aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-19 11:07:00 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-19 11:07:00 +1300
commit028ebe900329c5bccb5bee445bcee25aec892424 (patch)
tree22ef0e03abd9c04437b78d3717efac0e00274640 /vim/after/ftplugin
parent57d39d92fad5418e96dd4d69d6e86a578c3764b4 (diff)
downloaddotfiles-028ebe900329c5bccb5bee445bcee25aec892424.tar.gz
dotfiles-028ebe900329c5bccb5bee445bcee25aec892424.zip
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.
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/sh.vim9
1 files changed, 9 insertions, 0 deletions
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 <buffer> <LocalLeader>l
\ :<C-U>compiler shellcheck<CR>
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>c'
\ . '|nunmap <buffer> <LocalLeader>l'
+
+" Mapping to insert '\'' with Alt+'; not sure I'll keep this just yet
+if has('gui_running')
+ inoremap <buffer> <M-'> '\''
+ let b:undo_ftplugin .= '|nunmap <buffer> <M-''>'
+else
+ inoremap <buffer> <Esc>' '\''
+ let b:undo_ftplugin .= '|nunmap <buffer> <Esc>'''
+endif