Insert punctuation (semicolon) at the end of the current line and optionally go to the end or start a new line.
To activate, open the package panel thing and start typing "end line"
- If the current line already has a semicolon, it doesn't add another one, but still moves the cursor to the end of the line or the newly created next line, depending on the action triggered.
- Trims the end of the current line of white space before inserting the semicolon.
The endline extension includes three keyboard shortcuts:
- cmd + ;: insert semicolon at end of line, but keep the cursor where it is.
- ctrl + ;: insert semicolon at end of line and move cursor to the end of the line.
- cmd + shift + enter: insert semicolon at end of line, create a new line after the current one, and move cursor to the start of the new line.
None so far.
- At some point, I'd like determine if the current line is inside a JavaScript array or object, and, if so, insert a comma instead of a semicolon. (Will probably need to use https://github.com/Microsoft/vscode-textmate)