vim外掛程式安裝

2021-10-07 12:32:16 字數 3191 閱讀 2443

set t_co=256 " necessary for airlinetheme

set laststatus=2

set foldmethod=syntax

set statusline=%f%m%r%h

set tabstop=4

set number

set fencs=utf-8,gbk

set cindent

set expandtab

set softtabstop=4

set showmatch

set smartcase

set autochdir

set autoread

set wildmenu

set wildmode=longest:list,full

set hlsearch

set tags=./.tags;,.tags

let mapleader = ';'

syntax on

set ruler

set completeopt=longest,menu

set rtp+=~/.vim/bundle/vundle.vim

call vundle#begin()

plugin 'vundlevim/vundle.vim'

plugin 'rafi/awesome-vim-colorschemes'

bundle 'scrooloose/nerdtree'

let nerdtreewinpos='left'

map :nerdtreetogglebundle 'scrooloose/nerdcommenter'

let g:nerdspacedelims=1

bundle 'yggdroot/leaderf'

bundle 'mhinz/vim-startify'

bundle 'taglist.vim'

let tlist_ctags_cmd='/usr/bin/ctags-exuberant'

let tlist_show_one_file=1 "不同時顯示多個檔案的tag,只顯示當前檔案的

let tlist_winwidt =28 "設定taglist的寬度

let tlist_exit_onlywindow=1 "如果taglist視窗是最後乙個視窗,則退出vim

"let tlist_use_right_window=1 "在右側視窗中顯示taglist視窗

let tlist_use_left_windo =1 "在左側視窗中顯示taglist視窗

bundle 'majutsushi/tagbar'

"nmap tb :tagbartoggle"快捷鍵設定

let g:tagbar_ctags_bin='/usr/bin/ctags-exuberant' "ctags程式的路徑

let g:tagbar_autofocus = 1

let g:tagbar_width=20 "視窗寬度的設定

map :tagbar"autocmd bufreadpost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx call tagbar#autoopen() "如果是c語言的程式的話,tagbar自動開啟

bundle 'bling/vim-airline'

bundle 'vim-airline/vim-airline-themes'

"indentline **縮排線標誌線

plugin 'yggdroot/indentline'

let g:indentline_char = '┆'

let g:indentline_color_term = 239

let g:indentline_enabled = 1

"對映到ctrl+i鍵

map :indentlinestogglebundle 'easymotion/vim-easymotion'

plugin 'bling/vim-bufferline'

call vundle#end()

"autocmd vimenter * nerdtree

autocmd vimenter * wincmd w

autocmd vimenter * if !argc()|nerdtree|endif

autocmd bufenter * if (winnr("$") == 1 && exists("b:nerdtree") && b:nerdtree.istabtree()) | q | endif

let g:nerdtreedirarrowexpandable = '▸'

let g:nerdtreedirarrowcollapsible = '▾'

let nerdtreeignore = ['\.pyc$']

let g:nerdtreechdirmode = 2 "change current folder as root

let nerdtreeminimalui = 1

let nerdtreedirarrows = 1

" airline options

let g:airline_powerline_fonts=1

let g:airline#extensions#tabline#enabled = 1

nmap :bn"設定tab鍵對映"

let g:airline_theme="sol"

set langmenu=zh_cn.utf-8

set ambiwidth=double

let mapleader=','

"設定書籤

let g:startify_bookmarks = [

\ '~/project/test.cpp',

\]"起始頁顯示的列表長度

let g:startify_files_number = 20

"自動載入session

let g:startify_session_autoload = 1

"過濾列表,支援正規表示式

let g:startify_skiplist = [

\ '^/tmp',

\ ]

vim外掛程式安裝 如何安裝Vim外掛程式

vim外掛程式安裝 儘管vim快速高效,但預設情況下,它只是乙個文字編輯器。至少,這就是沒有外掛程式的情況,外掛程式基於vim並新增了額外的功能,使其不僅具有鍵入文字的視窗,還具有更多的功能。正確搭配各種外掛程式,您可以掌控自己的生活,並打造自己獨特的vim體驗。您可以自定義主題 還可以新增語法突出...

vim外掛程式安裝

filetype off required set rtp vim bundle vundle call vundle rc let vundle manage vundle required bundle gmarik vundle my bundles here original repos o...

安裝vim外掛程式

0.vundle 在按照官方的 教程 安裝好vundle之後,要安裝乙個外掛程式時,你只需要 選好外掛程式 在vim的配置檔案中加一句 bundle your script path 在vim中執行 bundleinstall 解除安裝時只需 去除配置檔案中的 bundle your script ...