Chinaunix首页 | 论坛 | 博客
  • 博客访问: 472772
  • 博文数量: 142
  • 博客积分: 4126
  • 博客等级: 上校
  • 技术积分: 1545
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-22 10:03
文章分类

全部博文(142)

文章存档

2011年(8)

2010年(7)

2009年(64)

2008年(63)

我的朋友

分类:

2008-12-20 21:01:29

用了一下不太习惯,呵呵,

" use visual bell instead of beeping
set vb

"
incremental search
set incsearch

" syntax highlighting
set bg=light
syntax on

"
autoindent
autocmd FileType perl set autoindent|set smartindent

" 4 space tabs
autocmd FileType perl set tabstop=4|set shiftwidth=4|set expandtab|set
set softtabstop=4

"
show matching brackets
autocmd FileType perl set showmatch

" show line numbers
autocmd FileType perl set number

"
check perl code with :make
autocmd FileType perl set makeprg=perl\ -c\ %\ $*
autocmd FileType perl set errorformat=%f:%l:%m
autocmd FileType perl set autowrite

" dont use Q for Ex mode
map Q :q

"
make tab in v mode ident code
vmap >gv
vmap

" make tab in normal mode ident code
nmap I
nmap ^i

"
paste mode - this will avoid unexpected effects when you
" cut or copy some text from one window and paste it in Vim.
set pastetoggle=

"
comment/uncomment blocks of code (in vmode)
vmap _c :s/^/#/gi
vmap _C :s/^#//gi

" my perl includes pod
let perl_include_pod = 1

"
syntax color complex things like @{${"foo"}}
let perl_extended_vars = 1

" Tidy selected lines (or entire file) with _t:
nnoremap _t :%!perltidy -q
vnoremap _t :!perltidy -q


"
Deparse obfuscated code
nnoremap _d :.!perl -MO=Deparse 2>/dev/null
vnoremap _d :!perl -MO=Deparse 2>/dev/null

阅读(1262) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~