aboutsummaryrefslogtreecommitdiff
path: root/stow/vim/.vim/ftplugin/sh
diff options
context:
space:
mode:
Diffstat (limited to 'stow/vim/.vim/ftplugin/sh')
-rw-r--r--stow/vim/.vim/ftplugin/sh/sh.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/stow/vim/.vim/ftplugin/sh/sh.vim b/stow/vim/.vim/ftplugin/sh/sh.vim
index 3eb4da5..ef41fa1 100644
--- a/stow/vim/.vim/ftplugin/sh/sh.vim
+++ b/stow/vim/.vim/ftplugin/sh/sh.vim
@@ -6,11 +6,18 @@
call matchadd('ColorColumn', '\%111v', 100)
setlocal textwidth=110
+" Mappings
+
+let mapleader = " "
+
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/sh/sh.vim<CR>
nnoremap <buffer> <leader>+x :!chmod 744 %<CR><CR>
nnoremap <buffer> <leader>x :w<CR>:!./%<Space>
+nnoremap <buffer> <leader>X :w<CR>:!./%<CR><CR>
nnoremap <buffer> <leader>e :Errors<CR>
+let mapleader = ","
+
inoremap <buffer> <leader>sh #!/bin/sh
inoremap <buffer> <leader>if if <+++>; then<CR><++><CR>fi<++><Esc>?<+++><CR>cf>
"inoremap <buffer> <leader>if <Esc>:read ~/.vim/ftplugin/sh/snippets/if.txt<CR>kdd/<+++><CR>cf>