linuxVim的配置是怎樣的

這篇文章給大家介紹linux Vim的配置是怎樣的,內(nèi)容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。

創(chuàng)新互聯(lián)主要從事成都網(wǎng)站制作、成都網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)紅花崗,10多年網(wǎng)站建設(shè)經(jīng)驗,價格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):18980820575

有需要的朋友可以參考下。

代碼如下:


" This is my _vimrc under windows platform
" and it can be used on *nix too
" all the difference of them is the font setting session
" happy Viming,
" copyLeft (#) Abruzzi John

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 the back space
set backspace=indent,eol,start "這行比較重要,剛接觸vim的朋友會發(fā)現(xiàn)有時候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

" the following function is used for show the status bar on the buttom
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

" this is a setting of font
if has("win32")
  set guifont=Courier_New:h20:cANSI
endif

" make sure that syntax always on
if exists("syntax_on")
  syntax reset
else
  syntax on
endif

 
" java complete
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
  " set win32 shell
endif
 
" set auto read when file is changed from outside
if exists("&autoread")
set autoread
endif
 
" enable the mouse
if exists("&mouse")
  set mouse=a
endif
 
" set mapleader
let mapleader=","
let g:mapleader=","
 
"fast saving
nmap <leader>x :xa!<cr>
nmap <leader>w :w!<cr>
 
"switch to current directory
map <leader>cd :cd %:p:h<cr>
 
" just for fun
map <F9> ggVGg?
 
" folding code
if exists("&foldenable")
  set fen
endif
 
if exists("&foldlevel")
  set fdl=0
endif
 
" tag list --
map <F3> :Tlist<cr>
 
"remove the windows ^M windows系統(tǒng)中常??梢钥吹轿谋局袏A雜著^M這樣的控制字符,用此命令刪除之
noremap <leader>m :%s/

關(guān)于linux Vim的配置是怎樣的就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學(xué)到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

文章題目:linuxVim的配置是怎樣的
當(dāng)前鏈接:http://bm7419.com/article46/geiseg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供Google、營銷型網(wǎng)站建設(shè)、移動網(wǎng)站建設(shè)、用戶體驗、定制開發(fā)、App設(shè)計

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運營