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

Vintage Relative Lines

by bicarlsen ST3

Relative numbering for Sublime Text's Vintage mode.

Details

  • 0.1.5
  • github.​com
  • github.​com
  • 2 months ago
  • 19 minutes ago
  • 2 months ago

Installs

  • Total 34
  • Win 24
  • Mac 5
  • Linux 5
Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9
Windows 0 0 1 0 2 0 0 1 0 3 0 2 0 1 0 0 0 0 1 0 0 0 4 0 2 1 1 0 0 1 0 1 0 2 0 0 2 0 0 0 0 0 3 0 1
Mac 1 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 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Linux 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Vintage Relative Numbering

Relative numbering for Sublime's Vintage mode.

Example

Install Instructions

Ensure that Vintage mode is enabled for Sublime.

In Command or Visual mode you will have control over the line numbering style.

From Package Control (Recommended)

  1. Install Package Control.

  2. Run the “Package Control: Install Package” command.

  3. Find and install the “Vintage Relative Lines” plugin.

  4. Restart Sublime Text if there are issues.

Manually

  1. Navigate to Sublime's Packages directory.

    This can be found by opening up Sublime's console (Ctrl + ` (backtick), or View > Show Console ), and run sublime.packages_path().

  2. Place the vintage_relnums folder inside the Packages directory.

    You can do this by cloning or downloading these files. For cloning, from the Packages directory run git clone https://github.com/bicarlsen/vintage_relnums.git in a console.

Commands

Two commands are provided with the plugin.

Toggle Line Mode

Command: vrl_toggle_line_mode

Suggested Key Map: ctrl + alt + l

Cycles through available line numbering modes.

  • When using phantoms these modes are hybrid, relative, and absolute.

  • When using native numbering the modes are hybrid and absolute.

Toggle Native

Command: vrl_toggle_native

Suggested Key Map: ctrl + alt + n

Toggles between using phantoms and native line numbering, if available.

Keybindings

For quick switching between modes, one can place key bindings in the Preferences > Key Bindings file for the commands. For example

[
    { 
        "keys": [ "ctrl+alt+l" ], 
        "command": "vrl_toggle_line_mode"
    },
    {
        "keys": [ "ctrl+alt+n" ],
        "command": "vrl_toggle_native"
    }
]

Helping Out

Please feel free to help out and imporve this plugin. It is my first sublime plugin so is fairly simple and should be easy to improve.

Acknowledgements

I used OdatNurd's Plugin 101 tutorial videos to get started. If you're interested in learning how to develop Sublime plugins it is a great starting point.