Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Indentation lost on line break in the middle of the line #11

Open
adriantoine opened this issue Sep 19, 2016 · 9 comments
Open

Indentation lost on line break in the middle of the line #11

adriantoine opened this issue Sep 19, 2016 · 9 comments

Comments

@adriantoine
Copy link

adriantoine commented Sep 19, 2016

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.

@sloanelybutsurely
Copy link
Owner

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

@sloanelybutsurely
Copy link
Owner

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

@adriantoine
Copy link
Author

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! 😊

@eanplatter
Copy link
Collaborator

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

@sloanelybutsurely
Copy link
Owner

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.

@davidosomething
Copy link

davidosomething commented Sep 28, 2016

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

@adriantoine
Copy link
Author

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

@adriantoine
Copy link
Author

After looking at this bug: mxw/vim-jsx#63, it works if I add:

Plug 'pangloss/vim-javascript'

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

@gabrielhpugliese
Copy link

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

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

No branches or pull requests

5 participants