Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for block / column selection #2306

Open
aybabtme opened this issue May 19, 2014 · 43 comments
Open

Add support for block / column selection #2306

aybabtme opened this issue May 19, 2014 · 43 comments
Labels

Comments

@aybabtme
Copy link

@aybabtme aybabtme commented May 19, 2014

In plenty editors, doing left-alt (left option) and selecting text will take a slice of that text:

sublime

Notice that only characters are selected, empty lines are ignored. Also, after selecting with left-alt, there should be multi-cursors at the end of each selection:

reslice

The GIF are from Sublime, the same behavior is observed in TextMate, IntelliJ, vim (visual selection).

The current behavior in Atom is to perform a normal text selection:

atom

@izuzak izuzak added the enhancement label May 20, 2014
@izuzak

This comment has been minimized.

Copy link
Member

@izuzak izuzak commented May 20, 2014

@aybabtme Yep, Atom doesn't support this at the moment. However, I think I've noticed some packages that do something similar, e.g. https://atom.io/packages/select-rectangle.

Could you give those packages a try and see if they work for you?

@GeoffreyFrogeye

This comment has been minimized.

Copy link
Contributor

@GeoffreyFrogeye GeoffreyFrogeye commented May 20, 2014

This package adds some functions but not all. Also, it's less usable.
👍 for the suggestion

@tonycoco

This comment has been minimized.

Copy link

@tonycoco tonycoco commented Sep 30, 2014

I've used the package, it works, but is not a simple gesture of alt+click and drag. It really should be something Atom supports if multiline cursors are supported. It was the first feature I missed from Sublime and Textmate when switching to Atom. Thanks!

@mark-hahn

This comment has been minimized.

Copy link
Contributor

@mark-hahn mark-hahn commented Sep 30, 2014

Check out Sublime-Style-Column-Selection. I think it is what you want. If you have a problem with a bug where the alt-key seems to stick down let me know. I have a simple fix that I just told the author about.

@xpol

This comment was marked as spam.

Copy link

@xpol xpol commented Dec 19, 2014

I suggest this should be a build-in feature (package).

@vjeux

This comment was marked as spam.

Copy link
Contributor

@vjeux vjeux commented Mar 6, 2015

I suggest this should be a build-in feature (package).

Agreed :)

@alexchandel

This comment has been minimized.

Copy link
Contributor

@alexchandel alexchandel commented Mar 20, 2015

This needs to be integrated into Atom. Column selection is a pretty essential function. It's actually a normal behavior of Cocoa text areas on OS X, and just works in almost all apps (Preview, TextEdit, Safari, even the Terminal).

@bronson

This comment has been minimized.

Copy link

@bronson bronson commented May 20, 2015

Gotta be in core. I'd like to update vim-mode to use it but that doesn't make a lot of sense if it's 3rd party.

@aldendaniels

This comment has been minimized.

Copy link

@aldendaniels aldendaniels commented Jul 6, 2015

👍 this is also supported by other web-based editors such as CodeMirror and Ace and is very useful.

@bronson

This comment has been minimized.

Copy link

@bronson bronson commented Jul 6, 2015

Sorry, got my terminology wrong. I mean, block select needs to be in the official Atom release! And it should probably be a plugin, not integrated into core. :) (still getting the hang of this stuff...)

@mnquintana mnquintana changed the title left-alt + mouse selection doesn't slice text Add support for block / column selection Jul 6, 2015
@alexchandel

This comment has been minimized.

Copy link
Contributor

@alexchandel alexchandel commented Jul 28, 2015

For reference, Sublime Style Column Selection supports this, which tells me it's possible to implement here.

@bronson

This comment has been minimized.

Copy link

@bronson bronson commented Jul 28, 2015

There's also vim-mode-visual-block for modalphiles.

But just I can't shake the feeling that an editor without built-in block select is a toy! Maybe it's my own prejudices...

@xpol

This comment has been minimized.

Copy link

@xpol xpol commented Jul 29, 2015

There's slickedit-select which uses right mouse button drag.

@tonycoco

This comment has been minimized.

Copy link

@tonycoco tonycoco commented Jul 29, 2015

I guess the argument is really, this should be part of Atom's core functionality (maybe it doesn't live inside core, but actually I think it should). Almost all other modern editors support the alt-click-and-drag style column-selection. A community-authored package to add this type of support is a bit dubious.

@PhiLhoSoft

This comment has been minimized.

Copy link

@PhiLhoSoft PhiLhoSoft commented Dec 30, 2015

