*unite.txt* Unite and create user interfaces. Version: 6.4 Author: Shougo Documentation Author: ujihisa License: MIT license CONTENTS *unite-contents* Introduction |unite-introduction| Usage |unite-usage| Install |unite-install| Configuration Examples |unite-examples| Interface |unite-interface| Commands |unite-commands| Variables |unite-variables| Sources variables |unite-sources-variables| Kind variables |unite-kind-variables| Filter variables |unite-filter-variables| Key mappings |unite-key-mappings| Functions |unite-functions| Options |unite-options| Sources |unite-sources| Kinds |unite-kinds| Actions |unite-actions| Filters |unite-filters| Create source |unite-create-source| Create kind |unite-create-kind| Create filter |unite-create-filter| External source |unite-external-sources| Denite |unite-denite| FAQ |unite-faq| ============================================================================== INTRODUCTION *unite-introduction* *unite* or *unite.vim* is a common extensible interface for searching and displaying lists of information from within vim. It can display and search through any arbitrary source, from files and directories to buffers and registers. The difference between |unite| and similar plug-ins like |fuzzyfinder|, |ctrl-p| or |ku| is, |unite| provides a standard interface for any sources. The API is flexible enough that it can be used to build your own interface. ============================================================================== USAGE *unite-usage* To browse a list of currently open buffers like |:ls| command. > :Unite buffer < To browse a list of files in the current working directory. > :Unite file < To browse recursive list of all the files under the current working directory. > :Unite file_rec < Or you can combine sources, to browse files and buffers. > :Unite file buffer < There are a number of command line flags (see |unite-options|), for example to set an initial search term (foo) to filter files search. > :Unite -input=foo file < You don't have to use |:execute| for dynamic arguments. You can use evaluation cmdline by ``. Note: In the evaluation, The special characters(spaces, "\" and ":") are escaped automatically. > :Unite -buffer-name=search%`bufnr('%')` line:forward:wrap < Invoking unite will create a horizontal split buffer by default. > :Unite file < This example lists all the files in the current directory. You can select one in the unite window by moving the cursor with normal Vim navigation, e.g. j and k. Pressing Enter on a candidate and it will open it in a new buffer. Enter will trigger the default action, which in the case of "file" is open, however alternate actions can be defined. These alternative actions can be invoked with . See also |unite-actions| to read on about different actions. You can also narrow down the list of candidates with a keyword. By entering insert mode in a unite window, the cursor will jump to the unite prompt (" ") at the top of the window. Typing at the unite prompt will filter the candidate list. You can also use the wild card "*" as an arbitrary character sequence. > *hisa < This example matches hisa, ujihisa, or ujihisahisa. Two consecutive wild cards recursively match directories. > **/foo < This example would match bar/foo or buzz/bar/foo. Note: The unite action |unite-source-file_rec| (read: file recursive) does a recursive file search by default without the need to set wildcards. Multiple keywords can be used to narrow down the candidates. They are separated by either a space " " or a pipe "|", and act like a logical AND. > foo bar foo|bar < This example matches "foobar" and "foobazbar", but not "foobaz" Specify negative conditions with a bang "!". > foo !bar < This example matches candidates that contain "foo" but not "bar". Specify command execution after the action with a ":". > " Jump to line 3. foo :3 " Search for "bar". foo :/bar " Execute :diffthis command. foo :diffthis < See |unite_default_key_mappings| for other actions. ============================================================================== INSTALL *unite-install* Install the distributed files into your Vim script directory which is usually ~/.vim/, or $HOME/vimfiles on Windows. You should consider to use 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 set a key mapping for the command. Note: MRU sources are split. To use mru sources, you must install |neomru|. https://github.com/Shougo/neomru.vim ============================================================================== EXAMPLES *unite-examples* With all of the flexibility and power that unite gives you it is recommended that you create some normal mode mappings for invoking unite in your .vimrc file. A simple mapping that will configure -f to browse for a file in the current working directory: > nnoremap f :Unite file < The same mapping, but instead start in insert mode so any typing will filter the candidate list: > nnoremap f :Unite -start-insert file < The popular recursive file search, starting insert automatically and using fuzzy file matching: > call unite#filters#matcher_default#use(['matcher_fuzzy']) nnoremap r :Unite -start-insert file_rec < Note: with large projects this may cause some performance problems. Normally it is recommended to use |unite-source-file_rec/async| source, which requires |vimproc|. The mapping might look something like this: > nnoremap r :Unite -start-insert file_rec/async:! < Since you can pass in multiple sources into unite you can easily create a mapping that will open up a unite pane with the sources you frequently use. To see buffers, recent files then bookmarks: > nnoremap b :Unite buffer bookmark < Much more sophisticated mappings can be configured to quickly find what you need in vim. More advanced configuration example: > " The prefix key. nnoremap [unite] nmap f [unite] nnoremap [unite]c :UniteWithCurrentDir \ -buffer-name=files buffer bookmark file nnoremap [unite]b :UniteWithBufferDir \ -buffer-name=files buffer bookmark file nnoremap [unite]r :Unite \ -buffer-name=register register nnoremap [unite]o :Unite outline nnoremap [unite]f \ :Unite -buffer-name=resume resume nnoremap [unite]ma \ :Unite mapping nnoremap [unite]me \ :Unite output:message nnoremap [unite]f :Unite source nnoremap [unite]s \ :Unite -buffer-name=files -no-split \ jump_point file_point buffer_tab \ file_rec:! file file/new " Start insert. "call unite#custom#profile('default', 'context', { "\ 'start_insert': 1 "\ }) " Like ctrlp.vim settings. "call unite#custom#profile('default', 'context', { "\ 'start_insert': 1, "\ 'winheight': 10, "\ 'direction': 'botright', "\ }) autocmd FileType unite call s:unite_my_settings() function! s:unite_my_settings()"{{{ " Overwrite settings. imap jj (unite_insert_leave) "imap (unite_delete_backward_path) imap j unite#smart_map('j', '') imap (unite_select_next_line) imap (unite_delete_backward_path) imap ' (unite_quick_match_default_action) nmap ' (unite_quick_match_default_action) imap x \ unite#smart_map('x', "\(unite_quick_match_jump)") nmap x (unite_quick_match_jump) nmap (unite_toggle_transpose_window) imap (unite_toggle_transpose_window) nmap (unite_toggle_auto_preview) nmap (unite_narrowing_input_history) imap (unite_narrowing_input_history) nnoremap l \ unite#smart_map('l', unite#do_action('default')) let unite = unite#get_current_unite() if unite.profile_name ==# 'search' nnoremap r unite#do_action('replace') else nnoremap r unite#do_action('rename') endif nnoremap cd unite#do_action('lcd') nnoremap S unite#mappings#set_current_sorters( \ empty(unite#mappings#get_current_sorters()) ? \ ['sorter_reverse'] : []) " Runs "split" action by . imap unite#do_action('split') endfunction"}}} < ============================================================================== INTERFACE *unite-interface* ------------------------------------------------------------------------------ COMMANDS *unite-commands* :Unite [{options}] {sources} *:Unite* Unite can be invoked with one or more sources. This can be done by specifying the list on the command line, separated by spaces. The list of candidates (the matches found in the source by your filter string) will be ordered in the same order that you specify the {sources}. If {sources} are empty, you can input source name and args manually. For example: :Unite file buffer Will first list the files, then list the buffers. See also |unite-sources| the available sources. In case you are already in a unite buffer, the narrowing text is stored. Unite can accept a list of strings, separated with ":", after the name of sources. You must escape ":" and "\" with "\" in parameters themselves. "::" is an abbreviation argument. It depends on the sources how the parameters are interpreted. Examples: "file:foo:bar": the parameters of source file are ["foo", "bar"]. "file:foo\:bar": the parameter of source file is ["foo:bar"]. "file:foo::bar": the parameters of source file are ["foo", "", "bar"]. {options} are options for a unite buffer: |unite-options| :UniteWithCurrentDir [{options}] {sources} *:UniteWithCurrentDir* Equivalent to |:Unite| except that it targets the current directory for the initial narrowing text. :UniteWithBufferDir [{options}] {sources} *:UniteWithBufferDir* Equivalent to |:Unite| except that it targets the buffer's directory for the initial narrowing text. :UniteWithProjectDir [{options}] {sources} *:UniteWithProjectDir* Equivalent to |:Unite| except that it targets the project directory for the initial narrowing text. :UniteWithInput [{options}] {sources} *:UniteWithInput* Equivalent to |:Unite| except that it will prompt the user for narrowing text before opening the unite buffer. *:UniteWithInputDirectory* :UniteWithInputDirectory [{options}] {sources} Equivalent to |:Unite| except that it will prompt the user for narrowing directory before opening the unite buffer. :UniteWithCursorWord [{options}] {sources} *:UniteWithCursorWord* Equivalent to |:Unite| except that it targets the word under the cursor for the initial narrowing text. :UniteResume [{options}] [{buffer-name}] *:UniteResume* Reuses the unite buffer named {buffer-name} that you opened previously. Narrowing texts or candidates are as-is. If {options} are given, context information gets overridden. Note: Reuses the last unite buffer you used in current tab if you skip specifying {buffer-name}. :UniteClose [{buffer-name}] *:UniteClose* Closes the unite buffer with {buffer-name}. Note: Closes the last unite buffer you used in current tab if you skip specifying {buffer-name}. :[count]UniteNext [{buffer-name}] *:UniteNext* Do the default action with the next candidate in the unite buffer with {buffer-name}. You can use it like |:cnext|. :[count]UnitePrevious [{buffer-name}] *:UnitePrevious* Do the default action with the previous candidates in the unite buffer with {buffer-name}. You can use it like |:cprevious|. :UniteFirst [{buffer-name}] *:UniteFirst* Do the default action with the first candidate in the unite buffer with {buffer-name}. You can use it like |:cfirst|. :UniteLast [{buffer-name}] *:UniteLast* Do the default action with the last candidate in the unite buffer with {buffer-name}. You can use it like |:clast|. :UniteDo {command} *:UniteDo* Executes a {command} for each candidate's default action. You can use it like |:argdo|. Example: Concider a JavaScript file with the code below. > /* jshint unused: true */ var variable = 1; function foo () { console.log('Hello foo!') } function bar () { console.log('Good bye bar!') } < Apply JsHint (http://jshint.com/) linting tool to the example. > test.js: line 6, col 30, Missing semicolon. test.js: line 10, col 33, Missing semicolon. test.js: line 3, col 5, 'variable' is defined but never used. test.js: line 5, col 10, 'foo' is defined but never used. test.js: line 9, col 10, 'bar' is defined but never used. < Syntastic (https://github.com/scrooloose/syntastic) can use JsHint to populate the location list with those warnings. So, use the quick fix external source to populate a Unite buffer with those issues. > :Unite location_list < Use "semicolon" as narrowing text so there is only one type of error. > test.js: line 6, col 30, Missing semicolon. test.js: line 10, col 33, Missing semicolon. < Then, use UniteDo to apply a fix to these lines using a single command. > :UniteDo normal! A; < Limitations: If the candidates are lines in a file, UniteDo assumes that either: - {command} doesn't change the number of lines; or - candidates are sorted in ascending order by line. UniteDo might have unexpected behaviour if none of the two conditions above are met. The commands of source *:unite-sources-commands* :UniteBookmarkAdd [{file}] *:UniteBookmarkAdd* Adds a file to the bookmark list. By default this will also store the position of the current file. ------------------------------------------------------------------------------ VARIABLES *unite-variables* *g:unite_force_overwrite_statusline* g:unite_force_overwrite_statusline If this variable is 1, unite will overwrite 'statusline' automatically. Note: If you want to change 'statusline' in unite buffer, you must set it to 0. The default value is 1. g:unite_ignore_source_files *g:unite_ignore_source_files* Ignore source filenames (not full path). You can optimize source initialization. Note: You cannot use the sources in ignored source files. > let g:unite_ignore_source_files = ['function.vim', 'command.vim'] < The default value is []. g:unite_quick_match_table *g:unite_quick_match_table* The table of completion candidates of quick match list, corresponding the narrowing text. The default value is complex; so see plugin/unite.vim. g:unite_data_directory *g:unite_data_directory* Specify directories to store unite configurations. Used by both unite itself and its sources. If the directory doesn't exist, the directory is automatically created. For example source of file_mru saves the information of the most recent used files into this directory. Default value is "$XDG_CACHE_HOME/unite" or expand("~/.cache/unite"); the absolute path of it. g:unite_no_default_keymappings *g:unite_no_default_keymappings* If this variable is 1, unite doesn't set any default key mappings. Not recommended. You shouldn't set this to 1 unless you have a specific reason. This variable doesn't exist unless you define it explicitly. g:unite_redraw_hold_candidates *g:unite_redraw_hold_candidates* If the number of unite candidates is not greater than this variable, all the candidates are holded for redrawing. The default value is 10000. g:unite_enable_auto_select *g:unite_enable_auto_select* If it is 1, unite skip first candidate when cursor is on the prompt line. The default value is 1. *g:unite_restore_alternate_file* g:unite_restore_alternate_file Option to restore alternate file after open action. The unite buffer does not become the alternate file by default. Default value is 1. SOURCES VARIABLES *unite-sources-variables* *g:unite_source_buffer_time_format* g:unite_source_buffer_time_format Specify the output format of the last access time of |unite-source-buffer|. Uses |strftime()| formatting. The default value is "(%Y/%m/%d %H:%M:%S) ". *g:unite_source_file_async_command* g:unite_source_file_async_command Specify the filelist command and arguments in file/async source. The default value is "ls -a". g:unite_source_bookmark_directory *g:unite_source_bookmark_directory* Specify the directory where |unite-source-bookmark| writes its bookmarks. The default value is |g:unite_data_directory|; '/bookmark'. *g:unite_source_rec_min_cache_files* g:unite_source_rec_min_cache_files Specify the minimum number of files that |unite-source-file_rec| saves the caches. Any cache isn't saved if the number of files is less than this value or this value is 0. The default value is 100. *g:unite_source_rec_max_cache_files* g:unite_source_rec_max_cache_files Specify the maximum number of files that |unite-source-file_rec| saves the caches. The default value is 20000. *g:unite_source_rec_unit* g:unite_source_rec_unit Specify the unit of gather files in |unite-source-file_rec|. If you increase the value, |unite-source-file_rec| will be faster but it will block Vim for a long time. Note: This option does not work in |unite-source-file_rec/async| source. The default value is 1000(windows environment), 2000(other). *g:unite_source_rec_async_command* g:unite_source_rec_async_command Specify the filelist command and arguments in file_rec/async source. It is arguments List. > " Using ack-grep as recursive command. let g:unite_source_rec_async_command = \ ['ack', '-f', '--nofilter'] " Using ag as recursive command. let g:unite_source_rec_async_command = \ ['ag', '--follow', '--nocolor', '--nogroup', \ '--hidden', '-g', ''] < The default value is ["find", "-L"] which follows symbolic links to have the same behaviour as file_rec, and the args(|g:unite_source_rec_find_args|). Because, "find" command is fastest. Note: In windows environment, you must install file list command and specify the variable. Note: "cmd.exe" is not supported. *g:unite_source_rec_find_args* g:unite_source_rec_find_args Specify the find arguments in file_rec/async source. The default value is ['-path', '*/.git/*', '-prune', '-o', '-type', 'l', '-print']. *g:unite_source_rec_git_command* g:unite_source_rec_git_command Specify the git command in file_rec/git source. g:unite_source_grep_command *g:unite_source_grep_command* Set grep command. The default value is "grep". *g:unite_source_grep_recursive_opt* g:unite_source_grep_recursive_opt Set grep recursive option. The default value is "-r". *g:unite_source_grep_default_opts* g:unite_source_grep_default_opts Set the default options for grep. Note: grep output must match the pattern below. filename:number:pattern > let g:unite_source_grep_default_opts = '-iRHn' < The default value is "-inH". *g:unite_source_grep_search_word_highlight* g:unite_source_grep_search_word_highlight Specify the search word highlight. The default value is "Search". g:unite_source_grep_encoding *g:unite_source_grep_encoding* Set output encoding of grep command. The default value is "char". g:unite_source_grep_separator *g:unite_source_grep_separator* The grep argument separator. The default value is "--" or ""(for jvgrep). *g:unite_source_vimgrep_search_word_highlight* g:unite_source_vimgrep_search_word_highlight Specify the search word highlight. The default value is "Search". g:unite_source_find_command *g:unite_source_find_command* Set find command. The default value is "find". *g:unite_source_find_default_opts* g:unite_source_find_default_opts Set the default options for find. " Follow symlinks let g:unite_source_find_default_opts = "-L" The default value is "". *g:unite_source_find_default_expr* g:unite_source_find_default_expr Set the default expression for find. The default value is "-name ". *g:unite_source_line_enable_highlight* g:unite_source_line_enable_highlight Control whether highlighted in unite buffer. Note: It is slow. The default value is 0. g:unite_source_alias_aliases *g:unite_source_alias_aliases* Set |unite-source-alias| settings. This variable is a dictionary. The key is an alias source name, and the value is a dictionary with the following attributes. Alias sources are copies of original sources. If the value items are a string, they will be used as the base source name. source (String) (Required) Base source name. args (String) (Optional) Set arguments automatically. description (String) (Optional) Description string. Example: > let g:unite_source_alias_aliases = { \ 'test' : { \ 'source': 'file_rec', \ 'args': '~/', \ }, \ 'b' : 'buffer', \ } < The default value is "{}". g:unite_source_menu_menus *g:unite_source_menu_menus* Set |unite-source-menu| settings. This variable is a dictionary. The keys are menu names and the values are the following attributes. candidates (List or Dictionary) (Required) Menu candidates. If candidates type is a dictionary, keys are ignored, but you can refer to the map attribute described below. file_candidates (List) (Optional) Menu candidates for files. The first item is used for word. The second item is file path. command_candidates (List or Dictionary) (Optional) Menu candidates for commands. If this is a Dictionary, the key is used for word. The value is command name. If this is a List, the first item is used for word. The second item is command name. map (Function) (Optional) If this attribute is given, candidates are results of map(key, value). description (String) (Optional) Description string. Example: > let g:unite_source_menu_menus = {} let g:unite_source_menu_menus.test = { \ 'description' : 'Test menu', \ } let g:unite_source_menu_menus.test.candidates = { \ 'ghci' : 'VimShellInteractive ghci', \ } function g:unite_source_menu_menus.test.map(key, value) return { \ 'word' : a:key, 'kind' : 'command', \ 'action__command' : a:value, \ } endfunction let g:unite_source_menu_menus.test2 = { \ 'description' : 'Test menu2', \ } let g:unite_source_menu_menus.test2.command_candidates = { \ 'python' : 'VimShellInteractive python', \ } let g:unite_source_menu_menus.test3 = { \ 'description' : 'Test menu3', \ } let g:unite_source_menu_menus.test3.command_candidates = [ \ ['ruby', 'VimShellInteractive ruby'], \ ['python', 'VimShellInteractive python'], \ ] let g:unite_source_menu_menus.zsh = { \ 'description' : 'zsh files', \ } let g:unite_source_menu_menus.zsh.file_candidates = [ \ ['zshenv' , '~/.zshenv'], \ ['zshrc' , '~/.zshrc'], \ ['zplug' , '~/.zplug'], \ ] nnoremap sm :Unite menu:test < The default value is "{}". *g:unite_source_process_enable_confirm* g:unite_source_process_enable_confirm When this variable is 1 and a signal is sent to a process via |unite-source-process| such as KILL, Vim will ask you if you really want to do that. The default value is 1. *g:unite_source_output_shellcmd_colors* g:unite_source_output_shellcmd_colors A list of colors correspond to coloring in escape sequence. 0-8 as normal colors, 9-15 as highlight colors. KIND VARIABLES *unite-kind-variables* *g:unite_kind_jump_list_after_jump_scroll* g:unite_kind_jump_list_after_jump_scroll Number of lines to adjust the cursor location after the jump via |unite-kind-jump_list|. Valid range is 0 to 100, where 0 is the top of the window and 100 is the bottom of the window. value meaning equivalent command -------------------------------------- 0 Window top normal! |z| 50 Window centre normal! |z.| 100 Window bottom normal! |z-| The default value is 25. *g:unite_kind_file_preview_max_filesize* g:unite_kind_file_preview_max_filesize It is max file size of preview action in file kind. The default value is 1000000. *g:unite_kind_openable_persist_open_blink_time* g:unite_kind_openable_persist_open_blink_time The amount of blink time after "persist_open" action from |unite-kind-openable|. The default value is "250m" *g:unite_kind_cdable_cd_command* g:unite_kind_cdable_cd_command *g:unite_kind_openable_cd_command* g:unite_kind_openable_cd_command Specify the Vim command for cd action. The default value is "cd". *g:unite_kind_cdable_lcd_command* g:unite_kind_cdable_lcd_command *g:unite_kind_openable_lcd_command* g:unite_kind_openable_lcd_command Specify the Vim command for lcd action. The default value is "lcd". FILTER VARIABLES *unite-filter-variables* *g:unite_converter_file_directory_width* g:unite_converter_file_directory_width Specify the filename width. The default value is "45". *g:unite_matcher_fuzzy_max_input_length* g:unite_matcher_fuzzy_max_input_length Specify the maximum input pattern length for |unite-filter-matcher_fuzzy|, beyond which the matcher falls back to |unite-filter-matcher_glob|. The default value is 20. DEPRECATED VARIABLES *unite-deprecated-variables* g:unite_update_time *g:unite_update_time* The time interval for updating the candidate list as the filter text it typed in Msec. If it is 0, this feature is disabled. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-update-time| instead. g:unite_enable_start_insert *g:unite_enable_start_insert* If this variable is 1, unite buffer will be in Insert Mode immediately. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-start-insert| instead. g:unite_split_rule *g:unite_split_rule* Defines split position rule. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-direction| instead. *g:unite_enable_split_vertically* g:unite_enable_split_vertically If this variable is 1, unite window is split vertically. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-vertical| instead. g:unite_winheight *g:unite_winheight* The height of unite window when split horizontally. Ignored when splitting vertically. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-winheight| instead. g:unite_winwidth *g:unite_winwidth* The width of unite window when split vertically. Ignored when splitting horizontally. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-winwidth| instead. *g:unite_enable_short_source_names* g:unite_enable_short_source_names If this variable is 1, unite buffer will show short source names when multiple sources. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-short-source-names| instead. g:unite_abbr_highlight *g:unite_abbr_highlight* Specify abbreviated candidates highlight. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-abbr-highlight| instead. g:unite_cursor_line_time *g:unite_cursor_line_time* Specify the cursor line highlight time. If you scroll cursor quickly less than it, unite will skip cursor line highlight. If it is "0.0", this feature will be disabled. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-cursor-line-time| instead. *g:unite_kind_file_vertical_preview* g:unite_kind_file_vertical_preview If this variable is 1, Unite will open the preview window vertically rather than horizontally. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-vertical-preview| instead. ------------------------------------------------------------------------------ KEY MAPPINGS *unite-key-mappings* Normal mode mappings. (unite_exit) *(unite_exit)* Exits unite. The previous unite buffer menu will be restored. Note: You cannot close unite buffer using the |:close|, |:bdelete| or |:quit| command. This mapping restores windows. (unite_all_exit) *(unite_all_exit)* Exits unite with previous unite buffer menu. Note: You cannot close unite buffer using the |:close|, |:bdelete| or |:quit| command. This mapping restores windows. (unite_restart) *(unite_restart)* Restarts unite. (unite_do_default_action) *(unite_do_default_action)* Runs the default action of the default candidates. The kinds of each candidates have their own defined actions. See also |unite-kinds| about kinds. Refer to |unite-default-action| about default actions. (unite_choose_action) *(unite_choose_action)* Runs the default action of the selected candidates. The kinds of each candidates have their own defined actions. Refer to |unite-kinds| about kinds. (unite_insert_enter) *(unite_insert_enter)* Starts inputting narrowing text from the cursor position. In the case when the cursor is not on the prompt line, this moves the cursor into the prompt line automatically. (unite_insert_head) *(unite_insert_head)* Starts inputting narrowing text from the head of the line. In the case when the cursor is not on the prompt line, this moves the cursor into the prompt line automatically. (unite_append_enter) *(unite_append_enter)* Starts inputting narrowing text from the right side of the cursor position. In the case when the cursor is not on the prompt line, this moves the cursor into the prompt line automatically. (unite_append_end) *(unite_append_end)* Starts inputting narrowing text from the end of the line. In the case when the cursor is not on the prompt line, this moves the cursor into the prompt line automatically. (unite_toggle_mark_current_candidate) *(unite_toggle_mark_current_candidate)* Toggles the mark of the candidates in the current line. You may run an action on multiple candidates at the same time by marking multiple candidates. (unite_toggle_mark_current_candidate_up) *(unite_toggle_mark_current_candidate_up)* Toggles the mark of the candidates in the current line and moves the cursor up. (unite_toggle_mark_all_candidates) *(unite_toggle_mark_all_candidates)* Toggles the mark of the candidates in the all lines. (unite_redraw) *(unite_redraw)* Without waiting for the update time defined in |g:unite_update_time|, Unite updates its view immediately. This is also used internally for updating the cache. (unite_rotate_next_source) *(unite_rotate_next_source)* Changes the order of source in normal order. (unite_rotate_previous_source) *(unite_rotate_previous_source)* Changes the order of source in reverse order. (unite_print_candidate) *(unite_print_candidate)* Shows the target of the action of the selected candidate. (unite_print_message_log) *(unite_print_message_log)* Shows the message log in current unite buffer. (unite_cursor_top) *(unite_cursor_top)* Moves the cursor to the top of the Unite buffer. (unite_cursor_bottom) *(unite_cursor_bottom)* Moves the cursor to the bottom of the Unite buffer. Note: This mapping redraws all candidates. (unite_loop_cursor_down) *(unite_loop_cursor_down)* Goes to the next line. Goes up to the top when you are on the bottom. (unite_loop_cursor_up) *(unite_loop_cursor_up)* Goes to the previous line. Goes down to the bottom when you are on the top. (unite_skip_cursor_down) *(unite_skip_cursor_down)* Goes to the next line, but skips unmatched candidates. Goes up to top when you are on the bottom. (unite_skip_cursor_up) *(unite_skip_cursor_up)* Goes to the previous line, but skips unmatched candidates. Goes down to the bottom when you are on the top. *(unite_quick_match_default_action)* (unite_quick_match_default_action) Runs the default action of the selected candidate with using quick match. This doesn't work when there are marked candidates. *(unite_quick_match_jump)* (unite_quick_match_jump) Jump to the selected candidate with using quick match. (unite_input_directory) *(unite_input_directory)* Narrows with inputting directory name. (unite_delete_backward_path) *(unite_delete_backward_path)* Deletes a narrowing text or a path upward. Refer to |i_(unite_delete_backward_path)|. *(unite_toggle_transpose_window)* (unite_toggle_transpose_window) Change the unite buffer's split direction. *(unite_narrowing_input_history)* (unite_narrowing_input_history) Narrowing candidates by input history. *(unite_narrowing_dot)* (unite_narrowing_dot) Narrowing candidates by dot character. (unite_toggle_auto_preview) *(unite_toggle_auto_preview)* Toggles the unite buffer's auto preview mode. (unite_disable_max_candidates) *(unite_disable_max_candidates)* Disable the unite buffer's max_candidates. (unite_quick_help) *(unite_quick_help)* Views the mappings of the unite buffer. (unite_new_candidate) *(unite_new_candidate)* Add new candidate in cursor source. (unite_smart_preview) *(unite_smart_preview)* When you selected a candidate, runs preview action. But if preview window is already visible, will close it. Insert mode mappings. (unite_exit) *i_(unite_exit)* Exits Unite. (unite_insert_leave) *i_(unite_insert_leave)* Changes the mode into Normal mode and moves the cursor to the first candidate line. (unite_delete_backward_char) *i_(unite_delete_backward_char)* Deletes a char just before the cursor, or quits the unite buffer. (unite_delete_backward_line) *i_(unite_delete_backward_line)* Deletes all chars after the cursor until the end of the line. (unite_delete_backward_word) *i_(unite_delete_backward_word)* Deletes a word just before the cursor. (unite_delete_backward_path) *i_(unite_delete_backward_path)* Deletes a path upward. For example doing (unite_delete_backward_path) on > /Users/ujihisa/Desktop < or > /Users/ujihisa/Desktop/ < this changes into > /Users/ujihisa < This is handy for changing file paths. (unite_select_next_line) *i_(unite_select_next_line)* Goes to the next candidate, or goes to the top from the bottom. (unite_select_previous_line) *i_(unite_select_previous_line)* Goes to the previous candidate, or goes to the bottom from the top. (unite_skip_next_line) *i_(unite_skip_next_line)* Goes to the next candidate but skips unmatched candidates. Or, goes to the top from the bottom. (unite_skip_previous_line) *i_(unite_skip_previous_line)* Goes to the previous candidate but skips unmatched candidates. Or, goes to the bottom from the top. (unite_select_next_page) *i_(unite_select_next_page)* Shows the next candidate page. (unite_select_previous_page) *i_(unite_select_previous_page)* Shows the previous candidate page. (unite_do_default_action) *i_(unite_do_default_action)* The same as |(unite_do_default_action)|. *i_(unite_toggle_mark_current_candidate)* (unite_toggle_mark_current_candidate) The same as |(unite_toggle_mark_current_candidate)|. *i_(unite_toggle_mark_current_candidate_up)* (unite_toggle_mark_current_candidate_up) The same as |(unite_toggle_mark_current_candidate_up)|. (unite_choose_action) *i_(unite_choose_action)* The same as |(unite_choose_action)|. (unite_move_head) *i_(unite_move_head)* Goes to the top of the line. (unite_move_left) *i_(unite_move_left)* Goes to the left of the line. (unite_move_right) *i_(unite_move_right)* Goes to the right of the line. *i_(unite_quick_match_default_action)* (unite_quick_match_default_action) The same as |(unite_quick_match_default_action)|. *i_(unite_quick_match_jump)* (unite_quick_match_jump) The same as |(unite_quick_match_jump)|. (unite_input_directory) *i_(unite_input_directory)* The same as |(unite_input_directory)|. *i_(unite_toggle_transpose_window)* (unite_toggle_selected_candidates) The same as |(unite_toggle_transpose_window)|. *i_(unite_narrowing_input_history)* (unite_narrowing_input_history) The same as |(unite_narrowing_input_history)|. (unite_toggle_auto_preview) *i_(unite_toggle_auto_preview)* The same as |(unite_toggle_auto_preview)|. *i_(unite_disable_max_candidates)* (unite_disable_max_candidates) The same as |(unite_disable_max_candidates)|. (unite_redraw) *i_(unite_redraw)* The same as |(unite_redraw)|. (unite_print_candidate) *i_(unite_print_candidate)* The same as |(unite_print_candidate)|. (unite_print_message_log) *i_(unite_print_message_log)* The same as |(unite_print_message_log)|. (unite_new_candidate) *i_(unite_new_candidate)* The same as |(unite_new_candidate)|. (unite_complete) *i_(unite_complete)* Complete narrowing text by candidate words. Visual mode mappings. *v_(unite_toggle_selected_candidates)* (unite_toggle_mark_selected_candidates) Toggle marks in visual selected candidates. *unite_default_key_mappings* Following keymappings are the default keymappings. Normal mode mappings. {lhs} {rhs} -------- ----------------------------- i |(unite_insert_enter)| I |(unite_insert_head)| a In case when you selected a candidate, |(unite_choose_action)| else |(unite_append_enter)| A |(unite_append_end)| q |(unite_exit)| |(unite_exit)| Q |(unite_all_exit)| g |(unite_all_exit)| |(unite_restart)| |(unite_toggle_mark_current_candidate)| |(unite_toggle_mark_current_candidate_up)| * |(unite_toggle_mark_all_candidates)| M |(unite_disable_max_candidates)| |(unite_choose_action)| |(unite_rotate_next_source)| |(unite_rotate_previous_source)| |(unite_print_message_log)| |(unite_print_candidate)| |(unite_redraw)| |(unite_delete_backward_path)| gg |(unite_cursor_top)| |(unite_cursor_top)| G |(unite_cursor_bottom)| |(unite_cursor_bottom)|$ j |(unite_loop_cursor_down)| |(unite_loop_cursor_down)| k |(unite_loop_cursor_up)| |(unite_loop_cursor_up)| J |(unite_skip_cursor_down)| K |(unite_skip_cursor_up)| g? |(unite_quick_help)| N |(unite_new_candidate)| . |(unite_narrowing_dot)| <2-LeftMouse> |(unite_do_default_action)| |(unite_exit)| p |(unite_smart_preview)| In case when you selected a candidate, runs default action b In case when you selected a candidate, runs bookmark action d In case when you selected a candidate, runs delete action e In case when you selected a candidate, runs narrow action t In case when you selected a candidate, runs tabopen action yy In case when you selected a candidate, runs yank action o In case when you selected a candidate, runs open action x In case when you selected a candidate, runs |(unite_quick_match_default_action)| Insert mode mappings. {lhs} {rhs} -------- ----------------------------- |i_(unite_insert_leave)| |i_(unite_choose_action)| |i_(unite_select_next_line)| |i_(unite_select_next_line)| |i_(unite_select_previous_line)| |i_(unite_select_previous_line)| |i_(unite_select_next_page)| |i_(unite_select_previous_page)| |i_(unite_do_default_action)| |i_(unite_delete_backward_char)| |i_(unite_delete_backward_char)| |i_(unite_delete_backward_line)| |i_(unite_delete_backward_word)| |i_(unite_move_head)| |i_(unite_move_head)| |i_(unite_move_left)| |i_(unite_move_right)| |i_(unite_redraw)| |i_(unite_exit)| In case when you selected a candidate, |i_(unite_toggle_mark_current_candidate)| In case when you selected a candidate, |i_(unite_toggle_mark_current_candidate_up)| <2-LeftMouse> |i_(unite_do_default_action)| |i_(unite_exit)| runs delete action runs edit action runs tabopen action runs yank action runs open action Visual mode mappings. {lhs} {rhs} -------- ----------------------------- |v_(unite_toggle_selected_candidates)| ------------------------------------------------------------------------------ FUNCTIONS *unite-functions* CORE *unite-functions-core* unite#get_kinds([{kind-name}]) *unite#get_kinds()* Gets the kinds of {kind-name}. Unless they exist, this returns an empty dictionary. This returns a dictionary of keys that are kind names and the values are the kinds when you skip giving {kind-name}. Note: Changing the return value is not allowed. unite#get_sources([{source-name}]) *unite#get_sources()* Gets the loaded source of {source-name}. Unless they exist, this returns an empty dictionary. This returns a dictionary of keys that are source names and the values are the sources when you skip giving {source-name}. If you give {source-name} as a dictionary, unite.vim use this source temporary. Note: Changing the return value is not allowed. unite#get_unite_winnr({buffer-name}) *unite#get_unite_winnr()* Returns the unite window number which has {buffer-name}. If the window is not found, it will return -1. unite#redraw([{winnr}]) *unite#redraw()* Redraw {winnr} unite window. If you omit {winnr}, current window number will be used. unite#force_redraw([{winnr}]) *unite#force_redraw()* Force redraw {winnr} unite window. If you omit {winnr}, current window number will be used. CUSTOMS *unite-functions-customs* unite#start({sources}, [, {context}]) *unite#start()* Creates a new Unite buffer. In the case when you are already on a Unite buffer, the narrowing text is preserved. {sources} is a list of elements which are formatted as {source-name} or [{source-name}, {args}, ...]. You may specify multiple string arguments for {args} of {source-name}. Refer to |unite-notation-{context}| about {context}. If you skip a value, it uses the default value. unite#start_complete({sources}, [{context}]) *unite#start_complete()* Returns the key sequence that opens unite buffer for completion. This will be used with inoremap usually. Example: > inoremap unite#start_complete( \ ['vimshell/history'], { \ 'start_insert' : 0, \ 'input' : vimshell#get_cur_text()}) < unite#get_candidates({sources}, [, {context}]) *unite#get_candidates()* Get a list of all source candidates. A unite buffer is not created. This function may not work with some sources. The arguments are the same as |unite#start()|. Note: the max_candidates source option is ignored. *unite#action#do_candidates()* unite#action#do_candidates({action-name}, {candidates}, [, {context}]) Does {action-name} with {candidates}. Unite buffer is not created. This function may not work in some actions. Note: To get candidates, use |unite#get_candidates()|. unite#get_context() *unite#get_context()* Gets the context information of the current Unite buffer. This is used by functions like |unite#custom#action()| to call |unite#start()| internally. unite#do_action({action-name}) *unite#do_action()* Returns the key sequence for running {action-name} action on the marked candidates. This function works only when Unite has been already activated. This causes a runtime error if {action-name} doesn't exist or the action is invalid. Note: This action will return Vim to Normal mode. This is handy for defining a key mapping to run an action. This runs the default action when you specify "default" for {action-name}. This runs an action on the candidates of the current line or the top of the candidates when none of the candidates are marked. This is usually used as inoremap or nnoremap . For example, > nnoremap \ unite#do_action('preview') > unite#smart_map({narrow-map}, {select-map}) *unite#smart_map()* Returns the key sequence which works with both modes of narrowing and selecting with respect to the given narrow-map and select-map. Use this with |unite#do_action()|. This will be used with inoremap or nnoremap usually. Example: > inoremap ' \ unite#smart_map("'", unite#do_action('preview')) < unite#get_status_string() *unite#get_status_string()* Returns unite status string. It is useful to customize the statusline. *unite#mappings#set_current_matchers()* unite#mappings#set_current_matchers({matchers}) Changes current unite buffer matchers. Example: > nnoremap M unite#mappings#set_current_matchers( \ empty(unite#mappings#get_current_matchers()) ? \ ['matcher_migemo'] : []) < *unite#mappings#set_current_sorters()* unite#mappings#set_current_sorters({sorters}) Changes current unite buffer sorters. Example: > nnoremap S unite#mappings#set_current_sorters( \ empty(unite#mappings#get_current_sorters()) ? \ ['sorter_reverse'] : []) < *unite#mappings#set_current_converters()* unite#mappings#set_current_converters({matchers}) Changes current unite buffer matchers. *unite#mappings#get_current_matchers()* unite#mappings#get_current_matchers() Gets current unite buffer matchers. *unite#mappings#get_current_sorters()* unite#mappings#get_current_sorters() Gets current unite buffer sorters. *unite#mappings#get_current_converters()* unite#mappings#get_current_converters() Gets current unite buffer converters. *unite#custom#profile()* *unite#set_profile()* unite#custom#profile({profile-name}, {option-name}, {value}) Set {profile-name} specialized {option-name} to {value}. The options below are available: substitute_patterns (Dictionary) Specify substitute patterns. The keys are "pattern", "subst" and "priority". "pattern" is the replace target regexp and "subst" is the substitute string. If you specify the same "pattern" again, then the setting is just updated. You may remove "pattern" by giving "" to "subst". "priority" prioritizes how this replaces. If you skipped giving "priority" it is 0. Give a bigger number for a "pattern" which must be done earlier. Note: The initial text of Unite buffers is not replaced with these values. You may mimic ambiguous matching with using this function. > call unite#custom#profile('files', 'substitute_patterns', { \ 'pattern' : '[^*]\ze[[:alnum:]]', \ 'subst' : '\0*', \ 'priority' : 100, \ }) call unite#custom#profile('files', 'substitute_patterns', { \ 'pattern' : '[[:alnum:]]', \ 'subst' : '\0', \ 'priority' : 100, \ }) < The former does ambiguous search within "/" while the latter does over it. The initial value is defined as the following; on a buffer of which profile_name is files, it adds a wildcard in order to match ~ as $HOME and to match "/" partially. > call unite#custom#profile('files', 'substitute_patterns', { \ 'pattern' : '^\~', \ 'subst' : substitute( \ unite#util#substitute_path_separator($HOME), \ ' ', '\\\\ ', 'g'), \ 'priority' : -100, \ }) call unite#custom#profile('files', 'substitute_patterns', { \ 'pattern' : '\.\{2,}\ze[^/]', \ 'subst' : "\\=repeat('../', len(submatch(0))-1)", \ 'priority' : 10000, \ }) < If {subst} is a list, Unite searches by some narrowing texts. Note: It is only once to be replaced with a list. > call unite#custom#profile('files', 'substitute_patterns', { \ 'pattern' : '^\.v/', \ 'subst' : [expand('~/.vim/'), \ unite#util#substitute_path_separator($HOME) \ . '/.bundle/*/'], \ 'priority' : 1000, \ }) < matchers (List) Specify a list of matcher names. The filters are called instead of the source filters. If you change filters dynamically, use |unite#mappings#set_current_matchers()| instead. sorters (List) Specify a list of sorter names. The filters are called instead of the source sorters. If you change filters dynamically, use |unite#mappings#set_current_sorters()| instead. converters (List) Specify a list of converter names. The filters are called instead of the source converters. If you change filters dynamically, use |unite#mappings#set_current_converters()| instead. context (Dictionary) Specify default {context} value in unite buffer. You can customize the context in the unite buffer. Valid key context is in |unite-options|. However, "-" is substituted to "_", and "-" prefix is removed. Note: In temporary unite buffers and script created unite buffers, the context overwrites current context instead of default context. Note: If you want to change default context, you should use "default" profile name. Note: If you use single source in unite.vim commands with omitting profile name and buffer name, "source/{source-name}" is used. Thus, you can define a source-specific profile. Example: > " Start insert mode in unite-action buffer. call unite#custom#profile('action', 'context', { \ 'start_insert' : 1 \ }) " Set "-no-quit" automatically in grep unite source. call unite#custom#profile('source/grep', 'context', { \ 'no_quit' : 1 \ }) " Use start insert by default. call unite#custom#profile('default', 'context', { \ 'start_insert' : 1 \ }) < Note: In action(script) executed source, "script/{source-name1}[:{{source-name2}:...}]" is used. Thus, you can define a source-specific profile. > " Do not use log. call unite#custom#profile('script/neobundle/update', \ 'context', { \ 'log' : 0 \ }) < *unite#custom#substitute()* unite#custom#substitute({profile-name}, {pattern}, {subst} [, {priority}]) Specify a replace pattern of narrowing text for a Unite buffer with the name of {profile-name}. Note: This is a wrapper function for backward compatibility. *unite#custom_default_action()* *unite#custom#default_action()* unite#custom#default_action({kind}, {default-action}) Changes the default action of {kind} into {default-action}. You may specify multiple {kind} with the separator ",". For Example: > call unite#custom#default_action('file', 'tabopen') < *unite#custom#action()* *unite#custom_action()* unite#custom#action({kind}, {name}, {action}) Adds an {action} of which name is {name} for {kind}. You may specify multiple {kind} with the separator ",". For example: > let my_tabopen = { \ 'is_selectable' : 1, \ } function! my_tabopen.func(candidates) call unite#take_action('tabopen', a:candidates) let dir = isdirectory(a:candidate.word) ? \ a:candidate.word : fnamemodify(a:candidate.word, ':p:h') execute g:unite_kind_openable_lcd_command fnameescape(dir) endfunction call unite#custom#action('file,buffer', 'tabopen', my_tabopen) unlet my_tabopen < *unite#custom#alias()* *unite#custom_alias()* unite#custom#alias({kind}, {name}, {action}) Defines an action of {name} which is another name of {action} in {kind}. You may specify multiple {kind} with the separator ",". If {action} is "nop", the action is disabled. example: > call unite#custom#alias('file', 'h', 'left') < *unite#custom_filters()* unite#custom_filters({source-name}, {filters}) Note: This function is deprecated. Please use |unite#custom#source()| instead. *unite#custom_max_candidates()* unite#custom_max_candidates({source-name}, {max}) Note: This function is deprecated. Please use |unite#custom#source()| instead. *unite#custom#source()* *unite#custom_source()* unite#custom#source({source-name}, {option-name}, {value}) Set {source-name} source specialized {option-name} to {value}. You may specify multiple sources with the separator "," in {source-name}. The options below are available: filters (List) Specify a list of filter names. The filters overwrite source default filters. matchers (List) or (String) Specify a list of matcher names. The filters overwrite source default matchers. sorters (List) or (String) Specify a list of sorter names. The filters overwrite source default sorters. converters (List) or (String) Specify a list of converter names. The filters overwrite source default converters. max_candidates (Number) Changes the max candidates into {value}. If {value} is 0, all candidates are displayed. ignore_pattern (String) Specify the regexp pattern to ignore candidates of the source. This applies on the path or word attribute of candidates. Note: It is not case sensitive. ignore_globs (List) or (String) Specify the glob pattern list to ignore candidates of the source. You can use 'wildignore' globs easily. But you must split it by ",". If it starts with "./", it is current directory pattern. This applies on the path or word attribute of candidates. Note: It is not case sensitive. Example: > call unite#custom#source('file_rec', 'ignore_globs', \ split(&wildignore, ',')) " Ignore ignore1 and ignore2/ignore3. call unite#custom#source('file_rec', 'ignore_globs', \ ['./ignore1', './ignore2/ignore3']) < white_globs (List) or (String) Specify the whitelist glob pattern list not to ignore candidates of the source. syntax (String) You can change source syntax name. If it is empty string, the source syntax feature is disabled. Example: > call unite#custom#source('output', 'syntax', '') < *unite#take_action()* unite#take_action({action-name}, {candidate}) Runs an action {action-name} against {candidate}. This will mainly be used in |unite#custom#action()|. When the action is is_selectable, the {candidate} will be automatically converted into a list. *unite#take_parents_action()* unite#take_parents_action({action-name}, {candidate}, {extend-candidate}) Similar to |unite#take_action()|, but searches the parents' action table by combining {extend-candidate} with {candidate}. This is handy for reusing parents' actions. unite#define_source({source}) *unite#define_source()* Adds {source} dynamically. See also |unite-create-source| about the detail of source. If a source with the same name exists, it is overwritten. unite#define_kind({kind}) *unite#define_kind()* Adds {kind} dynamically. See also |unite-create-kind| about the detail of kind. If a kind with the same name exists, it is overwritten. unite#define_filter({filter}) *unite#define_filter()* Adds {filter} dynamically. See also |unite-create-filter| about the detail of filter. If a filter with the same name exists, it is overwritten. unite#undef_source({name}) *unite#undef_source()* Removes the source with a name of {name} that was added by |unite#define_source()|. If such a source doesn't exist, this function does nothing. unite#undef_kind({name}) *unite#undef_kind()* Removes the kind with a name of {name} that was added by |unite#define_kind()|. If such a kind doesn't exist, this function does nothing. unite#undef_filter({name}) *unite#undef_filter()* Removes the filter with a name of {name} that was added by |unite#define_filter()|. If such a filter doesn't exist, this function does nothing. *unite#filters#matcher_default#use()* unite#filters#matcher_default#use({matchers}) Changes the default match used by |unite-filter-matcher_default| into {matchers}. {matchers} must be specified with a list of matcher names. *unite#filters#sorter_default#use()* unite#filters#sorter_default#use({sorters}) Changes the default sorter used by |unite-filter-sorter_default| into {sorters}. {sorters} must be specified with a list of sorter names. *unite#filters#converter_default#use()* unite#filters#converter_default#use({converters}) Changes the default converter used by |unite-filter-converter_default| into {converters}. {converters} must be specified with a list of converter names. ------------------------------------------------------------------------------ OPTIONS *unite-options* {options} are options for a unite buffer. You may give the following parameters for an option. You need to escape spaces with "\". Note: In unite.vim options are converted to a context dictionary. The "-buffer-name" option is the same as the "buffer_name" key in the context dictionary. *unite-options-no-* -no-{option-name} Disable {option-name} flag. Note: If you use both {option-name} and -no-{option-name} in same unite buffer, it is undefined. *unite-source-custom-options* -custom-{option-name}={value} Source custom options. For example: "-custom-grep-search-word-highlight=Error" *unite-options-no-quit* -no-quit Doesn't close unite buffer after firing an action. Unless you specify it, a unite buffer gets closed when you selected an action which is "is_quit". Default: quit *unite-options-no-empty* -no-empty If candidate is empty, it doesn't open any unite buffer. Default: empty *unite-options-no-split* -no-split Open the unite buffer in the current window instead of a new window. This is ignored if the current buffer has set 'bufhidden' to unload/delete/wipe. Default: split *unite-options-no-cursor-line* -no-cursor-line Disable cursor line highlight. This option is useful for animation source. Default: cursor-line *unite-options-no-focus* -no-focus Do not focus the unite buffer after opening it. Default: focus *unite-options-buffer-name* -buffer-name={buffer-name} Specify a buffer name. Note: Buffer name must not contain any spaces. Default: "default" *unite-options-profile-name* -profile-name={profile-name} (String) Specify a profile name. Default: the same as the buffer name *unite-options-input* -input={input-text} Specify an initial narrowing text. Default: "" *unite-options-path* -path={input-text} Specify an initial narrowing path. Default: "" *unite-options-prompt* -prompt={prompt-text} Specify the prompt. Note: "uniteInputPrompt" highlight is used. Default: "" *unite-options-prompt-visible* -prompt-visible Visible prompt if narrowing text is empty. Note: It is old prompt behavior. Default: no-prompt-visible *unite-options-prompt-focus* -prompt-focus Move to prompt if unite enters insert mode. Note: It is old prompt behavior. Default: no-prompt-focus *unite-options-prompt-direction* -prompt-direction="top" or "below" Specify the prompt direction. Note: If it is "below", |unite-options-auto-resize| is used automatically. To disable it, you must set "-no-auto-resize" option. Default: "below" (if |unite-options-direction| contains "below") *unite-options-candidate-icon* -candidate-icon={icon-text} Specify the candidate icon text. Default: " " *unite-options-marked-icon* -marked-icon={icon-text} Specify the marked icon text. Default: " " *unite-options-no-hide-icon* -no-hide-icon Don't hide candidates icons. Default: hide-icon (hide candidates icons) *unite-options-default-action* -default-action={default-action} Specify a default action. Default: "default" *unite-options-start-insert* -start-insert Opens a unite buffer in the narrowing mode. Default: no-start-insert When both options are undefined, it depends on |g:unite_enable_start_insert| option. The behavior is undefined when both options are defined. *unite-options-keep-focus* -keep-focus Keep the focus on a unite buffer after firing an action. Note: This option is used with "-no-quit" option. Default: no-keep-focus *unite-options-winwidth* -winwidth={window-width} Specify the width of a unite buffer. Default: "90" *unite-options-winheight* -winheight={window-height} Specify the height of a unite buffer. Default: "20" *unite-options-immediately* -immediately If the number of candidates is exactly one, it runs the default action immediately. If the candidate list is empty, it does not open any unite buffer. Default: no-immediately *unite-options-force-immediately* -force-immediately If candidates are exists, it runs the default action immediately. If the candidate list is empty, it does not open any unite buffer. Default: no-force-immediately *unite-options-auto-preview* -auto-preview When you select a candidate, it runs the "preview" action automatically. Default: no-auto-preview *unite-options-auto-highlight* -auto-highlight When you select a candidate, it runs the "highlight" action automatically. Default: no-auto-highlight *unite-options-complete* -complete Uses unite completion interface. |unite-options-col| is also required. Default: no-complete *unite-options-col* -col={column-number} Specify the called unite buffer position. Default: "-1" *unite-options-vertical* -vertical Splits unite window vertically. |unite-options-winwidth| is used. Default: no-vertical *unite-options-horizontal* -horizontal Splits unite window horizontally. Default: horizontal When both options are undefined, "-horizontal" is used by default. The behavior is undefined when both options are defined. *unite-options-direction* -direction={direction} Defines split position rule. When it is "dynamictop", if each item's length is less than the current window's width, the direction becomes "aboveleft", otherwise - "topleft". Similarly for "dynamicbottom", the direction becomes "belowright" or "botright". It is useful to always make best effort to show all items without shortening. Default: "topleft" *unite-options-verbose* -verbose Print verbose warning messages. Default: no-verbose *unite-options-auto-resize* -auto-resize Auto resize unite buffer height by candidates number. Default: no-auto-resize *unite-options-no-resize* -no-resize Do not resize the unite buffer after opening it. Default: resize *unite-options-toggle* -toggle Close unite buffer window if one of the same buffer name exists. Default: no-toggle *unite-options-quick-match* -quick-match Start in the quick match mode. Default: no-quick-match *unite-options-create* -create Create a new unite buffer. Default: no-create (reuse same buffer named unite buffer) *unite-options-update-time* -update-time={new-update-time} Change 'updatetime' option. This option is useful for animation source. Note: Must be smaller than 'updatetime'. Default: "200" *unite-options-abbr-highlight* -abbr-highlight={highlight-name} Specify abbreviated candidates highlight. Default: "Normal" *unite-options-hide-source-names* -hide-source-names Hides source names. Note: Source highlight will be overwritten by other sources. Default: no-hide-source-names (single source) hide-source-names (multiple sources) *unite-options-max-multi-lines* -max-multi-lines={max-lines} Specify the lines max in multiline candidates. Default: "5" *unite-options-here* -here Open unite buffer at the cursor position. Note: This option is disabled if "-vertical" or "-no-split" option is on. Default: no-here *unite-options-silent* -silent Shuts messages up in unite buffer. Default: no-silent *unite-options-auto-quit* -auto-quit Closes unite buffer automatically when all candidates are shown. Default: no-auto-quit *unite-options-short-source-names* -short-source-names Use short source names if multiple sources. Default: no-short-source-names *unite-options-multi-line* -multi-line Force use multi line. If candidate abbr is too long, unite.vim will fold automatically. Default: no-multi-line *unite-options-resume* -resume Reuse any previous buffer. If none exist, a new unite buffer gets created. Cf: |:UniteResume| Note: Uses |unite-options-buffer-name| to search for previous buffers, which must be set. Default: no-resume *unite-options-wrap* -wrap If it is set, lines longer than the width of the window will wrap and displaying continues on the next line. Note: This option will set 'wrap' option and disable |unite-options-multi-line| option. Default: no-wrap *unite-options-select* -select={select-candidate-index} If it is set, unite will select the specified candidate. Note: The candidate index is 0-based. Default: "-1" *unite-options-log* -log Enable log mode. In log mode, the cursor is placed at the bottom automatically. Default: no-log *unite-options-truncate* -truncate Truncate lines longer than the window's width. Default: truncate *unite-options-truncate-width* -truncate-width Truncate percentage of lines. Default: 50(%) *unite-options-tab* -tab Open a new unite buffer in a new tabpage. Default: no-tab *unite-options-sync* -sync Disable asynchronous mode like |ctrlp| plugin. It is useful if you don't want to get input lag. Default: no-sync *unite-options-unique* -unique Unique candidates by word attribute. Default: no-unique *unite-options-cursor-line-time* -cursor-line-time={icon-text} Specify the cursor line highlight time. If you scroll cursor quickly less than it, unite will skip cursor line highlight. If it is "0.0", this feature will be disabled. Default: "0.10" *unite-options-wipe* -wipe Wipeout unite buffer when quit. It is useful for using jumplist. Note: If it is used, you cannot use |:UniteResume| feature. Default: no-wipe *unite-options-ignorecase* -ignorecase Specify 'ignorecase' value in unite buffer. Default: 'ignorecase' value *unite-options-smartcase* -smartcase Specify 'smartcase' value in unite buffer. Default: 'smartcase' value *unite-options-no-restore* -no-restore Don't restore the cursor in unite buffer. Default: restore *unite-options-vertical-preview* -vertical-preview If it is on, Unite will open the preview window (when executing the file preview action) vertically rather than horizontally. It will take up half the width of the current Unite buffer. Default: no-vertical-preview *unite-options-force-redraw* -force-redraw It it is on, Unite will redraw the candidates like |(unite_redraw)|. Default: no-force-redraw *unite-options-previewheight* -previewheight={height} Change preview window height in unite buffer. Default: 'previewheight' *unite-options-no-buffer* -no-buffer Don't create unite buffer. Default: buffer *unite-options-match-input* -match-input Enable input keyword match highlight. Default: match-input *unite-options-file-quit* -file-quit Jump to file buffer after firing an action. Default: no-file-quit ============================================================================== SOURCES *unite-sources* *unite-source-file* file Nominates an input file as a candidate. Note: This source doesn't nominate files in the parent directory (e.g. "../") or hidden files (e.g. ".gitignore"). If you want to open these files, please input ".". Source arguments: 1. the file/directory path. *unite-source-file/new* file/new Nominates a new input file as a candidate. Source arguments: 1. the file/directory path. *unite-source-file/async* file/async Similar to |unite-source-file|, but get files asynchronously. *unite-source-file_rec* file_rec Gather files recursive and nominates all file names under the search directory (argument 1) or the current directory (if argument is omitted) as candidates. This may freeze Vim when there are too many candidates. The candidates are cached by file_rec source. To clear cache, use |(unite_redraw)| keymapping. Note: If you edit file by Vim, file_rec source will update cache file. Note: If the candidates are over 1000, it will disable make cache. Note: If you input |(unite_restart)|, you can change search directory. Source arguments: 1. the search directory. *unite-source-file_rec/async* file_rec/async Similar to |unite-source-file_rec|, but get files asynchronously with |g:unite_source_rec_async_command|. Note: Requires |vimproc|. Note: Requires the "ag" or "find" command. Note: Windows "find" command is not supported. Note: If you edit one of the files in Vim, the source will update its cache. Note: In windows environment, you must define |g:unite_source_rec_async_command| variable. Note: It is really slow in Windows. "gtags/path" source is recommended. https://github.com/hewes/unite-gtags Source arguments: 1. the target directories splitted by newlines. *unite-source-file_rec/neovim* file_rec/neovim Similar to |unite-source-file_rec|, but get files asynchronously by neovim job APIs with |g:unite_source_rec_async_command|. Note: Requires neovim and the "find" command. Note: Windows "find" command is not supported. Note: If you edit one of the files in Vim, the source will update its cache. Source arguments: 1. the target directories splitted by newlines. *unite-source-file_rec/git* file_rec/git Similar to |unite-source-file_rec|, but get files by "git ls-files" command. It is faster than file_rec/async source. Note: Requires vimproc. Note: Requires git. Note: Searches from current directory only. Source arguments: 1. "git ls-files" arguments Example: > nnoremap ,ug :Unite \ file_rec/git:--cached:--others:--exclude-standard *unite-source-directory* directory Nominates an input directory as a candidate. Note: This source doesn't nominate the parent directory (Example: "../") or hidden directories (Example: ".git"). If you want to open these directories, please input ".". Source arguments: 1. the file/directory path. *unite-source-directory/new* directory/new Nominates a new input directory as a candidate. Source arguments: 1. the file/directory path. *unite-source-buffer* buffer Nominates opened buffers as candidates, ordering by time series. Output format : " (