neovim插件配置与tips
Opened this issue · 5 comments
AndreGeng commented
- mg979/vim-visual-multi
- mac下默认快捷键不起作用,需要自定义mapping
- m-j/k/h/l 添加cursor
- 8mj, mip 可以在text object范围内选中所需字段
- visual mode, 选中一块区域,通过g/可以用正则进入多光标模式
- godlygeek/tabular
- 对齐文本 :Tabular /=
- junegunn/fzf
- 命令行快捷方式
- CTRL-R 搜索命令行历史记录
- CTRL-T 搜索文件
- Process IDs
- kill -9
- Host names
- ssh **
- telnet **
- 环境变量/别名
- unset **
- export **
- unalias **
- 命令行快捷方式
- 集成fzf+git
- 现在只加了一个命令fco, 用来方便checkout其它branch 😃
- see here: fzf+git
- Ack/ag
- 搜索特定后缀文件:Ack -i -G '.wxml$' Number
- 搜索regex:Ack -i -w 'hooks.\w+.call'
- Fold
- 打开/关闭一段代码的fold, 可以用zO, zC
- 全文件fold, zM
- 全文件unfold, zR
- Tips:
CTRL-i等同于tab, 以前总是不好按到tab 😂
***CTRL-/***可以用来插入上一次的搜索内容
cdo quickfix list replace
Register
用r寄存器为例
"ryw
"rp
CTRL-rr
默认寄存器
""
Git
Glog master.. --author=xxx --
Glog master.. --author=xxx
可以用zm fold来检查看更改了哪个页面
]q,[q来上下移动commit
AndreGeng commented
mac 快捷键
CTRL-w 向前删除一个单词
CTRL-k 从光标向后删除到行尾
AndreGeng commented
替换quickfix window中的内容
cdo %s/<search term>/<replace term>/cg
AndreGeng commented
vim性能评估
启动性能评估
vim --startuptime vim.log
运行时性能评估
:profile start profile.log
:profile func *
:profile file *
" At this point do slow actions
:profile pause
:noautocmd qall!
AndreGeng commented
tmux custom layout
tmux list-windows
tmux switch windows
ctrl-space(prefix:) + :
swap-window -s 3 -t 1
AndreGeng commented
macos enable key repeats
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false