vimrc
vim config file
"zpy's vim config file
set nocompatible
set cindent
syntax on
set bs=2
"tabstop is 4
set ts=4
"smart tab is 4
set sw=4
set smarttab
set cindent
"no backup file
set nobackup
"keep the history in 50
set history=50
"show the cursor all the time
set ruler
"show the status line
set laststatus=2
"increase search
set incsearch
"highlight the search
set hlsearch
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
"cursor movement
nnoremap <Down> gj
nnoremap <Up> gk
vnoremap <Down> gj
vnoremap <Up> gk
inoremap <Down> <C-o>gj
inoremap <Up> <C-o>gk
nnoremap <End> g$
nnoremap <Home> g0
vnoremap <End> g$
vnoremap <Home> g0
inoremap <End> <C-o>g$
inoremap <Home> <C-o>g0
filetype plugin on
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
endif " has("autocmd")
-------------