edit-numbers

Edit (serial) numbers in the editor.

BlueSilverCat

1,345

2

0.4.1

MIT

GitHub

edit-numbers

Edit (serial) numbers in the editor.

demo

Basic useage

  1. Toggle package to open panel.
  2. Input search conditions and output conditions.
  3. Push mark button to highlight target numbers.
  4. Push edit button to edit one by one, or push editAll button to edit at once.

Panel

panel

Settings

KeyBindings

Default keybindings

Keystroke Command Selector Description
F12 edit-numbers:toggle atom-workspace Open/close panel. (Activate package)
none edit-numbers:settings atom-workspace Open package settings. (Activate package)
tab edit-numbers:focusNext .edit-numbers.root Focus next panel element.
shift-tab edit-numbers:focusPrevious .edit-numbers.root Focus previous panel element.
pageup edit-numbers:previous .edit-numbers.root Focus previous matching number.
pagedown edit-numbers:next .edit-numbers.root Focus next matching number.
insert edit-numbers:mark .edit-numbers.root Highlight all matching numbers.
home edit-numbers:editAll .edit-numbers.root Replace all matching numbers.
end edit-numbers:edit .edit-numbers.root Replace a selected number.
escape none none Close panel.

Examples

case1

Input text is as below.

2
1
4
3
6
5
8
10
7
9

editType = 'overwrite'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 1, paddingChar = '0', sign = 'minus', align = 'right', radix = 'decimal', upperCase=true
start = -2, end = 5, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

-2
-1
0
1
2
3
4
5
-2
-1

editType = 'overwrite'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = ' ', sign = 'minus', align = 'right', radix = 'decimal', upperCase=true
start = -2, end = 5, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

  -2
  -1
   0
   1
   2
   3
   4
   5
  -2
  -1

editType = 'overwrite'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = ' ', sign = 'plus', align = 'right', radix = 'decimal', upperCase=true
start = -2, end = 5, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

  -2
  -1
  +0
  +1
  +2
  +3
  +4
  +5
  -2
  -1

editType = 'overwrite'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = '*', sign = 'space', align = 'right', radix = 'decimal', upperCase=true
start = -2, end = 5, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

**-2
**-1
** 0
** 1
** 2
** 3
** 4
** 5
**-2
**-1

editType = 'overwrite'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = ' ', sign = 'minus', align = 'right_lead_sign', radix = 'decimal', upperCase=true
start = -2, end = 5, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

-  2
-  1
   0
   1
   2
   3
   4
   5
-  2
-  1

editType = 'overwrite'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = '*', sign = 'minus', align = 'left', radix = 'decimal', upperCase=true
start = -2, end = 5, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

-2**
-1**
0***
1***
2***
3***
4***
5***
-2**
-1**

editType = 'overwrite'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = '0', sign = 'minus', align = 'right', radix = 'hexadecimal', upperCase=true
start = 8, end = 0, increment = 2, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

0008
000A
000C
000E
0010
0012
0014
0016
0018
001A

editType = 'overwrite'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = '0', sign = 'minus', align = 'right', radix = 'hexadecimal', upperCase=false
start = 8, end = 0, increment = 2, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

0008
000a
000c
000e
0010
0012
0014
0016
0018
001a

case2

Input text is as below.

0008
000A
000C
000E
0010
0012
0014
0016
0018
001A

editType = 'modify'
prefix = '', suffix = '', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'hexadecimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = ' ', sign = 'minus', align = 'right', radix = 'hexadecimal', upperCase=true
start = 0, end = 0, increment = 0, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

   8
  10
  12
  14
  16
  18
  20
  22
  24
  26

case3

Input text is as below.

00-5
00-4
00-3
00-2
00-1
0000
0001
0002
0003
0004
0005

editType = 'modify'
prefix = '^', suffix = '$', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = ' ', sign = 'minus', align = 'right_lead_sign', radix = 'decimal', upperCase=true
start = 0, end = 0, increment = 0, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

