Reputation: 20730
I am moving from Sublime
to Atom
, and can't find a certain hotkey for the life of me.
Control+D
will still do a multi-select - select the next instance your highlighted text, at which point you will get multiple cursors.
In Sublime
, if you selected multiple lines and pressed control+shift+l
, it would then create a cursor on each line, so you could edit each line at once.
I looked through the hotkey lists for Atom
, and can't find this. But then I probably don't know the right terminology.
Upvotes: 4
Views: 7759
Reputation: 4711
Selection
--> Split into Lines
To add the ctrl+shift+L Key-binding to this you need to edit your custom keymap file.
Edit
--> Keymap...
:opens keymap.cson fileAppend to : keymap.cson
".platform-darwin atom-text-editor":
"ctrl-shift-j": "grammar-selector:show"
".platform-win32 atom-text-editor":
"ctrl-shift-j": "grammar-selector:show"
".platform-linux atom-text-editor":
"ctrl-shift-j": "grammar-selector:show"
Append to : keymap.cson
'.platform-darwin atom-text-editor:not([mini])':
'ctrl-shift-l': 'editor:split-selections-into-lines'
'.platform-win32 atom-text-editor:not([mini])':
'ctrl-shift-l': 'editor:split-selections-into-lines'
'.platform-linux atom-text-editor:not([mini])':
'ctrl-shift-l': 'editor:split-selections-into-lines'
Note: I have only tested this on linux.
Note2: on mac , i.e. darwin
this may not be needed
Upvotes: 0
Reputation: 2480
Use the multi-cursor package.
Use CTRL/COMMAND to select multiple places.
Upvotes: 1
Reputation: 153
The command in the menu Selection —> Split into Lines
should do what you want. On the Mac the keyboard shortcut is cmd-shift-l
.
Upvotes: 2
Reputation: 1200
For Windows users,
the default keybindings ctrl + shift + up / down
seems to work.
For Mac users,
add the following custom keybinding code to the
/user/<yourName>/.atom/keymap.cson
file
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# change the keybinding for ADD SELECTION ABOVE / BELOW
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 'shift-alt-up': 'editor:add-selection-above'
# 'shift-alt-down': 'editor:add-selection`-below'
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Then place the cursor where you want to start and press and hold shift + alt
and press up
or down
repeatedly to extend the cursor to as many lines as needed.
Upvotes: 3
Reputation: 7193
I recently apm'd this package, though I'm not sure if there's a hotkey: https://atom.io/packages/sublime-style-column-selection
Upvotes: 2