Skip to content
This repository

New line format differs when using VsVim #621

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

2 participants

Tyrell Atterberry Jared Parsons
Tyrell Atterberry

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.

Jared Parsons
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.

Tyrell Atterberry

Thanks for the quick response.

Jared Parsons
Owner

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

Jared Parsons jaredpar closed this issue from a commit September 11, 2011
Jared Parsons 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
Jared Parsons jaredpar closed this in 10a5872 September 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.