From 15d380e416464b774c43a93f9759cb4c95c5364b Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Fri, 2 May 2025 15:34:35 +0800 Subject: [PATCH] =?UTF-8?q?vimrc:=20=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=95=9F=E7=94=A8=E6=98=AF=E5=90=A6=E5=95=9F=E7=94=A8YCM=20com?= =?UTF-8?q?patible=E9=96=8B=E9=97=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .chezmoi.toml.tmpl | 2 ++ dot_vimrc => dot_vimrc.tmpl | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) rename dot_vimrc => dot_vimrc.tmpl (99%) diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index 3ee1291..c69ecb6 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -1,9 +1,11 @@ {{- $name := promptStringOnce . "name" "請輸入您的姓名" -}} {{- $email := promptStringOnce . "email" "輸入您的Email地址" -}} {{- $hasGUI := promptBoolOnce . "hasGUI" "Does this machine have a GUI" -}} +{{- $enableYcm := promptBoolOnce . "enableYcm" "是否要啟用Vim YCM compatible功能(會佔用2.7GB)" -}} sourceDir = "~/.local/share/chezmoi" [data] name = {{ $name | quote }} email = {{ $email | quote }} noGUI = {{ not $hasGUI }} + enableYcm = {{ $enableYcm }} diff --git a/dot_vimrc b/dot_vimrc.tmpl similarity index 99% rename from dot_vimrc rename to dot_vimrc.tmpl index 78cb01e..41aaae1 100644 --- a/dot_vimrc +++ b/dot_vimrc.tmpl @@ -96,6 +96,7 @@ Plug 'bryanmylee/vim-colorscheme-icons' Plug 'ctrlpvim/ctrlp.vim' " 模糊搜尋 Ctrl+P +{{ if .enableYcm }} " YCM自動補齊 function! BuildYCM(info) " info is a dictionary with 3 fields @@ -132,22 +133,23 @@ let g:UltiSnipsJumpForwardTrigger = "" let g:UltiSnipsJumpBackwardTrigger = "" Plug 'mattn/emmet-vim' "Ctrl+Y , +{{ end }} Plug 'jiangmiao/auto-pairs' " 自動補全對稱符 " 這是自訂括號的寫法 au FileType ejs let b:AutoPairs = AutoPairsDefine({'<%': '%>', ''}) au FileType html let b:AutoPairs = AutoPairsDefine({''}) +" 看看你設定了哪些變數、函數,也可以快速跳轉 +Plug 'majutsushi/tagbar' +nmap :TagbarToggle + Plug 'editorconfig/editorconfig-vim' " 按 可以回朔到開啟檔案以來的任何歷史,還會標出修改的地方,很酷 Plug 'mbbill/undotree' nnoremap :UndotreeToggle -" 看看你設定了哪些變數、函數,也可以快速跳轉 -Plug 'majutsushi/tagbar' -nmap :TagbarToggle - " 可以在文档中显示 git 信息 Plug 'airblade/vim-gitgutter'