Exploring VS Code

It's important to be familiar with the tools you use. While Visual Studio Code is primarily a text editor, it does boast a rather large set of IDE-like features. VS Code can easily become overwhelming if you are not familiar with using it.

Visual Studio Code is a powerful text editor with many advanced features. If you are interested in learning more about the editor than this section covers, visit the online basics guide at https://code.visualstudio.com/docs/editor/codebasics.

Follow these steps to gain some familiarity and intuition with Visual Studio Code:

  1. When you open up Visual Studio Code, you are greeted with either the last open documents, the welcome page, or if you have no documents open and the welcome page is disabled, the default window.
  2. The icons on the left side of the screen make up what is called the View bar. Clicking any of the items on the View bar will cause a side bar to become visible:
  1. The first item on the View bar is the Explorer. You can use the Explorer to open a folder and View all of the files in that folder in one convenient list. We will use this feature of the editor throughout the next few chapters:
  1. The search item on the bar will let you search for and replace text in either open documents, or documents inside of the currently open folder.

 

  1. The GIT item on the View bar will only be available if the currently open folder is a git repository. VS Code has excellent git integration! While source control solutions such as git are outside the scope of this book, using some kind of source control is highly recommended:
  1. The DEBUG sidebar gives VS Code IDE features such as break points and a watch window:
  1. Finally, the EXTENSIONS item will show you a side bar that can be used to View, manage, and install new extensions in Visual Studio Code:
  1. To make a new file, simply select File > New File.
  2. This opens a new file, in a new tab. This file has no syntax highlighting yet. To assign a syntax, click on the Plain Text label in the bottom-right of the code tab, then select Lua (lua) from the drop-down menu that appears:
  1. If at any point you open a file and it does not have proper syntax highlighting, you can follow the previous step to force the file to have Lua syntax highlighting. In the previous step, we set the syntax of the file manually. If you save a file with a .lua extension, the next time the file is opened, it will automatically use Lua syntax highlighting.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.97.187