cmdline completion : cmdline completion like insert mode
script karma |
Rating 134/40,
Downloaded by 2337 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
jinhu lu |
|
script type |
utility |
|
description |
This script let you can use CTRL-P/N to complete word in cmdline mode
just like in insert mode.
for instance :
1. :something<C-P>
2. /else<C-N>
you also can map other keys instead of <C-P/N> like this in your vimrc:
cmap <C-J> <Plug>CmdlineCompletionBackward
cmap <C-K> <Plug>CmdlineCompletionForward
Or, you may wanna keep compatiable recent history when using <C-P/N> , try this: ( Thanks for Enno.Nagel's good idea ) .
cmap <expr> <c-p> getcmdpos() == 1 ? '<up><home>' : '<plug>CmdlineCompletionBackward'
cmap <expr> <c-n> getcmdpos() == 1 ? '<down><home>' : '<plug>CmdlineCompletionForward'
|
|
install details |
Drag this file into vim plugin directory ( ~/.vim/plugin)
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.236.112.101
|