sponsor Vim development Vim logo Vim Book Ad

cream-sort : sort a file by lines

 script karma  Rating 58/24, Downloaded by 1673    Comments, bugs, improvements  Vim wiki

created by
Steve Hall
 
script type
utility
 
description

: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.

 
install details

Just copy this file and paste it into your vimrc. Or you can drop the entire file into your plugins directory.

 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
cream-sort.vim 1.3 2002-09-10 6.0 Steve Hall * Quote path/filenames on Windows to handle spaces
* Added requirement that file be named (external redirection methods
  require it)
* Added prompt to save modified file before proceeding
ip used for rating: 54.82.209.152

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo