本周整理一批别人写的代码,要处理好所有的注释和缩进。
碰到那种大片的赋值或者注释或者宏定义,但又没对齐的,简直太难看了。
于是手工对了几个,觉得确实不是人干的活,心想这种需求应该有工具自动搞定才对啊,于是google了一把
果然,插件在此,tabular
https://github.com/godlygeek/tabular
再配合多行编辑插件vim-multiple-cursors,搬砖效率成倍提升啊
https://github.com/terryma/vim-multiple-cursors
let g:multi_cursor_start_key='<C-n>'
let g:multi_cursor_start_word_key='g<C-n>'
let g:multi_cursor_next_key='<C-n>'
let g:multi_cursor_prev_key='<C-p>'
let g:multi_cursor_skip_key='<C-x>'
let g:multi_cursor_quit_key='<Esc>'
效果这里不好展示,可以自己搜一下。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有