4

I just switched from Windows to Ubuntu 13.04 and I'm missing a function in Sublime Text,

On Windows I used the middle mouse button to set multiple cursors (a bit like holding Ctrl and adding cursors but instead of click for each cursor jsut hold the middle mousebtn) but now on Ubuntu I can't find anything like that.

How can I get this functionality back?

is there any super user out there? for any hint thanks in advance

7

shift+right mouse button is the combination for column selection in Linux

  • After that how can you go to the end of the lines for all cursors? – aless80 Jun 21 '17 at 13:58
  • @aless80 then you work just like with one cursor, all combinations are the same. Go to the end of the line - press End. – bruha Jun 22 '17 at 7:04
  • @bruha Sorry, now I see that that was possible. When I wrote my previous command I could not make it work – aless80 Jun 22 '17 at 13:12
4
  • Ctrl + Mouse1Click will set another cursor at the location of the click.

  • Ctrl + D will highlight the current word, move the cursor to its end, and add another highlight and cursor at the next occurence of that word. Repeated presses will select additional occurences.

  • 2
    The OP already knows that they can hold Ctrl to achieve that, but they want it with the middle mouse button. – slhck Sep 5 '13 at 10:17
2

Copy the relevant mousemap settings from the Windows file to the Linux file.

Windows file: ~/.config/sublime-text-2/Packages/Default/Default (Windows).sublime-mousemap

You could copy the settings to the linux file in the same directory, however I recommend adding a file in your user folder: ~/.config/sublime-text-2/Packages/User/Default (Linux).sublime-mousemap

Relevant settings:

// Mouse 3 column select
{
  "button": "button3",
  "press_command": "drag_select",
  "press_args": {"by": "columns"}
},
{
  "button": "button3", "modifiers": ["ctrl"],
  "press_command": "drag_select",
  "press_args": {"by": "columns", "additive": true}
},
{
  "button": "button3", "modifiers": ["alt"],
  "press_command": "drag_select",
  "press_args": {"by": "columns", "subtractive": true}
}

This is not included in the Linux settings by default because in linux, mouse 3 is paste. You can highlight something and use your mouse to paste (without having to copy).

2

Alt+Shift+Up Will Add a new cursor on the line above the current one

Alt+Shift+Down Will Add a new cursor on the line under the current one

  • Does not work on Ubuntu 16 for me. – Evan Oct 29 '19 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.