commit 28f4f4527de21b3f1ef337cbe7210684cb718c5b
parent 1019994c4d5e8472aba3cca79c336abe50df2202
Author: Alex Balgavy <alex@balgavy.eu>
Date: Tue, 9 Mar 2021 11:13:50 +0100
vim: make visualrun its own plugin
Diffstat:
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/vim/plugin/visualrun.vim b/vim/plugin/visualrun.vim
@@ -1,5 +0,0 @@
-function s:RunCommands()
- exe getline('.')
-endfunction
-map <Plug>VisualRunCommands
- \ :call <SID>RunCommands()<CR>
diff --git a/vim/vimrc b/vim/vimrc
@@ -126,6 +126,9 @@ Plug 'thezeroalpha/vim-schemer', { 'for': 'schemer', 'on': ['<Plug>SchemerSynsta
" Make ins-completion relative to current file
Plug 'thezeroalpha/vim-relatively-complete'
+" Run visually selected lines as Vim commands
+Plug 'thezeroalpha/vim-visualrun'
+
" Select files with LF
Plug 'thezeroalpha/vim-lf'
@@ -389,8 +392,9 @@ nmap <leader><C-E><C-L> <Plug>SchemerEdit
" Relatively complete {{{3
" Replace default file completion with 'smart' relative complete
imap <C-x><C-f> <Plug>RelativelyCompleteFile
-" Isotope {{{3
-let g:isotope_use_default_mappings = 0
+" Visualrun {{{3
+" Run selected commands (silent)
+vmap <silent> <leader><cr> <Plug>VisualRunCommands
" Zepl {{{3
augroup zepl
autocmd!
@@ -856,9 +860,6 @@ nnoremap <leader>f :Lexplore<CR>
" Strip trailing whitespace (silent makes it so nothing is echoed)
nmap <silent> <leader>$ <Plug>StripTrailingWhitespace
-" Run selected commands (again, silent)
-vmap <silent> <leader><CR> <Plug>VisualRunCommands
-
" Buffer switching
nnoremap H :bprevious<CR>
nnoremap L :bnext<CR>