User Tools

Site Tools


newdevs:landscape:tools:vscode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
newdevs:landscape:tools:vscode [2024/08/27 15:49] – created slearynewdevs:landscape:tools:vscode [2025/02/26 11:53] (current) sleary
Line 36: Line 36:
 "files.associations": { "files.associations": {
         "*.tt2": "html",         "*.tt2": "html",
-        "*.css.tt2": "css"+        "*colors.tt2": "perl", 
 +        "*.css.tt2": "css",
     },     },
 </code> </code>
  
-''*.js.tt2'' files are best displayed as HTML.+''*.js.tt2'' files are best displayed as HTML or Perl. 
 + 
 +===== HTML in VSCode ===== 
 + 
 +VSCode supports [[https://docs.emmet.io/abbreviations/|Emmet syntax]] in new files, which can be very helpful for creating quick mockups. 
 + 
 +With Emmet, you can quickly wrap a selection in an HTML tag. Press Ctrl-Shift-P to bring up the command palette, then type 'wrap' and press Enter. You will be prompted for the tag you want to wrap your selection with. If Wrap is your most recent command, you will be able to use it again without typing the word 'wrap'; you can just press Ctrl-Shift-P and then Enter when you see 'Emmet:Wrap' highlighted.
  
 ===== Git in VSCode ===== ===== Git in VSCode =====
Line 47: Line 54:
   * [[https://code.visualstudio.com/docs/sourcecontrol/overview#_vs-code-as-git-difftool-and-mergetool|Use VSCode as diff, merge, and interactive rebase tools]]   * [[https://code.visualstudio.com/docs/sourcecontrol/overview#_vs-code-as-git-difftool-and-mergetool|Use VSCode as diff, merge, and interactive rebase tools]]
   * Use the ''git.alwaysSignOff'' setting to [[https://github.com/microsoft/vscode/issues/83096|automatically sign off on commits]]   * Use the ''git.alwaysSignOff'' setting to [[https://github.com/microsoft/vscode/issues/83096|automatically sign off on commits]]
 +
 +===== Command Line Tools for the VSCode Terminal =====
 +
 +To open a file from the Terminal command line into a new window in the VSCode editor, use:
 +<code>
 +code path/to/filename.ext
 +</code>
 +
 +To open the file in your current workspace (assuming the file exists somewhere in your working directory), use ''-r'':
 +<code>
 +code -r path/to/filename.ext
 +</code>
 +
 +You can edit ''~/.bash_aliases'' to rename that command to something easier to remember, like...
 +<code>
 +alias vscode='code -r'
 +</code>
 +
 +...which would allow you to edit the file with 
 +<code>
 +vscode path/to/filename.ext
 +</code>
 +
 +See the [[newdevs:git:commands#aliases|aliases section of the Git Commands]] page for other bash aliases that might be useful in your workflow.
  
 See the [[newdevs:landscape:tools]] page for other editors and development tools. See the [[newdevs:landscape:tools]] page for other editors and development tools.
newdevs/landscape/tools/vscode.1724788170.txt.gz · Last modified: 2024/08/27 15:49 by sleary

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.