From 0ec38c1050b00845abaa2faa9f56d04c9d2b8992 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 21 Jan 2015 11:34:56 +0000 Subject: Edit mode: initial framework. --- background_scripts/commands.coffee | 3 +++ 1 file changed, 3 insertions(+) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 485195a9..f8167042 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -112,6 +112,7 @@ Commands = "goToRoot", "enterInsertMode", "enterVisualMode", + "enterEditMode", "focusInput", "LinkHints.activateMode", "LinkHints.activateModeToOpenInNewTab", @@ -197,6 +198,7 @@ defaultKeyMappings = "i": "enterInsertMode" "v": "enterVisualMode" + "gv": "enterEditMode" "H": "goBack" "L": "goForward" @@ -286,6 +288,7 @@ commandDescriptions = enterInsertMode: ["Enter insert mode", { noRepeat: true }] enterVisualMode: ["Enter visual mode (not yet implemented)", { noRepeat: true }] + enterEditMode: ["Enter vim-like edit mode (not yet implemented)", { noRepeat: true }] focusInput: ["Focus the first text box on the page. Cycle between them using tab", { passCountToFunction: true }] -- cgit v1.2.3 From 256beee031efef70f4ee750044d9e697d66868bd Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Thu, 22 Jan 2015 16:50:58 +0000 Subject: Visual/edit modes: develop edit mode. - implement "i", "a". - fix "w" for edit mode. - try out "e" for enter edit mode. - initial implementation "o", "O" - Suppress backspace and delete. - Scroll in text areas. --- background_scripts/commands.coffee | 3 +++ 1 file changed, 3 insertions(+) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index f8167042..f79f495b 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -198,7 +198,10 @@ defaultKeyMappings = "i": "enterInsertMode" "v": "enterVisualMode" + # NOTE(smblott). We'll try two default bindings for enterEditMode, and see which ends up feeling mode + # natural. "gv": "enterEditMode" + "e": "enterEditMode" "H": "goBack" "L": "goForward" -- cgit v1.2.3 From e1b7b0a963490b0991d72a0143f489e0bc1e8096 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 23 Jan 2015 11:02:31 +0000 Subject: Visual/edit modes: more (and better) commands. --- background_scripts/commands.coffee | 3 --- 1 file changed, 3 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index f79f495b..67c4b9ad 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -198,9 +198,6 @@ defaultKeyMappings = "i": "enterInsertMode" "v": "enterVisualMode" - # NOTE(smblott). We'll try two default bindings for enterEditMode, and see which ends up feeling mode - # natural. - "gv": "enterEditMode" "e": "enterEditMode" "H": "goBack" -- cgit v1.2.3 From d9462e5d1e3ebb8f2fedc400b05c4c545fada142 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 24 Jan 2015 07:16:37 +0000 Subject: Visual/edit modes: more edit-mode commands. - "dw", "3dw", "d3w" - "dc", "3dc", "d3c" - "D" - "C" Also refactor enterInsertMode. Also major refactor of interface between edit and visual modes. --- background_scripts/main.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index c1c8dfc8..37d219df 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -168,9 +168,10 @@ upgradeNotificationClosed = (request) -> sendRequestToAllTabs({ name: "hideUpgradeNotification" }) # -# Copies some data (request.data) to the clipboard. +# Copies or pastes some data (request.data) to/from the clipboard. # copyToClipboard = (request) -> Clipboard.copy(request.data) +pasteFromClipboard = (request) -> Clipboard.paste() # # Selects the tab with the ID specified in request.id @@ -647,6 +648,7 @@ sendRequestHandlers = upgradeNotificationClosed: upgradeNotificationClosed updateScrollPosition: handleUpdateScrollPosition copyToClipboard: copyToClipboard + pasteFromClipboard: pasteFromClipboard isEnabledForUrl: isEnabledForUrl saveHelpDialogSettings: saveHelpDialogSettings selectSpecificTab: selectSpecificTab -- cgit v1.2.3 From 9c4603680284a4e00f11b097aebc65c6f6c0af07 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 24 Jan 2015 17:50:47 +0000 Subject: Visual/edit modes: visual line mode. --- background_scripts/commands.coffee | 3 +++ 1 file changed, 3 insertions(+) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 67c4b9ad..80f18409 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -112,6 +112,7 @@ Commands = "goToRoot", "enterInsertMode", "enterVisualMode", + "enterVisualLineMode", "enterEditMode", "focusInput", "LinkHints.activateMode", @@ -198,6 +199,7 @@ defaultKeyMappings = "i": "enterInsertMode" "v": "enterVisualMode" + "V": "enterVisualLineMode" "e": "enterEditMode" "H": "goBack" @@ -288,6 +290,7 @@ commandDescriptions = enterInsertMode: ["Enter insert mode", { noRepeat: true }] enterVisualMode: ["Enter visual mode (not yet implemented)", { noRepeat: true }] + enterVisualLineMode: ["Enter visual line mode (not yet implemented)", { noRepeat: true }] enterEditMode: ["Enter vim-like edit mode (not yet implemented)", { noRepeat: true }] focusInput: ["Focus the first text box on the page. Cycle between them using tab", -- cgit v1.2.3 From ef9a8473d7d6b932de21642684f27e7696aac01b Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 26 Jan 2015 06:31:34 +0000 Subject: Visual/edit modes: minor changes. --- background_scripts/commands.coffee | 1 + 1 file changed, 1 insertion(+) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 80f18409..b8623fc8 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -201,6 +201,7 @@ defaultKeyMappings = "v": "enterVisualMode" "V": "enterVisualLineMode" "e": "enterEditMode" + "gv": "enterEditMode" "H": "goBack" "L": "goForward" -- cgit v1.2.3 From f81080f951a02524b7c681546e309ede3955fbe6 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 3 Feb 2015 16:13:25 +0000 Subject: Visual/edit modes: remove "e" binding for edit mode. The "e" binding for edit mode is super convenient. However, it clashes with "e" bindings on Gmail and Google's Inbox. If you get too used to it, then you keep archiving messages unintentionally. So, let's try just the "gv" binding for now. --- background_scripts/commands.coffee | 1 - 1 file changed, 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index b8623fc8..76081068 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -200,7 +200,6 @@ defaultKeyMappings = "i": "enterInsertMode" "v": "enterVisualMode" "V": "enterVisualLineMode" - "e": "enterEditMode" "gv": "enterEditMode" "H": "goBack" -- cgit v1.2.3 From 325ebc88fe3e1b79e5165bbc35db119e58609932 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 9 Feb 2015 11:35:18 +0000 Subject: Visual/edit modes: disable edit mode for merge to master. --- background_scripts/commands.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 76081068..ae065f55 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -113,7 +113,7 @@ Commands = "enterInsertMode", "enterVisualMode", "enterVisualLineMode", - "enterEditMode", + # "enterEditMode", "focusInput", "LinkHints.activateMode", "LinkHints.activateModeToOpenInNewTab", @@ -200,7 +200,7 @@ defaultKeyMappings = "i": "enterInsertMode" "v": "enterVisualMode" "V": "enterVisualLineMode" - "gv": "enterEditMode" + # "gv": "enterEditMode" "H": "goBack" "L": "goForward" @@ -291,7 +291,7 @@ commandDescriptions = enterInsertMode: ["Enter insert mode", { noRepeat: true }] enterVisualMode: ["Enter visual mode (not yet implemented)", { noRepeat: true }] enterVisualLineMode: ["Enter visual line mode (not yet implemented)", { noRepeat: true }] - enterEditMode: ["Enter vim-like edit mode (not yet implemented)", { noRepeat: true }] + # enterEditMode: ["Enter vim-like edit mode (not yet implemented)", { noRepeat: true }] focusInput: ["Focus the first text box on the page. Cycle between them using tab", { passCountToFunction: true }] -- cgit v1.2.3