vimrc入門配置

2021-09-26 23:22:17 字數 2578 閱讀 5973

```csharp

set number

set tabstop=

4colorscheme the-creator

syntax on

inoremap jj

map

:nerdtreetoggle

nmap ss

(easymotion-s2)

set hlsearch

set incsearch

call plug#begin

('~/.vim/plugged'

)plug 'mhinz/vim-startify'

plug 'scrooloose/nerdtree'

plug 'vim-airline/vim-airline'

plug 'vim-airline/vim-airline-themes'

plug 'yggdroot/indentline'

plug 'kien/ctrlp.vim'

plug 'easymotion/vim-easymotion'

call plug#end

()

更新

```csharp

set number

set tabstop=4uj

colorscheme the-creator

syntax on

inoremap ( ()i

inoremap [ i

inoremap iinoremap < <>i

inoremap " ""i

inoremap jj map :nerdtreetogglenmap ss (easymotion-s2)

set hlsearch

set incsearch

" youcompleteme

set runtimepath+=~/.vim/bundle/youcompleteme

let g:ycm_collect_identifiers_from_tags_files = 1 " 開啟 ycm 基於標籤引擎

let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注釋與字串中的內容也用於補全

let g:syntastic_ignore_files=[".*\.py$"]

let g:ycm_seed_identifiers_with_syntax = 1 " 語法關鍵字補全

let g:ycm_complete_in_comments = 1

let g:ycm_confirm_extra_conf = 0

let g:ycm_key_list_select_completion = ['', ''] " 對映按鍵, 沒有這個會攔截掉tab, 導致其他外掛程式的tab不能用.

let g:ycm_key_list_previous_completion = ['', '']

let g:ycm_complete_in_comments = 1 " 在注釋輸入中也能補全

let g:ycm_complete_in_strings = 1 " 在字串輸入中也能補全

let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注釋和字串中的文字也會被收入補全

let g:ycm_global_ycm_extra_conf='~/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'

let g:ycm_show_diagnostics_ui = 0 " 禁用語法檢查

inoremap pumvisible() ? "\" : "\" | " 回車即選中當前項

nnoremap :ycmcompleter gotodefinitionelsedeclaration| " 跳轉到定義處

"let g:ycm_min_num_of_chars_for_completion=1 " 從第2個鍵入字元就開始羅列匹配項

"autocmd vimenter * nerdtree

call plug#begin('~/.vim/plugged')

plug 'ycm-core/youcompleteme'

plug 'mhinz/vim-startify'

plug 'scrooloose/nerdtree'

plug 'vim-airline/vim-airline'

plug 'vim-airline/vim-airline-themes'

plug 'yggdroot/indentline'

plug 'kien/ctrlp.vim'

plug 'easymotion/vim-easymotion'

call plug#end()

vimrc配置文件示例

set nocompatible set number set numberwidth 4 set autoindent source home murphy set encoding info set encoding utf 8 set fileencodings utf 8,latin 1 s...

我的 vimrc配置

syntax on 自動語法高亮 set number 顯示行號 set cursorline 突出顯示行 set cursorcolumn 突出顯示列 set tabstop 2 tab佔兩個空格 set ruler 開啟狀態列標尺 這裡有個ctags外掛程式,如果只將vim config.tar...

vim基本配置 vimrc

語法高亮 syntax on 高亮度查詢 set hlsearch 設定底色色調 set bg dark 可隨時用退格鍵刪除 set backspace 2 顯示行號 set number 自動縮排與c語言風格縮排 set autoindent set cindent 縮排寬度 set tabsto...