0
点赞
收藏
分享

微信扫一扫

vim使用格式化代码

陆公子521 2022-04-13 阅读 64
linux

vim代码格式化

在命令状态下输入gg,光标跳转到文件首部,

然后在键盘下输入"=G"

centos7下

cp /etc/vimrc  ~/.vimrc
vim ~/.vimrc

set sw=4
set ts=4
filetype indent on
set cindent

Ubuntu下

cp /etc/vim/vimrc  ~/.vimrc
vim ~/.vimrc

set sw=4
set ts=4
filetype indent on
set cindent
举报

相关推荐

0 条评论