Difference between revisions of "VS Code Tips"

From Tuflow
Jump to navigation Jump to search
Line 11: Line 11:
 
In addition to the TUFLOW plugin, some useful plugins for working with TUFLOW include: <br>
 
In addition to the TUFLOW plugin, some useful plugins for working with TUFLOW include: <br>
 
*[https://marketplace.visualstudio.com/items?itemName=Fr43nk.seito-openfile Open File] by Frank Stuetzer or similar:
 
*[https://marketplace.visualstudio.com/items?itemName=Fr43nk.seito-openfile Open File] by Frank Stuetzer or similar:
:*Right-click on a filename and open it in a new window.
+
:*Right-click on a filename and select 'Open file under cursor'. If the file is found by VS Code, then the selected file will open in a new tab.
 +
:*To open multiple files, hold down Alt while selecting the filenames, then right click and select 'Open file under cursor'. If the files are found by VS Code, then the selected files will each open in a new tab.
 +
<br>{{Video|name=Animation_OpenFile.mp4|width=900}}<br>
 
*[https://marketplace.visualstudio.com/items?itemName=ionutvmi.path-autocomplete Path Autocomplete] by Mihai Vilcu:
 
*[https://marketplace.visualstudio.com/items?itemName=ionutvmi.path-autocomplete Path Autocomplete] by Mihai Vilcu:
 
:*Adds auto-complete when it determines a filename is being written. For this feature to work, set the 'triggerOutsideStrings' to true (as described in the plugin details).  
 
:*Adds auto-complete when it determines a filename is being written. For this feature to work, set the 'triggerOutsideStrings' to true (as described in the plugin details).  

Revision as of 15:49, 3 October 2023

Page Under Construction

Introduction

Visual Studio Code (commonly referred to as VS Code) is a free source code editor developed by Microsoft. It can be downloaded here. It supports a variety of file types and can be used to work with TUFLOW control files. The TUFLOW plugin provides highlighting support. Thanks to Daniel Copelin for creating the TUFLOW plugin. One feature of VS Code is that it includes an explorer window from a root folder, so it is easy to navigate the files within a project.
Thousands of free plugins exist for VS Code and some of them are useful when working with TUFLOW models.

Install TUFLOW VS Code Plugin

Useful Plugins

In addition to the TUFLOW plugin, some useful plugins for working with TUFLOW include:

  • Right-click on a filename and select 'Open file under cursor'. If the file is found by VS Code, then the selected file will open in a new tab.
  • To open multiple files, hold down Alt while selecting the filenames, then right click and select 'Open file under cursor'. If the files are found by VS Code, then the selected files will each open in a new tab.



  • Adds auto-complete when it determines a filename is being written. For this feature to work, set the 'triggerOutsideStrings' to true (as described in the plugin details).
  1. From the file menu, choose File\Preferences\Settings. Then select 'path-autocomplete' under 'Extensions'.
  2. Toggle on the 'Trigger Outside Strings' in the settings on the right.
  • Has the ability to view a map of GIS layers right inside of VS Code. This is helpful for double checking that the layer looks correct without loading it into a GIS application.