Skip to content

Wiezzel/.sensible-dotfiles

 
 

Repository files navigation

Sensible dotfiles

Screenshot of sensible-dotfiles

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] (https://github.com/janek-warchol/.sensible-dotfiles/issues).

Installation

Clone the repo and run the installation script (it will backup your existing config files):

git clone https://github.com/janek-warchol/.sensible-dotfiles
cd .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.

Features

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 and st,
    • improved output layout and coloring for status, grep, blame and log,
    • better default behaviour in case of merge conflicts, file renames etc.
  • reasonable defaults and convenient aliases for [ls, less and grep] (.bashrc#L8):

    • 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 to less?
  • 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!

Other good stuff

Want more? Here are a couple things I recommend:

  • 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 typing cd and ls all the time.
  • install trash-cli - command-line interface to system trash. Have you ever rm'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.

Backward compatibility

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.

About

Sensible defaults for your command line

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 72.8%
  • Vim Script 27.2%