-
-
Save jeremychase/796f5b1fdd57e9f5e0ff to your computer and use it in GitHub Desktop.
vim-mode ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[573] 15:42:49 tech-chase-mbpr:find-and-replace $ git diff | |
diff --git a/lib/find.coffee b/lib/find.coffee | |
index 835e6bc..1fc57cf 100644 | |
--- a/lib/find.coffee | |
+++ b/lib/find.coffee | |
@@ -90,6 +90,12 @@ module.exports = | |
@findPanel.show() | |
@findView.focusFindEditor() | |
+ @subscriptions.add atom.commands.add 'atom-workspace', 'find-and-replace:hide-all', => | |
+ @createViews() | |
+ @projectFindPanel.hide() | |
+ @findPanel.hide() | |
+ console.log("find-and-replace:hide-all called") | |
+ | |
@subscriptions.add atom.commands.add 'atom-workspace', 'find-and-replace:show', => | |
@createViews() | |
@projectFindPanel.hide() | |
diff --git a/package.json b/package.json | |
index 4160d4d..012310b 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -9,6 +9,7 @@ | |
"project-find:show", | |
"project-find:toggle", | |
"project-find:show-in-current-directory", | |
+ "find-and-replace:hide-all", | |
"find-and-replace:show", | |
"find-and-replace:toggle", | |
"find-and-replace:find-next", | |
[574] 15:44:45 tech-chase-mbpr:find-and-replace $ cd .. | |
[575] 15:44:51 tech-chase-mbpr:atom $ cd vim-mode/ | |
[576] 15:44:54 tech-chase-mbpr:vim-mode $ git diff | |
diff --git a/lib/vim-state.coffee b/lib/vim-state.coffee | |
index db59ee5..89acee5 100644 | |
--- a/lib/vim-state.coffee | |
+++ b/lib/vim-state.coffee | |
@@ -31,6 +31,8 @@ class VimState | |
@marks = {} | |
@subscriptions.add @editor.onDidDestroy => @destroy() | |
+ @workspaceElement = atom.views.getView(atom.workspace) | |
+ | |
@editorElement.addEventListener 'mouseup', @checkSelections | |
if atom.commands.onDidDispatch? | |
@subscriptions.add atom.commands.onDidDispatch (e) => | |
@@ -557,6 +559,7 @@ class VimState | |
@clearOpStack() | |
@editor.clearSelections() | |
@activateNormalMode() | |
+ atom.commands.dispatch(@workspaceElement, 'find-and-replace:hide-all') | |
# Private: A generic way to create a Register prefix based on the event. | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment