您的位置:首页 > 运维架构 > Linux

linux 下的vim 简单配置

2014-07-05 16:09 337 查看
set linebreak " line break
set nocompatible " no compatible
set history=400 " history
set ruler
set number " line number
set hlsearch " highlight search
set noincsearch " no in C search
set expandtab " expand table
set t_vb= "close bell
set foldmethod=marker
set tabstop=4 " table step
set shiftwidth=4
set nobackup " don't backup
set smarttab " smart table
set smartindent " smart indent
set autoindent " auto indent
set cindent "cindent
set cursorline " hightlight cursor line 高亮光标所在行
set backspace=indent,eol,start "这行比较重要,刚接触vim的朋友会发现有时候backspace键删不了文字
colorscheme desert " color scheme
let Tlist_Use_Right_Window=0 " for tag_list plugin only
let Tlist_File_Fold_Auto_Close=1 " for tag_list plugin only
let g:winManagerWindowLayout="FileExplorer|TagList" " for winmanager
filetype plugin indent on " filetype setting
set completeopt=longest,menu " for code complete
function! CurrectDir()
let curdir = substitute(getcwd(), "", "", "g")
return curdir
endfunction
set statusline=\ [File]\ %F%m%r%h\ %w\ \ [PWD]\ %r%{CurrectDir()}%h\ \ %=[Line]\ %l,%c\ %=\ %P
if has("win32")
set guifont=Courier_New:h10:cANSI
endif
if exists("syntax_on")
syntax reset
else
syntax on
endif
if has("autocmd")
autocmd Filetype java setlocal omnifunc=javacomplete#Complete
endif
let performance_mode=1
function MySys()
if has("win32")
return "win32"
elseif has("unix")
return "unix"
else
return "mac"
endif
endfunction
if MySys() == "unix" || MySys() == "mac"
set shell=bash
else
endif
if exists("&autoread")
set autoread
endif
if exists("&mouse")
set mouse=a
endif
let mapleader=","
let g:mapleader=","
nmap <leader>x :xa!<cr>
nmap <leader>w :w!<cr>
map <leader>cd :cd %:p:h<cr>
map <F9> ggVGg?
if exists("&foldenable")
set fen
endif
if exists("&foldlevel")
set fdl=0
endif
map <F3> :Tlist<cr>
noremap <leader>m :%s/


此是网上摘抄别人的,目前还没有把vim配置成一个功能较为强大的 IDE 编译器,如有大神在,请赐教。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: