tracyone / ctrlp-vimshell.vim

List command history in vimshell with ctrlp interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ctrlp-vimshell.vim

Execute vimshell history by ctrlp interface.

Dependence: vimshell and ctrlp.vim

vimshell is a amazing shell for vim. I like it, But some of its function are depending on other plugin like unite.vim.

List command history is one of basic function of a shell, here I use ctrlp interface to implement this feature.

Add following keymappng to your vimrc.

au FileType vimshell :imap <buffer> <c-k> <c-o>:stopinsert<cr>:call ctrlp#vimshell#start()<cr> 
au FileType vimshell :imap <buffer> <up> <c-o>:stopinsert<cr>:call ctrlp#vimshell#start()<cr>

Press Enter in ctrlp window will execute the selected command immediately.

Press Ctrl-x in ctrlp window will insert the command string only.

About

List command history in vimshell with ctrlp interface

License:MIT License


Languages

Language:Vim Script 100.0%