neovim

安装 参考 https://github.com/neovim/neovim/blob/master/INSTALL.md 配置文件 nvim 的配置文件目录在 ~/.config/nvim 下,默认读取该目录下的init.lua 文件。

2025-09-08 · 1 min

Vim and Vim plugins

VIM Starting VIM :w file.txt Buffers, Windows, and Tabs Buffers Buffers 是一个内存空间,您可以在其中写入和编辑一些文本。当你在 Vim 中打开一个文件时,数据被绑定到一个缓冲区。当你在 Vim 中打开 3 个文件时,你有 3 个缓冲区。 # 展示缓冲区的三个命令 :buffers :ls :files # 跳转缓冲区 :bnext # 下一个缓冲区 :buffer + file name :buffer + buffer number Ctrl-^ # 删除缓冲区 :bdelete + file name :bdelete + buffer number # 退出所有缓冲区 :qall :qall! :wqall Windows windows 是展示 buffer 的显示 UI. :split filename :vsplit filename :new filename Ctrl-W H/J/K/L # move to left/below/upper/right window Ctrl-W V/S # open a vertical/horizontal split Ctrl-W C # close a window Ctrl-W O # make the current window the only one on screen Tabs Tab 是一系列 windows。...

2023-12-13 · 2 min

Tmux

常用快捷键 ~/.tmux.conf 可修改 tmux 配置。 tmux: open a new session. C-b -> C-a C-b %: 左右分屏。改为-> C-a | C-b ": 上下分屏。-> C-a - C-b <arrow key>:在 panes 间移动。-> alt + arrow exit or hit Ctrl-d:退出当前 pane。 C-b c: new window. C-b p: previous window. C-b n: next window. C-b <number> : move to window n. C-b ?: help message. C-b z: make a pane go full screen. Hit C-b z again to shrink it back to its previous size...

2023-12-13 · 1 min

正则表达式

笔记一 笔记源自 RegexOne 需要转义的特殊字符: * . ? + $ ^ [ ] ( ) { } | \ / \s 匹配所有空格字符,等同于: [\t\n\f\r\p{Z}] \f 换页符 \n 换行符 \r 回车符 \t 制表符 \p 等同于\r\n, CRLF DOS 行终止符 Tutorials Lesson 1 The 123s \d any single digit character \D any single non-digit character Lesson 2: The Dot . any single character \. period Lesson 3: Matching specific characters [abc] only a, b, c single character...

2023-01-12 · 2 min