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

Toggle​Quotes

by spadgos ST2/ST3

ST2 Plugin for toggling quote marks

Details

  • 2016.12.03.16.39.55
  • github.​com
  • github.​com
  • 2 years ago
  • 18 minutes ago
  • 7 years ago

Installs

  • Total 9K
  • Win 3K
  • OS X 4K
  • Linux 2K
Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1
Windows 1 1 0 1 2 1 1 3 0 1 0 1 0 0 0 0 1 2 1 0 1 1 2 1 3 1 1 0 1 1 0 0 0 0 2 0 0 0 2 0 1 0 1 0 1 1
OS X 0 2 0 0 0 0 0 0 0 0 1 0 0 2 1 1 1 0 0 3 1 2 0 0 1 1 0 0 2 0 1 0 1 0 0 1 0 1 1 0 0 2 0 0 0 0
Linux 1 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 2 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