VSCode使用技巧

記錄個人用到的 VSCode 技能。

0x1 搜索 \t tab 字符

無論是單個文件內搜索,還是全局搜索; 輸入\t 後, 需要 勾選正則匹配(.*那個icon):

0x2 搜索行尾空格字符

\s$

0x3 使用GitLens插件

可以方便的查看最近commit的修改內容,對比分支等

0x4 ~/.gitconfig中配置 VSCode 爲默認編輯器:

[core]
    #editor = vim
    #editor = subl -n w # sublime
    #editor = notepad++ -multiInst -nosession # notepad++
    #editor = 'C:\\Program Files (x86)\\Microsoft VS Code\\code.exe' -w  # vscode
    #editor = 'E:\\soft\\VSCode-Insider\\Code - Insiders.exe' -w  # vscode-insiders
    editor = code-insiders -w # recommend VSCode with GitLens especially rebase -i moment

以後 git commit 時候編輯起來比 vim 方便多了, 例如多列編輯。 對於 rebase,由於裝了 git lens 插件, 直接是 GUI 方式選擇, 太方便了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章