emacs: bind `C-x w d' to trim-extra-space
This commit is contained in:
parent
3f97350549
commit
0d1f2570d1
1 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,6 @@
|
||||||
;; basic key binds
|
;; basic key binds
|
||||||
(global-set-key (kbd "C-`") 'other-window)
|
(global-set-key (kbd "C-`") 'other-window)
|
||||||
(global-set-key (kbd "C-x w c") 'whitespace-cleanup)
|
(global-set-key (kbd "C-x w c") 'whitespace-cleanup)
|
||||||
(global-set-key (kbd "C-x w d") 'delete-all-space)
|
|
||||||
(global-set-key (kbd "C-x w f") 'forward-whitespace)
|
(global-set-key (kbd "C-x w f") 'forward-whitespace)
|
||||||
(global-set-key (kbd "C-c c") 'compile)
|
(global-set-key (kbd "C-c c") 'compile)
|
||||||
(global-set-key (kbd "C-c r") 'recompile)
|
(global-set-key (kbd "C-c r") 'recompile)
|
||||||
|
@ -63,6 +62,10 @@ value `italic'."
|
||||||
(find-file custom-file)
|
(find-file custom-file)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(kill-current-buffer))
|
(kill-current-buffer))
|
||||||
|
(defun trim-extra-space ()
|
||||||
|
(interactive)
|
||||||
|
(delete-all-space)
|
||||||
|
(insert " "))
|
||||||
|
|
||||||
(add-hook 'after-change-major-mode-hook #'hide-minor-modes)
|
(add-hook 'after-change-major-mode-hook #'hide-minor-modes)
|
||||||
|
|
||||||
|
@ -72,6 +75,7 @@ value `italic'."
|
||||||
(defalias 'wc 'count-words)
|
(defalias 'wc 'count-words)
|
||||||
|
|
||||||
;; other key binds
|
;; other key binds
|
||||||
|
(global-set-key (kbd "C-x w d") 'trim-extra-space)
|
||||||
(global-set-key (kbd "C-c e b k") 'kill-all-buffers)
|
(global-set-key (kbd "C-c e b k") 'kill-all-buffers)
|
||||||
(global-set-key (kbd "C-c e i") 'edit-init-file)
|
(global-set-key (kbd "C-c e i") 'edit-init-file)
|
||||||
(global-set-key (kbd "C-c e r") 'reindent-buffer)
|
(global-set-key (kbd "C-c e r") 'reindent-buffer)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue