Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enter input mode when press ctrl-[xvt] #10

Merged
merged 4 commits into from
Mar 13, 2018
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion autoload/ctrlp/cmdpalette.vim
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,18 @@ endfunction
func! ctrlp#cmdpalette#accept(mode, str)
call ctrlp#exit()
redraw
let g:ctrlp_open_mode = a:mode
let g:ctrlp_open_cmd = a:str
call feedkeys(':', 'n')
call feedkeys(split(a:str, '\t')[0], 'n')
if g:ctrlp_cmdpalette_execute == 1
if a:mode == 'e' && g:ctrlp_cmdpalette_execute == 1
call feedkeys("\<CR>", 'n')
endif
call remove(s:cmdpalette_commands, index(s:cmdpalette_commands, a:str))
call insert(s:cmdpalette_commands, a:str)
if a:mode != 'e'
call feedkeys(" ", 'n')
endif
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small detail: please change these tabs to spaces ;) (using tabs makes it look with a different indentation level depending on the tool)

endfunc


Expand Down