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

regular vim -- function keys in Unite's insert mode need to be remapped for xterm #1113

Closed
davidosomething opened this issue Feb 8, 2016 · 2 comments

Comments

@davidosomething
Copy link

Reproduce in gnome-terminal, terminator, or other VTE100 terminal (not newer vte!)
Not an issue with Neovim -- only in regular vim:

.vimrc -- with unite installed, map F key to close unite:

autocmd FileType unite nmap <buffer><special> <F1> <Plug>(unite_all_exit)

in vim:

:Unite -start-insert buffer

result:

Pressing <F1> should close Unite window. Instead it will insert xterm function key value instead ( <Esc>OP ) so you get a newline from O and then letter P in buffer.

I think this fix should be included in Unite:

  nmap <buffer><special> <Esc>OP    <F1>

I added to my vimrc here: https://github.com/davidosomething/dotfiles/blob/0230945bf96a31fbe6972e01a56fe232899e2982/vim/plugin/unite.vim#L147-L159

@Shougo
Copy link
Owner

Shougo commented Feb 8, 2016

It is Vim and terminal problem. Not unite.vim problem. Closing.

I think this fix should be included in Unite:

No. I don't want to add the dirty hack.

https://github.com/davidosomething/dotfiles/blob/0230945bf96a31fbe6972e01a56fe232899e2982/vim/plugin/unite.vim#L145

You should not map <ESC>.
It causes the problem.

@Shougo Shougo closed this as completed Feb 8, 2016
@davidosomething
Copy link
Author

doh! i forgot that map esc is bad, thanks
On Feb 8, 2016 8:18 AM, "Shougo" notifications@github.com wrote:

It is Vim and terminal problem. Not unite.vim problem. Closing.

I think this fix should be included in Unite:

No. I don't want to add the dirty hack.

https://github.com/davidosomething/dotfiles/blob/0230945bf96a31fbe6972e01a56fe232899e2982/vim/plugin/unite.vim#L145

You should not map .
It causes the problem.


Reply to this email directly or view it on GitHub
#1113 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants