Add commands for managing queries in namedqueries mode#1533
Open
brenns10 wants to merge 4 commits intopazz:masterfrom
Open
Add commands for managing queries in namedqueries mode#1533brenns10 wants to merge 4 commits intopazz:masterfrom
brenns10 wants to merge 4 commits intopazz:masterfrom
Conversation
Both classes' apply() methods call FlushCommand(), which needs to be
awaited in order to complete. This commit resolves the following errors
when using the savequery/removequery commands:
RuntimeWarning: coroutine 'UI.apply_command' was never awaited
pazz
reviewed
Jul 5, 2020
| def afterwards(self): | ||
| self.ui.current_buffer.rebuild() | ||
|
|
||
| """remove the selected namedquery""" |
Owner
There was a problem hiding this comment.
Codacy found an issue: String statement has no effect
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I wanted to use namedqueries as my main startup mode. I hadn't used namedqueries before and wanted some easy management tools for them. So this adds the following commands:
query-rename NEWNAMEquery-duplicate NEWNAME(newname defaults to oldname_copy, so this can be bound to other commands)query-removeis a shortcut forremovequeryglobal command, which deletes the currently highlighted query (after a prompt)query-refineopens a prompt where you can edit thesavequerycommand for the currently highlighted command. This is useful because it allows you to edit both the query name, and the query itself. This is effectively both an "edit" command, as well as a "edit and save as" command.This branch is only preliminary - I wanted to check if there were any general objections to the approaches, naming, etc. If not, then I'd like to add documentation and tests.
By the way, great project! I'm enjoying using it and hope to be contributing more.