Ⅰ. 插件描述
Vim plugin for converting CSV data to/from tablesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bgrohman/vim-bg-tables'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bgrohman/vim-bg-tables'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bgrohman/vim-bg-tables'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bgrohman/vim-bg-tables
Ⅳ. 文档说明
# vim-bg-tables
About
Turns this:
ID,Food,Type,Tasty?
1,Pizza,Italian,Yes
2,Apples,Fruit,Yes
3,Bananas,Fruit,Yes
4,Asparagus,Vegetable,No
5,Broccoli,Vegetable,YesInto this:
+----+-----------+-----------+--------+
| ID | Food | Type | Tasty? |
+====+===========+===========+========+
| 1 | Pizza | Italian | Yes |
+----+-----------+-----------+--------+
| 2 | Apples | Fruit | Yes |
+----+-----------+-----------+--------+
| 3 | Bananas | Fruit | Yes |
+----+-----------+-----------+--------+
| 4 | Asparagus | Vegetable | No |
+----+-----------+-----------+--------+
| 5 | Broccoli | Vegetable | Yes |
+----+-----------+-----------+--------+Usage
:[range]Table [separator]
- Converts CSV formatted data over the given range into a table.
- Uses the supplied separator or "," if none is provided.
- Can be used with visual ranges, too.
:[range]Untable [separator]
- Converts the table over the given range into CSV formatted data.
- Uses the supplied separator or "," if none is provided.
- Can be used with visual ranges, too.
- Useful for making large changes to a table - convert it to CSV, make your
edits, and then convert back to a table.
Global Options
g:tables_default_separator = ","g:tables_column_separator = "|"g:tables_vertex = "+"g:tables_border = "-"g:tables_header_border = "="