Comments (25)
I'd love to see sublime-ToggleQuotes
in vsCode!
from vscode-quick-select.
I would like to toggle also between backticks (`) since those are required for variable substitution in JavaScript, e.g.
`string text ${variable} string text`
My suggestion is to not add a new command, but make it cycle between all three quote styles ", ' and `
from vscode-quick-select.
Yep. I like the idea. Should be simple to implement. I had that the other day when wanting to change an json object to array.
I just need to think through the flow.
For example, ctrl + " highlights the text inside the quotes (like it does now). Then if followed by ctrl + ', since there is already a selection, it replaces the "
to '
.
Sound good?
from vscode-quick-select.
@koskoci this is an extension. Search for "Quick and Simple Text Selection"
from vscode-quick-select.
I think we don't need to specify two combinations of keys and it's better to think it just as string. I mean for example ctrl
+'
( "
needs to holding shift
too ) select both 'string'
and "string"
and pressing ctrl
+'
again will switch between single and double quotes and so on. this idea can expand to other functionalities, I mean why we need two different key for selecting inner and outer? I personally prefer to pressing once to select inner and pressing it again to select outer (and pressing again expand to parent inner) and ideally the other key doing it reverse (from outer to inner) it's easier to remember and much efficient for using remaining keys on keyboard. ;)
from vscode-quick-select.
Here's the same plugin for Sublime https://github.com/colinta/SublimeChangeQuotes
You can put your cursor inside the text that is in quotes and then execute the command to replace the quotes. No selection needed. Works with
cmd+shift+'
by default.
Hope this can also be adopted to vscode.
from vscode-quick-select.
@raldred I've got the last version and I got
You sure that's it?
from vscode-quick-select.
Have you thought about adding the ability to change to backticks? I primarily use JavaScript, and in the era of ES6, I find myself having to utilize all 3 methods of quotes quite often and have yet to find a plugin that allows changing to backticks. I feel like this plugin is 90% of the way there
from vscode-quick-select.
from vscode-quick-select.
Just set the shortcut yourself? I think the action required for mapping is called extension.switchQuotes
mentioned in the readme.
from vscode-quick-select.
@doplumi release CMD after CMD+K, before ;
from vscode-quick-select.
hmm... I hear.
from vscode-quick-select.
There's another extension available which allows to switch between single and double quotes:
https://marketplace.visualstudio.com/items?itemName=vilicvane.es-quotes
from vscode-quick-select.
would be nice if there were a more universal feature to swap single <-> double quotes in all text grammars.
from vscode-quick-select.
Here's the same plugin for sublime https://github.com/spadgos/sublime-ToggleQuotes
Make one or more selections of strings including their quotes and then press the opposite quote mark. That is, if you have "test" press ', if you have 'test', press ".
from vscode-quick-select.
This is now fixed and published. You will probably want to change the shortcuts...
from vscode-quick-select.
This is a great step forward, thank you!
Any chance to not move the caret to the end of the string?
from vscode-quick-select.
Just tested it, it works like a dream! Thank you so much!
from vscode-quick-select.
How to use it, cause I can't find anything about it in vs code?
from vscode-quick-select.
@almadsen
OSX: cmd + k then ;
Windows: ctrl + k then ;
from vscode-quick-select.
I can't get this to work. Do I need to install an extension? Thanks!
from vscode-quick-select.
@dbankier Thanks, works like a charm!
from vscode-quick-select.
from vscode-quick-select.
@raldred yeah for sure, I was mainly asking if it was something that was considered or even wanted with this plugin. I don't wanna put in time adding it if it doesn't align with the goal of the plugin
from vscode-quick-select.
I always get this:
The key combination (Ctrl+K, Ctr+K) is not a command.
Whatever I try:
I'm working on Windows 10 with the latest version of VSCode (v1.62.0
) and latest version of the Quick and Simple Text Selection plugin (v0.2.9
)
from vscode-quick-select.
Related Issues (20)
- Selecting inside back tick adds unwanted backtick HOT 1
- Parenthesis in string literals should be ignored
- No keyboard shortcut for customize ⌘k ( and ⌘k {
- switchQuotes after selectEitherQuote leaks quote characters
- Suggestion: show commands in palette HOT 1
- Request: select current query
- [Ctrl] + [K], ["] and [Ctrl] + [K], ['] not working on Windows. HOT 6
- Automate selection with one keyboard shortcut HOT 5
- extension.selectBackTick support for markdown code chunks ```
- Not working on MacOS HOT 3
- Not working recently HOT 1
- command 'extension.selectSingleQuote' not found error
- Add extension to Open VSX Registry HOT 1
- Support multiline strings
- Does nothing if an escaped quote character is in the string HOT 2
- Suggestion: toggle between of select excluding brackets or including brackets
- reccomend adding some sort've logo HOT 1
- IDEA: SelectEitherQuoteOuter
- What does "hack" do?
- Select inside tag: maximum call stack size exceeded
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-quick-select.