ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Atomic Soft Tab Nav

by ruiokada ST4

Makes arrow keys treat soft tabs like tabs in Sublime Text.

Details

Installs

  • Total 15
  • Win 6
  • Mac 7
  • Linux 2
May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 2
Mac 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text Atomic Soft Tab Nav

In Sublime Text, soft tabs (multiple spaces used as tabs) require as many arrow key presses as there are spaces to navigate. The purpose of this package is to make it so that soft tabs can be navigated just like tabs when using the arrow keys.

Standard Demo

Set enable_line_nav to true in Atomic Soft Tab Nav plugin settings (access preferences via Command Palette or through the Preferences menu item) to enable atomic soft tabs when navigating by lines:

With 'enable_line_nav' True Demo

Install

Atomic Soft Tab Nav is available on Sublime Text's Package Control. To install use the command palette commands:

  1. Package Control: Install Package
  2. Install Atomic Soft Tab Nav

Otherwise, you can also manually install by cloning this repository into your user packages folder:

git clone https://github.com/ruiokada/sublime-text-atomic-soft-tab-nav.git "Atomic Soft Tab Nav"

Sublime Text has a setting to visually distinguish tabs and soft tabs but it is not enabled by default. It is recommended to enable it by setting draw_white_space to all in your user settings file:

{"draw_white_space": "all"}

Functionality

The functionality of this package is simple. When the text cursor encounters a soft tab during arrow key input, this plugin will modify the arrow key input accordingly. The following are the arrow key input modification details:

  • Soft tabs are assumed to appear only at the beginning of lines so multiple spaces that do not span to the beginning of the line are ignored.
  • If the cursor is on the edge of a soft tab, then the left/right arrow keys move the cursor as if the soft tabs were tabs.
  • If the cursor is in the middle of a soft tab, then the left/right arrow keys move the cursor to the end of the soft tab.
  • If enable_line_nav is set to true in plugin settings then the up/down arrow keys will also treat soft tabs in a similar manner.
  • The above modifications are applied even in the case when the cursor is making a text selection.
  • The above modifications will not be applied if there are multiple active cursors.
  • If the spaces as tabs function is disabled in the current file view then this plugin will be disabled.
  • The size of soft tabs depends on the tab size of the current file view.
  • If there are multiple cursors, then navigation input will not be modified.