Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Terminates the current line with a semicolon.
#### End Line with a comma `CTRL-,`
Terminates the current line with a comma (great for object literals).

#### End Line `CTRL-.`
Terminates the current line with a dot.

#### End New Line `CTRL-ENTER`
Terminates the current line with a colon or semicolon, followed with a new line. A comma is inserted when the cursor is inside an object literal, otherwise a semicolon is inserted.

Expand Down
1 change: 1 addition & 0 deletions keymaps/turbo-javascript.cson
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
'atom-text-editor':
'ctrl-;': 'turbo-javascript:end-line'
'ctrl-,': 'turbo-javascript:end-line-comma'
'ctrl-.': 'turbo-javascript:end-line-dot'
'ctrl-enter': 'turbo-javascript:end-new-line'
'ctrl-b': 'turbo-javascript:wrap-block'
2 changes: 2 additions & 0 deletions lib/turbo-javascript.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module.exports =
'turbo-javascript:end-line': => @endLine(';', false)
atom.commands.add 'atom-text-editor',
'turbo-javascript:end-line-comma': => @endLine(',', false)
atom.commands.add 'atom-text-editor',
'turbo-javascript:end-line-dot': => @endLine('.', false)
atom.commands.add 'atom-text-editor',
'turbo-javascript:end-new-line': => @endLine('', true)
atom.commands.add 'atom-text-editor',
Expand Down
1 change: 1 addition & 0 deletions menus/turbo-javascript.cson
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{'label': 'End line and return', 'command': 'turbo-javascript:end-new-line'}
{'label': 'End line with semicolon', 'command': 'turbo-javascript:end-line'}
{'label': 'End line with comma', 'command': 'turbo-javascript:end-line-comma'}
{'label': 'End line with dot', 'command': 'turbo-javascript:end-line-dot'}
{'label': 'Insert or remove block', 'command': 'turbo-javascript:wrap-block'}
]
]
Expand Down