分类: LINUX
2013-07-11 14:16:28
# vi ~/.vimrc
set history=50 set ruler set tabstop=3 set shiftwidth=3 set smartindent set autoindent set undolevels=100 set showmatch set showcmd set number set tw=0 " autowrite buffer on suspend, buffer switch etc... set autowrite " vmap sb "zdiz : wrap around VISUALLY selected Text " syntax on colorscheme slate "for scp set nocp if version >= 600 filetype plugin indent on endif "date stamps "Sunday January 02 2008. iab dmy =strftime("%A %B %d %Y") "20080102 iab ymd =strftime("%Y%m%d") "02:32:22 iab hms =strftime("%H:%M:%S") " misc abbs " maps for inserting files map ,int :read ~/neil/docs/job_hunting/cover/intro.txt map ,cov :read ~/neil/docs/job_hunting/cover/cover-letter.txt map ,sig :read ~/neil/docs/signatures/resume " Rules for different file types. au BufRead,BufNewFile */journal/*.txt set tw=72 et spell au BufRead,BufNewFile *.rem set ft=remind au BufRead,BufNewFile *.cf set ft=cf3 au BufRead,BufNewFile *.xml set ft=xml "=================================== "PERL SECTION "=================================== :syntax match xComment /#.*/ "create perl header map ,ph i! :read !which perl kgJA use strict; use warnings; ggI# G "common DBI statements iab hashref while ($ref = $sth->fetchrow_hashref){ "iab sth $sth = $dbh->prepare($statement) or die "Couldn't prepare statement: $statement ".$dbh->errstr; $sth->execute or die "Couldn't execute statement: $statement ".$dbh->errstr; "=================================== "FUNCTIONS "=================================== fun! Getchar() let c = getchar() if c != 0 let c = nr2char(c) endif return c endfun fun! Eatchar(pat) let c = Getchar() return (c =~ a:pat) ? '' : c endfun " .gvimrc "font set guifont=Bitstream\ Vera\ Sans\ Mono\ Bold\ 10 "window size set guiheadroom=20 "set columns=127 "et lines=58 " remove menus, icons and scrollbars "set guioptions-=m set guioptions-=T set guioptions-=R set guioptions-=r