Skip to main content

Cultured Perl: A programmer's Linux-oriented setup

Optimizing your machine for your needs

Return to article


Listing 8: the .vimrc file
" keys: C-j and ",j" will reformat a paragraph
map 
 gqap
imap 
 
gqap
nmap ,j Vjgq
" print a ruler
map [r 0o....+....1....+....2....+....3....+....4....+....5....+....6....+....7.....+....80

" autoloads: for code, use autoindent.  For text files, nothing
" extra.  Mail gets all the extras.
au BufNewFile,BufRead *.c,*.h,*.java set ai
au BufNewFile,BufRead *.pl set ai
au BufNewFile,BufRead *.txt
au BufNewFile,BufRead Re*,.letter,mutt*,nn.*,snd.* set tw=72 ai com+=n:\:,n:\|

" abbreviations
iab _DATE 
=strftime("%a %b %d %T %Z %Y")

iab _time 
=strftime("%H:%M")

iab abotu about
iab alos also
iab aslo also
iab charcter character
iab charcters characters
iab exmaple example
iab mroe more
iab seperate separate
iab shoudl should
iab taht that
iab teh the

" various settings: backspace over everything, show matched
" parentheses/braces, show syntax
set bs=indent,eol,start
set sm
set writeany
syntax on

Return to article