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.
Adds the necessary features to add a regexp/command plugin.
My use-case is to be able to open a file at a specific line in my IDE, just by clicking on an error message.
For instance, for opening a python script indicated in a python error, within vim, use the following configuration with the RunCmdOnMatch plugin implemented in this PR:
\B(/\S+?\.py)\S{2}\sline\s(\d+)
gvim --servername IDE --remote +{1} {0}
This adds three interconnected features:
terminator://
URL.The overall architecture is not really elegant, but it is the smallest footprint I found for implementing a match/command plugin.
It needs a URLhandler metaclass and will instantiate on-the-fly one plugin per configured match/command pair (hence the necessity to hide them, as the user is not supposed to interact with them anyway).
As those hidden plugins are responsible for "opening" the URL they match, a way to bypass the URL handler was needed. Returning
None
already had a semantic, so I opted for a fake protocol in the URI.The GUI code is almost a copy/paste of the custom commands plugin, so it would be better to have the plugin window's entry point (instead of the contextual menu) and keep a single code base.
I'm not sure where to edit a user documentation.