20. General 設定
" 這是註解
filetype plugin indent on "偵測檔案格式
syntax on "syntax highlight
scriptencoding utf8 "設定編碼 utf8
set mouse=a "開啟滑⿏鼠模式
set background=dark "以深⾊色為底
21. Vim UI 設定
set number "顯⽰示⾏行號
set showmode "顯⽰示⺫⽬目前模式
set cursorline "在當前⾏行下顯⽰示標記
" 以下兩⾏行會更加 highlight 當前⾏行
highlight clear SignColumn
highlight clear LineNr
22. Vim UI 設定 - con't
set showcmd "顯⽰示輸⼊入的指令
set showmatch "對應的括弧
set hlsearch "highlight search
set smartcase "同下
set ignorecase "忽略⼤大⼩小寫搜尋
23. Vim Formatting 設定
set autoindent "⾃自動縮排
set smartindent "智慧縮排
set shiftwidth=4 "讓縮排是四格空⽩白
set tabstop=4 "內縮是四個欄位
set softtabstop=4 "backspace可刪除tab
24. Vim Formatting 設定
set expandtab "⽤用空⽩白取代 tab
autocmd FileType make setlocal noexpandtab
"上⾯面這⾏行是為了編輯 makefile 時保持使⽤用 tab