Ⅰ. 插件描述
csv ftplugin from wikia (http://vim.wikia.com/wiki/csv)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dsummersl/wikia-csv'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dsummersl/wikia-csv'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dsummersl/wikia-csv'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dsummersl/wikia-csv
Ⅳ. 文档说明
# Overview
A mirror of the wikia csv plugin.
Add the following to your ~/.vimrc to support CSV and TSV type files
automatically:
autocmd BufNewFile,BufRead *.csv setf csv
autocmd BufNewFile,BufRead *.tsv setf csv
autocmd BufNewFile,BufRead *.tsv Delimiter \t
autocmd BufNewFile,BufRead *.tsv setlocal ts=20 sw=25
Keys
| Key | Mode | Description |
|---|---|---|
| H | normal | Move left one column in the CSV. |
| J | normal | Move down one row in the CSV (stay in focused column). |
| K | normal | Move up one row in the CSV (stay in focused column). |
| L | normal | Move right one column in the CSV. |
| 0 | normal | Move to the first column. |
| $ | normal | Move to the last column. |
| gm | normal | Jump back to focused column/row. |
Commands
| Command | Description |
|---|---|
| :Delimiter | Change the delimiter for a file. Takes a single character. |
| :DC | Delete the current column. |
| :SC | Search the current column. |
| :Csv # | Highlight a specific column (0 to turn off). |
| :HL # | Set the heading line number |
| :Sort | Sort by the current column. Can sort visually selected regions. |
| :CC | Copy the current column. |