国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

linux Vim經典配置一例

2020-06-13 12:13:24
字體:
來源:轉載
供稿:網友
有需要的朋友可以參考下。

復制代碼
代碼如下:

" 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的朋友會發現有時候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:h10: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系統中常常可以看到文本中夾雜著^M這樣的控制字符,用此命令刪除之
noremap <leader>m :%s/

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 山阴县| 天全县| 依兰县| 江永县| 页游| 宜兰县| 和林格尔县| 从江县| 海城市| 青阳县| 揭阳市| 南充市| 鄱阳县| 宁蒗| 荔浦县| 阿拉善盟| 营口市| 南江县| 芷江| 乌苏市| 荥经县| 浠水县| 通化市| 新晃| 内丘县| 民县| 土默特右旗| 隆回县| 凉城县| 玉环县| 阿克苏市| 金山区| 桃源县| 柞水县| 梨树县| 龙陵县| 霸州市| 泽普县| 天津市| 西丰县| 法库县|