DEV Community 👩‍💻👨‍💻

Cover image for Improve Your Windows Development Environment
Antonin J. (they/them)
Antonin J. (they/them)

Posted on • Originally published at antjanus.com

Improve Your Windows Development Environment

Windows has been my main dev environment for about 4 years with some linux interspersed in there. Before that, I used OSX and Windows interchangeably. When I made the switch, I wrote an article on my Windows Dev environment and today, I want to write a sort-of update, and sort-of introduction on how to make your Windows machine the best place possible for web development, whatever language you may be using.

Without further ado, let's start!

The Terminal

In my previous post linked above, I mentioned several options. Well, no more. I've come across a winner, and it's ConEmu. What's ConEmu? Well, it's a terminal emulator that can run PowerShell, CMD, Bash, Cygwin and pretty much any other terminal.

It has tabbing, color settings, custom fonts, hotkeys, and so much more. I can't work without it. You are more than welcome to copy over my conemu.xml settings file which includes my favorite shortcuts:

  • ctrl + win + l and ctrl + win + h to switch between tabs
  • ctrl + shift + v which will paste text with newlines
  • ctrl + shift + t which will open a dialog to create a new tab with terminal settings (regular ctrl + t just opens a new tab with whatever your defaults are)

The best thing about ConEmu is really that it handles those tabs for you. You can run a tab with webpack, node server, and run another tab with Bash if you want.

If you want a slightly more preconfigured version, checkout CMDer which has a ton of customizations around CMD.

The console/shell

Before moving away from the terminal, I highly recommend setting up ConEmu with PowerShell and the subsystem Bash. I run one system where I default to PS and one where I default to Bash and honestly, it's up to you what you do but I've noticed that I still have to occasionally jump into PowerShell even if I want to mainly use Bash.

PowerShell is REALLY powerful and it's amazing. I only scratched the surface with it but to me, it's a good rival to Bash and other shells. Plus, the output from commands is usually nicer than what Bash provides! PowerShell can also be configured just like Bash. Checkout my Profile PS1 file and make sure to install Posh-Git for full git support.

I do use Fish for the Windows Linux subsystem and found it pretty cool. I definitely don't know enough about it to configure it for 100% productivity but it works well-enough that I prefer it over plain Bash.

VIM

Despite being a full-time user of VS Code, I still jump into VIM for a few small things -- whether it's a quick file edit or just wanting a nice Golang development experience. It's worthwhile setting up just in case.

The awesome thing is that VIM 8.1 now supports running a terminal within VIM itself.

You can download VIM from the official website.

Package Manager

Okay, so I have a controversial view on this: don't bother. Chocolatey is great but I found that going straight to the source is better.

Node installation and upgrades are pretty straightforward. Same goes for Elixir or Golang. Does it take more than a single command to upgrade? Yep! But it's not as big of a deal as it looks. Precompiled binaries ftw.

Docker

I use Docker at work and it's great. Windows support is pretty good too but you need Hyper-V. Hyper-V essentially disables using VirtualBox for anything at all so be aware that using Docker usually means that you cannot use VB.

If you want to use Docker in the Linux subsystem, I recommend following this guide which will take you step-by-step through making the Windows Docker system available via command line in the Linux subsystem very seamlessly.

Notepad++

If you're deving on windows, you MUST have heard of Np++. Notepad++ is by far the best text editor I've seen. It works exceptionally well as a scratch pad, a quick todo list, markdown editor, CSV viewer, text manipulator and so much more. What do I use it for?

  • daily list of todos
  • editing my markdown
  • writing SQL queries
  • editing/cleaning up CSVs (there is an AWESOME CSV plugin)
  • quick edits when I'm using explorer (if I'm in terminal, I use VIM)

It's powerful, it's amazing. Go download it right now.

Code Editor

I've been a VIM purist for years now but VSCode swept me off my feet and put a ring on it. Before that I've tried Emacs, Atom, and a few other code editors. On windows, all of them run quite well.

I still keep VIM around and want to do a hard reset on my .vimrc and start over. I keep Emacs around, too, hoping to get back into it. Its org-mode is to die for and doesn't have an alternative that works so damned well.