-  5
-  4
-  3
-  2
-  1
   0
   1
   2
   3
   4
   5

case4

Input text is as below.

-5**
-4**
-3**
-2**
-1**
 0**
 1**
 2**
 3**
 4**
 5**

editType = 'modify'
prefix = '^', suffix = '$', ignoreCase=false
targetPadding = '*', targetSign = 'space', targetAlign = 'left',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = '0', sign = 'minus', align = 'right_lead_sign', radix = 'decimal', upperCase=true
start = 0, end = 0, increment = 0, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

-005
-004
-003
-002
-001
0000
0001
0002
0003
0004
0005

case5

Input text is as below.

0008
000B
000E
0011
0014
0017
001A
001D
0020
0023

editType = 'modify'
prefix = '^', suffix = '$', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'hexadecimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = '0', sign = 'minus', align = 'right', radix = 'decimal', upperCase=true
start = 0, end = 0, increment = 0, add = 100, multiply = 2

Change conditions as above then push editAll button.
Then the result is as below.

0116
0122
0128
0134
0140
0146
0152
0158
0164
0170

case6

input text is empty.

  1. Input 10 to new line input.
  2. Push newLine button.










editType = 'insert'
prefix = '^', suffix = '$', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 4, paddingChar = '0', sign = 'minus', align = 'right', radix = 'hexadecimal', upperCase=true
start = 1, end = 0, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

0001
0002
0003
0004
0005
0006
0007
0008
0009
000A

case7

Input text is as below.

Num 000 Data1 Price Note
Num 000 Data2 Price Note
Num 000 Data3 Price Note
Num 000 Data4 Price Note
Num 000 Data5 Price Note
Num 000 Data6 Price Note
Num 000 Data7 Price Note

editType = 'overwrite'
prefix = 'num ', suffix = '', ignoreCase=true
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 6, paddingChar = '0', sign = 'minus', align = 'right', radix = 'decimal', upperCase=true
start = 0, end = 0, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

Num 000000 Data1 Price Note
Num 000001 Data2 Price Note
Num 000002 Data3 Price Note
Num 000003 Data4 Price Note
Num 000004 Data5 Price Note
Num 000005 Data6 Price Note
Num 000006 Data7 Price Note

case8

Input text is as below.

Num 000000 Data1 Price Note
Num 000001 Data2 Price Note
Num 000002 Data3 Price Note
Num 000003 Data4 Price Note
Num 000004 Data5 Price Note
Num 000005 Data6 Price Note
Num 000006 Data7 Price Note

editType = 'insert'
prefix = 'data. ', suffix = 'price', ignoreCase=true
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'decimal', targetCase = 'both', useCustom = false
digits = 2, paddingChar = '0', sign = 'minus', align = 'right', radix = 'decimal', upperCase=true
start = 0, end = 0, increment = 0, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

Num 000000 Data1 00Price0 Note
Num 000001 Data2 00Price1 Note
Num 000002 Data3 00Price2 Note
Num 000003 Data4 00Price3 Note
Num 000004 Data5 00Price4 Note
Num 000005 Data6 00Price5 Note
Num 000006 Data7 00Price6 Note

case9

Input text is as below.

  :
01:
02:
  :
  :
03:
04:
05:
  :
06:
FF:
FE:
  :
0a:
13:

editType = 'overwrite'
prefix = '^', suffix = ':', ignoreCase=false
targetPadding = '0', targetSign = 'minus', targetAlign = 'right',
targetRadix = 'hexadecimal', targetCase = 'both', useCustom = true, customTarget='0*-?[0-9a-fA-F]+|( )'
digits = 2, paddingChar = '0', sign = 'minus', align = 'right', radix = 'hexadecimal', upperCase=true
start = 0, end = 0, increment = 1, add = 0, multiply = 1

Change conditions as above then push editAll button.
Then the result is as below.

01:
02:
03:
04:
05:
06:
07:
08:
09:
0A:
0B:
0C:
0D:
0E:
0F: