Comments (5)
This is a good idea. I added at #22.
from vscode-toggle-quotes.
Interesting. yes, this would be outside. Now, what you could do, is do a regex multi selection, in the search,
There must be a way to select all matches. And then, toggle it. Should work.
from vscode-toggle-quotes.
That's tricky because Toggle Quotes only seems to work if the select text is exactly between a pair of quotes and not if the selected text includes the quotes.
If I try (["'`]).*?\1
then I get this
That won't work because the match includes the quotes and Toggle Quotes won't accept that
If I try (?<=(["'`])).*?(?=\1)
then I get this
That won't work because of the text outside the quotes that still gets recognized as being between quotes (": "
)
Finally, I came across this solution: (?<=["])[^"]*(?="(?:(?:[^"]*"){2})*[^"]*$)
It works only for one type of quote at a time, and it's still much more complicated than the other expressions. Would it be possible for the Toggle Quotes extension to be more lenient with what particular text needs to be selected?
from vscode-toggle-quotes.
interesting. I understand the regex challenge.
The issue is that the "ignore selected" text is by design to allow a simple and custom way to "exclude" some text from the toggle change.
Now, perhaps, you can split it two steps. First get names '...':
, before the ':
, and then, another step with the : '
assuming all is formatted this way.
from vscode-toggle-quotes.
Could Toggle Quotes be split into two commands, "Toggle Quotes: Surrounding" and "Toggle Quotes: Within"? It seems like the "within" option would be even easier to implement than the original "surrounding" option, and it would give us the ability to select all and then toggle quotes for the whole document.
from vscode-toggle-quotes.
Related Issues (20)
- Add a command "Toggle Quotes: Within", allow to change default
- Add/remove quotes HOT 7
- Is this still working? HOT 8
- doc - update doc showing how selection affect the toggling HOT 1
- Publish extension to Open VSX HOT 7
- Svelte files don't currently support backticks HOT 3
- Support multi character beginning/end strings, e.g. Ruby's Percent Strings, here docs etc. HOT 2
- support empty case HOT 1
- Running the contributed command: 'editor.togglequotes' failed. HOT 2
- Powershell HOT 1
- Add extension to Open VSX Registry HOT 2
- Not working on any file ext: "Cannot read property 'begin' of undefined" HOT 11
- Support unbalanced/asymmetrical quote pairs
- Wrong default keybinding on nordic keyboard layout :bug: HOT 4
- The 'Toggle Quotes' extension is not available in Visual Studio Code for the Web. HOT 1
- Toggling is sometimes super slow HOT 4
- How to change default keyboard shortcut HOT 1
- Toggle curly braces in JSX/HTML properties?
- Toggling brackets not working + multiple config HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-toggle-quotes.