With VSCode, I try to keep a short number of extensions around. The more languages, tools, and frameworks I work with, the more extensions I need. That kind of extension creep is inevitable the more you work in a diverse ecosystem:

  • Angular Language Services - code completion for angular templates which read your component typescript files
  • Bracket Pair Colorizer - changes color of brackets based on nesting level
  • Docker - docker syntax highlighter
  • DotEnv - syntax highlight for .env files
  • EditorConfig for VS Code - editor config support
  • elm - Elm support
  • Eslint - JS linter
  • Gitignore - language support for .gitignore files
  • Material Icon Theme
  • npm intellisense - autocomplete for installed NPM modules
  • org-mode - basic org mode support for the well-known Emacs org-mode
  • path intellisense - filename autocomplete
  • polacode - select code and export it as a beautiful image
  • PowerShell - powershell script syntax highlight
  • prettier - prettier formatting support
  • prettify json - makes JSON look nice
  • Rust - rust lang support
  • Sass - sass support
  • Settings Sync super important - this will upload settings to a gist and download it as well. Process is manual but it helps me keep my VS Code installs in sync
  • stylelint - linter for CSS/SCSS/Less
  • TSLint - typescript linter
  • Vim - Vim emulation! I wouldn't use VS Code without it
  • VS Live Share - real-time collab/share
  • vscode-elixir - Elixir lang support
  • vscode-elixir-formatter - formatter for Elixir files

Utilities

I use a collection of several small tools to make my life easier that I think are worth sharing:

  1. Lightshot - a superb screenshotting tool

Is that it?

I can't think of anything else off the top of my head right now but this should be it!

Top comments (15)

Collapse
lietux profile image
Janne "Lietu" Enberg

I wish Chocolatey was better, but it's just annoying to me .. have to run it in elevated prompts, and iirc installation even required powershell which I don't normally bother using.

You can use Docker without Hyper-V when you use the Docker Toolbox, which I do. I also use Minikube with it, works perfectly fine. All this is powered by .. VirtualBox of course.

I slightly prefer Sublime Text over Notepad++, and since I got a paid license for it it's not annoying to use either.

JetBrains IDEs also beat all the other options for me, but I've been trying out vscode a bit more with languages that are not easily supported by them, and it's definitely not bad.

I also use Greenshot for screenshotting but I think it's dead. Add ScreenToGif for recording small things that can be easily shared.

IrfanView and Gimp are nice for those few times when you need to batch process a bunch of images, Putty + Pageant for SSH and SSH keys, though people have been hyped about this Termius thing but apparently it's SSH key support is just completely broken, has been for months, and devs don't care.

Oh, I also use WinSplit Revolution (also now a dead project, though I think some fork is trying to revive it) to do some nice quick alignment of windows.

Other than that, I don't think my environment differs that much really.

Collapse
antjanus profile image
Antonin J. (they/them) Author

I think the biggest problem with Chocolatey is that it's confusing in terms of how it works. Maybe I'm a noob but I've always found it confusing as to which tools will be available via path. And then, of course, you forget that you installed something via Chocolatey which makes life super confusing.

Notepad++ in my opinion is superior for the tasks I use it for. It's lightweight, extremely fast boot time, and has one killer feature: when you create a new file, you can keep it in a tab and it autosaves without actually saving. Eg. the file has no place in the file system but exists without failure in NP++

LICEcap has been my go to for screen recording...and yeah, Greenshot is dead but I did love that tool.

I'm currently using Bash/WSL for SSH which might sound weird but works for me. I tend to not use Putty/Pageant.

Thanks for all the input! :)

Collapse
lietux profile image
Janne "Lietu" Enberg

Definitely Chocolatey's worst part is that it's still so little used, so you always forget it exists and you've installed something via it.

when you create a new file, you can keep it in a tab and it autosaves without actually saving. Eg. the file has no place in the file system but exists without failure in NP++

Yea that's what I do in Sublime Text too - I just open a new "file" for temporary notes. They survive a reboot, without having to ever save anywhere.

I'm currently using Bash/WSL for SSH which might sound weird but works for me. I tend to not use Putty/Pageant.

I've been trying to get Gnome-Terminal to reliably launch via a simple shortcut in Windows to a X Server running locally, but for some reason that thing just regularly fails to launch .. if I could get that thing working, then I'd just SSH from the WSL as well.

Without something like Gnome-Terminal (or maybe LXTerm) working properly I don't find it a reasonable option.

Collapse
jsn1nj4 profile image
Elliot Derhay • Edited on

You nearly have me convinced to immediately jump into PS. I may at some point, but it's actually beneficial for me to work in BASH since the projects I work on are hosted in a Linux environment anyway. Very good article though.

You named several things I had no idea existed (the intellisense extensions for VS Code, polacode, the CSV plugin for N++). I'm gonna have to try those now.

