Chinaunix首页 | 论坛 | 博客
  • 博客访问: 46536
  • 博文数量: 7
  • 博客积分: 310
  • 博客等级: 二等列兵
  • 技术积分: 75
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-29 14:10
文章分类
文章存档

2012年(1)

2009年(6)

我的朋友

分类:

2009-10-25 16:37:15

"---------------------
"genernal
"---------------------
""Get out of VI's compatible mode..
"set nocompatible

"sets how many lines of history VIM har to remember
set history=400


"set to auto read when a file is changed from the outside
set autoread

set nu

set encoding=utf-8

set fileencoding=utf-8

set fileencodings=gb18030,utf-8,gbk,gb2312,cp936

set termencoding=utf-8

set fileformats=unix

set ambiwidth=double

set nobackup

set mouse=""

"Enable filetype plugin
filetype plugin on
filetype indent on

"Set mapleader
let mapleader = ","
let g:mapleader = ","


"Fast saving
nmap w :w!
nmap f :find



set hlsearch


set tabstop=4
set softtabstop=4

set shiftwidth=4


set tags=./tags,./../tags,./**/tags

"show matching bracets
set showmatch

"--------------------------
" Statusline
"--------------------------
"Always hide the statusline
set laststatus=2

function! CurDir()
    let curdir = substitute(getcwd(), '/Users/amir/', "~/", "g")
    return curdir
endfunction

"Format the statusline
set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{CurDir()}%h\ \ \ Line:\ %l/%L\ \%c

"-----------------
"indent setting
"-----------------
set autoindent
set cindent

"-----------------
"colors and fonts
"-----------------
syntax on

colorscheme desert


"------------------
"taglist setting
"------------------

nmap tl :Tlist

let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1

"------------------------------
"winmanagerwindowlayout setting
"------------------------------
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap wm :WMToggle

"-----------------------------
"cscopesetting
"-----------------------------
set cscopequickfix=s-,c-,d-,i-,t-,e-


"
"miniBufExplor setting
"
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1

"------------------------------------------
"c/h translate setting
"------------------------------------------

nnoremap :A

"------------------------------------------
"grep setting
"------------------------------------------

nnoremap :Grep

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Folding
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"Enable folding, I find it very useful
set nofen
set fdl=0

set foldlevel=0

"set foldmarker={{{,}}}
"set foldmethod=indent
"set foldmethod=syntax
"set foldmethod=markers
"set foldmethod=manual

nmap fa :set foldmethod=syntax:set foldmethod=manualzf

nmap zf zfa}



""""""""""""""""""""""""""""""
" Indent
""""""""""""""""""""""""""""""
"Auto indent
set ai

"Smart indet
set si

"C-style indeting
set cindent

"Wrap lines
set wrap



"-------------------------------------
"indent setting
"-------------------------------------

filetype plugin indent on
set completeopt=longest,menu



"-------------------------------------
"superTab Setting
"-------------------------------------

let g:SuperTabRetainCompletionType=2
let g:SuperTabDefaultCompletionType=""

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