Quick question for those, who are well acquainted with Overleaf:
is there a keybinding that enables multiple selection? For example, when I work in the tabular environment, I select one \cellcolor command and see that all other instances of \cellcolor across the table are being put into frame. I would like to know if it possible to have multiple selections, so I can simultaneously edit all of them? I believe there should be some simple trick but I cannot find out.
Your advice is appreciated!
Asked
Active
Viewed 9,006 times
5
user136555
- 522
2 Answers
10
TL;DR the Ctrl+D as in Sublime Text or VS Code is Ctrl+Alt+Right in Overleaf.
The full list of keyboard shortcuts that work for me in Overleaf to create multiple cursors / selections:
- Ctrl+Alt+Right (or additionally Ctrl+Alt+L in Vim mode): search for next occurence of word under cursor, add it to selection
- Ctrl+Alt+Left (or additionally Ctrl+Alt+H in Vim mode): search for previous occurence of word under cursor, add it to selection
- Ctrl+Alt+Down (or additionally Ctrl+Alt+J in Vim mode): add cursor one line below
- Ctrl+Alt+Up (or additionally Ctrl+Alt+K in Vim mode): add cursor one line above
For these above, hold also Shift to skip items / lines.
- Ctrl + click somewhere: add new cursor
- Alt + click and drag through multiple lines: block selection, add multiple cursors
- Ctrl+Alt+K if keybindings set to
None: select all occurences of text under cursor
Furthermore, if using multiple selections with Vim mode, it's good to know that you need to press Shift+A or Shift+I to enter insert mode.
ha7ilm
- 216
-
1This answer has saved me a good 20-30 hours of grunt work. May be more. – Academic May 11 '23 at 18:53
0
On Mac a more manual approach but similar to SublimeText / Code multi-cursor editing is with the mouse:
- Double click the word
- Maintain pressed the ⌘ key
- Double click the other words you want to simultaneously edit.
This would put the cursor at the end of all the selected words. But you can arbitrarily put second, third, etc cursors anywhere if you just maintain pressed ⌘ while you click.
Sdlion
- 101
\cellcolorin the editor, then on Windows Ctrl+Alt+K (or Ctrl+Opt+G on the Mac for me) will also select all other\cellcolor. You can also use Ctrl-F (or Cmd-F on Mac) to open the search dialog; then use the "All" button to perform a bulk replacement. Another way to get multiple cursors at arbitrary locations, is to hold down the Ctrl key (or the Cmd key on a Mac) while clicking on the required locations. – imnothere Jun 30 '20 at 06:08