AutoQuote is a simple yet powerful Visual Studio Code extension designed to make working with single and double quotes more efficient. It enables users to quickly add quoted sections with a comma and space, making your coding workflow smoother. I simply made this because while working during some data science lab times, I found it extremely annoying having to manually put quotes in lists etc.
- Insert Single Quotes: Add a comma, a space, and a pair of single quotes (
''
) at the cursor's position or after the nearest closing quote. - Insert Double Quotes: Add a comma, a space, and a pair of double quotes (
""
) at the cursor's position or after the nearest closing quote. - Interoperability: Regardless of the type of closing quote (
'
or"
), you can choose to insert either single or double quotes. - Cursor Placement: Automatically positions the cursor between the newly inserted quotes for immediate typing.
- Insert Single Quote:
ctrl+'
(Windows/Linux) orcmd+'
(macOS) - Insert Double Quote:
ctrl+shift+'
(Windows/Linux) orcmd+shift+'
(macOS) - Wrap Text in Quotes:
ctrl+'
(Windows/Linux) orcmd+'
(macOS) for single quotes,ctrl+shift+'
(Windows/Linux) orcmd+shift+'
(macOS) for double quotes
Before: "hello|"
Press ctrl+'
(or cmd+'
on macOS).
After: "hello", '|'
Before: 'hello'
Press ctrl+'
After: 'hello', '|'
Before: 'world|'
Press ctrl+shift+'
(or cmd+shift+'
on macOS).
After: 'world', "|"
Before: "world|"
Press ctrl+shift+'
(or cmd+shift+'
on macOS).
After: "world", "|"
Before: hello|
Press ctrl+'
(or cmd+'
on macOS).
After: hello, '|''
This is a demonstration using commands for both kind of quotes:
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or pressing
Ctrl+Shift+X
. - Search for
AutoQuote
. - Click Install.
Contributions are welcome! Please open an issue or a pull request on GitHub.
This extension is licensed under the BSD 3-Clause License.