Skip to content

New line format differs when using VsVim #621

Closed
tyrellj opened this Issue Jul 29, 2011 · 3 comments

2 participants

@tyrellj
tyrellj commented Jul 29, 2011

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.

@jaredpar
Owner

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.

@tyrellj
tyrellj commented Jul 30, 2011

Thanks for the quick response.

@jaredpar
Owner

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

@jaredpar jaredpar added a commit that closed this issue Sep 11, 2011
@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
10a5872
@jaredpar jaredpar closed this in 10a5872 Sep 11, 2011
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.