sobolevn-dotfiles (3 Part Series)
Being productive is fun.
There are a lot of fields to improve your productivity. Today I am going to share some command line tips and tricks to make your life easier.
My full setup includes all the stuff discussed in this article and even more. Check it out: https://github.com/sobolevn/dotfiles
Using a good, helping, and the stable shell is the key to your command line productivity. While there are many choices, I prefer
zsh coupled with
oh-my-zsh. It is amazing for several reasons:
- Autocomplete nearly everything
- Tons of plugins
- Really helping and customizable
You can follow these steps to install this setup:
- Choose plugins that might be useful for you: https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
That's it. You will gain instant +50% productivity. Now hit tab as much as you can!
Choosing theme is quite important as well since you see it all the time. It has to be functional and pretty. I also prefer minimalistic themes, since it does not contain a lot of visual noise and unused information.
Your theme should show you:
- current folder
- current branch
- current repository status: clean or dirty
- error codes if any
I also prefer my theme to have new commands on a new line, so there is enough space to read and write it.
I personally use
sobole. It looks pretty awesome. It has two modes.
Get your another +15% boost. And an awesome-looking theme.
For me, it is very important to have enough visual information from my shell to make right decisions. Like "does this command have any typos in its name" or "do I have paired scopes in this command"? And I really make tpyos all the time.
These steps brings us extra +5%.
I travel inside my directories a lot. Like a lot. And I do all the things there:
- navigating back and forwards
- listing files and directories
- printing files' contents
I prefer to use
z to navigate to the folders I have already been to. This tool is awesome. It uses 'frecency' method to turn your
.dot TAB into
~/dev/shell/config/.dotfiles. Really nice!
When printing files you want usually to know several things:
- file names
- git status of the file
- modified date
- size in human readable form
You also probably what to show hidden files to show up by default as well. So, I use
exa as the replacement for standard
ls. Why? Because it has a lot of stuff enabled by default:
To print the file contents I use standard
cat or if I want to see to proper syntax highlighting I use a custom alias:
# exa: alias la="exa -abghl --git --color=automatic" # `cat` with beautiful colors. requires: pip install -U Pygments alias c='pygmentize -O style=borland -f console256 -g'
Now you have mastered the navigation. Get your +15% productivity boost.
When searching in a source code of your applications you don't want to include folders like
bower_components into your results by default. You also want your search to be fast and smooth.
Here's a good replacement for the built in search methods:
It is written in pure
C and uses a lot of smart logic to work fast.
R for reverse search in
history is very useful. But have you ever found yourself in a situation when I can quite remember a command? What if there were a tool that makes this search even greater enabling fuzzy searching and a nice UI?
There is such a tool, actually. It is called
It can be used to fuzzy-find anything, not just history. But it requires some configuration.
You are now a search ninja with +15% productivity bonus.
Using better CLIs: https://dev.to/sobolevn/using-better-clis-6o8
Following these simple steps, you can dramatically increase your command line productivity, like +100% (numbers are approximate).
There are other tools and hacks I will cover in the next articles.
Do you like reading about the latest trends in software development? Subscribe to our blog on Medium: https://medium.com/wemake-services