Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement
Toggle a single-quoted string to a double-quoted string, and vice versa.
This is a package for Atom, a hackable text editor for the 21st Century.
Place the cursor within a string and execute the Toggle Quotes: Toggle
command to toggle that string between single and double quotes. Only available when using a grammar that supports single-quoted and double-quoted strings, or any other configured string character (e.g. JavaScript, Python, Ruby, etc.).
Command | Description |
---|---|
toggle-quotes:toggle |
Toggles the quote characters used for quoted strings between the configured Quote Characters (' and " by default). |
Command | Linux | OS X | Windows |
---|---|---|---|
toggle-quotes:toggle |
Ctrl-" | Cmd-" | Ctrl-" |
Custom keybindings can be added by referencing the above commands. To learn more, visit the Using Atom: Basic Customization or Behind Atom: Keymaps In-Depth sections in the flight manual.
Configuration Key Path | Type | Default | Description |
---|---|---|---|
toggle-quotes.quoteCharacters |
string |
'" |
The characters toggle-quotes:toggle toggles between. No whitespace. |
You can add language-specific settings for languages with more exotic string delimiters. For example, this setting in your config.cson
will add backticks in JavaScript files, but not in other kinds of files:
".js.source":
"toggle-quotes":
quoteCharacters: "\"'`"
Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, Atom's contributing guide will help get you started while the guide for contributing to packages has some extra information.
MIT License - see the LICENSE for more details.