My Code Editor
Hello and welcome. The other day we dealt with the most important tool of every software developer: the text editor.
Therefore, we now know the characteristics that make up a good editor and where the advantages and disadvantages of an IDE lie. So that you don’t lose sight of the actual goal in the huge jungle of editors and don’t forget to continue learning programming while evaluating the best one based on the countless reviews on the web, I would like to introduce you to my current text editor.
Visual Studio Code
Yes, it is a Microsoft product. And no, it is not affiliate marketing. Recommending this text editor to you does me no favors. Because VSCode is not only a powerful editor with many extensibility options, but it also meets two very important criteria of my journey:
Open Source and Cross-Platform
As mentioned in the beginning, a text editor is one of the most important parts of your development platform. With the help of sophisticated controls, it can even protect your wrists and fingers from repetitive strain injuries. And should you be planning a strenuous code marathon, the theme, the look of the user interface, can be easy on your eyes.
Even though the official download is under the proprietary Microsoft Software License, VSCode for Windows, macOS and Linux is free and open source.
Currently, I use VSCode as my text editor because it helps me a lot in the way I work. And that’s why I want to show you…
Why VSCode?
Visual Studio Code combines the ease of use of a classic, lightweight text editor with more powerful IDE-like features with minimal configuration required. It almost sounds like something out of an advertising brochure, but I’ve actually had a good experience. All you have to do is download it, run the installation and you’re ready to go.
It just works, out of the box!
After the quick startup, the working speed left the next positive impression. VSCode is fast and that for every action I want to perform. This includes opening and loading project folders. This is what I expect from a good text editor.
During my first steps, I immediately noticed the well-designed user interface. Everything seems very tidy and not cluttered. Nevertheless, everything is intuitive and quick to reach. The sidebar is largely responsible for this. I have never seen a sidebar in this form before in any other editor.
Come to the Sidebar, we have…
The bar consists of the elements:
- Explorer
- Search
- Source Control Management (SCM)
- Debug
- Extensions
Explorer
The Explorer is the main area for editing your files. In the Explorer you can browse, open and manage all files and folders in your project. After you open a project folder, all the files it contains are displayed in the explorer and you can start editing immediately.
You can also open as many editors as you want side by side vertically and horizontally. This feature saves you a lot of work moving back and forth through tabs. This means less context switching, better focus, which leads to higher productivity.
Search
There is not much to say about this. The search function simply works. And it works quite comfortably. You just have to type the term you are looking for into the field and it will show you every place in every file in the project folder. Additionally, you can replace the term individually or globally with another one quite easily.
Source Control Management (SCM)
If you take a look at my roadmap, you will find the item version control there. VSCode would like to assist with this as well.
By default, your Git repositories are automatically detected. The Source Control icon on the left side always shows you how many changes have been made in your repository. Clicking on it will show you the details of your current Changes, Staged Changes and the Merge Changes option.
VSCode has a good flow to it, which is especially helpful in resolving conflicts when merging. Again, everything is very intuitive and works transparently. The text editor marks all changes made in files, so you can see very quickly what has been changed.
I find the Git Diff view especially helpful. With it you always have the full overview of your changes and can write much better commit messages.
If you use another version control software, that’s no problem either. VSCode supports the simultaneous processing of multiple source control providers. All you have to do is install the appropriate extension.
I would like to leave it at this point. More about the very important topic of version control will be covered in another series of articles.
Debug
Now let’s move on to VSCode’s excellent debugging support. The integrated debugger is a key feature of the editor and speeds up the edit-compile-debug workflow.
The debugger initially only supports Node.js, but you can use extensions to virtually analyze and debug source code from any programming language.
Accompanying the debugger is an integrated terminal. For me as a Linux user, this is a huge boon. I am always just a shortcut away from a new terminal instance. The terminal starts directly in my project folder and lets me quickly execute command line commands without annoying jumping back and forth, without changing an already existing terminal instance.
Extensions
What’s the deal with these extensions? People refer to them all the time.
VSCode comes with some very useful features after installation, but that’s just the beginning. The ability to add more capabilities gives you the flexibility to customize the editor to your exact needs.
Under the Extensions tab you can search for specific extensions and see which ones you already have installed. This way you can easily add languages, debuggers and other tools. And to maximize the level of customization, you can even add your own extensions using the same APIs.
GoGo Gadgeto Editor
VSCode wants to make your work as comfortable as possible. It even goes so far as to suggest suitable extensions when the need for a plugin comes up, taking your project into consideration.
Of the countless extensions in the Marketplace, I only use a few, but I really appreciate the flexibility and customizability they offer.
In fact, right now I’m writing this post and all my other blog posts with VSCode and Markdown extension support.
The Editing
Now you know the most powerful convenience features that VSCode offers you to simplify and speed up your workflow in the development process. If you want to know more about it or get to know the numerous other features, I recommend you to read the official documentation. There you will find a Getting Started and a detailed User Guide.
Now I want to talk about the core task of the tool, editing. Also here VSCode offers some conveniences that are not self-evident with every text editor.
Intellisense
This general term covers a variety of code editing functions, including code completion, parameter info, quick info, and member lists. You will probably also encounter other names for IntelliSense, such as code completion, content assist, and code hinting.
No matter what the feature is called, it is very helpful. It informs you which parts of your code are invalid according to the extension set you have installed. Thus you can immediately recognize if you mistyped, violated the syntax or mixed up data types.
Just the fact that the definition of the typed function is displayed is extremely helpful. If you can’t remember the order in which the arguments are to be passed, then your only alternative would be to look at the documentation.
In addition, you are offered a very intelligent programming language support and auto-completion with accurate suggestions.
Refactoring
Surely you will soon notice the little yellow light bulb when working with VSCode. This is the editor’s way of signaling that it wants to make a suggestion for refactoring your code.
Refactoring the source code can improve the quality and maintainability of your project by restructuring it without changing its behavior. VSCode supports you with operations like extracting methods or variables. This serves to improve your code base.
Short ways
All functions and extensions of VSCode serve the sole purpose of increasing your productivity. And in the most extreme case, this goes as far as avoiding unnecessary hand movements.
If you are able to keep your hands on the keyboard while writing code, the time you need for your work is minimized. That’s why VSCode has an extensive set of shortcuts, so that you can operate it without a mouse. Additionally, you can customize the default shortcuts or create your own.
Here you can find a list of all Keyboard shortcuts.
Lots of stuff
As you can see, VSCode has a lot to offer and wants to support you as much as possible. However, many of the great features are associated with terms that may not mean anything to you yet. But keep calm. Version control, debugging, refactoring, etc. are topics we will explore together.
You have to start somewhere, and after choosing a suitable text editor, you’ll have a powerful tool to help you focus on the essentials.
Probier’s mal mit…
VSCode is cross-platform, free and open source. Thus, it fulfills the non-functional requirements of my journey. In addition, it is low-maintenance, works easily, facilitates my everyday coding with its functions and presents them in a well-packaged, well thought-out format.
After this hymn of praise, I would still advise you to judge objectively. Just try it out. Tinker around and experiment. Maybe you’ll like it. If not, check out one of the many other text editors, such as
- Sublime,
- Atom,
- Code::Blocks,
- etc..
In the end, it’s a matter of taste.
I use VSCode as my code editor. What do you think about this tool? What text editor do you use and for what reasons? Maybe you have found a better one.
I wish you maximum success!