Implement move-to-beginning/end-of line for Org-mode

This commit is contained in:
Gergely Polonkai 2016-11-15 22:07:39 +01:00
parent b48f918bdd
commit 5e6aae007d
2 changed files with 10 additions and 2 deletions

View File

@ -345,7 +345,9 @@
("c" . org-capture)
:map org-mode-map
("SPC" . org-space-key)
("C-c l" . org-toggle-link-display)))
("C-c l" . org-toggle-link-display)
("C-a" . gpolonkai/move-to-beginning-of-line)
("C-e" . gpolonkai/move-to-end-of-line)))
(use-package org-bullets
:ensure t

View File

@ -145,6 +145,9 @@ http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-l
(back-to-indentation))
(when (= (point) last-pos)
(beginning-of-line))
(when (and (eq major-mode 'org-mode)
(= (point) last-pos))
(org-beginning-of-line))
(when (= (point) last-pos)
(back-to-indentation))))
@ -157,4 +160,7 @@ http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-l
(when visual-line-mode
(end-of-visual-line))
(when (= (point) last-pos)
(end-of-line))))
(end-of-line))
(when (and (eq major-mode 'org-mode)
(= (point) last-pos))
(org-end-of-line))))