ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Toggle​Quotes

by spadgos ALL

ST2 Plugin for toggling quote marks

Details

  • 2016.12.03.16.39.55
  • github.​com
  • github.​com
  • 8 years ago
  • 31 minutes ago
  • 13 years ago

Installs

  • Total 11K
  • Win 4K
  • Mac 5K
  • Linux 2K
Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10
Windows 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 2 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
Mac 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0
Linux 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 2 0 0 0 1 1 4 0 1 1 0 0 3 4 4 8 51 2 6 2 1 0 1

Readme

Source
raw.​githubusercontent.​com

ToggleQuotes is a Sublime Text plugin which lets you easily toggle quote marks in your code.

Installation

With Package Control

If you have the Package Control package installed, you can install ToggleQuotes from inside Sublime Text itself. Open the Command Palette and select “Package Control: Install Package”, then search for ToggleQuotes and you're done!

Without Package Control

Go to your Sublime Text 2/3 Packages directory and clone the repository using the command below:

git clone https://github.com/spadgos/sublime-ToggleQuotes.git ToggleQuotes

Don't forget to keep updating it, though!

Example

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

// With this selected:
"test"
// Press: '
// Result is:
'test'

Internal quotes are escaped, and already-escaped quotes are unescaped for you:

// With this selected:
"hello 'world'"
// Press: '
// Result is:
'hello \'world\''

// With this selected:
'hello \'world\''
// Press: "
// Result is:
"hello 'world'"

If you have multiple selections which have different quote marks, you can toggle them all by pressing Ctrl+'

You can also toggle the quote marks of a string by simply putting your cursor inside the string and pressing Ctrl+'. The selection will expand to the entire string automatically.

Version History

  • 1.2.0 December 2, 2016
    • Added ability to toggle backquotes by pressing ` with string selected, or Ctrl+' to cycle through quote types.
  • 1.1.0 January 15, 2012
    • Added Ctrl+' hotkey to expand to selection inside of strings.
  • 1.0.0 November 8, 2011
    • First release