Vim
https://gyazo.com/39e18e18703f59cfb358282f87d772eb
/icons/Vim
Vi IMproved
1991
Bram Moolenaar
📒 1 時間で Vim に惚れるチュートリアル - Minerva
Interactive Vim tutorial
Learn Vim
GitHub - iggredible/Learn-Vim
GitHub - wsdjeg/Learn-Vim_zh_cn
Vim: usr_toc.txt
Vim - Curated Learning Resources
2023-10-29 Vimの思想について
開啟檔案
vim 檔案名稱
$ vim +10 filename.txt
開啟檔案並跳至第10行
$ vim +/search-term filename.txt
開啟檔案並跳至第一個符合內容的位置
$ vim -R /etc/passwd
以唯獨模式開始檔案
開啟檔案後預設會進入「一般指令模式(Vim)」
模式
code:mermaid
flowchart TD
n1(一般指令模式)
n2(編輯模式)
n3(指令列命令模式)
n4(視覺模式)
n1--i-->n2
n2--Esc-->n1
n1--:-->n3
n3--Esc-->n1
n1--v-->n4
n4--Esc-->n1
table:切換模式
ESC 一般指令模式(Vim)
i 編輯模式(Vim)
: 指令列命令模式(Vim)
v 視覺模式(Vim)
切換模式(Vim)
組合按鍵
Vim的精髓
例如
指定次數的移動
11h
想移到下個字串的最後一個字元,並進入編輯模式
ga
想往後移動指定個數字串
3w
想往下移動指定行數
5j
刪除搜尋文字
/example
/:搜尋關鍵字
gnd
gn:前往下一個搜尋的關鍵字(n)
d:刪除選擇內容
中級 Vim 操作
ちょっと面倒だなぁ~ってテキスト編集をなんとかする使い捨て十徳ナイフの作り方
工具
coc.nvim
在NeoVim上以類似VS Code的體驗開發
Message from the family of Bram Moolenaar