I discovered that Atom actually has column selection out of the box (if I am not mistaken...).
It is part of the multiple caret feature, described in https://discuss.atom.io/t/vertical-column-selection/15913/7
So this thread is more about allowing this selection with the mouse (which is the first thing I tried), which is provided by the above mentioned package, but it might be (should be?) a core package...

I came here to report a bug mentioned in the above thread, but come to think about it, I will just make a new issue, as it is not really related to this thread.

@EdenSG

This comment has been minimized.

Copy link

@EdenSG EdenSG commented Dec 31, 2015

+1 for block select with mouse in core

@mnquintana mnquintana removed their assignment Dec 31, 2015
@justyn-clark

This comment has been minimized.

Copy link

@justyn-clark justyn-clark commented Jan 26, 2016

Thank you @alexchandel. Sublime Style Column Selection is what I was looking for. My switch to Atom is getting better by the day.

@haacked haacked added the windows label Mar 17, 2016
@haacked

This comment has been minimized.

Copy link

@haacked haacked commented Mar 17, 2016

I've tried several block selection packages and none of them seem to work on Windows.

I'd love to see us include ALT+SHIFT block selection which works with the arrow keys. This would help Visual Studio users with muscle memory transition to Atom. I try to do it every day. 😛

@mark-hahn

This comment has been minimized.

Copy link
Contributor

@mark-hahn mark-hahn commented Mar 17, 2016

none of them seem to work on Windows.

That is surprising. What could cause this?

On Thu, Mar 17, 2016 at 1:19 PM, Phil Haack notifications@github.com
wrote:

I've tried several block selection packages and none of them seem to work
on Windows.

I'd love to see us include ALT+SHIFT block selection which works with the
arrow keys. This would help Visual Studio users with muscle memory
transition to Atom. I try to do it every day. [image: 😛]


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#2306 (comment)

@haacked

This comment has been minimized.

Copy link

@haacked haacked commented Mar 17, 2016

That is surprising. What could cause this?

I've noticed a lot of Atom plugins I've tried document Mac key mappings. I wonder if there's an issue with keyboard mappings.

@mark-hahn

This comment has been minimized.

Copy link
Contributor

@mark-hahn mark-hahn commented Mar 17, 2016

document Mac key mappings.

That is usually just a doc problem.

On Thu, Mar 17, 2016 at 2:38 PM, Phil Haack notifications@github.com
wrote:

That is surprising. What could cause this?

I've noticed a lot of Atom plugins I've tried document Mac key mappings. I
wonder if there's an issue with keyboard mappings.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#2306 (comment)

@lukeapage

This comment has been minimized.

Copy link

@lukeapage lukeapage commented Mar 17, 2016

@VGerris

This comment has been minimized.

Copy link

@VGerris VGerris commented May 12, 2017

So will this be moved to core?
One thing I miss is how to insert before the selected text, not replacing?
Isn't one of the most used scenarios to comment or uncomment code blocks?
[edit] found that I can tap the left cursor key so the text selection is undone, happy with that :) [/edit]

@dgboy2000

This comment was marked as spam.

Copy link

@dgboy2000 dgboy2000 commented Sep 13, 2017

+1 for moving this to core

@backspaces

This comment has been minimized.

Copy link

@backspaces backspaces commented Jan 10, 2018

Is there a way to click-drag the selection, rather than the keyboard ctl-shift-click-arrow?

@oryandunn

This comment was marked as spam.

Copy link

@oryandunn oryandunn commented Jan 25, 2018

Issue still open going on 4yrs now...

@pakirby1

This comment was marked as spam.

Copy link

@pakirby1 pakirby1 commented Feb 17, 2018

Is this supported yet in ATOM.?

@DominikSerafin

This comment has been minimized.

Copy link

@DominikSerafin DominikSerafin commented May 13, 2018

Right now from my testing multiple plugins - https://atom.io/packages/sublime-style-column-selection is the best alternative for mouse multi select. But sadly it's very buggy - e.g. one of the most annoying things about it is that the select simply doesn't work on bottom of medium-large files (~600+ lines).

