Vscode: Multiple cursors + Word wrap

Created on 10 May 2017  路  6Comments  路  Source: microsoft/vscode

The current behaviour in VSCode with "editor.wordWrap": "on" is like this:
Image

But I would prefer an option for this
Image

Note I used the gif from here which I found while looking for a solution.

editor-multicursor feature-request

Most helpful comment

I would say the current implementation is not just useless like @oliversturm points out, but outright dangerous: I have many times accidentally added some garbage in the wrapped lines which I have had to hunt for later on. It just happened for me again, which prompted to finally find out why this glaring bug hasn't been fixed already.

So even if there would be a use case for the current behavior, I would prefer it to be disabled by default to avoid hard-to-notice accidental edits.

I love the multi-cursor support in VS Code (I find new uses for ctrl+d all the time), but this wrapping behavior has caused me to a bit afraid to use it as much as before.

I guess this doesn't bite all users frequently, but I have my editor on a vertical monitor and have enabled wrapping and frequently edit code with too long lines, so I'm dealing with the wrapping hazard daily.

All 6 comments

Since this would operate on the model (not the view model), this can be implemented from an extension.

Is anybody intending to do anything about this, extension or otherwise? @alexandrudima seems to imply that the current behavior is by design, but I believe it is literally useless. Additional cursors positioned in parts of the same wrapped line are placed "randomly" (depending on the view width) - I can't see how this behavior could be compatible with any legitimate use case of multiple cursor editing.

I suggest this issue should be called a bug, unless a use case can be demonstrated that benefits from the current behavior.

I would say the current implementation is not just useless like @oliversturm points out, but outright dangerous: I have many times accidentally added some garbage in the wrapped lines which I have had to hunt for later on. It just happened for me again, which prompted to finally find out why this glaring bug hasn't been fixed already.

So even if there would be a use case for the current behavior, I would prefer it to be disabled by default to avoid hard-to-notice accidental edits.

I love the multi-cursor support in VS Code (I find new uses for ctrl+d all the time), but this wrapping behavior has caused me to a bit afraid to use it as much as before.

I guess this doesn't bite all users frequently, but I have my editor on a vertical monitor and have enabled wrapping and frequently edit code with too long lines, so I'm dealing with the wrapping hazard daily.

Agreed, this behavior is unexpected and often results in deletions or additions mid-line which I discover later during compiles.

Would also like to see the default behaviour reversed.

Since I couldn鈥檛 find an extension that provided this behavior, and @alexdima implied that it could be done through an extension, I implemented one.
I hope this is also useful to others: https://marketplace.visualstudio.com/items?itemName=MartinZimmermannApps.CursorColumnSelectOnTrueLines

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omidgolparvar picture omidgolparvar  路  3Comments

villiv picture villiv  路  3Comments

vsccarl picture vsccarl  路  3Comments

mrkiley picture mrkiley  路  3Comments

chrisdias picture chrisdias  路  3Comments