/
operator-user.vim
40 lines (31 loc) · 1.2 KB
/
operator-user.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
let s:config = vivacious#bundleconfig#new()
function! s:config.config()
" operator-sort
call operator#user#define_ex_command('sort', 'sort')
Map -remap [nxo] <operator>s <Plug>(operator-sort)
" operator-retab
call operator#user#define_ex_command('retab', 'retab')
Map -remap [nxo] <operator>t <Plug>(operator-retab)
" operator-join
call operator#user#define_ex_command('join', 'join')
Map -remap [nxo] <operator>j <Plug>(operator-join)
" operator-uniq
call operator#user#define_ex_command('uniq', 'sort u')
Map -remap [nxo] <operator>u <Plug>(operator-uniq)
" operator-blank-killer
call operator#user#define_ex_command('blank-killer', 's/\s\+$//')
Map -remap [nxo] <operator>bk <Plug>(operator-blank-killer)
" TODO: operator-zen2han, operator-han2zen
if 0
call operator#user#define('zen2han', 'Op_zen2han')
function! Op_zen2han(motion_wiseness)
" TODO
endfunction
call operator#user#define('han2zen', 'Op_han2zen')
function! Op_han2zen(motion_wiseness)
" TODO
endfunction
Map -remap [nxo] <operator>zh <Plug>(operator-zen2han)
Map -remap [nxo] <operator>hz <Plug>(operator-han2zen)
endif
endfunction