Showing posts with label Xdefaults. Show all posts
Showing posts with label Xdefaults. Show all posts

Wednesday, November 30, 2011

My Dot Files

This post is to follow up on the previous one.  I recently brought up a new Windows system and installed Cygwin.  Rather than simply save my dot files in a safe location, I decided to do a short write up on them.

.cshrc.local

I use C shell (tcsh) and not bash. Based on my experiences, I've observed that it is the preferred shell in the world of hardware engineering.  I won't argue here, the discussion about bash vs. tcsh is not worth any of my spare cycles.  I don't tend to need much more than the default settings and I seem to have converged on the following options:

set history=1000
set ignoreeof     # Don't let ^D exit the shell
set notify        # Print message when background jobs complete
set autoexpand    # Expand history when completing

bindkey -k down history-search-forward # Essential, see my previous blog post
bindkey -k up history-search-backward

alias df 'df -h'    # Print sizes in human readable format
alias du 'du -h'
alias g  'egrep -i' # Default to egrep and ignore case
alias h  'history'
alias l  'less'
alias la 'ls -a'
alias ll 'ls -l'
alias ls 'ls --color'
alias rg  'g -r'    # Alias for recursive grep
alias vi  'vim'     # Shortcut for vim and gvim
alias gi  'gvim'


.vimrc

It wasn't until I switch to vim (not vi) that I begun to call myself not-an-emacs user.  I have never been comfortable with legacy vi key mappings, so I disable compatibility within vim.  In addition to that setting, I typically set the following ones:

" Allow backspace to work in insert mode
set backspace=indent,eol,start

" Use VIM settings, rather than Vi settings
set nocompatible

" " Enable default ruler and always display status line
set ruler
set laststatus=2

" Indentation, use spaces not tabs
set shiftwidth=4
set tabstop=4
set expandtab

" Search
set ignorecase
set hlsearch
set incsearch
set nowrap


rxvt and .Xdefaults

I use the rxvt-native package for my Cygwin console rather than Microsoft's vanilla console or (name of your variant of) xterm + X11 server.  It works very well.  To run rxvt.exe, I created a shortcut to the following command line:

E:\cygwin\bin\rxvt.exe -display :0 -fn "Lucida Console-14" -tn rxvt-cygwin-native -e /bin/tcsh -l

Rather than use option -rv for reverse video (dark background, light foreground), I set the following options in my .Xdefaults file.  rxvt-native will use the values specified in this file even though it does not require an X server.

 rxvt*background: Black
 rxvt*foreground: LightGrey