https://github.com/junegunn/vim-easy-align

用vundle安装, 添加下面到vimrc

Plugin 'junegunn/vim-easy-align'

" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign) " Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)

  

我感觉就是使用有点难学

先用v选择多行

ga进入easyalign模式

默认向左对其,比如按照空格对其  *<space>

向右对其 <enter>*<space>

居中对其 <enter><enter>*<space>

如果遇到其他字符比如 | , = 啥的,都把空格替换为对应的即可

*可以换成数字,对应后面的第几个字符,*就是全部都指定

比如这个

| Option| Type | Default | Description |
|--|--|--|--|
| threads | Fixnum | 1 | number of threads in the thread pool |
|queues |Fixnum | 1 | number of concurrent queues |
|queue_size | Fixnum | 1000 | size of each queue |
| interval | Numeric | 0 | dispatcher interval for batch processing |
|batch | Boolean | false | enables batch processing mode |
|batch_size | Fixnum | nil | number of maximum items to be assigned at once |
|logger | Logger | nil | logger instance for debug logs |

试试vipga*|

vip是选择多行,ga是进入easyalign模式,*|是指对|对齐

就变成了这样

vipga*|
| option | type | default | description |
| -- | -- | -- | -- |
| threads | fixnum | 1 | number of threads in the thread pool |
| queues | fixnum | 1 | number of concurrent queues |
| queue_size | fixnum | 1000 | size of each queue |
| interval | numeric | 0 | dispatcher interval for batch processing |
| batch | boolean | false | enables batch processing mode |
| batch_size | fixnum | nil | number of maximum items to be assigned at once |
| logger | logger | nil | logger instance for debug logs | vipga<enter>*|
| option | type | default | description |
| -- | -- | -- | -- |
| threads | fixnum | 1 | number of threads in the thread pool |
| queues | fixnum | 1 | number of concurrent queues |
| queue_size | fixnum | 1000 | size of each queue |
| interval | numeric | 0 | dispatcher interval for batch processing |
| batch | boolean | false | enables batch processing mode |
| batch_size | fixnum | nil | number of maximum items to be assigned at once |
| logger | logger | nil | logger instance for debug logs | vipga<enter><enter>*|
| option | type | default | description |
| -- | -- | -- | -- |
| threads | fixnum | 1 | number of threads in the thread pool |
| queues | fixnum | 1 | number of concurrent queues |
| queue_size | fixnum | 1000 | size of each queue |
| interval | numeric | 0 | dispatcher interval for batch processing |
| batch | boolean | false | enables batch processing mode |
| batch_size | fixnum | nil | number of maximum items to be assigned at once |
| logger | logger | nil | logger instance for debug logs |

  

vim easy-align插件使用的更多相关文章

  1. Struts2 easy UI插件

    一.easy UI是类似于jQuery UI的插件库,它提供了丰富的各种常用插件:tree.datagrid... tree插件: 语法:$(selector).tree([settings]); 常 ...

  2. vim代码格式化插件clang-format

    title: vim代码格式化插件clang-format date: 2017-12-12 20:28:26 tags: vim categories: 开发工具 安装vim-clang-forma ...

  3. vim配置及插件安装管理(超级详细)

    1 写在前面   Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Linux牛人, 黑客之类的也都不用IDE. 但是对我等从Windows平台转移过来的Coder来说, 一个好用 ...

  4. vim配置及插件安装管理(超级详细)[转]

    1 写在前面   Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Linux牛人, 黑客之类的也都不用IDE. 但是对我等从Windows平台转移过来的Coder来说, 一个好用 ...

  5. vim之pydiction插件

    [vim之pydiction插件] It consists of three main files: python_pydiction.vim -- Vim plugin. complete-dict ...

  6. WordPress Event Easy Calendar插件多个跨站请求伪造漏洞

    漏洞名称: WordPress Event Easy Calendar插件多个跨站请求伪造漏洞 CNNVD编号: CNNVD-201309-083 发布时间: 2013-09-11 更新时间: 201 ...

  7. Vim扩展YouCompleteMe插件

    在Vim中安装YouCompleteMe插件 一.安装前的说明: 1.确保vim版本>=7.4,若MAC OS,建议直接安装MacVim(8.0版本). ps:如果不想使用MacVim的GUI, ...

  8. vim配置文件和插件管理

    本文通过总结零碎的资料总结而成,更多是去引导学习vim配置文件及插件使用. .vimrc配置文件,内容如下(备注清晰) "引入插件pathogen使用 execute pathogen#in ...

  9. vim实战:插件安装(Vundle,NerdTree)

    一:插件管理器Vundle 1.简介 Vundle是vim的一个插件管理器, 同时它本身也是vim的一个插件.插件管理器用于方便.快速的安装.删除.Vim更新插件.vim Vundle插件官方地址:h ...

  10. vim语法高亮插件编写

    # vim语法高亮插件编写 编写vim语法高亮插件很简单,只需要编写两个文件.vim放到vim的安装目录下的目录就可以了. ## 输出------------------------------ sy ...

