Trailing Punctuation
Sublime Text plugin which will add and toggle punctuation at the end of a line
Details
Installs
- Total 3K
- Win 2K
- Mac 855
- Linux 600
Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 2 | 0 | 1 | 0 | 1 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 1 | 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 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 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 |
Readme
- Source
- raw.githubusercontent.com
Trailing Punctuation
This is a Sublime Text 3 plugin which will add or toggle punctuation at the end of a line.
Installation
Use Package Control, search for “Trailing Punctuation”.
Usage
This adds two keyboard shortcuts: Alt+, and Alt+;. Respectively, these will add a comma and a semicolon at the end of the current line (or lines, in the case of multiple selections or a multiple-line selection).
If the line already ends with the character, it is removed (toggled).
If the line ends with the other character, it is replaced (comma becomes semicolon, semicolon becomes comma).
For example, assume the cursor is on this line and you press Alt+,. Each line shows the behaviour of pressing the shortcut key again.
var foo = 1;
var foo = 1,
var foo = 1
var foo = 1,
First, the semicolon is replaced with a comma. The second time, it removes the comma. The third time, it inserts a trailing comma.
In all cases, the current cursor position and selection is unchanged.
It is even smart enough to ignore comments and whitespace at the end of lines. (·
represents whitespace below)
var·whyDoPeople····
var·notUseSemicolons·//·???···
// select all, press `Alt+;`
var·whyDoPeople;····
var·notUseSemicolons;·//·???···
On lines which are empty, or only contain whitespace or comments, no characters are inserted.