diff options
Diffstat (limited to 'emacs/init.org')
-rw-r--r-- | emacs/init.org | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/emacs/init.org b/emacs/init.org index 6605dcd..ad3a5ad 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -1355,6 +1355,40 @@ (add-hook 'python-mode-hook 'oni:local-set-smartparens-hook) #+END_SRC +* Load slime-helper to work with slime :slime: + + The slime helper is necessary to work with slime. It gets installed + by quicklisp. + + #+BEGIN_SRC emacs-lisp + (load (expand-file-name "~/.local/share/quicklisp/slime-helper.el")) + #+END_SRC + +* Smarter move-beginning-of-line :navigation: + + This snippet has been in my Emacs setup for a while, but seeing + [[http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/][bbatsov]] talk about it prompted me to take over one of his tweaks: I + used =beginning-of-line= whereas he uses =move-beginning-of-line=. I've + also grabbed the example of the remap key binding from him. + + This function moves to the first non-whitespace character on the + line, or if you're already there it jumps to the first (whitespace + or otherwise) character on the line. Subsequent calls toggle + between the two locations. + + #+BEGIN_SRC emacs-lisp + (defun oni:move-beginning-of-dwim () + "Move to beginning of line either after indentation or before." + (interactive) + (let ((start (point))) + (back-to-indentation) + (if (= start (point)) + (move-beginning-of-line 1)))) + + (global-set-key [remap move-beginning-of-line] + 'oni:move-beginning-of-dwim) + #+END_SRC + * All the rest This still needs to be sorted out and documented, haven't had time @@ -1438,7 +1472,6 @@ (global-set-key (kbd "C-M-d") 'kill-word) (global-set-key (kbd "C-M-w") 'backward-kill-word) (global-set-key (kbd "C-S-k") 'kill-whole-line) - (global-set-key (kbd "C-a") 'oni:move-beginning-of-dwim) (global-set-key (kbd "C-c a") 'org-agenda) (global-set-key (kbd "C-c c") 'org-capture) (global-set-key (kbd "C-c i p") 'identica-update-status-interactive) @@ -1595,5 +1628,4 @@ ;;; Finally, load any `customize' settings and slime. (load custom-file) - (load (expand-file-name "~/quicklisp/slime-helper.el")) #+END_SRC |