随机推荐

  1. EF Code First 一对多、多对多关联,如何加载子集合?

    应用场景 先简单描述一下标题的意思:使用 EF Code First 映射配置 Entity 之间的关系,可能是一对多关系,也可能是多对多关系,那如何加载 Entity 下关联的 ICollectio ...

  2. 小菜学习Winform(一)贪吃蛇2

    前言 上一篇<小菜学习Winform(一)贪吃蛇>中实现了简单版的贪吃蛇,在文章末也提到需要优化的地方,比如使用oo.得分模式.速度加快模式和减少界面重绘.因为是优化篇,实现方式上一篇有, ...

  3. PC网站CSS分享

    这里想总结些编写网页的经验,以PC端的为主,前面总结过后台的,今天写些前台的,参考了bootstrap3.3.5.bootstrip2.3.2和模版matrix. 前段时间还写过一篇<前端基础学 ...

  4. 使用 CSS3 实现超炫的 Loading(加载)动画效果

    SpinKit 是一套网页动画效果,包含8种基于 CSS3 实现的很炫的加载动画.借助 CSS3 Animation 的强大功能来创建平滑,易于定制的动画.SpinKit 的目标不是提供一个每个浏览器 ...

  5. Date, TimeZone, MongoDB, java中date的时区问题

    打印new Date(),Fri Aug 12 13:37:51 CST 2016. 显示Asia/Shanghai的时区,但是date toString 的时区简写却是CST.更坑爹的是,Googl ...

  6. 关系数据库SQL之可编程性函数(用户自定义函数)

    前言 在关系型数据库中除了前面几篇基本的数据库和数据表操作之外,还提供了可编程性的函数.存储过程.事务.触发器及游标. 本文介绍的是函数. 函数分为两种: 系统函数 用户自定义函数 准备工作 这里以银 ...

  7. c#动态加载卸载DLL的方法

    这篇文章介绍了c#动态加载卸载DLL的方法,有需要的朋友可以参考一下 c#中通过反射可以方便的动态加载dll程序集,但是如果你需要对dll进行更新,却发现.net类库没有提供卸载dll程序集的方法.在 ...

  8. 《疯狂Java讲义》学习笔记——第2章 理解面向对象

    面向对象的三种基本特征:继承,封装,多态 UML(统一建模语言) 2.1 面向对象 2.1.1 结构化程序设计简介 图2.1  结构化软件的逻辑结构示意图 从图2.1可以看出,结构化设计需要采用自顶向 ...

  9. Sublime Text使用配置介绍

    这篇文章很多内容都是来源自网络,发布这里当作自己留个底,以后不用到处去找 对于文本编辑器,我用过notepad2.notepad++.Editplus.UltraEdit.Vim.TextPad,都没 ...

  10. jquery实现表格动态添加

    //点击追加触发$(function(){$("#button").click(function(){var div_ = $("#sel").val();va ...