This is a selection of most common tweaks that make working with terminal more enjoyable and productive. Some command line defaults are over a decade old - leave them behind and make your life easier!
-
If you haven't done much customization before, this will be a good starting point. (It's also a good opportunity to start versioning your dotfiles.)
-
If you are pair programming or otherwise sharing a machine, you can install this rather than confuse other people with your personal configuration.
-
You can install this on all your VMs etc. to have some basic amenities without making too many changes.
I will keep this repository small and focused, including only settings that are essential for comfortable work environment. If you think that something doesn't make a reasonable default and should be removed (or that I missed an important setting), please open an issue.
Clone the repo and run the installation script (it will backup your existing config files):
git clone https://github.com/jan-warchol/sensible-dotfiles
~/sensible-dotfiles/link-dotfiles.sh
You'll probably want to move some parts of your old configuration into the new files. Keep in mind that you need to re-run the installation script if you add new files to the repo, to create missing symlinks.
Here's a summary of the most interesting settings:
-
git-aware prompt displaying repository status (see screenshot) - very convenient!
-
essential git configuration:
- aliases for displaying awesome logs (see screenshot),
- a dozen of common shorthands, including
ci
,co
,br
andst
, - improved output layout and coloring for
status
,blame
andlog
, - better default behaviour in case of merge conflicts, file copies etc.
-
reasonable defaults and convenient aliases for
ls
,less
andgrep
:- let
ls
group directories together, listing them above files, - better searching and navigation inside
less
, - did you know that
grep
can highlight matches even when piped toless
?
- let
-
handy bash settings, for example:
- case-insensitive autocompletion,
- more powerful shell history and navigation,
cd
to a directory just by typing its name, autocorrect typos
-
disable SSH timeouts - don't let the connection hang because of inactivity
-
Tim Pope's sensible.vim - reasonable and widely accepted default configuration for Vim
-
turtles all the way down: a global
Vagrantfile
that lets Vagrant install sensible-dotfiles on your VMs as well!
Want more? Here are a couple things I recommend:
- Install (smart history)[https://github.com/jan-warchol/smart-bash-history] to make reusing commands you typed super efficient
- Install (smart find)[https://github.com/jan-warchol/smart-find] to get only meaningful results when you look for files
- remap the close-to-useless Caps Lock key to control - makes pressing common
keyboard shortcuts much more comfortable:
-
on Linux, add this to your
~/.profile
:setxkbmap -option ctrl:nocaps setxkbmap -option shift:both_capslock
(the second command allows you to toggle caps lock by pressing two shifts simultaneously).
-
on OSX, you can change Caps Lock key behaviour in System Preferences -> Keyboard -> Modifier Keys.
-
- use
xcape
to make your remapped caps lock emit escape when pressed on its own. Great for vim users :-) - install
ranger
- a console file manager. It's much better than typingcd
andls
all the time. - install
trash-cli
- command-line interface to system trash. Have you everrm
'ed wrong file and wanted to get it back?
Both ranger and trash-cli are available from apt repositories: sudo apt-get install ranger trash-cli
.
If you're interested in my personal configuration (forked from this repo), look here.
Please note that I may occasionally remove some settings if it turns out that they interfere with something else or are too controversial. However, this will happen rarely, and in each case you will be able to get previous behavior back by reverting the commit that removed it.