fix C-a / C-e nav functions and keyboard shortcuts
This commit is contained in:
parent
75ab209b53
commit
e5d0f68dc4
|
@ -197,8 +197,8 @@
|
||||||
(global-set-key (kbd "C-o") 'helm-find-files)
|
(global-set-key (kbd "C-o") 'helm-find-files)
|
||||||
(global-set-key (kbd "C-k") 'kmn/dired-default-directory-on-left)
|
(global-set-key (kbd "C-k") 'kmn/dired-default-directory-on-left)
|
||||||
(global-set-key (kbd "M-a") 'mark-whole-buffer)
|
(global-set-key (kbd "M-a") 'mark-whole-buffer)
|
||||||
(global-set-key (kbd "C-a") 'kmn/my--smart-beginning-of-line)
|
(global-set-key (kbd "C-a") 'kmn/smart-beginning-of-line)
|
||||||
(global-set-key (kbd "C-e") 'knn/my--smart-end-of-line)
|
(global-set-key (kbd "C-e") 'kmn/smart-end-of-line)
|
||||||
(global-set-key (kbd "C-c w")
|
(global-set-key (kbd "C-c w")
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
"Move point to `beginning-of-line'. If repeat command it cycle
|
"Move point to `beginning-of-line'. If repeat command it cycle
|
||||||
position between `back-to-indentation' and `beginning-of-line'."
|
position between `back-to-indentation' and `beginning-of-line'."
|
||||||
(interactive "^")
|
(interactive "^")
|
||||||
(if (eq last-command 'my--smart-beginning-of-line)
|
(if (eq last-command 'smart-beginning-of-line)
|
||||||
(if (= (line-beginning-position) (point))
|
(if (= (line-beginning-position) (point))
|
||||||
(back-to-indentation)
|
(back-to-indentation)
|
||||||
(beginning-of-line))
|
(beginning-of-line))
|
||||||
|
@ -66,7 +66,7 @@ position between `back-to-indentation' and `beginning-of-line'."
|
||||||
"Move point to `end-of-line'. If repeat command it cycle
|
"Move point to `end-of-line'. If repeat command it cycle
|
||||||
position between last non-whitespace and `end-of-line'."
|
position between last non-whitespace and `end-of-line'."
|
||||||
(interactive "^")
|
(interactive "^")
|
||||||
(if (and (eq last-command 'kmn/my--smart-end-of-line)
|
(if (and (eq last-command 'kmn/smart-end-of-line)
|
||||||
(= (line-end-position) (point)))
|
(= (line-end-position) (point)))
|
||||||
(skip-syntax-backward " " (line-beginning-position))
|
(skip-syntax-backward " " (line-beginning-position))
|
||||||
(end-of-line)))
|
(end-of-line)))
|
||||||
|
|
Reference in a new issue