Steps to Reproduce:
Notice that cursors are placed on all lines including those that don't have any text. Most use cases for this feature are only interested in editing lines that have text so this should be the default.
This action came in via PR #1479 from @Bigous
The desire was to add the same functionality present under ctrl+shift+L in Sublime as to aid folks making the transition from Sublime.
In Sublime the action places cursors on all lines (including those that don't have any text), same as it does for VS Code.
If there appears to be high agreement that the behaviour should be changed, we can change it, otherwise this can easily be implemented from an extension.
Hi @oste and @alexandrudima .
I think it could be an option to behave like that. To me it's more useful as it is, but I got the point.
What do you think?
[]'s
I am personally against adding more options.
We are suffering from option overload :) and are getting this as feedback through all the channels: people don't find anymore the more important options because we have so many less important options.
Given this can be easily customized via an extension and the original intent of the command (to help folks onboarding from Sublime) is achieved by having parity with Sublime, I would personally not make any change unless there is high agreement that this should be changed. By high agreement I mean 10+ folks jumping in this issue and expressing themselves. :)
I'd vote against it, the cursors needs to be at each line for doing things like e.g. commenting out whole blocks of code manually. Missing cursors between gaps would be broken semantics for a lot of use cases.
But Sublime's implementation is in my opinion broken anyways, if you think it through it doesn't even put the cursors at the end of each line. Last line gets the cursor at the end only if you select the entire line – and i can't think of any reasonable case where one wants to have a single cursor at the opposite direction. And if you think even further, the cursors belong to the beginning of each line, because (almost?) all languages are LTR. The only editor I know of that got this part right is TextMate. But that's an issue of it's own :)
Hi @kaiwood . Exactly :D
At first, when I implemented it, I've implemented it to have one cursor at the end of each line. So, a couple of friends of mine told me it was not equals to Sublime behavior, then I've changed to match the same behavior ( if the cursor in the last line is at column 0 ignore it ).
Anyway, @oste already set the label to be an extension.
We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.
Happy Coding!
Most helpful comment
I am personally against adding more options.
We are suffering from option overload :) and are getting this as feedback through all the channels: people don't find anymore the more important options because we have so many less important options.
Given this can be easily customized via an extension and the original intent of the command (to help folks onboarding from Sublime) is achieved by having parity with Sublime, I would personally not make any change unless there is high agreement that this should be changed. By high agreement I mean 10+ folks jumping in this issue and expressing themselves. :)