projects
/
~bandali
/
configs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5b99021
)
Add convenience b/move-indentation-or-beginning-of-line, bind to C-a
author
Amin Bandali
<bandali@gnu.org>
Mon, 13 Apr 2020 16:15:22 +0000
(12:15 -0400)
committer
Amin Bandali
<bandali@gnu.org>
Mon, 13 Apr 2020 16:15:22 +0000
(12:15 -0400)
init.el
patch
|
blob
|
blame
|
history
diff --git
a/init.el
b/init.el
index
23158a1
..
e633282
100644
(file)
--- a/
init.el
+++ b/
init.el
@@
-239,6
+239,17
@@
For disabling the behaviour for certain buffers and/or modes."
(interactive)
(kill-buffer (current-buffer)))
(interactive)
(kill-buffer (current-buffer)))
+(defun b/move-indentation-or-beginning-of-line (arg)
+ "Move to the indentation or to the beginning of line."
+ (interactive "^p")
+ ;; (if (bolp)
+ ;; (back-to-indentation)
+ ;; (move-beginning-of-line arg))
+ (if (= (point)
+ (progn (back-to-indentation)
+ (point)))
+ (move-beginning-of-line arg)))
+
\f
;;; Defaults
\f
;;; Defaults
@@
-490,6
+501,7
@@
For disabling the behaviour for certain buffers and/or modes."
;;; General bindings
(bind-keys
;;; General bindings
(bind-keys
+ ("C-a" . b/move-indentation-or-beginning-of-line)
("C-c a i" . ielm)
("C-c e b" . eval-buffer)
("C-c a i" . ielm)
("C-c e b" . eval-buffer)