Surround selected text with a command input by the user
See original GitHub issueThis is a follow up on #246 from @jlanza
The current surrounding command only enables the user to select a command from a fixed list. Allowing the user input would help. I am summarising the discussion in #246.
What could be done is to wrap the selections with {...}
and put a multi-cursor before the opening {
. Quoting @jlanza, other options could be
- Something similar to the one you have already implemented. The only difference would be that in case the typed text is not in the list, it should be accepted. For instance, right now \ac for glossaries is not included in the list, so I cannot use the keyboard shortcut.
- Another option would be to enable adding new commands to a configuration file, so you will be adding new commands to the list. I guess your current list is hard coded somewhere else. This way you won’t be typing something undesired. It is less friendly.
- You can also think on a mix between option 1 and 2. That is, when you type and click enter on a non-included one, it is added to
settings.json
in your local folder.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Surround Selection - Visual Studio Marketplace
Surround selected text with your input, inspired by the Sublime Text ... Launch VS Code Quick Open ( Ctrl+P ), paste the following...
Read more >How to use surround-with code snippets - Visual Studio ...
In the Code Editor, select text to surround. From the Edit menu, select IntelliSense and then select the Surround With command.
Read more >Visual Studio Code Surround With - Stack Overflow
In VS Code hold Command + Shift + P then write: "> Preferences: Open Keyboard Shortcuts ( ...
Read more >Adding parenthesis around highlighted text in Vim - Super User
In addtition to Dmitry's suggestion of the surround plugin, adding parenthesis around highlighted text can be done with the following command ...
Read more >Pass visually-selected text as argument to script
The command works fine when there is no \n character in the selected text (using Visual mode). :vmap <Leader>tts 0y:silent exec ":!/home/user/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Then, I guess just including this ones in the QuickPick window would be more than enough.
Please open a new issue filling out all the information required in the issue template.