From 028ebe900329c5bccb5bee445bcee25aec892424 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 19 Dec 2018 11:07:00 +1300 Subject: Add sh.vim mapping to insert '\'' quickly This was added as a Bash Readline macro in commit 25b513d, and has proven to be very useful. I don't normally like insert mode maps in Vim, especially Alt keys, so I'm not sure this will stick; we'll see. --- vim/after/ftplugin/sh.vim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vim/after/ftplugin') diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index 6ee016a5..d6716a3d 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -45,3 +45,12 @@ nnoremap l \ :compiler shellcheck let b:undo_ftplugin .= '|nunmap c' \ . '|nunmap l' + +" Mapping to insert '\'' with Alt+'; not sure I'll keep this just yet +if has('gui_running') + inoremap '\'' + let b:undo_ftplugin .= '|nunmap ' +else + inoremap ' '\'' + let b:undo_ftplugin .= '|nunmap ''' +endif -- cgit v1.2.3