Skip to content

dsummersl/vus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

VUS

An underscore/lodash-like library for Vim.

Functions implemented are listed below. See the source for more details:

  • _#map() : Perform a mapping on the dictionary.
  • _#max() : Return the maximum value of a list or dictionary.
  • _#memoize() : Wrap a function with a memoization storage mechanism.
  • _#min() : Give the minimum value of a list or dictionary.
  • _#once() : Returns a function that will only execute once (per buffer/window, etc).
  • _#throttle() : Returns a function that will only execute once per period of time.
  • _#reduce() : Reduce a list down to one value using an arbitrary reducing function.
  • _#sort() : Sort a list (supports arbitrary sort methods)
  • _#sum() : Add up all the elements in a list.
  • _#uniq() : Return the unique elements in a list.

Install

Drop into your plugins folder, use vundle, or pathogen.

Testing

I used vimunit for testing. If you have it installed, you can run all the tests like so:

../vimunit/vutest.sh autoload/vus/test.vim

Requirements:

Vim Version 7.2+. '+python' support is also required.

About

Underscore-like support functions for Vim's vimscript language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published