fix C-a / C-e nav functions and keyboard shortcuts

This commit is contained in:
KemoNine 2023-04-11 14:20:01 -04:00
parent 75ab209b53
commit e5d0f68dc4
2 changed files with 4 additions and 4 deletions

View File

@ -197,8 +197,8 @@
(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 "M-a") 'mark-whole-buffer)
(global-set-key (kbd "C-a") 'kmn/my--smart-beginning-of-line)
(global-set-key (kbd "C-e") 'knn/my--smart-end-of-line)
(global-set-key (kbd "C-a") 'kmn/smart-beginning-of-line)
(global-set-key (kbd "C-e") 'kmn/smart-end-of-line)
(global-set-key (kbd "C-c w")
(lambda ()
(interactive)

View File

@ -56,7 +56,7 @@
"Move point to `beginning-of-line'. If repeat command it cycle
position between `back-to-indentation' and `beginning-of-line'."
(interactive "^")
(if (eq last-command 'my--smart-beginning-of-line)
(if (eq last-command 'smart-beginning-of-line)
(if (= (line-beginning-position) (point))
(back-to-indentation)
(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
position between last non-whitespace and `end-of-line'."
(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)))
(skip-syntax-backward " " (line-beginning-position))
(end-of-line)))