Skip to content

A Pulsar package to toggle between single and double quotes

License

Notifications You must be signed in to change notification settings

pulsar-edit/toggle-quotes

 
 

Repository files navigation

Toggle Quotes

Toggle a single-quoted string to a double-quoted string, and vice versa.

toggle-quotes-demo

This is a package for Pulsar, a community-led hyper-hackable text editor.

Usage

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

Commands

Command Description
toggle-quotes:toggle Toggles the quote characters used for quoted strings between the configured Quote Characters (' and " by default).

Keybindings

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

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: "\"'`"

Contributing

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.

License

MIT License - see the LICENSE for more details.

About

A Pulsar package to toggle between single and double quotes

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%