Townk / vim-autoclose

This plugin for Vim enable an auto-close chars feature for you. For instance if you type an '(', ``autoclose`` will automatically insert a ')' and put the cursor between than.
http://townk.github.com/vim-autoclose/
503 stars 66 forks source link

autoclose breaks nocompatibility #30

Closed orlando closed 12 years ago

orlando commented 12 years ago

using autoclose in ubuntu 11.10 breaks nocompatibility, so it writes ABCD when you press arrows keys in insert mode..

artm commented 12 years ago

is this in terminal vim or in gvim?

On Wed, May 2, 2012 at 2:04 AM, Orlando Del Aguila < reply@reply.github.com

wrote:

using autoclose in ubuntu 11.10 breaks nocompatibility, so it writes ABCD when you press arrows keys in insert mode..


Reply to this email directly or view it on GitHub: https://github.com/Townk/vim-autoclose/issues/30

Artm Baguinski, Software Engineer, V2_ Institute for the Unstable Media, http://www.v2.nl/

tel: +31.6.29394010 skype: v2_artm web: http://claimid.com/artm/

orlando commented 12 years ago

in terminal... in gvim works perfectly... i switched to auto-pairs for now, i tried all fixes that i could find and nothing worked...

i tried all fixes in this page fixes

artm commented 12 years ago

hi again

here is what's happening: we install a map for the Escape key (part of dot-register preservation code), but in terminal special keys are implemented as escape sequences. There is a different set of mappings that attempts to restore the escape sequences in known terminals, which should have solved your problem. But either vim doesn't report the terminal type correctly or the terminal uses different escape sequences (very unlikely).

to investigate this further, what does :echo &term reports inside vim in terminal?

orlando commented 12 years ago

im using this line in .vimrc

set term=gnome-256color

together with CSApprox.vim to be able to use non 256bits colorschemes in terminal..

changing this line to

set term=xterm-256color

works perfect (for both AutoClose.vim and CSApprox.vim)

thanks for your time @artm :smiley:

btw.. i was getting this issue also when searching with Command-T, but setting &term to 'xterm' instead of 'gnome' fixed that problem too..

artm commented 12 years ago

ah, but that means we have to add 'gnome' to the list of terminals that need to be fixed.