vim+Vundle+vim-autoformat+astyle格式化代码
来源:互联网 发布:怎么淘宝开店 编辑:程序博客网 时间:2024/05/20 22:04
Vundle是vim插件管理工具,用来管理vim插件,vim-autoformat是代码格式化插件
1.安装Vundle(参考点击打开链接)
$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
2.在.vimrc文件中添加如下内容
set nocompatible " be iMproved, requiredfiletype off " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" alternatively, pass a path where Vundle should install plugins"call vundle#begin('~/some/path/here')" let Vundle manage Vundle, requiredPlugin 'VundleVim/Vundle.vim'Plugin 'Chiel92/vim-autoformat'" All of your Plugins must be added before the following linecall vundle#end() " requiredfiletype plugin indent on " required" To ignore plugin indent changes, instead use:"filetype plugin on"" Brief help" :PluginList - lists configured plugins" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate" :PluginSearch foo - searches for foo; append `!` to refresh local cache" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal"" see :h vundle for more details or wiki for FAQ" Put your non-Plugin stuff after this line
3.重启vim,在vim中执行:PluginInstall,安装vim-autoformat4.安装 astyle
sudo apt-get install astyle也可以安装其他语言对应的格式化插件,安装完成后,会执行默认格式化设置
5.自定义astyle格式化,在.vimrc中添加如下代码
let g:formatdef_my_cpp = '"astyle --style=google"'let g:formatters_cpp = ['my_cpp']au BufWrite * :Autoformat代码保存时,会自动进行格式化
阅读全文0 0
- vim+Vundle+vim-autoformat+astyle格式化代码
- vim+astyle 格式化代码
- Vim插件之vim-autoformat
- vim代码补全:YouCompleteMe\Vundle\python
- Vim整合AStyle进行代码美化
- Vim整合AStyle进行代码美化
- Vim::Vundle管理vim插件
- 用vim格式化代码
- vim格式化代码
- 用vim格式化代码
- vim 格式化代码
- vim代码格式化功能
- vim 格式化代码
- VIM格式化C代码
- vim格式化代码
- vim格式化C代码
- VIM 格式化代码
- VIM格式化代码
- Servlet基础(4)
- python dic 字典排序
- ccpc 2017 网络赛 1004 A Secret (扩展kmp)【模板】
- 二维数组的定义方式与细节
- R:向量、矩阵、数组操作
- vim+Vundle+vim-autoformat+astyle格式化代码
- [除法分块] BZOJ1257: [CQOI2007]余数之和sum
- django-pure-pagination的使用
- JZOJ4876. 【NOIP2016提高A组集训第10场11.8】基因突变(2017.8B组)
- struts-struts标签的使用(一)
- 51Nod-1019-逆序数
- Party at Hali-Bula(UVA
- java-----I/O流
- PHP框架
原创粉丝点击
热门IT博客
热门问题
老师的惩罚
人脸识别
我在镇武司摸鱼那些年
重生之率土为王
我在大康的咸鱼生活
盘龙之生命进化
天生仙种
凡人之先天五行
春回大明朝
姑娘不必设防,我是瞎子
卡特二手勾机
勾机找活
求购二手勾机
私人二手勾机
大型勾机图片
2手勾机价格
勾机吧
勾机合格证
二手卡特勾机
全自动衣架焊勾机
勾玉
勾玉写轮眼
四星太鼓给多少勾玉
三勾玉写轮眼
九勾玉写轮眼
勾球
高尔夫女球童会勾客人
勾画
勾画拼音
勾画的拼音
勾画的意思
勾画造句
勾画的近义词
勾留
一方山影长勾留猜一字
勾留的读音
勾线笔图片
双勾子线打结方法
勾线画
勾线
勾线笔长什么样图片
勾线笔怎么用
工笔画入门勾线图片
毛衣被勾线了怎么办
勾线笔画的怎么洗掉
勾线笔是记号笔吗
水彩勾线笔
画画勾线笔
勾线毛笔
美术勾线笔
勾线笔是什么