看板 Editor 關於我們 聯絡資訊
各位板上先進好 想請教一下如果在文字檔裏有error及warning兩個關鍵字 我想在用vim開啟這文字檔時,這兩個關鍵字分別以不同顏色表示 請問該如何實現? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.250.205.229 ※ 文章網址: https://www.ptt.cc/bbs/Editor/M.1467885693.A.0BA.html
Bellkna: highlight hl01 guibg=white guifg=red 07/07 22:14
Bellkna: highlight hl02 guibg=white guifg=green 07/07 22:14
Bellkna: syntax match hl01 /\verror/ 07/07 22:15
Bellkna: syntax match hl01 /\vwarning/ 07/07 22:15
Bellkna: 2 07/07 22:15
andy433268: 請問這在哪輸入 謝謝 07/08 03:07
Qiqi: 冒號後輸入,懶得每次輸入就寫進rc裡 07/08 07:52
andy433268: 萬分感謝樓上的兩位大大! 07/11 00:18
andy433268: 我照著key入.vimrc後,重新開啟檔案字體還是沒變色 07/11 10:02
andy433268: 必須用gvim開啟檔案才會有變化,用vi開無變化 07/11 10:07
andy433268: 不曉得問題出在哪?? 謝謝 07/11 10:07
Bellkna: ^guibg^ctermbg ^guifg^ctermfg 07/12 01:10
andy433268: 謝謝!! 成功了 07/12 13:34
MortonRainey: 479 這個也滿好用的 08/05 22:23