The more time you spend using a tool should mean putting more time into configuring it and learning about it. Using a program with its defaults alone, over time, is a massive productivity killer. For example, the speed at which I was able to do things in a unix shell skyrocketed when I learned that I could have vi keybindings in my shell (with 'set -o vi' or 'bindkey -v' in most shells).
As mentioned above, part of learning how to configure a tool is simply reading documentation, or searching online for how to do something. Another important part is by learning from others: reading their dotfiles. In order to read your dotfile, it must be available somewhere. I heavily encourage you to post your rc files online. Not only publish them, but make sure you put comments describing what each configuration decision does. Knowledge grows faster when there's a community contributing to it, so post documented snippets online!
Rather than covering another best practice or tool, today's article is an attempt to try and fill your mind with some useful things you may want to try in your own tools. Covered below are some of my configurations for various tools. Each configuration has a link to respective documentation (if available online) about that option. Futher, it is not my hope that you agree with my configurations, but that you find options here that you didn't know about that might help you.
In the process of reading peer rc files and gathering data for this article, I found a neat website where people can publish their own dotfiles, dotfiles.org. This site lets you view everyone's uploaded dotfiles.
There are far too many tools and options to cover, so I'll cover the three tools closest to my heart: zsh, vim, and screen. However, before I get into it, I want to make a few, important points.
- Vi mode in your shell is one of the best features available if you are familiar with vi. Bash, ksh, zsh, and tcsh all support 'vi mode' in varying degrees of compatibility. In your shell, type 'set -o vi' (bash, ksh) or 'bindkey -v' (zsh, tcsh), and be happy with your increase in productivity.
- Set your terminal (screen or terminal) title! There are lots of existing rc files that show you how to do this. For zsh, try searching zsh screen title.
- Don't ignore configuration of tools you use every day. Being a power user doesn't mean you automatically do lame things like recompiling vim with -O9999, it means understanding the tools you use and how to configure them to best fit your pattern of work and your style preferences.
- zsh
setopt append_history setopt auto_pushd setopt beep setopt no_cdable_vars setopt extended_glob setopt extended_history setopt hist_ignore_all_dups setopt interactive_comments setopt no_correct setopt no_no_match setopt no_prompt_cr setopt notify setopt rm_star_silent setopt sh_word_split setopt vi
If you're a vi (or vim) user, you should 'setopt vi' or 'bindkey -v' (same thing). It makes line editing heavenly, just like vi :) - vim - part of my vimrc includes:
set autoindent set background=dark set backspace=indent,eol set cindent set cinkeys=!^F set cinoptions=(0t0c1 set comments=b:# set complete=.,w,b,i,t,u set expandtab set foldclose= set foldmethod=marker set formatoptions=tcrqn set ignorecase set list set listchars=tab:>-,trail:- set matchpairs+=<:> set nocompatible set noerrorbells set nohlsearch set noincsearch set noshowmode set notitle set number set ruler set shiftwidth=2 set showcmd set showmatch set smartcase filetype on syntax off
- screen
Unfortunately, screen doesn't have official documentation on it's site, so you'll have to search for it or read it locally.
deflogin on defscrollback 10000 autodetach on startup_message off vbell off msgwait 0 msgminwait 1 # Nethack-like screen messages are more fun. nethack on # Show '[screennum] location - title' as hardstatus hardstatus string "[%n] %h - %t" windowlist title "Num Name%=Location Flags" windowlist string "%03n %t%=%h %f" # Disable flow control (^S and ^Q) flow off bind s bind ^S bind q bind ^Q # For the following, search the screen man page for 'ESC ] 83' # Lets you have a tool execute commands in screen itself. # This aclchg allows only the 'select' screen command to be run. multiuser on aclchg :window: +x select # emulate .logout message pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." # advertise hardstatus support to $TERMCAP termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'