Fully working mwim config
- Enable in org-mode and visual-line-mode - Configure visual line stops as first options
This commit is contained in:
@@ -3,12 +3,29 @@
|
|||||||
(use-package mwim
|
(use-package mwim
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind (([remap move-beginning-of-line] . mwim-beginning)
|
:bind (([remap move-beginning-of-line] . mwim-beginning)
|
||||||
([remap move-end-of-line] . mwim-end))
|
([remap move-end-of-line] . mwim-end)
|
||||||
|
:map visual-line-mode-map
|
||||||
|
("C-a" . mwim-beginning)
|
||||||
|
("C-e" . mwim-end))
|
||||||
|
:init
|
||||||
|
(defun mwim-visual-line-end ()
|
||||||
|
(mwim-point-at
|
||||||
|
(end-of-visual-line)))
|
||||||
|
(defun mwim-visual-line-beginning ()
|
||||||
|
(mwim-point-at
|
||||||
|
(beginning-of-visual-line)))
|
||||||
:custom
|
:custom
|
||||||
(mwim-beginning-position-functions
|
(mwim-beginning-position-functions
|
||||||
'(mwim-line-beginning
|
'(mwim-visual-line-beginning
|
||||||
|
mwim-line-beginning
|
||||||
mwim-code-beginning
|
mwim-code-beginning
|
||||||
mwim-comment-beginning)))
|
mwim-comment-beginning))
|
||||||
|
(mwim-end-position-functions
|
||||||
|
'(mwim-visual-line-end
|
||||||
|
mwim-block-end
|
||||||
|
mwim-code-end
|
||||||
|
mwim-line-end)))
|
||||||
|
|
||||||
|
|
||||||
;; Allow movement during isearch
|
;; Allow movement during isearch
|
||||||
;; C/M-v move to next/previous match not currently visible
|
;; C/M-v move to next/previous match not currently visible
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
:bind (("C-c o ," . thoom/org-clear-all)
|
:bind (("C-c o ," . thoom/org-clear-all)
|
||||||
("C-c o s" . org-screenshot)
|
("C-c o s" . org-screenshot)
|
||||||
("C-c SPC" . org-table-blank-field)
|
("C-c SPC" . org-table-blank-field)
|
||||||
;; Unbind to make room for avy
|
;; Unbind to make room for avy and mwim
|
||||||
:map org-mode-map
|
:map org-mode-map
|
||||||
("C-j" . nil))
|
("C-j" . nil)
|
||||||
|
("C-a" . mwim-beginning)
|
||||||
|
("C-e" . mwim-end))
|
||||||
:hook ((org-mode . visual-line-mode))
|
:hook ((org-mode . visual-line-mode))
|
||||||
:custom
|
:custom
|
||||||
(org-special-ctrl-a/e 'reversed)
|
(org-special-ctrl-a/e 'reversed)
|
||||||
|
|||||||
Reference in New Issue
Block a user