A Visual Studio Code extension that teaches you mindful programming.
Without Guns turns the following Visual Studio Code features on and off:
- IntelliSense
- Syntax Highlighting
- Code Lens
When these features are turned off, we say that we code "without guns".
Occasional coding without guns forces you to code mindfully and yields the following benefits:
- Increased coding confidence
- Deeper knowledge of programming language syntax and features
- Deeper knowledge of used frameworks and libraries
Code without guns whenever you learn something new, being that a new programming language, algorithm, framework or a technology.
You can download Without Guns from the Visual Studio Code marketplace.
To start coding without guns execute Guns: Without
from the Command Palette. To get the guns back, execute Guns: With
. An image is worth a thousand words, therefore:
No, I don't like guns. On the contrary, I dream of a world without them. The origin of the name is a story of its own. It is based on a quote from the 1996 film Last Man Standing starring Karina Lombard, Bruce Willis, and Christopher Walken. I'll write a blog post about the origin of the name and the philosophy behind the coding without guns. Stay tuned ;-)
No. On the contrary. I am myself a user and a strong proponent of productivity features and tools. What I am suggesting is to turn them off occasionally, especially when learning a new programming language or a framework.
Out of my years-long experience in practicing this technique - yes, definitely. Productivity features and tools like IntelliSense help you being fast and productive in the production environment. Coding without guns helps you learn new things in a much firmer way. Leaving guns behind intentionally while learning leads to a much deeper coding experience. This at the end brings deeper knowledge and a greater coding confidence.
Q: Shouldn't we better spend time learning how to more efficiently use productivity tools instead of learning how to code without them?
We should do both, master our productivity tools and master working without them. Coding without guns can be seen as practicing Tai Chi movements in a slow and mindful manner. It builds strong inner foundations. Programming with guns is using Tai Chi in a fight.
Yes, a good portion of it. This was my first project ever written in TypeScript. Coding it without guns helped me to better learn TypeScript and its ecosystem.
No. I'm dead serious about coding without guns.
Without Guns unobtrusively changes some Visual Studio Code workspace settings on the fly. These results in two intrinsic limitations:
- The extension cannot be used if there is no active workspace. In other words, you have to have a folder opened in Visual Studio Code in order for the extension to work.
- You have to "get the guns back" before closing Visual Studio Code. Otherwise, if you close VS code while the guns are off, you will not be able to turn them automatically on any more. If that happens, do not despair. To get the guns back simply do the following:
-
Open the VS Code settings (File > Preferences > Settings).
-
Inside the
settings.json
file you will see the following settings:"editor.quickSuggestions": { "other": false, "comments": false, "strings": false }, "editor.wordBasedSuggestions": false, "editor.parameterHints": false, "editor.suggestOnTriggerCharacters": false, "editor.codeLens": false, "editor.tokenColorCustomizations": { // Some token color settings, potentially a lot of them... }, "_withoutGuns.internal.areGunsTaken": true
-
Delete those settings and save the
settings.json
file. This will bring your guns back.
-
Without Guns extension comes with only one setting, _withoutGuns.internal.areGunsTaken
. As the name suggests, this is an internal setting used by the extension itself. It should never be changed manually. Just ignore it.
All notable changes to the Without Guns extension are documented in the changelog. Below is an excerpt from the changelog that lists the major changes.
- Adds the Visual Studio Marketplace badge.
- "Guns: With" and "Guns: Without" commands are context sensitive. (They are active only if the Guns are currently taken or not, respectively.)
- Turns Syntax Highlighting on and off.
- Turns Code Lens on and off.
- Turns IntelliSense on and off.
Without Guns is licensed under the MIT license.