Giter Site home page Giter Site logo

Comments (25)

anlek avatar anlek commented on June 28, 2024 9

I'd love to see sublime-ToggleQuotes in vsCode!

from vscode-quick-select.

Ciantic avatar Ciantic commented on June 28, 2024 6

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.

dbankier avatar dbankier commented on June 28, 2024 4

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.

dbankier avatar dbankier commented on June 28, 2024 3

@koskoci this is an extension. Search for "Quick and Simple Text Selection"

from vscode-quick-select.

okian avatar okian commented on June 28, 2024 2

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.

drgullin avatar drgullin commented on June 28, 2024 2

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.

 avatar commented on June 28, 2024 2

@raldred I've got the last version and I got
schermata 2017-05-21 alle 17 33 39

You sure that's it?

from vscode-quick-select.

AriTheElk avatar AriTheElk commented on June 28, 2024 2

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.

dbankier avatar dbankier commented on June 28, 2024 1

from vscode-quick-select.

Ciantic avatar Ciantic commented on June 28, 2024 1

Just set the shortcut yourself? I think the action required for mapping is called extension.switchQuotes mentioned in the readme.

from vscode-quick-select.

batamire avatar batamire commented on June 28, 2024 1

@doplumi release CMD after CMD+K, before ;

from vscode-quick-select.

dbankier avatar dbankier commented on June 28, 2024

hmm... I hear.

from vscode-quick-select.

wmaurer avatar wmaurer commented on June 28, 2024

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.

wprater avatar wprater commented on June 28, 2024

would be nice if there were a more universal feature to swap single <-> double quotes in all text grammars.

from vscode-quick-select.

cuevven avatar cuevven commented on June 28, 2024

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.

dbankier avatar dbankier commented on June 28, 2024

This is now fixed and published. You will probably want to change the shortcuts...

from vscode-quick-select.

anlek avatar anlek commented on June 28, 2024

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.

anlek avatar anlek commented on June 28, 2024

Just tested it, it works like a dream! Thank you so much!

from vscode-quick-select.

almadsen avatar almadsen commented on June 28, 2024

How to use it, cause I can't find anything about it in vs code?

from vscode-quick-select.

raldred avatar raldred commented on June 28, 2024

@almadsen
OSX: cmd + k then ;
Windows: ctrl + k then ;

from vscode-quick-select.

koskoci avatar koskoci commented on June 28, 2024

I can't get this to work. Do I need to install an extension? Thanks!

from vscode-quick-select.

koskoci avatar koskoci commented on June 28, 2024

@dbankier Thanks, works like a charm!

from vscode-quick-select.

raldred avatar raldred commented on June 28, 2024

from vscode-quick-select.

AriTheElk avatar AriTheElk commented on June 28, 2024

@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.

kristofmulier avatar kristofmulier commented on June 28, 2024

I always get this:

The key combination (Ctrl+K, Ctr+K) is not a command.

Whatever I try:

image

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.