Regarding ConEmu, I did use it primarily previously. It really does work well. But someone sold me on Hyper, so it's what I use now. I'll give ConEmu props for being native though. It should always start faster than Hyper since the latter is an electronic app.

Lastly, 100% agree on Lightshot. It's made taking screenshots so much easier for me.

Collapse
antjanus profile image
Antonin J. (they/them) Author • Edited on

Thanks for the feedback!

I work on projects that are primarily hosted on Linux as well. I tend to make myself the canary in the coal mine on my team by sticking to IE Edge and Windows-first development so that new devs (or existing devs on MS or devs switching to MS) have me to rely on for problem reporting and problem fixing since I'm already used to it. I had the chance to update a few open source libraries to work on Windows which makes me exceptionally happy :)

I liked Hyper as well but I started using it back in its Windows beta/alpha days which meant that I faced a lot of problems I just did not have the patience to fix. ConEmu/CMDer have been exceptionally dependable. I'll link drop Scott Hanselman's recent article on Windows terminals for more options. I have it bookmarked and the new contenders look really nice.

Lightshot ftw! I used to use Greenshot which had an awesome feature (take screenshot of previously selected area) which I dearly miss but it's not enough to make me switch back haha.

Collapse
jsn1nj4 profile image
Elliot Derhay

Oh nice (about the terminal article)! I may have to try out some of those alternatives.

Of course, I do hope to switch permanently to Linux one day, but terminal apps like these will get me through in the meantime.

No, that's not the only thing I like better about Linux than Windows, but it's definitely part of it.

Collapse
lietux profile image
Janne "Lietu" Enberg

Hyper had such incomprehensible bugs with it's node environment that ended up with me getting regular annoying error notifications on my desktop when it was trying to run updates I had to give up on that.

Collapse
djuuu profile image
Julien Tardot

On Windows, I can't live without AutoHotkey anymore.

With it, i defined several custom shortcuts, using the Caps lock key as a pseudo-modifier :

  • to insert special characters or strings:
    Caps lock + X inserts
    Caps lock + C inserts
    Caps lock + V inserts
    Caps lock + Y inserts ¯\(ツ)

  • to insert uppercase accented characters (I'm french)
    Caps lock + é inserts É
    Caps lock + è inserts È
    Caps lock + ç inserts Ç
    Caps lock + à inserts À

  • instant google search of selected text with the ² key (top-left key, before numbers on a french layout)

  • Caps lock + D inserts the current date : 2018-11-15

  • Caps lock + T inserts the current time : 13:15:20

  • Caps lock + Tab switches the mouse cursor to the next monitor

...and some other custom shortcuts.

It's a really powerful tool!

My scripts are available here if anyone is interested :
github.com/Djuuu/AutoHotkey

Collapse
objectliteral profile image
Peter Steinberg

Nice selection of tools.

But I can not imagine a development environment without a proper package manager. Yea, the language-specific ones are neat (e.g. yarn, pip), but as a generic Windows package manager, I like Scoop (scoop.sh) a lot. Can only recommend it to anyone who is annoyed by Chocolatey!

Apart from that, are you folks really satisfied with your dev setup under Windows? Generally speaking I find it to be more frustrating to get things to work the way I want, compared to Linux and macOS. Package Manager is a big part of this, but also shell (I can not get fish to properly function under Windows).

Collapse
antjanus profile image
Antonin J. (they/them) Author

I'm super happy with my dev environment. I've gotten used to not using package managers since majority of my tools auto-update and things like Node need updating only when it's necessary for my work (we all sync up on Node versions). Outside of that, I don't find myself needing a package manager (aside from lang-specific ones)

Package management needs work but it's been slowly crawling to a good place. :)

And again, there's always WSL!

Collapse
jamezrin profile image
Jaime Martínez Rincón

I also was a user of Lightshot, but I ditched it for ShareX.

I suggest anyone trying it out, it is so much better IMO than Lightshot, and even more if you spend 5 minutes configuring it.

Collapse
antjanus profile image
Antonin J. (they/them) Author

Oooh! I've actually used ShareX. Definitely a worthwhile contender! :)

Collapse
arrogar profile image
Robbie Datkov

You should try Screen presso for screenshots and screen capturing.

Collapse
inozex profile image
Tiago Marques

Amazing article ☺

Collapse
marcoravicini profile image
Marco Ravicini

Nice composition, I created a repo with a few hints to a better powershell setup. You'll find it here: github.com/ravicini/posh-setup

👀 Every week new members join DEV and share a bit about them in our Welcome Thread

Welcome them to DEV and share a bit about yourself.