[Emacs] Evil visual line movement in markdown and org
Markdown and org files can contain long files that span several visual lines. Moving with `evil-next-line' and `evil-previous-line' is not exactly comfortable when that’s the case. `evil-next-visual-line' and `evil-previous-visual-line' come to the rescue!
This commit is contained in:
parent
4940ee4fd3
commit
e6ffd2aba2
@ -1085,6 +1085,39 @@ windows.
|
|||||||
("r" enlarge-window-horizontally))
|
("r" enlarge-window-horizontally))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
This one allows me to manipulate my Emacs frames’ background
|
||||||
|
transparency.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun my/increase-frame-alpha-background ()
|
||||||
|
"Increase current frame’s alpha background."
|
||||||
|
(interactive)
|
||||||
|
(set-frame-parameter nil
|
||||||
|
'alpha-background
|
||||||
|
(min 1.0
|
||||||
|
(+ (frame-parameter nil 'alpha-background) 0.1)))
|
||||||
|
(message "%s" (frame-parameter nil 'alpha-background)))
|
||||||
|
|
||||||
|
(defun my/decrease-frame-alpha-background ()
|
||||||
|
"Decrease current frame’s alpha background."
|
||||||
|
(interactive)
|
||||||
|
(set-frame-parameter nil
|
||||||
|
'alpha-background
|
||||||
|
(max 0.0
|
||||||
|
(- (frame-parameter nil 'alpha-background) 0.1)))
|
||||||
|
(message "%s" (frame-parameter nil 'alpha-background)))
|
||||||
|
|
||||||
|
(defhydra my/modify-frame-alpha-background ()
|
||||||
|
"
|
||||||
|
^Transparency^ ^Other^
|
||||||
|
^^^^^^^^^^^^^^------------------------
|
||||||
|
[_t_] increase transparency [_q_] quit
|
||||||
|
[_s_] decrease transparency
|
||||||
|
"
|
||||||
|
("q" nil :exit t)
|
||||||
|
("s" my/decrease-frame-alpha-background)
|
||||||
|
("t" my/increase-frame-alpha-background))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Packages Configuration
|
* Packages Configuration
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Packages-Configurationije0fl6184j0
|
:CUSTOM_ID: Packages-Configurationije0fl6184j0
|
||||||
@ -5100,7 +5133,7 @@ Be prepared, I have a lot of keybindings for org-mode! They are all
|
|||||||
prefixed with a comma ~,~ in normal mode.
|
prefixed with a comma ~,~ in normal mode.
|
||||||
#+name: org-keybinds-various
|
#+name: org-keybinds-various
|
||||||
| Key chord | Function | Description |
|
| Key chord | Function | Description |
|
||||||
|-----------+---------------------+-------------|
|
|-----------+---------------------------+-------------|
|
||||||
| RET | org-ctrl-c-ret | |
|
| RET | org-ctrl-c-ret | |
|
||||||
| * | org-ctrl-c-star | |
|
| * | org-ctrl-c-star | |
|
||||||
| , | org-ctrl-c-ctrl-c | |
|
| , | org-ctrl-c-ctrl-c | |
|
||||||
@ -5112,6 +5145,8 @@ prefixed with a comma ~,~ in normal mode.
|
|||||||
| l | org-store-link | |
|
| l | org-store-link | |
|
||||||
| p | org-priority | |
|
| p | org-priority | |
|
||||||
| r | org-reload | |
|
| r | org-reload | |
|
||||||
|
| t | evil-next-visual-line | |
|
||||||
|
| s | evil-previous-visual-line | |
|
||||||
|
|
||||||
I then have a couple of babel-related functions.
|
I then have a couple of babel-related functions.
|
||||||
#+name: org-keybinds-babel
|
#+name: org-keybinds-babel
|
||||||
@ -6358,12 +6393,14 @@ unfortunately.
|
|||||||
:general
|
:general
|
||||||
(phundrak/evil
|
(phundrak/evil
|
||||||
:keymaps 'markdown-mode-map
|
:keymaps 'markdown-mode-map
|
||||||
:packages 'markdown-mode
|
:packages '(markdown-mode evil)
|
||||||
"M-RET" #'markdown-insert-list-item
|
"M-RET" #'markdown-insert-list-item
|
||||||
"M-c" #'markdown-promote
|
"M-c" #'markdown-promote
|
||||||
"M-t" #'markdown-move-down
|
"M-t" #'markdown-move-down
|
||||||
"M-s" #'markdown-move-up
|
"M-s" #'markdown-move-up
|
||||||
"M-r" #'markdown-demote)
|
"M-r" #'markdown-demote
|
||||||
|
"t" #'evil-next-visual-line
|
||||||
|
"s" #'evil-previous-visual-line)
|
||||||
(phundrak/major-leader-key
|
(phundrak/major-leader-key
|
||||||
:keymaps 'markdown-mode-map
|
:keymaps 'markdown-mode-map
|
||||||
:packages 'markdown-mode
|
:packages 'markdown-mode
|
||||||
@ -8257,9 +8294,10 @@ The prefix here is ~T~.
|
|||||||
My toggle keybinds are prefixed by ~t~.
|
My toggle keybinds are prefixed by ~t~.
|
||||||
#+name: keybinds-toggle
|
#+name: keybinds-toggle
|
||||||
| Key | Function | Description |
|
| Key | Function | Description |
|
||||||
|-----+-----------------------+--------------|
|
|-----+---------------------------------------+--------------|
|
||||||
| | | toggles |
|
| | | toggles |
|
||||||
| t | counsel-load-theme | |
|
| t | my/modify-frame-alpha-background/body | |
|
||||||
|
| T | counsel-load-theme | |
|
||||||
| d | | debug |
|
| d | | debug |
|
||||||
| de | toggle-debug-on-error | |
|
| de | toggle-debug-on-error | |
|
||||||
| dq | toggle-debug-on-quit | |
|
| dq | toggle-debug-on-quit | |
|
||||||
|
Loading…
Reference in New Issue
Block a user