vimrc.js icon indicating copy to clipboard operation
vimrc.js copied to clipboard

Indentation lost on line break in the middle of the line

Open adriantoine opened this issue 9 years ago • 9 comments

It's easier to understand with a gif: vimbug

If I add a new line there, the indentation is completely lost, which is very annoying. It happens sometimes at the end of the line, I've tried to google that issue but couldn't find anything. I'm only using this basic vimrc.js.

I'm using neovim in iTerm2 on Mac.

adriantoine avatar Sep 19 '16 12:09 adriantoine

I'm will be taking a look at this. Thanks for opening the issue!

sloanelybutsurely avatar Sep 21 '16 01:09 sloanelybutsurely

@adriantoine are you able to provide a file (perhaps via gist) that we could use to reproduce the issue?

sloanelybutsurely avatar Sep 24 '16 00:09 sloanelybutsurely

Unfortunately, I can reproduce that on every file 🤔 I think I'll do some investigation on my side, I'll disable plugins one by one and see which one is causing that.

Thanks! 😊

adriantoine avatar Sep 25 '16 12:09 adriantoine

I noticed some similar issues, I'll also look into this. My issues had to do with omitting semi-colons tho... 🤔

eanplatter avatar Sep 28 '16 03:09 eanplatter

Don't hold your breath but my long term goal is to write a syntax and indent file from scratch that works well. Right now a lot of the syntax and indent stuff is a "getting as close as we can with what we have" situation.

sloanelybutsurely avatar Sep 28 '16 03:09 sloanelybutsurely

FWIW pangloss/vim-javascript 's indent file does not have that issue: http://screencast.com/t/5oUSbdf2w Also, that indent file is part of upstream neovim now if you use neovim. I recommend switching back to that plugin if you :verb set indentexpr? is loading some other one

so no point in duplicating efforts when you can just grab the indent/ stuff from there

davidosomething avatar Sep 28 '16 05:09 davidosomething

After investigating, it works when I comment out this line: https://github.com/zperrault/vimrc.js/blob/master/vimrc.plugs#L25

adriantoine avatar Sep 28 '16 09:09 adriantoine

After looking at this bug: https://github.com/mxw/vim-jsx/issues/63, it works if I add:

Plug 'pangloss/vim-javascript'

in my ~/.vimrc.js/vimrc.plugs.local file.

adriantoine avatar Sep 28 '16 09:09 adriantoine

Thanks @adriantoine , I was going crazy here and your solution worked for me 👍

gabrielhpugliese avatar Oct 18 '16 07:10 gabrielhpugliese