You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the additional snippets in #143 they work fine!
When playing with them I found that it is not possible to select some text and run the snippet "on" the selected text to tag it with the role/directive.
I suggest that we define each snippets for all roles using $TM_SELECTED_TEXT${1:} as shown below in order to allow tagging selected text. Note the removed blank space before $0 to avoid extra space to be inserted.
Also, for directives that are used to tag text (i.e. stuff like .. tip:: but not .. image:: (i.e. all currently implemented directives apart from image, figure and label) I woiuld suggest to use a similar approach with a few additional new lines as shown below in order to be able to tag selected text no matter if on a single or multiple lines.
I.e. with the selected text starting one line below the directive and indented with three blanks to start at the same column as the directive name. For example resulting in this structure if selecting the lines bbb and ccc Before running the snippet (with the cursor on indented on the line after ccc).
aaa
.. tip::
bbb
ccc
ddd
The only downside I can see with using $TM_SELECTED_TEXT${1:} is that you will not get any helping default text, but I Think the possibility to tag selected text benefits a lot more.
Finally you might want to consider adding the snippets as keyboard shortcuts for rst-documents like below.
I created a PR for you to review to help.
Hälsar / Best regards
Roger Lindholm
System Architect
Basalt AB
POSTADRESS Box 38, 745 21 Enköping, Sweden
BESÖKSADRESS Basaltgatan 3
TELEFON +46 171- 17 05 00
MOBIL +46 722 01 8008
E-POST roger.lindholm@basalt.se
________________________________
Från: Lex Li <notifications@github.com>
Skickat: söndag, februari 10, 2019 2:21 fm
Till: vscode-restructuredtext/vscode-restructuredtext
Kopia: Roger Lindholm; Author
Ämne: Re: [vscode-restructuredtext/vscode-restructuredtext] Select text and tag via shortcut (#145)
Nice idea but might take a few days to plan out. Will provide an update once ready.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#145 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AFIIXWfniT4Nlj8hsLEx_BqF901yxpASks5vL2YCgaJpZM4aywGr>.
Thanks for the additional snippets in #143 they work fine!
When playing with them I found that it is not possible to select some text and run the snippet "on" the selected text to tag it with the role/directive.
I suggest that we define each snippets for all roles using
$TM_SELECTED_TEXT${1:}
as shown below in order to allow tagging selected text. Note the removed blank space before $0 to avoid extra space to be inserted.Also, for directives that are used to tag text (i.e. stuff like
.. tip::
but not.. image::
(i.e. all currently implemented directives apart from image, figure and label) I woiuld suggest to use a similar approach with a few additional new lines as shown below in order to be able to tag selected text no matter if on a single or multiple lines.I.e. with the selected text starting one line below the directive and indented with three blanks to start at the same column as the directive name. For example resulting in this structure if selecting the lines bbb and ccc Before running the snippet (with the cursor on indented on the line after ccc).
The only downside I can see with using
$TM_SELECTED_TEXT${1:}
is that you will not get any helping default text, but I Think the possibility to tag selected text benefits a lot more.Finally you might want to consider adding the snippets as keyboard shortcuts for rst-documents like below.
Environment
The text was updated successfully, but these errors were encountered: