Newline Seperated to List
A Sublime Text package that converts newline separated document to a list
Details
Installs
- Total 374
- Win 203
- Mac 125
- Linux 46
Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 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 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Mac | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
NewlineSeparatedToList for Sublime Text 3
This package makes converting newline separated document (or selection of document) to a list easier.
Settings
Set ask_for_bracket_type
to false
and default_bracket_type
to avoid having to select backet type every time.
NOTE: Setting
ask_for_bracket_type
and not settingdefault_bracket_type
will show the prompt to select bracket anyway.
{
"ask_for_bracket_type": false,
"default_bracket_type": "curved"
}
Accepted bracket types
Bracket Type | Example |
---|---|
curved | ( ) |
square | [ ] |
curly | { } |
none |
Usage
Tools -> Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
Options: * Newline to List: Double quotes - adds double quotes to each item in list, escapes any double quotes already present * Newline to List: No quotes - no quotes will be added * Newline to List: Single quotes - adds single quotes to each item in list, escapes any single quotes already present * Newline to List: Dynamic double quotes - adds double quotes to each non-digits item in list, escapes any double quotes already present * Newline to List: Dynamic single quotes - adds single quotes to each non-digits item in list, escapes any single quotes already present
Examples
one
two
three
4
five
# Becomes (with square brackets)
["one", "two", "three", "4", "five"] #with double quotes
[one, two, three, 4, five] #with no quotes
['one', 'two', 'three', '4', 'five'] #with single quotes
["one", "two", "three", 4, "five"] #with dynamic double quotes
['one', 'two', 'three', 4, 'five'] #with dynamic single quotes
one
two
three
4
five
# Becomes (with no brackets)
"one", "two", "three", "4", "five" #with double quotes
one, two, three, 4, five #with no quotes
'one', 'two', 'three', '4', 'five' #with single quotes
"one", "two", "three", 4, "five" #with dynamic double quotes
'one', 'two', 'three', 4, 'five' #with dynamic single quotes