diff options
Diffstat (limited to 'vim')
m--------- | vim/bundle/colon_operator | 0 | ||||
-rw-r--r-- | vim/plugin/colon_operator.vim | 36 |
2 files changed, 0 insertions, 36 deletions
diff --git a/vim/bundle/colon_operator b/vim/bundle/colon_operator new file mode 160000 +Subproject 5525627dd9727f2ee713e3a06145a145410bcd7 diff --git a/vim/plugin/colon_operator.vim b/vim/plugin/colon_operator.vim deleted file mode 100644 index e752e87c..00000000 --- a/vim/plugin/colon_operator.vim +++ /dev/null @@ -1,36 +0,0 @@ -" -" colon_operator.vim: Select ranges and run colon commands on them, rather -" like the ! operator but for colon commands like :sort. -" -" Author: Tom Ryder <tom@sanctum.geek.nz> -" License: Same as Vim itself -" -if exists('g:loaded_colon_operator') || &compatible - finish -endif -if v:version < 700 - finish -endif -let g:loaded_colon_operator = 1 - -" Operator prompts for a command if it doesn't have one from a prior run, and -" then runs the command on the selected text -function! ColonOperator(type) abort - if !exists('s:command') - let s:command = input('g:', '', 'command') - endif - execute 'normal! :''[,'']'.s:command."\<CR>" -endfunction - -" Clear command so that we get prompted to input it, set operator function, -" and return <expr> motions to run it -function! ColonMap() abort - unlet! s:command - set operatorfunc=ColonOperator - return 'g@' -endfunction - -" Set up mapping -nnoremap <expr> <silent> <unique> - \ <Plug>(ColonOperator) - \ ColonMap() |