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
  • 1 year ago
  • 38 minutes ago
  • 6 years ago

Installs

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