Closed ofdrykkja closed 12 years ago
Are you sure this is Autoclose problem?
If you remove Autoclose what happen when you do a { and press enter? The cursor is posicioned on the 4th ot 8th column?
without Autoclose i don't have this problem:
function foo {
....|
also i trying remove all plugin without Autoclose and i got same problem
i added checker to function s:Enter() for "smartindent" and all worked
function! s:Enter()
if has_key(b:AutoClosePumvisible, 'ENTER') && pumvisible()
let b:snippet_chosen = 1
return b:AutoClosePumvisible['ENTER']
elseif b:AutoCloseOn && s:IsEmptyPair() && stridx( b:AutoCloseExpandEnterOn, s:GetPrevChar() ) >= 0
if has("smartindent")
return "\<CR>\<Esc><<O"
else
return "\<CR>\<Esc>O"
endif
endif
return "\<CR>"
endfunction
Do you use many vim plugins? What is your vimrc configuration for smartindent, cinwords, etc.? Your code might break indent for other languages.
as I said above, I tried to remove all plugins leaving Autoclose but the problem still exists. your plugin breaks indent because my .vimrc contains "set smartindent". I've checked my fix on Java and Javascript files and everything is OK. can you tell me why my fix can be broken in other languages?
I'm not sure about anything yet. On my vim I set smartindent and the problem you reported doesn't exists. Than if I put your fix the "<<" "unindent" the code.
As I said, I'm not sure about anything yet. I'll try more things tonight to see if I can get your problem. BTW, can you send me your vimrc file?
i send my .vimrc on your email
Thanks, I'll check it when I get home tonight
this problem solved, after reinstalling all plugins with vundle plugin
when i type:
then press enter, i got 4 extra whitespace
please fix it