天天看點

vim無插件配置

個人使用的無插件vim配置

編輯 ~/.vimrc

set number 		 "顯示行号
syntax on 		 " 打開文法高亮
set mouse=a 		 "支援滑鼠
set encoding=utf-8
set nocompatible         " Use Vim defaults (much better!)
set bs=indent,eol,start  " allow backspacing over everything in insert mode
set cursorline		 " 光标所在的目前行高亮
set autoindent		 " 自動縮略,當按下回車時,自動與上一行的縮進保持一緻
set showmatch		 " 光标遇到{[()]}時,會高亮顯示另一半比對的符号
set noswapfile		 " 不建立交換檔案
set wildmenu		 " 指令模式下,底部操作指令按下 Tab 鍵自動補全
set fileencodings=ucs-bom,utf-8,latin1 " 檔案編碼探測清單
filetype plugin indent on " 開啟自動識别檔案類型,并根據檔案類型加載不同的插件和縮進規則
set linebreak		" 折行展示
set backspace=eol,start,indent " 修正 vim 删除/倒退鍵行為
set ruler               " show the cursor position all the time
set autoread		" 設定當檔案被改動時自動載入
set wildmenu        " 指令模式下,底部操作指令按下 Tab 鍵自動補全

" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500

" Makes search act like search in modern browsers
set incsearch

set t_Co=256

" 使用空格代替tabs
set expandtab

" Be smart when using tabs ;)
set smarttab

" 1 tab == 4 spaces
set shiftwidth=4

set tabstop=4
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines

" Always show the status line
set laststatus=2

" Format the status line
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c

           

參考

https://github.com/amix/vimrc

繼續閱讀