Ⅰ. 插件描述
sort a file by linesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/cream-sort'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/cream-sort'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/cream-sort'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/cream-sort
Ⅳ. 文档说明
:call Cream_sortfile() will sort the current file alphabetically by line. User is prompted to choose the column of the sort. The function uses the operating system's sort command (both Windows or Unix) for speed since our original use was for 7mb dictionary wordlists(!). (cream-sort actually creates and sorts a temp file copied from the current to preserve the original file since it would be destroyed by the OS during the process.)
Please notice three other sort libraries included within the script below the advertised first one. They were "research" during the project and may serve certain users better than ours!
This is one of the many custom utilities and functions for gVim from the Cream project (http://cream.sourceforge.net), a configuration of Vim in the vein of Apple and Windows software you already know.