aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-30 22:26:00 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-30 22:26:00 +1200
commit117dd0a8c93062a797bf873e37444feea4798bda (patch)
tree6a31050c553e0d22d7a0eff010de425c1e9a5b65 /vim/after/ftplugin
parentShorten filetype.vim load guard (diff)
downloaddotfiles-117dd0a8c93062a797bf873e37444feea4798bda.tar.gz
dotfiles-117dd0a8c93062a797bf873e37444feea4798bda.zip
Move execution mappings into relevant filetypes
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/sh.vim4
-rw-r--r--vim/after/ftplugin/vim.vim10
2 files changed, 14 insertions, 0 deletions
diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim
index 0327db78..8468b133 100644
--- a/vim/after/ftplugin/sh.vim
+++ b/vim/after/ftplugin/sh.vim
@@ -44,3 +44,7 @@ nnoremap <buffer> <LocalLeader>l
\ :<C-U>compiler shellcheck<CR>
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>c'
\ . '|nunmap <buffer> <LocalLeader>l'
+
+" ,! executes line with 'shell'
+nnoremap <buffer> <LocalLeader>! ^"zyg_:!<C-R>z<CR>
+let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>!'
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index 5b4d0f95..0b877178 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -43,3 +43,13 @@ endif
nnoremap <buffer> <LocalLeader>K
\ :<C-U>helpgrep <cword><CR>
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>K'
+
+" ,@ executes line in normal mode
+nnoremap <buffer> <LocalLeader>@
+ \ ^"zyg_@z
+let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>@'
+
+" ,: executes line in command mode
+nnoremap <buffer> <LocalLeader>:
+ \ ^"zyg_:<C-R>z<CR>
+let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>:'