vscode-restructuredtext
vscode-restructuredtext copied to clipboard
Snippets tagging selected text
This adds support for tagging selected text as roles/directives. This makes tagging existing text a lot easier. The negative side effect is that example default text can not be provided in a nice way and has therefor been removed. If included the default text would be appended to the selected text which is confusing.
For roles, the selected text is scanned for newline characters and replaced by space since these characters are not allowed. Normally a single or a few words are expected to be selected.
Included is also an example keyboard shortcut file for each snippet. You might want to add that to the default setup. I have used ctrl-k to initiate the shortcut sequence and tried to use reasonable second letters to select which snippet to use.
Also adds a snippet for the todo directive.
see #145
I just want to check if there is anything more I can do to get this MR approved and merged. Best regards Roger
Generally speaking, adding too many keyboard shortcuts is not recommended for an extension, as it might conflict with other extensions (or VSCode). So I don't plan to accept it at this moment.
Ok, but isn’t possible to have the shortcuts only active for only rst documents? However I guess it still would risk conflicting with shortcuts that are valid for all file types. Would you accept an MR with a much reduced set of shortcuts, ie only the most commonly used?
There seems to be a separate extension (not by me) already, so you might consider sending the changes to that,
https://marketplace.visualstudio.com/items?itemName=snowkylin.restructuredtext-shortcut