Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Øyvind Kallstad edited this page Sep 8, 2017 · 4 revisions

Single Quoted

Single quoted strings starts and ends with a single quote character. Every characters in between is considered a string.

Example
'This is a single quoted string.'

'Hello $user!'

Scopes

The following scopes are assigned to single quoted strings:

  • punctuation.definition.string.begin
  • punctuation.definition.string.end
  • string.quoted.single
  • constant.character.escape

The first single quote character are given the punctuation.definition.string.begin scope while the last will be given the punctuation.definition.string.end scope. All characters in between these will be scoped as string.quoted.single, with the exception of the escape character which will have a scope of constant.character.escape.

Double Quoted

Double quoted strings starts and ends with the double quote character. Unlike single quoted strings, double quoted strings supports sub expressions and variable expansion.

Example
"This is a double quoted string."

"Hello $user!"

Escape Characters

Escape Sequence Special Character
`0 Null
`a Alert
`b Backspace
`f Form feed
`n New line
`r Carriage return
`t Horizontal tab
`v Vertical tab

Home

About

Use

Contributing

Scopes and Tokens

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.