Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Sublime Text 2/3 to use direct Ctrl+Tab order and to create new tabs after the last one?

When I press Ctrl+Tab, Ctrl+Shift+Tab or Ctrl+W the tab I get switched to is not the one just near the one I was on (as I would like to) but to some else. When I press Ctl+N the new tab is created right near the tab I am at while I always want it to be created at the end of the tabs list. How to configure it to achieve the behaviour I desire?

like image 574
Ivan Avatar asked Aug 29 '14 13:08

Ivan


People also ask

How do I switch between tabs in Sublime Text 3?

Use Cmd (Mac) or Alt (Windows) with the number keys 0–9 to switch between tabs in Sublime Text. For example hit Cmd–2 (Mac) or Alt–2 (Windows) to switch to the second tab. You can also use Ctrl–Tab (Mac and Windows) to cycle through your tabs.

How do I add a tab in Sublime Text?

If you want to use a tab in search/replace, just type a tab on a new line ("Indent using spaces" disabled), select and cut and then paste into either search or replace field.

How do I indent multiple lines in Sublime Text 3?

You can use ctrl+ ] to indent a line (or highlighted block), and ctrl + [ to unindent.

How do you close a tab in Sublime Text?

Hit ctrl+f4 to close a single tab.


2 Answers

To achieve the Ctrl+Tab and Ctrl+Shift+Tab behavior you can add the following lines to your sublime-keymap:

{ "keys": ["ctrl+tab"], "command": "next_view" }, { "keys": ["ctrl+shift+tab"], "command": "prev_view" } 

To open sublime-keymap:

  1. click "Preferences"
  2. click "Key Bindings"
  3. You will see two settings file, select a file that named "User"
like image 76
Miguelgraz Avatar answered Sep 23 '22 22:09

Miguelgraz


With the default key bindings, ControlPage Up and ControlPage Down will allow you to move right and left among your open tabs, respectively, in their visual order. (The keybinding solution replicates this functionality using your preferred keys.)

Because the package installer is now included with Sublime Text, it's also straightforward to add the MoveTab extension, which adds the shortcuts ShiftControlPage Up and ShiftControlPage Down to move the current tab within that visual order.

To access the package installer in Sublime Text 3 (in Windows, anyway), type ShiftControlp, then Package Control: Install Package.

like image 36
durette Avatar answered Sep 20 '22 22:09

durette