Created
August 1, 2012 03:21
-
-
Save sgur/3223355 to your computer and use it in GitHub Desktop.
:, /, ? 2度押しで cmdline から cmdwin へ移行する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:switch_cmdline(trigger) | |
if empty(getcmdline()) && getcmdtype() == a:trigger | |
call feedkeys("\<ESC>q".a:trigger, 'n') | |
else | |
return a:trigger | |
endif | |
endfunction | |
cmap <expr> ; <SID>switch_cmdline(';') | |
cmap <expr> / <SID>switch_cmdline('/') | |
cmap <expr> ? <SID>switch_cmdline('?') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment