vim配置檔案

2021-08-02 13:50:54 字數 1146 閱讀 7191

乙個簡單的vim配置檔案,留下備用,修改配置檔案永久生效,vim ~/.vimrc

set nocompatible " 關閉 vi 相容模式

syntax on " 自動語法高亮

set number " 顯示行號

set cursorline " 突出顯示當前行

set ruler " 開啟狀態列標尺

set shiftwidth=4 " 設定 << 和 >> 命令移動時的寬度為 4

set softtabstop=4 " 設定 tab 長度為 4

set nobackup " 覆蓋檔案時不備份

set autochdir " 自動切換當前目錄為當前檔案所在的目錄

filetype plugin indent on " 開啟外掛程式

set backupcopy=yes " 設定備份時的行為為覆蓋

set ignorecase smartcase " 搜尋時忽略大小寫,但在有乙個或以上大寫字母時仍保持對大小寫敏感

set mouse=a "支援滑鼠游標定位

set nowrapscan " 禁止在搜尋到檔案兩端時重新搜尋

set incsearch " 輸入搜尋內容時就顯示搜尋結果

set hlsearch " 搜尋時高亮顯示被找到的文字

set noerrorbells " 關閉錯誤資訊響鈴

set novisualbell " 關閉使用可視響鈴代替呼叫

set t_vb= " 置空錯誤鈴聲的終端**

set showmatch " 插入括號時,短暫地跳轉到匹配的對應括號

set matchtime=2 " 短暫跳轉到匹配括號的時間

set hidden " 允許在有未儲存的修改時切換緩衝區,此時的修改由 vim 負責儲存

set guioptions-=t " 隱藏工具欄

set guioptions-=m " 隱藏選單欄

set smartindent " 開啟新行時使用智慧型自動縮排

set backspace=indent,eol,start" 不設定在插入狀態無法用退格鍵和 delete 鍵刪除回車符

set cmdheight=1 " 設定命令列的行數為 1

set laststatus=2 " 顯示狀態列 (預設值為 1, 無法顯示狀態列)

vim 配置檔案

set encoding utf 8 set fileencoding utf 8 syntax highlight syntax enable syntax on colorscheme colorscheme desert here to set line number set nu here ...

vim配置檔案

vundle 配置 set nocompatible filetype off set rtp vim bundle vundle.vim call vundle begin plugin vundlevim vundle.vim vim 外掛程式管理 plugin spf13 vim colors...

vim配置檔案

設定行行 set nu set tabstop 4 set shiftwidth 4 set is set si set ai set hlsearch 取消自動備份,這樣就不會有以 結尾的檔案了 這是備份檔案,如果你覺得多餘的話可以加上下面一句 set nobackup 總是顯示當開啟的檔案的名字...