Considering the sublime-style-column-selection is in the top 20 most popular packages (264,635 downloads and 1006 stars at the moment I'm writing this) it's a really shame that this feature is available only as that buggy package and not implemented in the core in a better and more usable way.


EDIT: It seems that problem with sublime-style-column-selection in medium-large files was fixed some time ago. And it works pretty great now!

@webark

This comment has been minimized.

Copy link

@webark webark commented May 13, 2018

bigfive/atom-sublime-select#144

looks like the author of is plugin might be defunct.. could be worth forking the plugin abd trying to fix it.

@justinpaulson

This comment was marked as disruptive content.

Copy link

@justinpaulson justinpaulson commented May 16, 2018

how is this still not supported in atom?

@Domarius

This comment has been minimized.

Copy link

@Domarius Domarius commented May 28, 2018

As a programmer, I regularly use block select, cut and paste to save time. The cases are to varied and numerous to describe - suffice to say I'm passing over Atom as a text editor, as I'm used to it, coming from Windows and using NotePad++, Visual Studio, etc. and currently switching to Linux and finding replacement programs. I'm also disappointed by the staunch position of the devs on this issue in spite of pages and pages of requests, clearly indicating this text editor isn't for me. It's disappointing, but worth mentioning, since the rest of the program looked so promising. I'll check out this Sublime text editor everyone is mentioning.

@TastyMuffins

This comment was marked as spam.

Copy link

@TastyMuffins TastyMuffins commented Oct 4, 2018

Just wanted to add that this is the only feature that is missing in ATOM that keeps me going back to notepad++

@aquadrehz

This comment was marked as spam.

Copy link

@aquadrehz aquadrehz commented Oct 18, 2018

I use Visual code because it has this feature.

@oryandunn

This comment was marked as spam.

Copy link

@oryandunn oryandunn commented Nov 9, 2018

I use Visual code because it has this feature.

I've switched to VS Code for a myriad of other reasons, and I do enjoy using block select in VS Code.

@ranyu87

This comment has been minimized.

Copy link

@ranyu87 ranyu87 commented Dec 13, 2018

@aybabtme @oryandunn @TastyMuffins @pakirby1
I am not sure why this is still open.

In windows I could do it without any plugins.

hold Ctrl+Alt and move the cursor up or down. Then hold Shift key and move the left or right to select the text.
Sorry Not sure what's the subsequent keys for Mac OS.

Thanks!

@DominikSerafin

This comment has been minimized.

Copy link

@DominikSerafin DominikSerafin commented Dec 13, 2018

@ranyu87

I think most people want proper support for block selection using mouse. At least that's what I want personally. I very rarely use keyboard to select text and I don't want to be limited to only that option for block select because it's a lot slower and less productive.

@VGerris

This comment has been minimized.

Copy link

@VGerris VGerris commented Dec 13, 2018

wow, amazing that this was staring us in the face all the time and someone discovered this?
It works :)!
On Mac, hold ctrl+shift and move the arrows up and down to select lines. then move with left and right to move and hold shift with that to select.

I personally never use a mouse for that, so I'm happy with that.

@ranyu87

This comment has been minimized.

Copy link

@ranyu87 ranyu87 commented Dec 13, 2018

@ranyu87

I think most people want proper support for block selection using mouse. At least that's what I want personally. I very rarely use keyboard to select text and I don't want to be limited to only that option for block select because it's a lot slower and less productive.

When I type something, I don't prefer to use mouse unless the text which I wanted to edit in not in the current viewable screen.

@ranyu87

This comment has been minimized.

Copy link

@ranyu87 ranyu87 commented Dec 13, 2018

wow, amazing that this was staring us in the face all the time and someone discovered this?
It works :)!
On Mac, hold ctrl+shift and move the arrows up and down to select lines. then move with left and right to move and hold shift with that to select.

I personally never use a mouse for that, so I'm happy with that.

I was searching why this feature is missing in atom as I recently moved away from notepad++. I got this open issue link from one of the atom plugin support (https://discuss.atom.io/t/is-column-selection-available-in-atom/48418). Then I was trying different combination and I found it. May be this issue is still open for mouse support.

@marioortizmanero

This comment was marked as spam.

Copy link

@marioortizmanero marioortizmanero commented Feb 18, 2019

Still no proper support with mouse drag, at least for Linux

@randomstability

This comment has been minimized.

Copy link

@randomstability randomstability commented Mar 15, 2019

Has anyone looked at using https://atom.io/packages/block-select, which seems to meet the requirements?

@alexchandel

This comment has been minimized.

Copy link
Contributor

@alexchandel alexchandel commented May 5, 2019

@randomstability is https://atom.io/packages/Sublime-Style-Column-Selection more feature complete?

This sort of missing feature is what prevents Atom (unlike npp) from being deployable as a generic Windows text editor. A package ecosystem isn't enough — offline users require you to actually ship useful packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.