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. geotrellis使用(六)Scala并发(并行)编程

    本文主要讲解Scala的并发(并行)编程,那么为什么题目概称geotrellis使用(六)呢,主要因为本系列讲解如何使用Geotrellis,具体前几篇博文已经介绍过了.我觉得干任何一件事情基础很重要 ...

  2. DIB位图(Bitmap)的读取和保存

    设备无关位图(Device Independent Bitmap)是可以保存在磁盘的位图文件,可以从磁盘读取到内存或者从内存保存到磁盘上.它的文件结构是标准化的,可以在Windows/Linux/Un ...

  3. RAC学习笔记

    RAC学习笔记 ReactiveCocoa(简称为RAC),是由Github开源的一个应用于iOS和OS开发的新框架,Cocoa是苹果整套框架的简称,因此很多苹果框架喜欢以Cocoa结尾. 在学习Re ...

  4. Vue.js说说组件

    什么是组件:组件是Vue.js最强大的功能之一.组件可以扩展HTML元素,封装可重用的代码.在较高层面上,组件是自定义的元素,Vue.js的编译器为它添加特殊功能.在有些情况下,组件也可以是原生HTM ...

  5. Android手机总是提示:存储空间不足,解决方法

    手机才有16G空间,用一段时间后,总是提示内存不足,各种清理软件都没卵用. 有一个方法立即见效: 1.进入Recovery 2.格式化 SDCard 博客园首席神棍 野生菌野菜干批发 大舍大得 小舍小 ...

  6. Top 15 不起眼却有大作用的 .NET功能集

    目录 1. ObsoleteAttribute2. 设置默认值属性: DefaultValueAttribute3. DebuggerBrowsableAttribute4. ??运算符5. Curr ...

  7. 去除Jsp页面空白行

    在Jsp页面head位置添加 <%@ page trimDirectiveWhitespaces="true" %> 在项目web.xml中添加 <servlet ...

  8. html中<radio>单选按钮控件标签用法解析及如何设置默认选中

    <input type="radio" name="radio" value="1">单选1 <input type=&q ...

  9. 使用python发送和接收邮件

    关于电子邮件 大学之前,基本不用邮箱,所以基本感觉不到它的存在,也不知道有什么用:然而大学之后,随着认识的人越来越多,知识越来越广泛,邮箱已然成为很重要的通讯工具,大学一些课程作业需要有邮箱发给老师, ...

  10. Netty(六)UDP在netty中的使用

    关于UDP的介绍,这里不在阐述.相比于TCP而言,UDP不存在客户端和服务端的实际链接,因此不需要为连接(ChannelPipeline)设置handler. 服务端: public void run ...