vimrc

if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif
set encoding=utf-8
set helplang=cn

nmap  :set spell
nmap  :set nospell

set number

"set mouse=a

set hlsearch
set incsearch

set tabstop=4
set expandtab
set listchars=tab:>-,trail:-
set shiftwidth=4
set autoindent
set smartindent
set cindent

set confirm

set showmatch
set matchtime=5

set ignorecase

set nowrap

set cc=80,120

function AddTitle()
    call setline(1,"/**")
    call append(1," *Author: ** - **@**")
    call append(2," *Last modified: " . strftime("%Y-%m-%d %H:%M"))
    call append(3," *Filename: " . expand("%"))
    call append(4," *Copyright 2014 ** Inc. All Rights Reserved.")
    call append(5," */")
endf

map hd :call AddTitle():$o

你可能感兴趣的:(vim,vi,vi)