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

Pad

by mborgerson ALL

Sublime Text Plug-In to Add Padding to Lines

Details

  • 2013.08.20.18.28.48
  • github.​com
  • github.​com
  • 11 years ago
  • 1 hour ago
  • 11 years ago

Installs

  • Total 1K
  • Win 787
  • Mac 479
  • Linux 209
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 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0
Mac 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 0 0 0 0 1 0
Linux 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Pad

Pad is a Sublime Text plug-in to add custom padding to lines.

Update: Sublime Text 3 is supported.

Installation

Automatic Installation using Package Control

Pad can be installed using the Sublime Package Control package manager plug-in. Use the command palette to launch the “Package Control: Install Package” command and search for Pad.

Manual Installation

Install by cloning this repository to your Packages directory.

  • For Windows:

    cd "%APPDATA%\Sublime Text 2\Packages"
    git clone https://github.com/mborgerson/pad.git
    
  • For Mac OS X:

    cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
    git clone https://github.com/mborgerson/pad.git
    

After cloning the repository to your packages directory, Sublime Text should automatically load the package.

How to Use

First, move the cursor to the line you want to pad or select the region of text in the line that should be padded. You may use multiple cursors to pad multiple lines at once. Then, use the command palette (Ctrl+Shift+P) to find and run the “Pad: Add Padding to Line or Selection” command. You will be prompted for alignment and fill character. The line/selected text will be padded with the fill character up to the first ruler (or column 80 if no rulers are being used).

Examples

  • Use no selection to pad the entire line.

    This is some text.
    

becomes

--------------------------This is some text.--------------------------
  • Use multiple selections to batch pad.

    /* This is some text. */
    /* This is some more text. */
    /* And here is even more text. */
    

becomes

/* -----------------------This is some text.----------------------- */
    /* --------------------This is some more text.--------------------- */
    /* ------------------And here is even more text.------------------- */
  • Perform the command on an empty line to fill the entire line with a character.

becomes

**********************************************************************

Limitations

  • Padding only works for one region of text per line.
  • Multi-line selection padding does not work properly.
    • Workaround: Use multiple cursors / multiple single-line selections to pad multiple lines at once.