A comprehensive Vim utility functions for Vim plugins.
This is like a plugin which has both aspects of Bundler and jQuery at the same time.
If you are a Vim user who don't make Vim plugins, please ignore this page.
If you are a Vim plugin author, please check this out.
- Assertion
- Bitwise
- Data.Base64
- Data.Collection
- Data.Dict
- Data.LazyList
- Data.List
- Data.OrderedSet
- Data.String
- Data.Tree
- Database.SQLite
- DateTime
- Experimental.Functor
- Interpreter.Brainf__k
- Locale.Message
- Lua.Prelude
- Mapping
- Math
- OptionParser
- Prelude
- Process
- ProcessManager
- Random
- Random.Xor128
- System.Cache
- System.File
- System.Filepath
- Text.CSV
- Text.Lexer
- Text.LTSV
- Text.Parser
- Text.Sexp
- Vim.Buffer
- Vim.BufferManager
- Vim.Compat
- Vim.Message
- Vim.Search
- Web.HTML
- Web.HTTP
- Web.JSON
- Web.URI
- Web.XML
- ... and more ...
Use :Vitalize
to install modules.
Please see the help for more details.
:Vitalize --name=your_plugin_name $HOME/.vim/bundle/your_plugin_dir/
You can also install only specified modules; recommended for making your repository size small, assuming you are going to upload it to a remote repository
:Vitalize --name=your_plugin_name $HOME/.vim/bundle/your_plugin_dir/ Data.String Data.List
Assuming your Vim plugin name is ujihisa
. You can define your utility
function set ujihisa#util
just by
let V = vital#of('ujihisa')
function! ujihisa#util#system(...)
return call(V.system, a:000, V)
endfunction
and then you can call functions by ujihisa#util#system()
, without taking care
of vital.vim
itself. It's all hidden.
Vital has module system. The below is an example to import/load a module
Data.OrderedSet
and to call a function f()
of the module.
" Recommented way
let V = vital#of('ujihisa')
let O = V.import('Data.OrderedSet')
call O.f()
or
" Recommended way only if you rarely use the module
let V = vital#of('ujihisa')
call V.load('Data.OrderedSet')
call V.Data.OrderedSet.f()
or
" Available, but we don't recommend this very much
let V = vital#of('ujihisa')
call V.import('Data.OrderedSet', s:)
call s:f()
We recommend you to use a capital letter for a Vital module dictionary to assign.
- How to use vital.vim (in Japanese)
- This is beautiful
- Delegation in Vim script
- Core concept of vital (in Japanese)
- How to make a vital module (in Japanese)
- Let's use vital.vim (in Japanese)
- thinca
- ujihisa (Tatsuhiro Ujihisa)
- tyru
- mattn
- Shougo
- ... and lots more https://github.com/vim-jp/vital.vim/graphs/contributors
Japanese original text: http://www.kmonos.net/nysl/
NYSL is a very loose license like a Beer License, or more like WTFPL. See NYSL for details. (English and Japanese)
First, vital.vim is a bundling (static) library. We think everyone should be able to use it easily, without worrying about licensing stuff too much.
Second, In Japan, Strict Public Domain might be invalid. You outside Japan may interpret simply the license as Public Domain.
That's why we chose NYSL.
(See vim-jp#26 about the discussion.)