diff options
| author | Stephen Blott | 2015-02-09 11:40:53 +0000 |
|---|---|---|
| committer | Stephen Blott | 2015-02-09 11:40:53 +0000 |
| commit | 0bf605a934115083e700f5de090f39841417482a (patch) | |
| tree | 408c191bd702da6847bca9943f6eba93ad28b209 /background_scripts | |
| parent | ac648a0e9f53c2fc359daa68309c25dd8c9db031 (diff) | |
| parent | ed306994697f6f9f5e13f9d018b5c7ffa2fff680 (diff) | |
| download | vimium-0bf605a934115083e700f5de090f39841417482a.tar.bz2 | |
Merge branch 'visual-and-edit-modes'
Conflicts:
background_scripts/main.coffee
content_scripts/vimium_frontend.coffee
lib/keyboard_utils.coffee
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/commands.coffee | 6 | ||||
| -rw-r--r-- | background_scripts/main.coffee | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 114f46ce..79cb9ee0 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -112,6 +112,8 @@ Commands = "goToRoot", "enterInsertMode", "enterVisualMode", + "enterVisualLineMode", + # "enterEditMode", "focusInput", "LinkHints.activateMode", "LinkHints.activateModeToOpenInNewTab", @@ -197,6 +199,8 @@ defaultKeyMappings = "i": "enterInsertMode" "v": "enterVisualMode" + "V": "enterVisualLineMode" + # "gv": "enterEditMode" "H": "goBack" "L": "goForward" @@ -286,6 +290,8 @@ 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", { passCountToFunction: true }] diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 6853c3af..5a126ceb 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -168,9 +168,11 @@ upgradeNotificationClosed = (request) -> sendRequestToAllTabs({ name: "hideUpgradeNotification" }) # -# Copies some data (request.data) to the clipboard. +# Copies or pastes some data (request.data) to/from the clipboard. +# We return null to avoid the return value from the copy operations being passed to sendResponse. # copyToClipboard = (request) -> Clipboard.copy(request.data); null +pasteFromClipboard = (request) -> Clipboard.paste(); null # # Selects the tab with the ID specified in request.id @@ -647,6 +649,7 @@ sendRequestHandlers = upgradeNotificationClosed: upgradeNotificationClosed updateScrollPosition: handleUpdateScrollPosition copyToClipboard: copyToClipboard + pasteFromClipboard: pasteFromClipboard isEnabledForUrl: isEnabledForUrl saveHelpDialogSettings: saveHelpDialogSettings selectSpecificTab: selectSpecificTab |
