Skip to content

Commit 8b7abe2

Browse files
justinmktpope
authored andcommitted
Command-line CTRL-U, CTRL-Y
1 parent 24dfc44 commit 8b7abe2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugin/rsi.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ endfunction
4747

4848
cnoremap <expr> <C-T> <SID>transpose()
4949
50+
function! s:ctrl_u()
51+
if getcmdpos() > 1
52+
let @- = getcmdline()[:getcmdpos()-2]
53+
endif
54+
return "\<C-U>"
55+
endfunction
56+
57+
cnoremap <expr> <C-U> <SID>ctrl_u()
58+
cnoremap <C-Y> <C-R>-
59+
5060
if exists('g:rsi_no_meta')
5161
finish
5262
endif

0 commit comments

Comments
 (0)