Updated the shit
This commit is contained in:
parent
66d5c1f60b
commit
288d81be1b
1 changed files with 680 additions and 569 deletions
577
config.org
577
config.org
|
@ -3,46 +3,46 @@
|
||||||
|
|
||||||
* qorg's Emacs config
|
* qorg's Emacs config
|
||||||
|
|
||||||
This is my Emacs configuration. Hope you like it.
|
This is my Emacs configuration. Hope you like it.
|
||||||
|
|
||||||
** Installation
|
** Installation
|
||||||
Just copy this repository to your .emacs.d. Nothing else is needed.
|
Just copy this repository to your .emacs.d. Nothing else is needed.
|
||||||
* Why?
|
* Why?
|
||||||
- I can
|
- I can
|
||||||
- I don't like doom emacs
|
- I don't like doom emacs
|
||||||
- I don't like spacemacs
|
- I don't like spacemacs
|
||||||
- I don't want to learn doom emacs
|
- I don't want to learn doom emacs
|
||||||
- I don't want to learn spacemacs
|
- I don't want to learn spacemacs
|
||||||
- I don't like Vim
|
- I don't like Vim
|
||||||
** About me
|
** About me
|
||||||
Here I set variables about personal information i'll use later in
|
Here I set variables about personal information i'll use later in
|
||||||
this config.
|
this config.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq name "qorg11")
|
(setq name "qorg11")
|
||||||
(setq email "qorg@vxempire.xyz")
|
(setq email "qorg@vxempire.xyz")
|
||||||
(setq website "qorg11.net")
|
(setq website "qorg11.net")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Dependencies
|
** Dependencies
|
||||||
The only no emacs related dependence in this configuration is the
|
The only no emacs related dependence in this configuration is the
|
||||||
IBM Plex Mono font. Install it from your distribution packages.
|
IBM Plex Mono font. Install it from your distribution packages.
|
||||||
You can change it before opening Emacs with this configuration for
|
You can change it before opening Emacs with this configuration for
|
||||||
the first time.
|
the first time.
|
||||||
|
|
||||||
For irony-mode (C autocompletion) irony-sever must be
|
For irony-mode (C autocompletion) irony-sever must be
|
||||||
installed. You can install it with M-x irony-install-server or via
|
installed. You can install it with M-x irony-install-server or via
|
||||||
distribution's packages, in Debian case, apt install irony-server.
|
distribution's packages, in Debian case, apt install irony-server.
|
||||||
Using M-x irony-install-server requires cmake and a lot of
|
Using M-x irony-install-server requires cmake and a lot of
|
||||||
dependences I'm to lazy to install.
|
dependences I'm to lazy to install.
|
||||||
|
|
||||||
** Configuration
|
** Configuration
|
||||||
Yeah, this configuration file has a configuration, ironic ha?
|
Yeah, this configuration file has a configuration, ironic ha?
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq i-just-use-emacs-to-be-cool nil) ;; Repleace to true to use EVIL
|
(setq i-just-use-emacs-to-be-cool nil) ;; Repleace to true to use EVIL
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* gc
|
* gc
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; Minimize garbage collection during startup
|
;; Minimize garbage collection during startup
|
||||||
(setq gc-cons-threshold most-positive-fixnum)
|
(setq gc-cons-threshold most-positive-fixnum)
|
||||||
|
|
||||||
|
@ -50,11 +50,11 @@ Yeah, this configuration file has a configuration, ironic ha?
|
||||||
(add-hook 'emacs-startup-hook
|
(add-hook 'emacs-startup-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(setq gc-cons-threshold (expt 2 23))))
|
(setq gc-cons-threshold (expt 2 23))))
|
||||||
#+end_src
|
#+end_src
|
||||||
* melpa crap, and basic packages installation
|
* melpa crap, and basic packages installation
|
||||||
melpa, where you get the packages. This also installs use-package,
|
melpa, where you get the packages. This also installs use-package,
|
||||||
and other packages I use.
|
and other packages I use.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(require 'package)
|
(require 'package)
|
||||||
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
||||||
(not (gnutls-available-p))))
|
(not (gnutls-available-p))))
|
||||||
|
@ -71,12 +71,12 @@ and other packages I use.
|
||||||
(unless (package-installed-p 'use-package)
|
(unless (package-installed-p 'use-package)
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(package-install 'use-package))
|
(package-install 'use-package))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Generic packages
|
** Generic packages
|
||||||
Here I install some packages that don't need configuration.
|
Here I install some packages that don't need configuration.
|
||||||
Remember to run M-x all-the-icons-install-fonts after the first
|
Remember to run M-x all-the-icons-install-fonts after the first
|
||||||
init to install the fonts.
|
init to install the fonts.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC elisp
|
||||||
|
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:defer 1
|
:defer 1
|
||||||
|
@ -88,10 +88,10 @@ init to install the fonts.
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
:ensure t
|
:ensure t
|
||||||
:init (which-key-mode))
|
:init (which-key-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Autoindentation
|
* Autoindentation
|
||||||
C-c n for indent-buffer. I don't use the rest.
|
C-c n for indent-buffer. I don't use the rest.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq-default tab-width 5)
|
(setq-default tab-width 5)
|
||||||
(defvaralias 'sgml-basic-offset 'tab-width)
|
(defvaralias 'sgml-basic-offset 'tab-width)
|
||||||
(add-hook 'html-mode-hook
|
(add-hook 'html-mode-hook
|
||||||
|
@ -104,18 +104,18 @@ C-c n for indent-buffer. I don't use the rest.
|
||||||
(global-set-key (kbd "C-c n") 'indent-buffer)
|
(global-set-key (kbd "C-c n") 'indent-buffer)
|
||||||
;; C bullshit
|
;; C bullshit
|
||||||
(c-set-offset 'arglist-cont-nonempty '+)
|
(c-set-offset 'arglist-cont-nonempty '+)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Shorcuts
|
* Shorcuts
|
||||||
Probably this overwrites another keybinding. But since I overwrited
|
Probably this overwrites another keybinding. But since I overwrited
|
||||||
it. I don't think i'd ever use the overwritten.
|
it. I don't think i'd ever use the overwritten.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(global-set-key (kbd "M-m") 'mark-whole-buffer)
|
(global-set-key (kbd "M-m") 'mark-whole-buffer)
|
||||||
(global-set-key (kbd "C-c m") 'man)
|
(global-set-key (kbd "C-c m") 'man)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* No idea
|
* No idea
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq package-enable-at-startup nil) (package-initialize)
|
(setq package-enable-at-startup nil) (package-initialize)
|
||||||
(setq make-backup-files nil) ; stop creating backup~ files
|
(setq make-backup-files nil) ; stop creating backup~ files
|
||||||
(setq auto-save-default nil) ; stop creating #autosave# files
|
(setq auto-save-default nil) ; stop creating #autosave# files
|
||||||
|
@ -131,12 +131,41 @@ it. I don't think i'd ever use the overwritten.
|
||||||
(use-package zencoding-mode
|
(use-package zencoding-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer 1)
|
:defer 1)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
* My functions
|
||||||
|
Functions I wrote because emacs lisp is cool and useful.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun qorg/goto-previous-buffer ()
|
||||||
|
"Switch to the previous buffer."
|
||||||
|
(interactive)
|
||||||
|
(switch-to-buffer (other-buffer)))
|
||||||
|
|
||||||
|
(defun kill-inner-word ()
|
||||||
|
"Unlike (kill-word) function, this function actually kill a world."
|
||||||
|
(interactive)
|
||||||
|
(forward-char 1)
|
||||||
|
(backward-word)
|
||||||
|
(kill-word 1))
|
||||||
|
(defun qorg/no-lines()
|
||||||
|
"Locally disable number line mode, useful hooks."
|
||||||
|
(display-line-numbers-mode -1))
|
||||||
|
|
||||||
|
(defun qorg/git-pushall ()
|
||||||
|
"Call the git pushall shell command."
|
||||||
|
(interactive)
|
||||||
|
(shell-command "git pushall"))
|
||||||
|
|
||||||
|
(defun qorg/goto-dashboard ()
|
||||||
|
"Goes to the dashboard buffer"
|
||||||
|
(interactive)
|
||||||
|
(switch-to-buffer "*dashboard*")
|
||||||
|
(dashboard-mode))
|
||||||
|
#+end_src
|
||||||
* Programs
|
* Programs
|
||||||
Emacs customization, Here is where most of the configuration is.
|
Emacs customization, Here is where most of the configuration is.
|
||||||
** Pseudopersonalization
|
** Pseudopersonalization
|
||||||
The basic emacs persdonalization lol
|
The basic emacs persdonalization lol
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(global-hl-line-mode)
|
(global-hl-line-mode)
|
||||||
|
@ -146,13 +175,13 @@ The basic emacs persdonalization lol
|
||||||
(setq-default major-mode 'text-mode)
|
(setq-default major-mode 'text-mode)
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
;; Are you experienced?
|
;; Are you experienced?
|
||||||
(set-cursor-color "purple")
|
|
||||||
(set-face-background 'line-number nil)
|
(set-face-background 'line-number nil)
|
||||||
(set-face-background 'line-number-current-line nil)
|
(set-face-background 'line-number-current-line nil)
|
||||||
(setq-default Man-notify-method 'pushy)
|
(setq-default Man-notify-method 'pushy)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Highlight matching parentheses
|
** Highlight matching parentheses
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(show-paren-mode 1)
|
(show-paren-mode 1)
|
||||||
(setq show-paren-style 'mixed)
|
(setq show-paren-style 'mixed)
|
||||||
|
|
||||||
|
@ -160,65 +189,66 @@ The basic emacs persdonalization lol
|
||||||
(setq gc-cons-threshold most-positive-fixnum)
|
(setq gc-cons-threshold most-positive-fixnum)
|
||||||
(defun startup/reset-gc () (setq gc-cons-threshold startup/gc-cons-threshold))
|
(defun startup/reset-gc () (setq gc-cons-threshold startup/gc-cons-threshold))
|
||||||
(add-hook 'emacs-startup-hook 'startup/reset-gc)
|
(add-hook 'emacs-startup-hook 'startup/reset-gc)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Tramp mode shit
|
** Tramp mode shit
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(set-variable 'tramp-copy-size-limit 122222222222)
|
(set-variable 'tramp-copy-size-limit 122222222222)
|
||||||
(set-variable 'tramp-inline-compress-start-size 12222222222222)
|
(set-variable 'tramp-inline-compress-start-size 12222222222222)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Lines and columns
|
** Lines and columns
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(global-display-line-numbers-mode 1)
|
(global-display-line-numbers-mode 1)
|
||||||
(setq display-line-numbers-type 'relative)
|
(setq display-line-numbers-type 'relative)
|
||||||
(column-number-mode 1)
|
(column-number-mode 1)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Flycheck
|
** Flycheck
|
||||||
Flycheck is a syntax validator or somehting like that
|
Flycheck is a syntax validator or somehting like that
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package flycheck
|
(use-package flycheck
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(add-hook 'after-init-hook #'global-flycheck-mode))
|
(add-hook 'after-init-hook #'global-flycheck-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
And for raku
|
And for raku
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package flycheck-raku
|
(use-package flycheck-raku
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(add-hook 'raku-mode 'flycheck-raku-mode))
|
(add-hook 'raku-mode 'flycheck-raku-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Terminal
|
** Terminal
|
||||||
vterm is better than ansi-term and shit, despite it's kinda slow,
|
vterm is better than ansi-term and shit, despite it's kinda slow,
|
||||||
it's a price i'm willing to pay.
|
it's a price i'm willing to pay.
|
||||||
|
|
||||||
It should use your default shell by default.
|
It should use your default shell by default.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package "vterm"
|
(use-package "vterm"
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind("C-x t" . vterm))
|
:bind("C-x C-t" . vterm))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Theme
|
** Theme
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package base16-theme
|
(use-package base16-theme
|
||||||
:ensure t
|
:ensure t
|
||||||
:init(load-theme 'base16-harmonic-dark t))
|
:init(load-theme 'base16-harmonic-dark t))
|
||||||
(set-face-attribute 'default nil :font "IBM Plex Mono 12")
|
(set-face-attribute 'default nil :font "IBM Plex Mono 12")
|
||||||
(set-frame-font "Inconsolata 14")
|
(set-frame-font "Source Code Pro 12")
|
||||||
#+end_src
|
(set-cursor-color "purple")
|
||||||
|
#+end_src
|
||||||
** ctrlf
|
** ctrlf
|
||||||
So, you know, C-s in emacs sucks, so this is a repleacement for that.
|
So, you know, C-s in emacs sucks, so this is a repleacement for that.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package ctrlf
|
(use-package ctrlf
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer 1
|
:defer 1
|
||||||
:init
|
:init
|
||||||
(ctrlf-mode +1))
|
(ctrlf-mode +1))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Company and Irony
|
** Company and Irony
|
||||||
Some shit for autocompletion and that kind of shit.
|
Some shit for autocompletion and that kind of shit.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package company
|
(use-package company
|
||||||
:defer 1
|
:defer 1
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -247,12 +277,12 @@ Some shit for autocompletion and that kind of shit.
|
||||||
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))
|
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))
|
||||||
(with-eval-after-load 'company
|
(with-eval-after-load 'company
|
||||||
(add-hook 'c-mode-hook 'company-mode))
|
(add-hook 'c-mode-hook 'company-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Programming language things
|
** Programming language things
|
||||||
*** Lisp
|
*** Lisp
|
||||||
Parentheses highlight in lisp modes. So you can easily identify
|
Parentheses highlight in lisp modes. So you can easily identify
|
||||||
them.
|
them.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
@ -261,62 +291,41 @@ them.
|
||||||
(add-hook 'scheme-mode-hook 'rainbow-delimiters-mode))
|
(add-hook 'scheme-mode-hook 'rainbow-delimiters-mode))
|
||||||
|
|
||||||
(setq lisp-indent-offset 5)
|
(setq lisp-indent-offset 5)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** Perl
|
*** Perl
|
||||||
Cperl-mode is better than perl-mode. You can't change my mind.
|
Cperl-mode is better than perl-mode. You can't change my mind.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defalias 'perl-mode 'cperl-mode)
|
(defalias 'perl-mode 'cperl-mode)
|
||||||
(setq cperl-indent-level 5)
|
(setq cperl-indent-level 5)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** C*
|
*** C*
|
||||||
This use c-eldoc mode so it prints the function's prototype in the
|
This use c-eldoc mode so it prints the function's prototype in the
|
||||||
minibuffer. Which is very useful since Irony works when it wants
|
minibuffer. Which is very useful since Irony works when it wants
|
||||||
to.
|
to.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package c-eldoc
|
(use-package c-eldoc
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(add-hook 'c-mode-hook 'c-turn-on-eldoc-mode))
|
(add-hook 'c-mode-hook 'c-turn-on-eldoc-mode))
|
||||||
(setq c-default-style "k&r")
|
(setq c-default-style "k&r")
|
||||||
(add-hook 'c-mode-hook '(lambda ()
|
(add-hook 'c-mode-hook (lambda ()
|
||||||
(lsp 1)
|
"" ""
|
||||||
(flycheck-select-checker 'c/c++-clang)))
|
(lsp)
|
||||||
(setq c-mode-hook nil)
|
(irony-mode -1)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** Raku
|
*** Raku
|
||||||
Raku, the cornerstone of any well designed programming language.
|
Raku, the cornerstone of any well designed programming language.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq raku-indent-offset 5)
|
(setq raku-indent-offset 5)
|
||||||
(setq raku-exec-path "/home/qorg/rakudo-star-2021.04/bin/raku")
|
(setq raku-exec-path "/home/qorg/rakudo-star-2021.04/bin/raku")
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Web shit
|
*** Now for indent shit, so it matches the tabsize
|
||||||
Web programming and its consequences have been a disaster for the
|
#+begin_src emacs-lisp
|
||||||
human race, but it's a necessary evil these days. So here's a little
|
|
||||||
configuration for web-mode. Which is an improved shit for editing html documents.
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package web-mode
|
|
||||||
:ensure t
|
|
||||||
:init
|
|
||||||
(setq web-mode-markup-indent-offset 5)
|
|
||||||
(setq web-mode-indent-style nil)
|
|
||||||
(setq web-mode-css-indent-offset 5)
|
|
||||||
(setq web-mode-code-indent-offset 5)
|
|
||||||
(add-to-list 'web-mode-indentation-params '("lineup-args" . nil))
|
|
||||||
(add-to-list 'web-mode-indentation-params '("lineup-calls" . nil))
|
|
||||||
(add-to-list 'web-mode-indentation-params '("lineup-concats" . nil))
|
|
||||||
(add-to-list 'web-mode-indentation-params '("lineup-ternary" . nil))
|
|
||||||
(setq web-mode-enable-current-element-highlight t)
|
|
||||||
(set-face-attribute 'web-mode-html-tag-face nil :foreground "Green3")
|
|
||||||
(set-face-attribute 'web-mode-html-attr-value-face nil :foreground "Orange4")
|
|
||||||
(set-face-attribute 'web-mode-html-attr-name-face nil :foreground "Yellow4"))
|
|
||||||
#+end_src
|
|
||||||
Now for indent shit, so it matches the tabsize
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq css-indent-offset 5)
|
(setq css-indent-offset 5)
|
||||||
(setq sgml-basic-offset 5)
|
(setq sgml-basic-offset 5)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** org
|
*** org
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq org-ellipsis " ")
|
(setq org-ellipsis " ")
|
||||||
(setq org-src-fontify-natively t)
|
(setq org-src-fontify-natively t)
|
||||||
(setq org-src-tab-acts-natively t)
|
(setq org-src-tab-acts-natively t)
|
||||||
|
@ -324,48 +333,39 @@ Now for indent shit, so it matches the tabsize
|
||||||
(setq org-export-with-smart-quotes t)
|
(setq org-export-with-smart-quotes t)
|
||||||
(setq org-src-window-setup 'current-window)
|
(setq org-src-window-setup 'current-window)
|
||||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||||
(add-hook 'org-mode-hook 'no-lines)
|
(add-hook 'org-mode-hook 'qorg/no-lines)
|
||||||
;; Syntax highlighting in exports
|
;; Syntax highlighting in exports
|
||||||
(use-package htmlize
|
(use-package htmlize
|
||||||
:ensure t)
|
:ensure t)
|
||||||
#+end_src
|
#+end_src
|
||||||
**** Org-agenda
|
**** Org-agenda
|
||||||
>Le attention deficit destroyer
|
>Le attention deficit destroyer
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq org-agenda-files (quote ("~/Documentos/agenda.org")))
|
(setq org-agenda-files (quote ("~/Documentos/agenda.org")))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Extra functions
|
** Keybindings
|
||||||
Here I put functions I won't bother to document because they're so
|
Here I put functions I won't bother to document because they're so
|
||||||
simple.
|
simple.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun git-pushall ()
|
|
||||||
(interactive)
|
|
||||||
(shell-command "git pushall"))
|
|
||||||
(defun no-lines()
|
|
||||||
(display-line-numbers-mode -1))
|
|
||||||
(defun kill-inner-word ()
|
|
||||||
(interactive)
|
|
||||||
(forward-char 1)
|
|
||||||
(backward-word)
|
|
||||||
(kill-word 1))
|
|
||||||
(global-set-key (kbd "M-d") 'kill-inner-word)
|
(global-set-key (kbd "M-d") 'kill-inner-word)
|
||||||
(global-set-key (kbd "M-.") 'repeat)
|
(global-set-key (kbd "M-.") 'repeat)
|
||||||
(global-set-key (kbd "C-x k") 'kill-buffer)
|
(global-set-key (kbd "C-x k") 'kill-buffer)
|
||||||
(global-set-key (kbd "C-x C-k") 'kill-current-buffer)
|
(global-set-key (kbd "C-x C-k") 'kill-current-buffer)
|
||||||
(global-set-key (kbd "C-k") 'kill-line)
|
(global-unset-key (kbd "C-x C-b"))
|
||||||
#+END_SRC
|
(global-set-key (kbd "C-x C-b") 'qorg/goto-previous-buffer)
|
||||||
|
#+END_SRC
|
||||||
** Hunspell
|
** Hunspell
|
||||||
For some reason, there is no ispell spanish in void linux. so i had
|
For some reason, there is no ispell spanish in void linux. so i had
|
||||||
to fallback to hunspell. which does the same.
|
to fallback to hunspell. which does the same.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defvar ispell-program-name "hunspell") ;; Or whatever you use
|
(defvar ispell-program-name "hunspell") ;; Or whatever you use
|
||||||
;; (ispell, aspell...)
|
;; (ispell, aspell...)
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Dired
|
** Dired
|
||||||
Ahhh, the emacs file browser, better than ranger and others...
|
Ahhh, the emacs file browser, better than ranger and others...
|
||||||
Hide dotfiles:
|
Hide dotfiles:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
||||||
(use-package dired-hide-dotfiles
|
(use-package dired-hide-dotfiles
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -385,39 +385,39 @@ Hide dotfiles:
|
||||||
(add-hook 'dired-mode-hook
|
(add-hook 'dired-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(dired-hide-details-mode)))
|
(dired-hide-details-mode)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
Now let's make the thing lysergic
|
Now let's make the thing lysergic
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(set-face-foreground dired-directory-face "orange")
|
(set-face-foreground dired-directory-face "orange")
|
||||||
(set-face-foreground dired-symlink-face "cyan")
|
(set-face-foreground dired-symlink-face "cyan")
|
||||||
(set-face-foreground dired-mark-face "green")
|
(set-face-foreground dired-mark-face "green")
|
||||||
(set-face-foreground dired-marked-face "blue")
|
(set-face-foreground dired-marked-face "blue")
|
||||||
#+end_src
|
#+end_src
|
||||||
** kill ring popup
|
** kill ring popup
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package popup-kill-ring
|
(use-package popup-kill-ring
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind ("M-y" . popup-kill-ring))
|
:bind ("M-y" . popup-kill-ring))
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** scrolling
|
** scrolling
|
||||||
Scroll by lines rather than by pages.
|
Scroll by lines rather than by pages.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq scroll-step 1)
|
(setq scroll-step 1)
|
||||||
(setq scroll-conservatively 10000)
|
(setq scroll-conservatively 10000)
|
||||||
(setq auto-window-vscroll nil)
|
(setq auto-window-vscroll nil)
|
||||||
(scroll-bar-mode 1)
|
(scroll-bar-mode 1)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Sidebar
|
** Sidebar
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package dired-sidebar
|
(use-package dired-sidebar
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands (dired-sidebar-toggle-sidebar))
|
:commands (dired-sidebar-toggle-sidebar))
|
||||||
(global-set-key (kbd "<f7>") 'dired-sidebar-toggle-sidebar)
|
(global-set-key (kbd "<f7>") 'dired-sidebar-toggle-sidebar)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Shell
|
** Shell
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-hook 'shell-mode-hook 'yas-minor-mode)
|
(add-hook 'shell-mode-hook 'yas-minor-mode)
|
||||||
(add-hook 'shell-mode-hook 'flycheck-mode)
|
(add-hook 'shell-mode-hook 'flycheck-mode)
|
||||||
(add-hook 'shell-mode-hook 'company-mode)
|
(add-hook 'shell-mode-hook 'company-mode)
|
||||||
|
@ -433,149 +433,266 @@ Scroll by lines rather than by pages.
|
||||||
:config
|
:config
|
||||||
(require 'company)
|
(require 'company)
|
||||||
(add-hook 'shell-mode-hook 'shell-mode-company-init))
|
(add-hook 'shell-mode-hook 'shell-mode-company-init))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Mark multiple
|
** Mark multiple
|
||||||
Multiple cursors :DD
|
Multiple cursors :DD
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "multiple-cursors"
|
(use-package "multiple-cursors"
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind ("C-c q" . 'mc/mark-next-like-this))
|
:bind ("C-c q" . 'mc/mark-next-like-this))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Highlight indent guides
|
** Highlight indent guides
|
||||||
I don't really know, it looks cool.
|
I don't really know, it looks cool.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "highlight-indent-guides"
|
(use-package "highlight-indent-guides"
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer
|
:defer
|
||||||
:init (add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
|
:init (add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
|
||||||
(setq highlight-indent-guides-method 'bitmap))
|
(setq highlight-indent-guides-method 'bitmap))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Ace jump mode
|
** Ace jump mode
|
||||||
So you can jump to characters fast af
|
So you can jump to characters fast af
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "ace-jump-mode"
|
(use-package "ace-jump-mode"
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind("C-l" . 'ace-jump-mode))
|
:bind("C-l" . 'ace-jump-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
And same but jumping between frames
|
And same but jumping between frames
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "ace-window"
|
(use-package "ace-window"
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind("M-l" . 'ace-window)
|
:bind("M-l" . 'ace-window)
|
||||||
:bind("M-o" . 'ace-delete-window))
|
:bind("M-o" . 'ace-delete-window))
|
||||||
;; Gotta remove the bad habits
|
;; Gotta remove the bad habits
|
||||||
(global-unset-key (kbd "C-x o"))
|
(global-unset-key (kbd "C-x o"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Expand region
|
** Expand region
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package expand-region
|
(use-package expand-region
|
||||||
:ensure t
|
:ensure t
|
||||||
:init(global-unset-key (kbd "C-q"))
|
:init(global-unset-key (kbd "C-q"))
|
||||||
(global-set-key (kbd"C-q") 'er/expand-region))
|
(global-set-key (kbd"C-q") 'er/expand-region))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Beacon mode
|
** Beacon mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "beacon"
|
(use-package "beacon"
|
||||||
:ensure t
|
:ensure t
|
||||||
:init(beacon-mode 1))
|
:init(beacon-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
** LSP
|
** LSP
|
||||||
Le language server
|
Le language server
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "lsp-mode"
|
(use-package "lsp-mode"
|
||||||
:ensure t
|
:ensure t
|
||||||
)
|
)
|
||||||
(use-package "lsp-ui"
|
(use-package "lsp-ui"
|
||||||
:ensure t
|
:ensure t
|
||||||
:init(add-hook 'lsp-mode-hook 'lsp-ui-mode))
|
:init(add-hook 'lsp-mode-hook 'lsp-ui-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Workspaces
|
** Workspaces
|
||||||
I'm a tilling window manager user, so i know what i'm talking about.
|
I'm a tilling window manager user, so i know what i'm talking about.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "workgroups"
|
; (use-package "workgroups"
|
||||||
:ensure t
|
; :ensure t
|
||||||
:init(workgroups-mode))
|
; :init(workgroups-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Buffers
|
** Buffers
|
||||||
Well, you know sometimes you just want to change to the previous
|
Well, you know sometimes you just want to change to the previous
|
||||||
buffer and don't want a whole interface for just pressing enter.
|
buffer and don't want a whole interface for just pressing enter.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun switch-to-previous-buffer ()
|
(defun switch-to-previous-buffer ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(switch-to-buffer (other-buffer (current-buffer) 1)))
|
(switch-to-buffer (other-buffer (current-buffer) 1)))
|
||||||
|
|
||||||
(global-set-key (kbd "C-x C-b") 'switch-to-previous-buffer)
|
(global-set-key (kbd "C-x C-b") 'switch-to-previous-buffer)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Hooks
|
** Hooks
|
||||||
I am tired of =M-x auto-fill-mode= in some modes
|
I am tired of =M-x auto-fill-mode= in some modes
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-hook 'org-mode-hook 'auto-fill-mode)
|
(add-hook 'org-mode-hook 'auto-fill-mode)
|
||||||
(add-hook 'text-mode-hook 'auto-fill-mode)
|
(add-hook 'text-mode-hook 'auto-fill-mode)
|
||||||
(add-hook 'sgml-mode-hook 'auto-fill-mode)
|
(add-hook 'sgml-mode-hook 'auto-fill-mode)
|
||||||
(add-hook 'sgml-mode-hook 'zencoding-mode)
|
(add-hook 'sgml-mode-hook 'zencoding-mode)
|
||||||
(add-hook 'Man-mode-hook 'no-lines)
|
(add-hook 'Man-mode-hook 'no-lines)
|
||||||
(add-hook 'speedbar-mode-hook 'no-lines)
|
(add-hook 'speedbar-mode-hook 'no-lines)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Hungry delete
|
** Hungry delete
|
||||||
Having to delete multiple whitespaces is one of the things I hate,
|
Having to delete multiple whitespaces is one of the things I hate,
|
||||||
thankfully there's this thing.
|
thankfully there's this thing.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "hungry-delete"
|
(use-package "hungry-delete"
|
||||||
:ensure t
|
:ensure t
|
||||||
:init(global-hungry-delete-mode))
|
:init(global-hungry-delete-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Yasnippet
|
** Yasnippet
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "yasnippet"
|
(use-package "yasnippet"
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(use-package "yasnippet-snippets"
|
(use-package "yasnippet-snippets"
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
:init(yas-global-mode)
|
||||||
(yas-reload-all))
|
(yas-reload-all))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Org-mode customization
|
** Org-mode customization
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "org-bullets"
|
(use-package "org-bullets"
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(add-hook 'org-mode-hook 'org-bullets-mode))
|
(add-hook 'org-mode-hook 'org-bullets-mode))
|
||||||
(local-unset-key (kbd"C-c C-q"))
|
(local-unset-key (kbd"C-c C-q"))
|
||||||
#+end_src
|
#+end_src
|
||||||
** diff-hl
|
** diff-hl
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "diff-hl"
|
(use-package "diff-hl"
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(global-diff-hl-mode)
|
(global-diff-hl-mode)
|
||||||
(add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh)
|
(add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh)
|
||||||
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
|
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
|
||||||
#+end_src
|
#+end_src
|
||||||
** zzz-to-char
|
** zzz-to-char
|
||||||
It's like ace-whatever but for zapping characters.
|
It's like ace-whatever but for zapping characters.
|
||||||
=zap-to-char=
|
=zap-to-char=
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package zzz-to-char
|
(use-package zzz-to-char
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind("M-z" . 'zzz-up-to-char))
|
:bind("M-z" . 'zzz-up-to-char))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Helpful
|
** Helpful
|
||||||
Better \*help\* buffer
|
Better \*help\* buffer
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package helpful
|
(use-package helpful
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind ("C-h f". #'helpful-callable)
|
:bind ("C-h f". #'helpful-callable)
|
||||||
:bind ("C-h v". #'helpful-variable)
|
:bind ("C-h v". #'helpful-variable)
|
||||||
:bind ("C-h k". #'helpful-key))
|
:bind ("C-h k". #'helpful-key))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
** Treemacs
|
||||||
|
Le ebin sidebar
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package treemacs
|
||||||
|
:ensure t
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(with-eval-after-load 'winum
|
||||||
|
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
|
||||||
|
treemacs-deferred-git-apply-delay 0.5
|
||||||
|
treemacs-directory-name-transformer #'identity
|
||||||
|
treemacs-display-in-side-window t
|
||||||
|
treemacs-eldoc-display 'simple
|
||||||
|
treemacs-file-event-delay 5000
|
||||||
|
treemacs-file-extension-regex treemacs-last-period-regex-value
|
||||||
|
treemacs-file-follow-delay 0.2
|
||||||
|
treemacs-file-name-transformer #'identity
|
||||||
|
treemacs-follow-after-init t
|
||||||
|
treemacs-expand-after-init t
|
||||||
|
treemacs-find-workspace-method 'find-for-file-or-pick-first
|
||||||
|
treemacs-git-command-pipe ""
|
||||||
|
treemacs-goto-tag-strategy 'refetch-index
|
||||||
|
treemacs-indentation 2
|
||||||
|
treemacs-indentation-string " "
|
||||||
|
treemacs-is-never-other-window nil
|
||||||
|
treemacs-max-git-entries 5000
|
||||||
|
(use-package treemacs-evil
|
||||||
|
:after (treemacs evil)
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
treemacs-missing-project-action 'ask
|
||||||
|
treemacs-move-forward-on-expand nil
|
||||||
|
treemacs-no-png-images nil
|
||||||
|
treemacs-no-delete-other-windows t
|
||||||
|
treemacs-project-follow-cleanup nil
|
||||||
|
treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory)
|
||||||
|
treemacs-position 'left
|
||||||
|
treemacs-read-string-input 'from-child-frame
|
||||||
|
treemacs-recenter-distance 0.1
|
||||||
|
treemacs-recenter-after-file-follow nil
|
||||||
|
treemacs-recenter-after-tag-follow nil
|
||||||
|
treemacs-recenter-after-project-jump 'always
|
||||||
|
treemacs-recenter-after-project-expand 'on-distance
|
||||||
|
treemacs-litter-directories '("/node_modules" "/.venv" "/.cask")
|
||||||
|
treemacs-show-cursor nil
|
||||||
|
treemacs-show-hidden-files t
|
||||||
|
treemacs-silent-filewatch nil
|
||||||
|
treemacs-silent-refresh nil
|
||||||
|
treemacs-sorting 'alphabetic-asc
|
||||||
|
treemacs-select-when-already-in-treemacs 'move-back
|
||||||
|
treemacs-space-between-root-nodes t
|
||||||
|
treemacs-tag-follow-cleanup t
|
||||||
|
treemacs-tag-follow-delay 1.5
|
||||||
|
treemacs-text-scale nil
|
||||||
|
treemacs-user-mode-line-format nil
|
||||||
|
treemacs-user-header-line-format nil
|
||||||
|
treemacs-wide-toggle-width 70
|
||||||
|
treemacs-width 35
|
||||||
|
treemacs-width-increment 1
|
||||||
|
treemacs-width-is-initially-locked t
|
||||||
|
treemacs-workspace-switch-cleanup nil)
|
||||||
|
|
||||||
|
;; The default width and height of the icons is 22 pixels. If you are
|
||||||
|
;; using a Hi-DPI display, uncomment this to double the icon size.
|
||||||
|
;;(treemacs-resize-icons 44)
|
||||||
|
|
||||||
|
(treemacs-follow-mode t)
|
||||||
|
(treemacs-filewatch-mode t)
|
||||||
|
(treemacs-fringe-indicator-mode 'always)
|
||||||
|
|
||||||
|
(pcase (cons (not (null (executable-find "git")))
|
||||||
|
(not (null treemacs-python-executable)))
|
||||||
|
(`(t . t)
|
||||||
|
(treemacs-git-mode 'deferred))
|
||||||
|
(`(t . _)
|
||||||
|
(treemacs-git-mode 'simple)))
|
||||||
|
|
||||||
|
(treemacs-hide-gitignored-files-mode nil))
|
||||||
|
:bind
|
||||||
|
(:map global-map
|
||||||
|
("M-0" . treemacs-select-window)
|
||||||
|
("C-x t 1" . treemacs-delete-other-windows)
|
||||||
|
("C-x t t" . treemacs)
|
||||||
|
("C-x t d" . treemacs-select-directory)
|
||||||
|
("C-x t B" . treemacs-bookmark)
|
||||||
|
("C-x t C-t" . treemacs-find-file)
|
||||||
|
("C-x t M-t" . treemacs-find-tag)))
|
||||||
|
|
||||||
|
(use-package treemacs-projectile
|
||||||
|
:after (treemacs projectile)
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package treemacs-icons-dired
|
||||||
|
:hook (dired-mode . treemacs-icons-dired-enable-once)
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package treemacs-magit
|
||||||
|
:after (treemacs magit)
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package treemacs-tab-bar ;;treemacs-tab-bar if you use tab-bar-mode
|
||||||
|
:after (treemacs)
|
||||||
|
:ensure t
|
||||||
|
:config (treemacs-set-scope-type 'Tabs))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
** Projectile
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package projectile
|
||||||
|
:ensure t
|
||||||
|
:init(projectile-mode))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Helm
|
* Helm
|
||||||
fuck Ido lol
|
fuck Ido lol
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package helm
|
(use-package helm
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind
|
:bind
|
||||||
|
@ -602,11 +719,11 @@ fuck Ido lol
|
||||||
(helm-autoresize-mode 1)
|
(helm-autoresize-mode 1)
|
||||||
(define-key helm-find-files-map (kbd "C-b") 'helm-find-files-up-one-level)
|
(define-key helm-find-files-map (kbd "C-b") 'helm-find-files-up-one-level)
|
||||||
(define-key helm-find-files-map (kbd "C-f") 'helm-execute-persistent-action)
|
(define-key helm-find-files-map (kbd "C-f") 'helm-execute-persistent-action)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* CRUX
|
* CRUX
|
||||||
This thing add sane shortcuts for emacs
|
This thing add sane shortcuts for emacs
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "crux"
|
(use-package "crux"
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind("C-k" . 'crux-smart-kill-line)
|
:bind("C-k" . 'crux-smart-kill-line)
|
||||||
|
@ -616,25 +733,19 @@ This thing add sane shortcuts for emacs
|
||||||
:bind("C-x C-d" . 'crux-duplicate-current-line-or-region)
|
:bind("C-x C-d" . 'crux-duplicate-current-line-or-region)
|
||||||
:bind("C-c u" . 'crux-view-url)
|
:bind("C-c u" . 'crux-view-url)
|
||||||
:bind("C-c s" . 'crux-create-scratch-buffer))
|
:bind("C-c s" . 'crux-create-scratch-buffer))
|
||||||
#+end_src
|
#+end_src
|
||||||
* Dashboard
|
* Dashboard
|
||||||
The dashboard is a good index for your things. So it's useful to have
|
The dashboard is a good index for your things. So it's useful to have
|
||||||
it
|
it
|
||||||
|
|
||||||
Here is an useful function I wrote so you can go to the dashboard (Or
|
Here is an useful function I wrote so you can go to the dashboard (Or
|
||||||
create it in case you accidentally killed the buffer)
|
create it in case you accidentally killed the buffer)
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun goto-dashboard ()
|
(global-set-key (kbd "C-c C-d") 'qorg/goto-dashboard)
|
||||||
(interactive)
|
#+end_src
|
||||||
(switch-to-buffer "*dashboard*")
|
|
||||||
;; In case it doesn't exist.
|
|
||||||
(dashboard-mode))
|
|
||||||
|
|
||||||
(global-set-key (kbd "C-c C-d") 'goto-dashboard)
|
#+BEGIN_SRC emacs-lisp
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package dashboard
|
(use-package dashboard
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
@ -648,10 +759,10 @@ create it in case you accidentally killed the buffer)
|
||||||
(setq dashboard-startup-banner "~/.emacs.d/img/banner.png")
|
(setq dashboard-startup-banner "~/.emacs.d/img/banner.png")
|
||||||
(setq dashboard-set-heading-icons t)
|
(setq dashboard-set-heading-icons t)
|
||||||
(setq dashboard-set-file-icons t))
|
(setq dashboard-set-file-icons t))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Modeline
|
* Modeline
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "doom-modeline"
|
(use-package "doom-modeline"
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
|
@ -659,7 +770,7 @@ create it in case you accidentally killed the buffer)
|
||||||
(setq doom-modeline-indent-info t)
|
(setq doom-modeline-indent-info t)
|
||||||
(setq doom-modeline-buffer-encoding t)
|
(setq doom-modeline-buffer-encoding t)
|
||||||
:init (doom-modeline-mode 1))
|
:init (doom-modeline-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue