diff options
author | Tom Willemse | 2013-05-25 00:26:55 +0200 |
---|---|---|
committer | Tom Willemse | 2013-05-25 00:26:55 +0200 |
commit | d86ee42c09795fb7a278686cb6948623821555fb (patch) | |
tree | 051c523f6e552616bdd17a900f9d03cb53859bd9 /emacs/init.org | |
parent | 9e78bdae063356d41dd3dc6529a7d4d2acbb3cb6 (diff) | |
download | dotfiles-d86ee42c09795fb7a278686cb6948623821555fb.tar.gz dotfiles-d86ee42c09795fb7a278686cb6948623821555fb.zip |
Skip over characters following point
Diffstat (limited to 'emacs/init.org')
-rw-r--r-- | emacs/init.org | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/emacs/init.org b/emacs/init.org index 24df753..a91b41d 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -1389,6 +1389,21 @@ 'oni:move-beginning-of-dwim) #+END_SRC +* Skip equal characters + + When using, for example, =smartparens-mode= it can get confusing + which characters get overwritten when. Usually I'll want to skip + the character I type if it directly follows =point=. + + #+BEGIN_SRC emacs-lisp + (defadvice self-insert-command (around oni:skip-if-equal activate) + "Skip over a character if it immediately follows point." + (if (and (eq (char-after) last-command-event) + (not (memq last-command-event '(?\ ?\n)))) + (forward-char) + ad-do-it)) + #+END_SRC + * All the rest This still needs to be sorted out and documented, haven't had time |