Skip to content


New line format differs when using VsVim #621

tyrellj opened this Issue · 3 comments

2 participants


When editing a unix-style (LF) .cpp file, new lines are inserted as CRLF. Is there an option to cause VsVim to behave correctly in this situation?

I have confirmed that the format is correct when I disable VsVim using Ctrl+Shift+F12, and then incorrectly formatted again when I re-enable VsVim. I've only tested this in insert mode, by pressing the normal return key. The only other extension of note I have installed are the Productivity Power Tools.


Sorry right now there's not an option. Right now it's essentially hard coded to use CRLF. I just checked and there is a way for me to get correct line ending information. It looks pretty straight forward so hopefully I can integrate this into the next point release (1.0.4).

i'll definitely fix by 1.1 though.


Thanks for the quick response.


Fixed. Please let me know if you see this anymore after sync'ing to the fix. Will push in a bit

@jaredpar jaredpar closed this issue from a commit
@jaredpar Now respecting the existing line ending when inserting a new line
instead of always using Environment.NewLine.  There doesn't appear to be
any documentation in Vim as to what exact algorithm they use but
experimentation shows it's uses the current line as context.

closes #621
@jaredpar jaredpar closed this in 10a5872
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.