Newline Seperated to List
A Sublime Text package that converts newline separated document to a list
Details
Installs
- Total 376
- Win 205
- Mac 125
- Linux 46
Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | Jul 29 | Jul 28 | Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 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 | 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 | 0 | 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