Chinaunix首页 | 论坛 | 博客
  • 博客访问: 368481
  • 博文数量: 100
  • 博客积分: 1894
  • 博客等级: 上尉
  • 技术积分: 951
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-11 23:17
文章分类

全部博文(100)

文章存档

2018年(3)

2014年(2)

2013年(7)

2012年(10)

2011年(8)

2010年(6)

2009年(63)

2008年(1)

分类: 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 perlkgJAuse 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
阅读(791) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~