Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snippets tagging selected text #146

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lindhor
Copy link

@lindhor lindhor commented Feb 10, 2019

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

- Adds todo directive snippet
- Adds support to tag selected text
@CLAassistant
Copy link

CLAassistant commented Feb 10, 2019

CLA assistant check
All committers have signed the CLA.

@lindhor
Copy link
Author

lindhor commented Apr 6, 2019

I just want to check if there is anything more I can do to get this MR approved and merged.
Best regards
Roger

@lextm
Copy link
Member

lextm commented Apr 6, 2019

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.

@lextm lextm added the idea label Apr 6, 2019
@lindhor
Copy link
Author

lindhor commented Apr 6, 2019

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?

@lextm
Copy link
Member

lextm commented Apr 13, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants