DEV Community

Discussion on: I hate setting up my dev environment.

Collapse
 
weirdmayo profile image
Daniel Mayovsky • Edited

Tmux automation. That changed my life.
Since i am doing my development in Vim (terminal text editor), and my task runner (gulp) is a nodejs terminal command, and git command line is, of course, in a terminal, I would always run Three tmux windows when I am doing my work. And I had to do it every time I want to continue working on a project.
So what I did was to write a Tmux script that would automate all of that for me, including renaming of windows to normal human names like editor and gulp, instead of sh and node. I just enter a directory I want to work on, that I have been working on before, and run gulp-dev and it runs everything for me and in the end I am in the Vim window hacking away, in 3 seconds or less.

About STARTING a dev environment as if

  • setting up gulp tasks
  • gitignore
  • package.json

well I am just copying them from my previous projects, edit my package.json with simple npm init

and immediately my setup becomes the same as it was on the previous project. Unless I have to do a complete remodel, where still, my package.json npm run start command can be changed, but its running by my gulp-dev script anyways. I never touch the tmux script, its always the same, while my project can change.

You can see my scripts on my github in a dotfiles repository if you want.