Skip to content

Commit

Permalink
Change to use '#' insteaf of '@'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Walasek committed Apr 15, 2014
1 parent 6f38216 commit cc9102a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions IncrementSelection.py
Expand Up @@ -3,7 +3,7 @@
class IncrementSelectionCommand(sublime_plugin.TextCommand):
digits = '0123456789'
letters = 'abcdefghijklmnopqrstuvwxyz'
special = '@'
special = '#'

def run(self, edit):
arr = self.view.substr(self.view.sel()[0]).replace(' ', '').split(',')
Expand Down Expand Up @@ -44,7 +44,7 @@ def gen(counter):
return self.letterEncode(start + counter).upper()

elif start[0] in self.special:
if start[0] == '@':
if start[0] == '#':
def gen(counter):
return str(self.view.rowcol(selection.begin())[0] + 1)

Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1 +1 @@
Increment Selection==================Add a number to each selection in Sublime Text, incremented once per selection.This plugin is based on [Riccardo Marotti](http://stackoverflow.com/users/761777/riccardo-marotti)'s answer of [this question](http://stackoverflow.com/questions/14574941/add-a-number-to-each-selection-in-sublime-text-2-incremented-once-per-selection) on stackoverflow. Usage is in Riccardo Marotti's answer. The default hotkey is <code>ctrl + alt + i</code>.Examples----------Tips: <code>[]</code> stand for a selection, <code>|</code> stand for a caret. [1] text [1] text [1] -> 1| text 2| text 3| [a] text [a] text [a] -> a| text b| text c| [A] text [A] text [A] -> A| text B| text C| [01] text [01] text [01] -> 01| text 02| text 03| [05,2] text [05,2] text [05,2] -> 05| text 07| text 09| [5,-1] text [5,-1] text [5,-1] -> 5| text 4| text 3| [a,3] text [a,3] text [a,3] -> a| text d| text g| [@] line 27 -> 27| line 27 [@] line 28 -> 28| line 28
Increment Selection==================Add a number to each selection in Sublime Text, incremented once per selection.You may also insert the number of line containing the selection by using the '#' symbol.This plugin is based on [Riccardo Marotti](http://stackoverflow.com/users/761777/riccardo-marotti)'s answer of [this question](http://stackoverflow.com/questions/14574941/add-a-number-to-each-selection-in-sublime-text-2-incremented-once-per-selection) on stackoverflow. Usage is in Riccardo Marotti's answer. The default hotkey is <code>ctrl + alt + i</code>.Examples----------Tips: <code>[]</code> stand for a selection, <code>|</code> stand for a caret. [1] text [1] text [1] -> 1| text 2| text 3| [a] text [a] text [a] -> a| text b| text c| [A] text [A] text [A] -> A| text B| text C| [01] text [01] text [01] -> 01| text 02| text 03| [05,2] text [05,2] text [05,2] -> 05| text 07| text 09| [5,-1] text [5,-1] text [5,-1] -> 5| text 4| text 3| [a,3] text [a,3] text [a,3] -> a| text d| text g| [#] line 27 -> 27| line 27 [#] line 28 -> 28| line 28
Expand Down

0 comments on commit cc9102a

Please sign in to comment.