linux 下的vim 简单配置

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 编译器,如有大神在,请赐教。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值