From 28325e4aed05ec6c3c5be1c3b39b827c2fce4015 Mon Sep 17 00:00:00 2001 From: Mark Pradhan Date: Tue, 17 May 2016 17:34:05 +0200 Subject: [PATCH 1/4] Added ending line with dot. I just copy pasted the code and added support so we can end the line with a dot. --- lib/turbo-javascript.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/turbo-javascript.coffee b/lib/turbo-javascript.coffee index 34d7fbf..bb0c82e 100644 --- a/lib/turbo-javascript.coffee +++ b/lib/turbo-javascript.coffee @@ -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', From 42fc4650b1c6f4e68e32d970610675717c2170e6 Mon Sep 17 00:00:00 2001 From: Mark Pradhan Date: Tue, 17 May 2016 17:35:08 +0200 Subject: [PATCH 2/4] Added keymap to end the line with a dot. --- keymaps/turbo-javascript.cson | 1 + 1 file changed, 1 insertion(+) diff --git a/keymaps/turbo-javascript.cson b/keymaps/turbo-javascript.cson index 407d2b1..61db7ec 100644 --- a/keymaps/turbo-javascript.cson +++ b/keymaps/turbo-javascript.cson @@ -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' From 31e6205b4925a0f4bb3c38af4e90ab3c592076e1 Mon Sep 17 00:00:00 2001 From: Mark Pradhan Date: Tue, 17 May 2016 17:35:39 +0200 Subject: [PATCH 3/4] Added end of line with dot. --- menus/turbo-javascript.cson | 1 + 1 file changed, 1 insertion(+) diff --git a/menus/turbo-javascript.cson b/menus/turbo-javascript.cson index 027096b..e323b47 100644 --- a/menus/turbo-javascript.cson +++ b/menus/turbo-javascript.cson @@ -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'} ] ] From b4eb765bcdb244ea26271665b127d61dc20a802e Mon Sep 17 00:00:00 2001 From: Mark Pradhan Date: Tue, 17 May 2016 17:36:06 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 497cab4..88ad65b 100644 --- a/README.md +++ b/README.md @@ -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.