dragon Unite and create user interfaces

License: Other

Language: Vim script

Stories in Ready

The unite or unite.vim plug-in can search and display information from arbitrary sources like files, buffers, recently used files or registers. You can run several pre-defined actions on a target displayed in the unite window.

The difference between unite and similar plug-ins like fuzzyfinder, ctrl-p or ku is that unite provides an integration interface for several sources and you can create new interfaces using unite.


Run unite to display files and buffers as sources to pick from.

:Unite file buffer

Run unite with an initial filter value (foo) to narrow down files.

:Unite -input=foo file

If you start unite it splits the window horizontally and pops up from the top of Vim by default.

:Unite file

The example call above lists all the files in the current directory. You can choose one of them in the unite window by moving the cursor up and down as usual with j and k. If you type Enter on an active candidate it will open it in a new buffer. Enter triggers the default action for a candidate which is "open" for candidates of the kind "file". You can also select an alternative action for a candidate with . See also unite-action to read on about actions.

You can also narrow down the list of candidates by a keyword. If you change into the insert mode inside of a unite window, the cursor drops you behind the ">" in the second line from above. There you can start typing to filter the candidates. You can also use the wild card * as an arbitrary character sequence. For example,


matches hisa, ujihisa, or ujihisahisa. Furthermore, two consecutive wild cards match a directory recursively.


So the example above matches bar/foo or buzz/bar/foo. Note: The unite action file_rec does a recursive file matching by default without the need to set wildcards.

You can also specify multiple keywords to narrow down the candidates. Multiple keywords need to be separated either by a space " " or a dash "|". The examples below match for candidates that meet both conditions "foo" and "bar".

foo bar

You can also specify negative conditions with an exclamation mark "!". This matches candidates that meet "foo" but do not meet "bar".

foo !bar

Wild cards are added automatically if you add a "/" in the filter and you have specified "files" as the buffer name with the option "-buffer-name". That's handy in case you select files with unite.

:Unite -buffer-name=files file

See also unite_default_key_mappings for other actions.


Install the distributed files into your Vim script directory which is usually ~/.vim/, or $HOME/vimfiles on Windows. You should consider using one of the famous package managers for Vim like vundle or neobundle to install the plugin.

After installation you can run unite with the :Unite command and append the sources to the command you wish to select from as parameters. However, it's a pain in the ass to run the command explicitly every time, so I recommend you to set a key mapping for the command. See :h unite.

Note: MRU sources are splitted. To use mru sources, you must install neomru.


Screen shots

unite action source

Unite action source.

unite output source

Unite output source.

unite mapping source

Unite mapping source.

unite menu source

Unite menu source.

unite menu source with customization

Unite menu source with customization.

let g:unite_source_menu_menus.git = {
    \ 'description' : '            gestionar repositorios git
        \                            ⌘ [espacio]g',
let g:unite_source_menu_menus.git.command_candidates = [
    \['▷ tig                                                        ⌘ ,gt',
        \'normal ,gt'],
    \['▷ git status       (Fugitive)                                ⌘ ,gs',
    \['▷ git diff         (Fugitive)                                ⌘ ,gd',
    \['▷ git commit       (Fugitive)                                ⌘ ,gc',
    \['▷ git log          (Fugitive)                                ⌘ ,gl',
        \'exe "silent Glog | Unite quickfix"'],
    \['▷ git blame        (Fugitive)                                ⌘ ,gb',
    \['▷ git stage        (Fugitive)                                ⌘ ,gw',
    \['▷ git checkout     (Fugitive)                                ⌘ ,go',
    \['▷ git rm           (Fugitive)                                ⌘ ,gr',
    \['▷ git mv           (Fugitive)                                ⌘ ,gm',
        \'exe "Gmove " input("destino: ")'],
    \['▷ git push         (Fugitive, salida por buffer)             ⌘ ,gp',
        \'Git! push'],
    \['▷ git pull         (Fugitive, salida por buffer)             ⌘ ,gP',
        \'Git! pull'],
    \['▷ git prompt       (Fugitive, salida por buffer)             ⌘ ,gi',
        \'exe "Git! " input("comando git: ")'],
    \['▷ git cd           (Fugitive)',
nnoremap <silent>[menu]g :Unite -silent -start-insert menu:git<CR>


It is a good introduction about the possibilities of Unite by ReneFroger.

Special Thanks

Project Statistics

Sourcerank 9
Repository Size 11.1 MB
Stars 2,687
Forks 234
Watchers 106
Open issues 1
Dependencies 0
Contributors 92
Tags 15
Last updated
Last pushed

Top Contributors See all

Shougo ujihisa Zhao Cai h1mesuke louispan Kenichi Ito Akira Hayakawa Takuya Fujiwara Christopher Sexton cohama Alisue Joel Moberg Tsukasa Maruyama thinca Justin M. Keyes Claas-Thido Pfaff Daniel Hahler todesking Nayuri Aohime osyo-manga

Recent Tags See all

ver.6.3 October 22, 2016
ver.6.2 April 15, 2016
ver.6.1 November 28, 2014
ver.6.0 May 26, 2014
ver.5.1 February 01, 2014
ver.5.0 May 11, 2013
ver.4.1 February 24, 2013
ver.4.0 September 01, 2012
ver.3.1 May 06, 2012
ver.3.0 November 21, 2011
ver.2.2 August 13, 2011
ver.2.1 July 05, 2011
ver.2.0 May 01, 2011
Ver.1.0 January 08, 2011
ver.0.5 September 21, 2010

Interesting Forks See all

Unite and create user interfaces
Vim script - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2017-11-24 18:48:32 UTC

Login to resync this repository