其他分享
首页 > 其他分享> > neovim中使用denite记录

neovim中使用denite记录

作者:互联网

Denite是Neovim / Vim统一所有接口的深色驱动插件。它可以用其界面替换许多功能或插件。它就像一个模糊查找器,但是更通用。您可以扩展接口并创建源。
您可以使用它做的一些事情包括:

项目主页

https://github.com/Shougo/denite.nvim

要求

您必须使用pip安装“ pynvim”模块

pip3 install --user pynvim

安装

对于vim-plug

if has('nvim')
  Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' }
else
  Plug 'Shougo/denite.nvim'
  Plug 'roxma/nvim-yarp'
  Plug 'roxma/vim-hug-neovim-rpc'
endif

示例:

" Define mappings
autocmd FileType denite call s:denite_my_settings()
function! s:denite_my_settings() abort
  nnoremap <silent><buffer><expr> <CR>
  \ denite#do_map('do_action')
  nnoremap <silent><buffer><expr> d
  \ denite#do_map('do_action', 'delete')
  nnoremap <silent><buffer><expr> p
  \ denite#do_map('do_action', 'preview')
  nnoremap <silent><buffer><expr> q
  \ denite#do_map('quit')
  nnoremap <silent><buffer><expr> i
  \ denite#do_map('open_filter_buffer')
  nnoremap <silent><buffer><expr> <Space>
  \ denite#do_map('toggle_select').'j'
endfunction

如何使用

怎么用呢?我一脸懵。看了半天不知道是如何使用的。神器就是这么让人难以琢磨?

后来才发现原来有个帮助文件单独放了。下面我会把帮助文档引用过来。
在这里插入图片描述

:Denite -input=App.js file

在这里插入图片描述

帮助文档

原文在:https://github.com/Shougo/denite.nvim/blob/master/doc/denite.txt

我简单的用翻译软件翻译一下。
Dark powered异步将NeoVim / Vim的所有接口结合在一起。

Version: 3.3
Author: Shougo <Shougo.Matsu at gmail.com>
License: MIT license

目录denite-contents
介绍denite-introduction
用法denite-usage
安装denite-install
配置示例denite-examples
Interfacedenite-interface
Commandsdenite-commands
Key mappingsdenite-key-mappings
Functionsdenite-functions
Optionsdenite-options
Sourcesdenite-sources
Kindsdenite-kinds
Filtersdenite-filters
Create sourcedenite-create-source
Create kinddenite-create-kind
Create filterdenite-create-filter
External sourcedenite-external-sources
FAQdenite-faq
Compatibilitydenite-compatibility

介绍

denitedenite.nvim是一种常见的可扩展界面,用于搜索和
显示NeoVim / Vim中的信息列表。 它可以显示和搜索任意源,从文件和目录到缓冲区。

用法

浏览当前打开的缓冲区列表,如:ls 命令。

:Denite buffer

在这里插入图片描述
浏览当前工作下所有文件的递归列表目录。

:Denite file/rec

在这里插入图片描述
或者,您可以组合源来浏览文件和缓冲区。

:Denite file/rec buffer

在这里插入图片描述
有许多命令行标志(请参见| denite-options |),用于设置初始搜索词(foo)来过滤文件搜索的示例。

:Denite -input=foo file/rec

在这里插入图片描述
可以使用多个关键字来缩小候选范围。 它们之间用空格“”分隔,并且起着逻辑“与”的作用。

foo bar

用破折号“!”指定否定条件。

foo !bar

它匹配包含“ foo”但不包含“ bar”的候选。

安装

(译:这个上面都有说明了,我就不翻译了)
Note: denite requires Neovim 0.4.0+ or Vim 8.0+ with |:python3| enabled.

Note: Please install/upgrade msgpack package (1.0.0+).
https://github.com/msgpack/msgpack-python

Note: You need to install Python 3.6.1+.

For neovim:

  1. Extract the files and put them in your Neovim directory
    (usually $XDG_CONFIG_HOME/nvim/).
  2. Execute the |:UpdateRemotePlugins| and restart Neovim.

If “:echo has(‘python3’)” returns 1, then you’re done; otherwise, see below.

You can enable Python3 interface with pip

  pip3 install --user pynvim

If you want to read for pynvim/python3 interface install documentation,
you should read |provider-python| and the Wiki.

You can check the Python3 installation |:checkhealth|
command.

For Vim8.0+:

Please install nvim-yarp plugin for Vim8.
https://github.com/roxma/nvim-yarp

Please install vim-hug-neovim-rpc plugin for Vim8.
https://github.com/roxma/vim-hug-neovim-rpc

Use |:python3| enabled Vim.

You must install “pynvim” module with pip

   pip3 install --user pynvim

配置示例

" Define mappings
	autocmd FileType denite call s:denite_my_settings()
	function! s:denite_my_settings() abort
	  nnoremap <silent><buffer><expr> <CR>
	  \ denite#do_map('do_action')
	  nnoremap <silent><buffer><expr> d
	  \ denite#do_map('do_action', 'delete')
	  nnoremap <silent><buffer><expr> p
	  \ denite#do_map('do_action', 'preview')
	  nnoremap <silent><buffer><expr> q
	  \ denite#do_map('quit')
	  nnoremap <silent><buffer><expr> i
	  \ denite#do_map('open_filter_buffer')
	  nnoremap <silent><buffer><expr> <Space>
	  \ denite#do_map('toggle_select').'j'
	endfunction

	autocmd FileType denite-filter call s:denite_filter_my_settings()
	function! s:denite_filter_my_settings() abort
	  imap <silent><buffer> <C-o> <Plug>(denite_filter_quit)
	endfunction

	" Change file/rec command.
	call denite#custom#var('file/rec', 'command',
	\ ['ag', '--follow', '--nocolor', '--nogroup', '-g', ''])
	" For ripgrep
	" Note: rg is faster than ag
	call denite#custom#var('file/rec', 'command',
	\ ['rg', '--files', '--glob', '!.git', '--color', 'never'])
	" For Pt(the platinum searcher)
	" NOTE: It also supports windows.
	call denite#custom#var('file/rec', 'command',
	\ ['pt', '--follow', '--nocolor', '--nogroup',
	\  (has('win32') ? '-g:' : '-g='), ''])
	" For python script scantree.py
	" Read bellow on this file to learn more about scantree.py
	call denite#custom#var('file/rec', 'command',
	\ ['scantree.py', '--path', ':directory'])

	" Change matchers.
	call denite#custom#source(
	\ 'file_mru', 'matchers', ['matcher/fuzzy', 'matcher/project_files'])
	call denite#custom#source(
	\ 'file/rec', 'matchers', ['matcher/cpsm'])

	" Change sorters.
	call denite#custom#source(
	\ 'file/rec', 'sorters', ['sorter/sublime'])

	" Change default action.
	call denite#custom#kind('file', 'default_action', 'split')

	" Add custom menus
	let s:menus = {}

	let s:menus.zsh = {
		\ 'description': 'Edit your import zsh configuration'
		\ }
	let s:menus.zsh.file_candidates = [
		\ ['zshrc', '~/.config/zsh/.zshrc'],
		\ ['zshenv', '~/.zshenv'],
		\ ]

	let s:menus.my_commands = {
		\ 'description': 'Example commands'
		\ }
	let s:menus.my_commands.command_candidates = [
		\ ['Split the window', 'vnew'],
		\ ['Open zsh menu', 'Denite menu:zsh'],
		\ ['Format code', 'FormatCode', 'go,python'],
		\ ]

	call denite#custom#var('menu', 'menus', s:menus)

	" Ag command on grep source
	call denite#custom#var('grep', {
		\ 'command': ['ag'],
		\ 'default_opts': ['-i', '--vimgrep'],
		\ 'recursive_opts': [],
		\ 'pattern_opt': [],
		\ 'separator': ['--'],
		\ 'final_opts': [],
		\ })

	" Ack command on grep source
	call denite#custom#var('grep', {
		\ 'command': ['ack'],
		\ 'default_opts': [
		\   '--ackrc', $HOME.'/.ackrc', '-H', '-i',
		\   '--nopager', '--nocolor', '--nogroup', '--column'
		\ ],
		\ 'recursive_opts': [],
		\ 'pattern_opt': ['--match'],
		\ 'separator': ['--'],
		\ 'final_opts': [],
		\ })

	" Ripgrep command on grep source
	call denite#custom#var('grep', {
		\ 'command': ['rg'],
		\ 'default_opts': ['-i', '--vimgrep', '--no-heading'],
		\ 'recursive_opts': [],
		\ 'pattern_opt': ['--regexp'],
		\ 'separator': ['--'],
		\ 'final_opts': [],
		\ })

	" Pt command on grep source
	call denite#custom#var('grep', {
		\ 'command': ['pt'],
		\ 'default_opts': [
		\   '-i', '--nogroup', '--nocolor', '--smart-case'],
		\ 'recursive_opts': [],
		\ 'pattern_opt': [],
		\ 'separator': ['--'],
		\ 'final_opts': [],
		\ })

	" jvgrep command on grep source
	call denite#custom#var('grep', {
		\ 'command': ['jvgrep'],
		\ 'default_opts': ['-i'],
		\ 'recursive_opts': ['-R'],
		\ 'pattern_opt': [],
		\ 'separator': [],
		\ 'final_opts': [],
		\ })

	" Specify multiple paths in grep source
	"call denite#start([{'name': 'grep',
	"      \ 'args': [['a.vim', 'b.vim'], '', 'pattern']}])

	" Define alias
	call denite#custom#alias('source', 'file/rec/git', 'file/rec')
	call denite#custom#var('file/rec/git', 'command',
	      \ ['git', 'ls-files', '-co', '--exclude-standard'])

	call denite#custom#alias('source', 'file/rec/py', 'file/rec')
	call denite#custom#var('file/rec/py', 'command',
	\ ['scantree.py', '--path', ':directory'])

	" 更改忽略的目录
	call denite#custom#filter('matcher/ignore_globs', 'ignore_globs',
	      \ [ '.git/', '.ropeproject/', '__pycache__/',
	      \   'venv/', 'images/', '*.min.*', 'img/', 'fonts/'])

	" Custom action
	" Note: denite#custom#action() with lambda parameter is only available
	"       in NeoVim; not supported in Vim8.
	call denite#custom#action('file', 'test',
	      \ {context -> execute('let g:foo = 1')})
	call denite#custom#action('file', 'test2',
	      \ {context -> denite#do_action(
	      \  context, 'open', context['targets'])})
	" Source specific action
	call denite#custom#action('source/file', 'test',
	      \ {context -> execute('let g:bar = 1')})

命令

:Denite [{options}] {sources}
创建一个新的Denite缓冲区。
可以使用一个或多个源调用Denite。 这可以通过在命令行上指定列表(以空格分隔)来完成。候选列表(通过过滤字符串在源中找到的匹配项)的排列顺序与您指定{sources}的顺序相同。
示例:

:Denite file/rec line

将首先列出文件,然后列出当前缓冲区的行。另请参见| denite-sources | 可用资源。
Denite可以接受以下字符串列表,并用":"分隔来源名称。
您必须使用“ \”转义“:”和“ \”在参数本身中,或在参数周围加上引号。
示例:

您可以通过``使用评估命令行。 注意:在评估中,特殊字符(空格,“ \”和“:”)会自动转义。

:Denite -buffer-name=search%`bufnr('%')` line<CR>

{options} are options for Denite buffer: |denite-options|




INTERFACE						*denite-interface*

------------------------------------------------------------------------------
COMMANDS 						*denite-commands*


		

:DeniteBufferDir [{options}] {sources}			*:DeniteBufferDir*
		Equivalent to |:Denite| except that it targets the buffer
		directory.

:DeniteCursorWord [{options}] {sources}			*:DeniteCursorWord*
		Equivalent to |:Denite| except that it targets <cword> under
		the cursor for the initial narrowing text.
		Note: <cword> means 'iskeyword' characters.  If you want to
		custom <cword> pattern, you need to set 'iskeyword' option.
		Note: <cword> characters are escaped automatically.

:DeniteProjectDir [{options}] {sources}			*:DeniteProjectDir*
		Equivalent to |:Denite| except that it search the VCS project
		directory from parent.
		Note: You can change the search directory by
		|denite-option-path| instead of |getcwd()|.

------------------------------------------------------------------------------
KEY MAPPINGS 						*denite-key-mappings*

		    				*denite-map-change_sorters*
change_sorters:{arg}
		Change |denite-option-sorters| to {arg}.
		If |denite-option-sorters| is {arg}, it will be disabled.

						*denite-map-choose_action*
choose_action
		Choose and fire the action by denite UI.

						*denite-map-do_action*
do_action:{action}
		Close current Denite buffer and fire {action} action.
		You can find the actions list in |denite-kinds|.
		If {action} is empty, "default" will be used.

					*denite-map-do_previous_action*
do_previous_action
		Fire the previous action.

						*denite-map-filter*
filter:{string}
		Filter the candidates by {string}.
		Note: It is used for filtering UI.

						*denite-map-move_up_path*
move_up_path
		Move to the upper path and restart Denite buffer.

						*denite-map-nop*
nop
		No operation.

					*denite-map-open_filter_buffer*
open_filter_buffer
		Open filter buffer to filtering.

						*denite-map-print_messages*
print_messages
		Output denite messages to |:messages|.
		Note: You cannot read the messages in Denite window.
		It is for debug only.

						*denite-map-quick_move*
quick_move
		Move to the selected candidate with using quick match.

						*denite-map-quit*
quit
		Close current Denite buffer.

						*denite-map-redraw*
redraw
		Clear the cache and redraw the candidates.

						*denite-map-restart*
restart
		Restart Denite buffer.

						*denite-map-restore_sources*
restore_sources
		Move back to the previous sources.
		Note: It does not restore the cursor position.

						*denite-map-toggle_auto_action*
toggle_auto_action:{action}
		Change |denite-option-auto-action| to {action}.
		If |denite-option-auto-action| is {action}, it will be disabled.
		If {action} is empty, all auto actions are disabled.

						*denite-map-toggle_select*
toggle_select
		Toggle cursor candidate select.

						*denite-map-toggle_select_all*
toggle_select_all
		Toggle all candidates.

						*denite-map-toggle_matchers*
toggle_matchers:{arg}
		Change |denite-option-matchers| to {arg}.
		If |denite-option-matchers| is {arg}, it will be disabled.

FILTER KEY MAPPINGS 				*denite-filter-key-mappings*
Below mappings are only available in denite filter buffer.

				*denite-map-i_<Plug>(denite_filter_backspace)*
<Plug>(denite_filter_backspace)
		Delete the back word.
		Note: If the input line is empty, quit the filter buffer.

			*denite-map-i_<Plug>(denite_filter_clear_backward)*
<Plug>(denite_filter_clear_backward)
		Clear the text before cursor.

				*denite-map-<Plug>(denite_filter_quit)*
				*denite-map-i_<Plug>(denite_filter_quit)*
<Plug>(denite_filter_quit)
		Quit both filter buffer and denite buffer.

				*denite-map-<Plug>(denite_filter_update)*
				*denite-map-i_<Plug>(denite_filter_update)*
<Plug>(denite_filter_update)
		Update the current input and quit filter buffer.
		Note: It does not close filter window if
		|denite-option-start-filter| is enabled.


					*denite-filter-default-key-mappings*
Following keymappings are default keymappings.

Normal mode default mappings.
{lhs}			{rhs}
--------		-----------------------------
<CR>			<Plug>(denite_filter_update)
q			<Plug>(denite_filter_quit)

Insert mode default mappings.
{lhs}			{rhs}
--------		-----------------------------
<BS>			<Plug>(denite_filter_backspace)
<C-h>			<Plug>(denite_filter_backspace)
<C-u>			<Plug>(denite_filter_clear_backward)
<CR>			<Plug>(denite_filter_update)

------------------------------------------------------------------------------
FUNCTIONS						*denite-functions*

denite#call_map({map-name}[, {args}])			*denite#call_map()*
		Fire {map-name} mapping with {args}.  You can find the
		mappings list in |denite-key-mappings|.
		{args} behavior depends on {map-name}.
		Note: It can be used in denite-filter buffer.

						*denite#custom#action()*
denite#custom#action({kind}, {name}, {func}[, {options}])
		Define {name} action for {kind}.
		If {kind} is "source/{source-name}", you can define
		{source-name} specific action.
		{func} must be a |Funcref| or the name of a function.
		{options} is an optional dictionary which overrides the
		action behaviors "is_quit" and/or "is_redraw".
		Note: {kind} is comma separated.
		Note: lambda function is not supported in Vim8.

						*denite#custom#alias()*
denite#custom#alias({type}, {alias-name}, {base-name})
		Define {alias-name} alias based on {base-name}.
		{type} must be "source" or "filter".

						*denite#custom#filter()*
denite#custom#filter({filter-name}, {variable-name}, {value})
denite#custom#filter({filter-name}, {dict})
		Set {filter-name} filter specialized variable {variable-name}
		to {value}.  You may specify multiple filters with the
		separator "," in {filter-name}.
		If {dict} is available, the key is {option-name} and the value
		is {value}.

						*denite#custom#kind()*
denite#custom#kind({kind-name}, {option-name}, {value})
denite#custom#kind({kind-name}, {dict})
		Set {kind-name} kind specialized {option-name} to {value}.
		You may specify multiple kinds with the separator "," in
		{kind-name}.
		A {kind-name} of "_" sets the default for all kinds.
		If {dict} is available, the key is {option-name} and the value
		is {value}.

		The options below are available:

		default_action			(String)
		Specify the kind default action.
		|denite-kind-attribute-default_action|

						*denite#custom#option()*
denite#custom#option({buffer-name}, {option-name}, {value})
denite#custom#option({buffer-name}, {dict})
		Set {option-name} option to {value} in {buffer-name}
		buffer.
		If {buffer-name} is "_", the options are used for all buffers.
		If {dict} is available, the key is {option-name} and the value
		is {value}.
		Note: The all options are in |denite-options|.  However, "-"
		is substituted to "_", and "-" prefix is removed. >

	call denite#custom#option('default', {
	      \ 'source_names': 'short',
	      \ })
						*denite#custom#source()*
denite#custom#source({source-name}, {option-name}, {value})
denite#custom#source({source-name}, {dict})
		Set {source-name} source specialized {option-name} to {value}.
		You may specify multiple sources with the separator "," in
		{source-name}.
		A {source-name} of "_" sets the default for all sources.
		If {dict} is available, the key is {option-name} and the value
		is {value}.

		The options below are available:

		args				(List)
		Specify the source default arguments.
		Default:  []

		converters			(List)
		Specify a list of converter names.
		|denite-source-attribute-converters|

		default_action			(String)
		Specify the source default action.
		|denite-source-attribute-default_action|

		matchers			(List)
		Specify a list of matcher names.
		|denite-source-attribute-matchers|

		max_candidates			(Number)
		Specify the maximum candidates.
		|denite-source-attribute-max_candidates|

		sorters				(List)
		Specify a list of sorter names.
		|denite-source-attribute-sorters|

							*denite#custom#var()*
denite#custom#var({source-name}, {var-name}, {value})
denite#custom#var({source-name}, {dict})
		Set {source-name} source specialized variable {variable-name}
		to {value}.  You may specify multiple sources with the
		separator "," in {source-name}.
		If {dict} is available, the key is {var-name} and the value
		is {value}.

							*denite#do_action()*
denite#do_action({context}, {action-name}, {targets})
		Runs an action {action-name} against {targets}.  This will
		mainly be used in |denite#custom#action()|.

denite#do_map({map-name}[, {args}])			*denite#do_map()*
		Fire {map-name} mapping with {args}.  You can find the
		mappings list in |denite-key-mappings|.
		{args} behavior depends on {map-name}.
		Note: It is only used to define mappings.
		Note: It can be used in denite-filter buffer. >

		autocmd FileType denite-filter
		\ call s:denite_filter_my_settings()
		function! s:denite_filter_my_settings() abort
		  inoremap <silent><buffer><expr> <C-c>
		  \ denite#do_map('quit')
		  nnoremap <silent><buffer><expr> <C-c>
		  \ denite#do_map('quit')
		endfunction

denite#get_status({name})				*denite#get_status()*
		Returns the {name} part of the status string.  It is useful to
		customize the statusline.
		Note: It also works in the Denite filter window.

		The available status names:
		"input": Current filtering text
		"sources": Current sources and candidates number
		"path": Specified |denite-option-path|
		"buffer_name": Current |denite-option-buffer-name|
		"line_total": Total candidates. Part of "linenr".

					*denite#increment_parent_cursor()*
denite#increment_parent_cursor({inc})
		Increment the parent denite cursor.
		Note: It is only used to define mappings.
		Note: It is only for neovim.

							*denite#initialize()*
denite#initialize()
		Initialize denite and sources.
		Note: You don't have to call it manually.

denite#move_to_filter()				*denite#move_to_filter()*
		Move to the filter buffer.
		Note: It is only used to define mappings.

denite#move_to_parent()				*denite#move_to_parent()*
		Move to the parent denite buffer.
		Note: It is only used to define mappings.
		Note: It can be used in denite-filter buffer.

							*denite#start()*
denite#start({sources}[, {context}])
		Creates a new Denite buffer.

		{sources} is a list of elements which are formatted as:
>
		"{'name': {source-name}, 'args': {source-args}}"
<
		Refer to |denite-notation-{context}| about {context}.  If you
		skip a value, it uses the default value.
>
		call denite#start([{'name': 'file/rec', 'args': []}])
<

------------------------------------------------------------------------------
OPTIONS							*denite-options*

							*denite-option-no-*
		-no-{option-name}
		Disable {option-name} flag.
		Note: If you use both {option-name} and -no-{option-name} in
		the same denite buffer, it is undefined.

						*denite-option-auto-action*
-auto-action={action}
		When you select a candidate, it runs the action automatically.
		Default: ""

						*denite-option-auto-resize*
-auto-resize
		Auto resize the Denite window height automatically.
		Default: false

						*denite-option-buffer-name*
-buffer-name={buffer-name}
		Specify the name of denite buffer.
		Default: "default"

						*denite-option-default-action*
-default-action={action}
		Specify the default action as {action}.
		Default: "default"
		Note: It overwrites all default actions includes kind/source
		default actions.

						*denite-option-cursor-pos*
-cursor-pos={number}
		Select {number} candidate.
		If {number} is "+{N}" or "-{N}" when resume, selects the next
		{N} or previous {N} candidate.
		previous {N} candidate.
		Note: "0" is the first candidate.
		Note: "$" is the last candidate.
		Default: ""

						*denite-option-direction*
-direction={direction}
		Specify the Denite window direction as {direction}.

		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: "botright"

						*denite-option-do*
-do={command}
		Execute a {command} for each candidate's default action.
		You can use it like |:argdo|.

		Default: ""

						*denite-option-empty*
-empty
		Open any denite buffer if the candidate is empty.
		Default: true

						*denite-option-expand*
-expand
		|expand()| the input.
		Note: It is useful for file sources.
		Default: false

					*denite-option-filter-split-direction*
-filter-split-direction={direction}
		Specify the Denite filter window direction as {direction}.

		When {direction} is "floating", the filter uses neovim
		floating window. If statusline is at the bottom, the filter
		overwrites statusline. Otherwise, it is located one line below
		statusline.

		Note: To use "floating", you need to use neovim
		0.4.0+(|nvim_open_win()|).

		Default: "botright"

					*denite-option-filter-updatetime*
-filter-updatetime={time}
		Specify the update time in the Denite filter window.
		If it is less than equal 0, the feature will be disabled.

		Default: 30

					*denite-option-filter-zindex*
-filter-zindex={index}
		Specify the filter floating window zindex.

		Note: To use it, you need to use neovim
		0.5.0+(|nvim_open_win()|).

		Default: 0(Disabled)

					*denite-option-floating-border*
-floating-border={type}
		Specify the floating window border.

		Note: To use it, you need to use neovim
		0.5.0+(|nvim_open_win()|).

		Default: ""

					*denite-option-floating-preview*
-floating-preview
		Open the preview window in floating window when
		|denite-option-vertical-preview|.
		Note: To use it, you need to use neovim
		0.4.0+(|nvim_open_win()|).
		Note: If you need the feature in Vim8, you should use
		'previewpopup' instead.

		Default: false

					*denite-option-floating-zindex*
-floating-zindex={index}
		Specify the floating window zindex.

		Note: To use it, you need to use neovim
		0.5.0+(|nvim_open_win()|).

		Default: 0(Disabled)

                            *denite-option-highlight-filter-background*
-highlight-filter-background
		Change backgroud color group in floating filter window.
		Default: "NormalFloat"

					*denite-option-highlight-matched-char*
-highlight-matched-char
		Matched characters highlight.
		Default: "None"

				*denite-option-highlight-matched-range*
-highlight-matched-range
		Matched range highlight.
		Default: "Underlined"

					*denite-option-highlight-preview-line*
-highlight-preview-line
		Previewed line highlight.
		Default: "Search"

					*denite-option-highlight-prompt*
-highlight-prompt
		Prompt highlight in filter window.
		Default: "Special"

                            *denite-option-highlight-window-background*
-highlight-window-background
		Change backgroud color group in floating window.
		Default: "NormalFloat"

						*denite-option-ignorecase*
-ignorecase
		If it is true, denite ignores the case.
		Default: true

						*denite-option-immediately*
-immediately
		If candidates exist, it runs the default action
		immediately.
		Default: false

						*denite-option-immediately-1*
-immediately-1
		If the number of candidates is exactly one, it runs the
		default action immediately.
		immediately.
		Default: false
							*denite-option-input*
-input={input-text}
		Specify an initial narrowing text.
		Default: ""

						*denite-option-match-highlight*
-match-highlight
		Highlight matched chars.
		Note: Vim 8.1.1084+ is needed for it.
		Note: It is slow.
		Default: v:false

						*denite-option-matchers*
-matchers
		Specify a list of matcher names.  They overwrite the source
		matchers.
		Default: ""

					*denite-option-max-candidate-width*
-max-candidate-width={width}
		Specify the max candidate width.
		Note: Denite skip the match after the width.
		Default: 200

				*denite-option-max-dynamic-update-candidates*
-max-dynamic-update-candidates={length}
		If the candidates are more than it, denite will ignore the
		dynamic filtering.

		Default: 20000

							*denite-option-path*
-path={path}
		Specify an initial narrowing path.

		Default: |getcwd()|

						*denite-option-post-action*
-post-action={action}
		Specify the action after action.

		"jump": open the denite buffer and jump to the file.
		"open": open the denite buffer.
		"quit": quit the denite buffer.
		Otherwise: nothing.

		Default: "none"

						*denite-option-prompt*
-prompt={prompt-text}
		Specify the prompt in filter window.
		Note: It must one or two characters.

		Default: ""

						*denite-option-preview-height*
-preview-height={preview-height}
		Specify the preview window height.

		Default: 'previewheight'

						*denite-option-preview-width*
-preview-width={preview-width}
		Specify the preview width when
		|denite-option-vertical-preview|.

		Default: 40

						*denite-option-quick-move*
-quick-move={action}
		It runs |denite-map-quick_move| automatically.

		"immediately": runs the default action immediately
		Empty string : nothing.
		Otherwise: move to the position.

		Default: ""

					*denite-option-quick-move-table*
-quick-move-table

		The table of completion candidates of quick move list,
		corresponding the narrowing text.

		Note: You cannot specify it from the command-line.

		Default: >
			{
        		\   'a' : 0, 's' : 1, 'd' : 2, 'f' : 3, 'g' : 4,
        		\   'h' : 5, 'j' : 6, 'k' : 7, 'l' : 8, ';' : 9,
        		\   'q' : 10, 'w' : 11, 'e' : 12, 'r' : 13, 't' : 14,
        		\   'y' : 15, 'u' : 16, 'i' : 17, 'o' : 18, 'p' : 19,
        		\   '1' : 20, '2' : 21, '3' : 22, '4' : 23, '5' : 24,
        		\   '6' : 25, '7' : 26, '8' : 27, '9' : 28, '0' : 29,
        		\ }
<
						*denite-option-refresh*
-refresh
		Refresh the candidates when |denite-option-resume| is true.
		Default: false

							*denite-option-relpath*
-relpath={path}
		Specify an relative path from |denite-option-path|.
		Default: ""

							*denite-option-resume*
-resume
		Reuse the previous buffer.  If none exist, a new denite
		buffer gets created.
		Note: Uses |denite-option-buffer-name| to search for
		previous buffers.
		Default: false

						*denite-option-reversed*
-reversed
		The candidates are reversed.
		Note: It is slow.
		Default: false

						*denite-option-root-markers*
-root-markers={markers}
		The project root marker files.
		It is splitted by comma.
		Default: ""

						*denite-option-search*
-search
		If it is true, denite update |quote/| register after user
		input.
		It is useful when you want to use |gn| mapping.
		Default: false

						*denite-option-smartcase*
-smartcase
		If it is true, denite ignores the case when the input contains
		the uppercase characters.
		Default: false

						*denite-option-sorters*
-sorters
		Specify a list of sorter names.  They are source independent.
		Default: ""

						*denite-option-split*
-split={direction}
		Specify the split direction.

		"vertical": Split buffer vertically
		"horizontal": Split buffer horizontally
		"no": No split
		"tab": Create the new tab for denite buffer
		"floating": Use neovim floating window feature
		"floating_relative_cursor": similar to "floating" but open
		floating window near the cursor.
		"floating_relative_window": similar to "floating" but open
		floating window near the window.

		Note: To use "floating", you need to use neovim
		0.4.0+(|nvim_open_win()|).

		Default: "horizontal"

					*denite-option-source-names*
-source-names={mode}

		"": Use long long names if multiple sources.
		"short": Use short long names if multiple sources.
		"hide": Hide source names.

		Default: ""

						*denite-option-start-filter*
-start-filter
		Start filtering on default.
		Default: false

						*denite-option-statusline*
-statusline
		Enable statusline.
		Default: true

						*denite-option-unique*
-unique
		Unique the candidates by word attribute.
		Default: false

					*denite-option-vertical-preview*
-vertical-preview
		Open the preview window vertically.
		Default: false

						*denite-option-wincol*
-wincol={window-column}
		Set the column position of the Denite window if
		|denite-option-split| is "floating".

		Default: &columns / 4

						*denite-option-winheight*
-winheight={window-height}
		Set the height of the Denite window if |denite-option-split|
		is "horizontal".
		if |denite-option-split| is "floating" or
		"floating_relative_cursor" or "floating_relative_window",
		set the height of the floating window.
		If auto-resize is set, |denite-option-winheight| is the
		maximum size of the window.

		Default: 20

						*denite-option-winrow*
-winrow={window-row}
		Set the row position of the Denite window if
		|denite-option-split| is "floating".
		If it is 1, Denite filter window position is always top.

		Default: &lines / 2 - 10

						*denite-option-winwidth*
-winwidth={window-width}
		Set the width of the Denite window if |denite-option-split|
		is "vertical".
		if |denite-option-split| is "floating" or
		"floating_relative_cursor" or "floating_relative_window",
		set the width of the floating window.

		Default: &columns / 2

						*denite-option-winminheight*
-winminheight={window-height}
		Set the minimum height of an auto-resize window.
		Note: a value of -1 for |denite-option-winminheight| leaves
		the minimum height unset.

		Default: -1

==============================================================================
SOURCES							*denite-sources*

						*denite-source-buffer*
buffer		Gather buffers and jump to the buffer.

		Source args:
			0. '!' : a flag to show unlisted buffers

		Custom variables:
		date_format	  the format string to show date
		exclude_unlisted
				  a flag to exclude unlisted buffers
				  (default is '1')
		exclude_filetypes
				  the list of excluded filetypes
				  (default is ["denite"])
		only_modified
				  a flag to list only modified buffers
				  (default is '0')

						*denite-source-change*
change		Gather results of |:changes|.

						*denite-source-colorscheme*
colorscheme	Gather colorschemes and change the colorscheme.

						*denite-source-command*
command		Gather commands and put on ex-mode.
		Note: |getcompletion()| "cmdline" feature is needed.

					*denite-source-command-history*
command_history	Gather command histories and run it.

		Custom variables:
		ignore_command_regexp	 the regexp to exclude from histories.
					Note: python3's regexp

		Source actions:
		delete		Remove the files from |:history|

						*denite-source-directory_rec*
directory_rec	Gather directories recursive and nominates all directory names
		under the search directory (argument 0) or the current
		directory (if argument is omitted) as candidates.
		Note: Windows environment is not supported.

		Source args:
			0. the search directory
			Note: The directory is not expanded argument by
			|expand()|.  The environment variable is only
			expanded.

		Custom variables:
		command		 the default get directories command
				(default is used "find" command in Unix
				environment)

						*denite-source-file*
file
		Gather files from the user input.

		Source args:
			0. if it is "new", file source create the file.
			1. the search directory

						*denite-source-file/old*
file/old
		Gather files from |v:oldfiles|.

		Note: This source cannot be update the candidates until Vim
		restart in Vim8.

		Source actions:
		delete		Remove the files from |v:oldfiles|

						*denite-source-file/point*
file/point
		Gather current line of "file:line" format as candidates.

						*denite-source-file/rec*
file/rec
		Gather files recursive and nominates all file names under the
		search directory (argument 0) or the current directory (if
		argument is omitted) as candidates.

		Source args:
			0. the search directory
			Note: The directory is not expanded argument by
			|expand()|.  The environment variable is only
			expanded.

		Custom variables:
		command		the default get files command.
				default uses "find" command in Unix
				environments:

				find -L <directory> \
					-path "*/.git/*" -prune, -o \
					-type l -print -o -type f -print

				To customize the find command or any command
				that does't expects the directory parameter as
				it's last parameter one can use the positional
				"directory" argument:
>
				call denite#custom#var('file/rec', 'command',
					\ ['find', '-L', ':directory',
					\ '-path', '*/.svn/*', '-prune', '-o',
					\ '-type', 'l', '-print', '-o',
					\ '-type', 'f', '-print'])
<
				You can use a python script that comes with
				denite for the file/rec command. It is the
				default on windows if you don't set your own
				commmand.
				To use it other environments you can do:
>
				call denite#custom#var('file/rec', 'command',
				\ ['scantree.py', '--path', ':directory'])
<
				By default it ignores the files or folders
				matching your 'wildignore' setting.
				You can change which files to ignore with the
				following command line argument:
				  --ignore pat1,pat2,...

				  where pat1, pat2 are patterns to ignore, for
				  example --ignore *pyc,.git

				The following two examples show how to set up
				the command:
>
				call denite#custom#var('file/rec', 'command',
				\ ['scantree.py', '--path', ':directory',
				\  "--ignore=''"])
<
				or
>
				let ignore=&wildignore .
				    \ ',*.pyc,.git,.hg,.svn'
				call denite#custom#var('file/rec', 'command',
				\ ['scantree.py', '--path', ':directory',
				\  '--ignore', ignore])
<
				The first example doesn't ignore any files,
				the second ignores everything matching
				'wildignore' plus the given patterns.
				Note: The patterns are based on fnmatch python
				module.

		cache_threshold
				The cache feature is disabled if the number of
				files is less than this value or this value is
				0.
				(default: 10000)

						*denite-source-filetype*
filetype	Gather filetypes and change the filetype of the current
		buffer.

						*denite-source-grep*
grep		Gather grep results and nominates them.
		The source executes [command, default_opts, recursive_opts,
		args[1]..., `pattern_opt, args[2]`..., separator, args[0]...
		or final_opts] command line.
		Note: The command result must be "path:linenr:text" pattern.

		Source args:
			0. path string or list of paths
			1. string or list of arguments
			2. pattern string or list of patterns

		Note: If the args 0 is empty, |denite-option-path| is used.
		Note: If the args 1 is "!", it is the interactive mode.
		Note: If the args 2 is "!", it is the interactive mode.
		The results are updated when the input is changed.
		Note: If the args 2 is empty, |denite-option-input| or user
		input pattern is used.

		Custom variables:
		command		the default grep command
				(default: ["grep"])
		default_opts	the grep default options
				(default: ["-inH"])
		final_opts	the final arguments
				(default: [])
		max_path_length
				the maximum path length.
				(default: 50)
		min_interactive_length
				the minimum input length of interactive
				filter.
				(default: 3)
		pattern_opt	the pattern option
				(default: ["-e"]
		recursive_opts	the recursive search arguments
				(default: ["-r"])
		separator	the argument separator
				(default: ["--"])

						*denite-source-help*
help		Search through doc tags


						*denite-source-jump*
jump		Gather results of |:jumps|.


						*denite-source-line*
line		Gather current buffer lines as candidates.

		Source arguments:

		1. the search direction:
		"all":       Search from the buffer top
		"backward":  Search from the current to the buffer top
		"forward":   Search from the current to the buffer bottom
		"buffers":   Search from the all buffers
		"args":      Search from the argument buffers
		Note: If the direction is "all" or omitted, it searches from
		the buffer top.
		Note: If you use "buffers", 'hidden' option must be set to
		gather the all buffers.  If 'hidden' is not set, not shown
		buffers lines will be empty.

		2. the line emptiness:
		"empty":     Include empty lines
		"noempty":   Do not include empty lines
		Note: By default, empty lines are included.

						*denite-source-line/external*
line/external	Gather current buffer lines as candidates.
		It is simpler but faster than |denite-source-line|.
		It is useful for huge buffers.
		Note: The command result must be "path:linenr:text" pattern.

		Custom variables:
		grep_command	the default grep command
				(default: ["grep"])
		grep_default_opts
				the grep default options
				(default: ["-inH"])
		grep_pattern_opt
				the pattern option
				(default: ["-e"]
		grep_separator	the argument separator
				(default: ["--"])
		grep_final_opts	the final arguments
				(default: [])

						*denite-source-mark*
mark		Gather |:mark|.

						*denite-source-menu*
menu		Gather custom menus.

		Source args:
			0. The desired menu

		Custom variables:
		menus		dictionary containing menus in key value
				pairs (See |denite-examples|). Only supports
				candidates of type list.

		unite_source_menu_compatibility
				"boolean" to determine whether or not to
				include menus previously defined in Unite
				configurations.

						*denite-source-outline*
outline		Gather outline and jump to the target.

		Source arguments:
		1. filename (use current buffer path if omitted)

		Custom variables:
		command 	the default command to get outline
				(default: ["ctags"])
		output          set as "json" to use json output 
				with latest universal-ctags
				(default: ["legacy"])
		force_filetype  set "--language-force" option of ctags
                		from buffer filetype
                		(default: True)
		options 	the default options for command
				(default: [])
		file_opt 	the default option for writing to
				specified file
				(default: '-o')
		ignore_types 	the list of ignore types
				(default: [])
		encoding 	the text encoding
				(default: 'utf-8')

						*denite-source-output*
output		Gather executed command output as candidates.

		Source arguments:
		1. Vim command or '!' prefixed shell command.
		2. Command args.

		Source default action: yank
>
		" It outputs "foo bar".
		:Denite output:echo:"foo:bar"
		:Denite output:echo\ "foo\ bar"

		" Gather the output of ls
		:Denite output:!ls
<
						*denite-source-register*
register	Gather the registers.

		Source actions:
		edit		Edit the register value

						*denite-source-source*
source		Gather Denite source names.

						*denite-source-spell*
spell		Gather spell suggestions.

		Source arguments:
		1. Word

		If no source arguments passed then current
		word under cursor is used.

						*denite-source-tag*
tag		Gather results of |tagfiles()|.
		Note: If the args 0 is "include", it will gather the results
		of |neoinclude| plugin.
		https://github.com/Shougo/neoinclude.vim


==============================================================================
KINDS							*denite-kinds*

All candidates can support below actions.

append		Insert the candidate word or text after the cursor.
defx		Run |defx| by denite candidates.
echo		Print the candidates to denite messages.
insert		Insert the candidate word or text before the cursor.
replace		Replace the selected text to the candidate word.
yank		Yank the candidate word.

Kind Specific candidates can support below actions.

						*denite-kind-buffer*
buffer		An interface to open the buffer.
		It extends |denite-kind-openable|.

			action__bufnr		(Number)	(Required)
				The buffer number.

						*denite-kind-buffer-actions*
			open (default)
				Open the buffer.

			delete
				Delete the buffer.

						*denite-kind-command*
command		An interface to execute the command.

			action__command		(String)	(Required)
				The command that you'll execute.

						*denite-kind-command-actions*
			execute (default)
				Execute the command.
			edit
				Edit the command.

						*denite-kind-directory*
directory	An interface to change directory.

			action__path		(String)	(Required)
				The path of the directory that you'll change
				directory.

					*denite-kind-directory-actions*
			narrow (default)
				Narrow by the directory.

			cd
				Change the Vim current directory to the
				directory.

			open
				Open the directory.

						*denite-kind-file*
file		An interface to jump to the file position.
		It extends |denite-kind-openable|.

			action__path		(String)	(Required)
				The path of the file that you'll jump into.

			action__line		(Number)	(Optional)
				The line number in the file you'll jump into.

			action__col		(Number)	(Optional)
				The column number in the file you'll jump
				into.

			action__pattern		(String)	(Optional)
				The search pattern in the file you'll jump
				into.

						*denite-kind-file-actions*
			open (default)
				|:edit| the file.

			drop
				|:drop| the file.

			preview
				Preview and highlight the file.  Close the
				preview window if it is already exists.

			preview_bat
				Preview the file by "bat" command.  Close the
				window if it is already exists.
				Note: "bat" command is required.
				https://github.com/sharkdp/bat

			highlight
				Highlight the location of the candidate if the
				buffer is visible.

			quickfix
				Set the quickfix list and open the quickfix
				window.

			location
				Set the location list and open the location
				window.

						*denite-kind-openable*
openable	An interface to open the object.
		Note: It is the abstract kind.

						*denite-kind-openable-actions*
			open (default)
				Open the object.

			tabopen
				Open the object in the next tab.

			split
				open the object with |:split|.

			vsplit
				open the object with |:vsplit|.

			switch
				Switch to the window that is opening the
				object. If it isn't opened, fallback open.

			tabswitch
				Switch to the window that is opening the
				object. If it isn't opened, fallback tabopen.

			splitswitch
				Switch to the window that is opening the
				object. If it isn't opened, fallback split.

			vsplitswitch
				Switch to the window that is opening the
				object. If it isn't opened, fallback vsplit.

						*denite-kind-source*
source		An interface to start the source.

						*denite-kind-source-actions*
			start (default)
				Start the source.

						*denite-kind-word*
word		An interface to paste the text.

			action__text		(String)	(Required)
				The command that you'll paste.

						*denite-kind-word-actions*
			append (default)

==============================================================================
FILTERS							*denite-filters*

						*denite-filter-matcher/clap*
matcher/clap
		A matcher which filters the candidates using vim-clap Rust
		matcher.
		https://github.com/liuchengxu/vim-clap
		It is faster than other matchers.

		Note: You need to install vim-clap and build binary file and
		specify the vim-clap path by |denite#custom#filter()|. >

			$ cd vim-clap
			$ cd pythonx/clap
			$ make build
<
		Custom variables:
		clap_path	the vim-clap installation path.
				(default: "")
>
		call denite#custom#filter('matcher/clap',
		      \ 'clap_path', expand('~/src/vim-clap'))
<
						*denite-filter-matcher/cpsm*
matcher/cpsm
		A matcher which filters the candidates using cpsm.
		Note: cpsm plugin build/install is needed in 'runtimepath'.
		https://github.com/nixprime/cpsm
		Note: The matcher is deprecated.  |denite-filter-matcher/clap|
		is recommended.
		Note: You must use Python3 support enabled cpsm. >
			$ PY3=ON ./install.sh
<
						*denite-filter-matcher/fuzzy*
matcher/fuzzy
		A matcher which filters the candidates with user given fuzzy
		string.

				*denite-filter-matcher/hide_hidden_files*
matcher/hide_hidden_files
		A matcher which hides the hidden files.  If your input
		contains ".", the hidden files will be appeared.

					*denite-filter-matcher/matchfuzzy*
matcher/matchfuzzy
		A matcher which filters the candidates by |matchfuzzy()|.

				*denite-filter-matcher/project_files*
matcher/project_files
		A matcher which removes non project files.

				*denite-filter-matcher/ignore_current_buffer*
matcher/ignore_current_buffer
		A matcher which ignores the current buffer path.

					*denite-filter-matcher/ignore_globs*
matcher/ignore_globs
		A matcher which ignores the globs matched files.
		Note: This filtering is slow.

		Custom variables:
		ignore_globs	the ignore globs pattern.
		(default is: >
		[
                 '*~', '*.o', '*.exe', '*.bak',
                 '.DS_Store', '*.pyc', '*.sw[po]', '*.class',
                 '.hg/', '.git/', '.bzr/', '.svn/',
                 'tags', 'tags-*'
		]
<
						*denite-filter-matcher/regexp*
matcher/regexp
		A matcher which filters the candidates with user given
		regular expression.
		Note: The matcher is very slow than other matchers.

					*denite-filter-matcher/substring*
matcher/substring
		A matcher which filters the candidates using simple substring
		matching.

						*denite-filter-sorter/oldfiles*
sorter/oldfiles
		Use |v:oldfiles| for sorting.
		Note: The candidates must contain "action__path" key.
		Note: It should be used in neovim instead of Vim8.

						*denite-filter-sorter/path*
sorter/path
		Simple filter to sort candidates by ascii order of path

						*denite-filter-sorter/rank*
sorter/rank
		Uses the scoring algorithm from selecta:
		https://github.com/garybernhardt/selecta.  If the matched
		length is shorter, the rank is higher.  This sorter is useful
		for file candidate source.

						*denite-filter-sorter/reverse*
sorter/reverse
		Simple filter to reverse the order of candidates.

						*denite-filter-sorter/sublime*
sorter/sublime
		Uses the scoring algorithm from this article and its
		implementation:
	https://bit.ly/reverse-engineering-sublime-text-s-fuzzy-match

						*denite-filter-sorter/word*
sorter/word
		Simple filter to sort candidates by ascii order of word

				*denite-filter-converter/abbr_word*
converter/abbr_word
		Convert candidate abbr to word.

				*denite-filter-converter/expand_input*
converter/expand_input
		Convert |expand()| input text.

				*denite-filter-converter/relative_abbr*
converter/relative_abbr
		Convert candidate's abbr to the relative path.

				*denite-filter-converter/relative_word*
converter/relative_word
		Convert candidate's word to the relative path.

				*denite-filter-converter/tail_path*
converter/tail_path
		Convert candidate tail path to word.

				*denite-filter-converter/truncate_abbr*
converter/truncate_abbr
		Truncate candidate abbr by |denite-option-winwidth|.

==============================================================================
CREATE SOURCE						*denite-create-source*

To create source, you should read default sources implementation in
rplugin/python3/denite/source/**/*.py.

The files are automatically loaded and denite creates new Source class object.
Source class must extend Base class in ".base".

Note: The sources must be created by Python3 language.

------------------------------------------------------------------------------
SOURCE ATTRIBUTES				*denite-source-attributes*

					*denite-source-attribute-__init__*
__init__	(Function)
		Source constructor.  It is always called in initializing.  It
		must call super() constructor.  This function takes {self} and
		{vim} as its parameters.

						*denite-source-attribute-__*
__{name}	(Unknown)			(Optional)
		Additional source information.
		Note: Recommend sources save variables instead of
		global variables.

					*denite-source-attribute-converters*
converters	(List)				(Optional)
		Source default converters list.

		Default: []

				*denite-source-attribute-default_action*
default_action
		(String)			(Optional)
		Define the source specific default action.

				*denite-source-attribute-define-syntax*
define_syntax
		(Function)			(Optional)
		Define the source specific syntax.

				*denite-source-attribute-gather_candidates*
gather_candidates
		(Function)			(Required)
		It is called to gather candidates.
		It takes {self} and {context} as its parameter and returns a
		list of {candidate}.
		{candidate} must be Dictionary contains
		|denite-candidate-attributes|.
		Here, {context} is the context information when the source is
		called(|denite-notation-{context}|).
		Note: The source must not filter the candidates by user input.
		It is |denite-filters| work.  If the source filter the
		candidates, user cannot filter the candidates by fuzzy match.
		Note: If the asynchronous gather is done, you must set
		"context['is_async']" to "False"

					*denite-source-attribute-get_status*
get_status	(Function)			(Optional)
		It is called to get the status for the 'statusline'.
		It takes {self} and {context} as its parameter.

		Default: |denite-source-attribute-name|

				*denite-source-attribute-highlight*
highlight
		(Function)			(Optional)
		Apply the source specific syntax highlight.

				*denite-source-attribute-is_public_context*
is_public_context
		(Bool)			(Optional)
		If it is True, the source context can be accessed by action.

				*denite-source-attribute-is_volatile*
is_volatile
		(Bool)			(Optional)
		If it is True, the source candidates is not be cached.

					*denite-source-attribute-kind*
kind		(String) or (Kind)		(Optional)
		The candidates kind name or source specific Kind object.

					*denite-source-attribute-matchers*
matchers	(List)				(Optional)
		Source default matchers list.

		Default: ['matcher/fuzzy']

				*denite-source-attribute-max_candidates*
max_candidates		(Number)		(Optional)
		If the candidates are more than it, denite will ignore the
		filtering.

		Default: 1000

					*denite-source-attribute-name*
name		(String)			(Required)
		The name of a source.

					*denite-source-attribute-on_init*
on_init		(Function)			(Optional)
		It is called after the source is initialized.
		It takes {self} and {context} as its parameter.

					*denite-source-attribute-on_close*
on_close	(Function)			(Optional)
		It is called before quit.
		It takes {self} and {context} as its parameter.

					*denite-source-attribute-sorters*
sorters		(List)				(Optional)
		Source default sorters list.

		Default: ['sorter/rank']

					*denite-source-attribute-syntax_name*
syntax_name		(String)		(Optional)
		The source syntax highlight name.

		Default: "deniteSource_{source-name}"

{context}					*denite-notation-{context}*
		A dictionary to give context information.
		The followings are the primary information.

		args			(List)
			The current source arguments.

		candidates		(List)
			The current candidates.

		event			(String)
			The gather event.
			"gather": normal gather update
			"interactive": interactive update
			"async": asynchronous update

		input			(String)
			The input string of current line.

		is_async		(Bool)
			If the gather is asynchronous, the source must set
			it "True".

		is_interactive		(Bool)
			If the gather is updated interactively, the source
			must set it "True".

		__			(Unknown)
			Additional source information.
		Note: Recommend sources save variables instead of
		global variables.

------------------------------------------------------------------------------
CANDIDATE ATTRIBUTES			*denite-candidate-attributes*

					*denite-candidate-attribute-name*
word		(String)			(Required)
		The word of a candidate. It is used for matching inputs.

					*denite-candidate-attribute-abbr*
abbr		(String)			(Optional)
		The string displayed in Denite buffer.  If it is omitted, word
		attribute is used instead.  It is not used for matching
		inputs.

==============================================================================
CREATE KIND						*denite-create-kind*

Custom Kind can be created to contain extra actions for your custom source.
Before create your new kind, you should have a look at existing kinds in
rplugin/python3/denite/kind/**/*.py

Instead of create new kind from scratch, you can extend one of the existing
Kind class, let's take "openable" for example: >

    from denite.kind.openable import Kind as Openable

    class Kind(Openable):
        def __init__(self, vim):
            super().__init__(vim)
            self.name = 'mykind'

        def action_open(self, context):
            target = context['targets'][0]
            path = target['action__path']
            # assume you have a MyEdit command
            self.vim.command('MyEdit', path)
>
After create new Kind class, alias it to your source by >

    self.kind = Kind(vim)
<
in the "__init__" method of your source class.

Note: If you want to change the source in the action, you can change
"context['sources_queue']" like this: >

    def action_refine(self, context):
        context['sources_queue'].append([
            {'name': 'myplugin', 'args': []},
        ])

------------------------------------------------------------------------------
KIND ATTRIBUTES					*denite-kind-attributes*

					*denite-kind-attribute-__init__*
__init__	(Function)
		Kind constructor.  It is always called in initializing.  It
		must call super() constructor.  This function takes {self} and
		{vim} as its parameters.

					*denite-kind-attribute-action_*
action_{name} (Function) 			(Optional)
		Custom action logic with {name} as action name. The function
		is passed with {self} and {context}.

		To get the seleted candidate list, you could use "targets"
		attribute in {context}: >

                    targets = context['targets']
<
		To get the source context, you could use "source_context"
		attribute in "target": >

		    for target in context['targets']:
		      source_context = target['source_context']
<
		Note: The source must be
		|denite-source-attribute-is_public_context|.
		Note: The source context is "__" prefixed keys (source
		specific keys) only.

					*denite-kind-attribute-default_action*
default_action  (String)
		Default action name.

					*denite-kind-attribute-name*
name 		(String) 			(Required)
		The name of a Kind.

				*denite-kind-attribute-persist_actions*
persist_actions (List) 				(Optional)
		List of action names which not close Denite buffer after
		executed.

					*denite-kind-attribute-redraw_actions*
redraw_actions (List) 				(Optional)
		List of action names which redraw Denite buffer after
		executed.

==============================================================================
CREATE FILTER						*denite-create-filter*

To create filter, you should read default filters implementation in
rplugin/python3/denite/filter/**/*.py.

The files are automatically loaded and denite creates new Filter class object.
Filter class must extend Base class in ".base".

Note: The filters must be created by Python3 language.

------------------------------------------------------------------------------
FILTER ATTRIBUTES				*denite-filter-attributes*

					*denite-filter-attribute-__init__*
__init__	(Function)
		Source constructor.  It will be called in initializing.  It
		must call Base constructor.  This function takes {self} and
		{vim} as its parameters.

					*denite-filter-attribute-filter*
filter
		(Function)			(Required)
		It is called to filter candidates.
		It takes {self} and {context} as its parameter and returns a
		list of {candidate}.
		{candidate} must be Dictionary contains
		|denite-candidate-attributes|.
		Here, {context} is the context information when the source is
		called(|denite-notation-{context}|).

					*denite-filter-attribute-name*
name		(String)			(Required)
		The name of a source.

==============================================================================
DEOPLETE SOURCES				*denite-deoplete-sources*

denite
		Custom variables:
		enable_buffer_pattern
				If it is True, denite source use the buffer
				pattern instead of original candidates word.
				(default: v:true)

==============================================================================
EXTERNAL SOURCES				*denite-external-sources*

vim-denite-ghq: "ghq" source
https://github.com/Jagua/vim-denite-ghq

==============================================================================
FAQ							*denite-faq*

Q: How to donate money to you?

A: I don't get the donation, but if you want to donate, please support neovim
project.  My plugins depends on neovim development.

Q: denite can support Vim8?

A: Yes.

Q: I want to change the cursor line color in Denite buffer.

A: denite uses 'cursorline' feature.
So you can change the color by |hl-CursorLine| highlight. >

Q: I want to use unite source in denite.

A: You can use |unite-denite-source-unite| for it. >
	Denite unite:file
Note: unite installation is needed.

Q: What is the correct way to say "if I'm in a git directory, git ls-files for
file/rec" ?

A: >
	call denite#custom#alias('source', 'file/rec/git', 'file/rec')
	call denite#custom#var('file/rec/git', 'command',
	\ ['git', 'ls-files', '-co', '--exclude-standard'])
	nnoremap <silent> <C-p> :<C-u>Denite
	\ `finddir('.git', ';') != '' ? 'file/rec/git' : 'file/rec'`<CR>

Q: Where is "file_mru" source for denite.nvim?

A: Please install neomru.vim plugin.  It includes file_mru source for
denite.nvim.
https://github.com/Shougo/neomru.vim

Q: Vimfiler will support denite?

A: Denite file explorer interface should be implemented by defx.nvim plugin.
It is not vimfiler work.
https://github.com/Shougo/defx.nvim

Q: ":UniteNext"/":UnitePrevious" like commands are available?

A: >

	:Denite -resume -cursor-pos=+1 -immediately
	:Denite -resume -cursor-pos=-1 -immediately

Q: ":UniteNext"/":UniteDo" like commands are available?

A: >

	:Denite -resume -do='normal! A;'

Q: I want to close denite buffer if grep results are empty.

A: >
	:Denite -no-empty grep

Q: grep source is very slow.

A: Because your machine is very slow.  The modern grep command like ripgrep is
optimized for modern multi core processors.  It uses 4 processes heavily.
More than a quad core CPU is recommended.  A dual core CPU is very slow.
And you can change |denite-option-filter-updatetime| option.

Q: I want to use grep source as interactive mode.  The interactive mode gives
you a prompt, and searches once the input is complete like helm-swoop.el.

A: You must set the 3rd argument to "!" in grep source(|denite-source-grep|).
>
	:Denite -start-filter grep:::!
<
If you want to use the interactive mode by default: >

	call denite#custom#source('grep', 'args', ['', '', '!'])


Q: What is "ch x was closed by the client"?

A: Python process was crashed.  I cannot fix the error.
I think the process was under heavy load.  You should change
|denite-option-filter-updatetime| option.

Q: Does hw (highway) work in denite.nvim?

A: No. It is not supported.

Q: Can I make denite window always use 40% of the current window?

A: >
	Denite file -winheight=`40*winheight(0)/100`


Q: I want to narrow by path in grep source.

A: >
	call denite#custom#source('grep',
	\ 'converters', ['converter/abbr_word'])

Q: I want to list buffers in current directory.

A:
>
	call denite#custom#source(
	\ 'buffer', 'matchers', ['matcher/fuzzy', 'matcher/project_files'])
<
Q: Where is bookmark source?

A: You can use denite-dirmark instead.
https://github.com/kmnk/denite-dirmark

Q: I want to use better matcher.

A: You can use fruzzy matcher instead.
https://github.com/raghur/fruzzy

Q: Not able to get to insert mode to filter. Esc does not work to hide denite
buffer. Enter does move cursor one line down. No nice input line. What to do?

A: Denite.nvim does not define any of default mappings.  You need to define
them.  |denite-examples|

Q: I want to move the cursor in a Denite filter window, while in insert mode.

A: Really? It is not the Vim way to move the cursor while in insert mode. You
must force this behaviour. >

	autocmd FileType denite-filter call s:denite_filter_my_settings()
	function! s:denite_filter_my_settings() abort
	  inoremap <silent><buffer> <C-j> <Esc>
	      \:call denite#move_to_parent()<CR>
	      \:call cursor(line('.')+1,0)<CR>
	      \:call denite#move_to_filter()<CR>A
	  inoremap <silent><buffer> <C-k> <Esc>
	      \:call denite#move_to_parent()<CR>
	      \:call cursor(line('.')-1,0)<CR>
	      \:call denite#move_to_filter()<CR>A
	endfunction

	" It is faster version, but neovim only.
	function! s:denite_filter_my_settings() abort
	  inoremap <silent><buffer><expr> <C-j>
	      \ denite#increment_parent_cursor(1)
	  inoremap <silent><buffer><expr> <C-k>
	      \ denite#increment_parent_cursor(-1)
	  nnoremap <silent><buffer><expr> <C-j>
	      \ denite#increment_parent_cursor(1)
	  nnoremap <silent><buffer><expr> <C-k>
	      \ denite#increment_parent_cursor(-1)
	endfunction

Note: This is very slow in Vim8 environment. See the |denite-examples| for an
example mapping from insert mode to filter mode.

Q: I want to use multiple action in denite buffer.

A: You can use |denite#call_map()| for it.
>
	autocmd FileType denite
	\ call s:denite_my_settings()
	function! s:denite_my_settings() abort
	  nnoremap <silent><buffer> <C-b>
	  \ :<C-u>call <SID>denite_quickfix()<CR>
	endfunction
	function! s:denite_quickfix()
	  call denite#call_map('toggle_select_all')
	  call denite#call_map('do_action', 'quickfix')
	endfunction
<
Q: I want to use external statusline plugin like lightline/vim-airline etc.

A: You should disable the internal statusline. >

	call denite#custom#option('_', 'statusline', v:false)

Q: I want to change current sources in the custom action.

A: You need to return new context in action function.
>
	function! s:candidate_file_rec(context)
	  let path = a:context['targets'][0]['action__path']
	  let narrow_dir = denite#util#path2directory(path)
	  let sources_queue = a:context['sources_queue'] + [[
	        \ {'name': 'file/rec', 'args': [narrow_dir]},
	        \ ]]
	  return {'sources_queue': sources_queue}
	endfunction
	call denite#custom#action('buffer,directory,file,openable',
	        \ 'candidate_file_rec', function('s:candidate_file_rec'))
<
Q: I want to quit filter window in denite filter window.

A: >

	autocmd FileType denite-filter call s:denite_filter_my_settings()
	function! s:denite_filter_my_settings() abort
	  imap <silent><buffer> <C-c> <Plug>(denite_filter_quit)
	endfunction

Q: I want to call default action in denite filter window.

A: >

	autocmd FileType denite-filter call s:denite_filter_my_settings()
	function! s:denite_filter_my_settings() abort
	  inoremap <silent><buffer><expr> <CR> denite#do_map('do_action')
	endfunction

Q: I want to disable deoplete auto completion in denite filter window.

A:
>
	autocmd FileType denite-filter call s:denite_filter_my_settings()
	function! s:denite_filter_my_settings() abort
	  call deoplete#custom#buffer_option('auto_complete', v:false)
	endfunction

Q: I want to execute custom action in denite window.

A: >

	autocmd FileType denite call s:denite_my_settings()
	call denite#custom#action('directory', 'dein_update',
	\ function('s:dein_update'))
	function! s:denite_filter_my_settings() abort
	  nnoremap <silent><buffer><expr> U
	  \ denite#do_map('do_action', 'dein_update')
	endfunction

Q: I want to narrow by tail path instead of full path in file/rec source.

A: >
	call denite#custom#source('file/rec',
	\ 'matchers', ['converter/tail_path', 'matcher/fuzzy'])

Q: In a large git repo, the candidates list doesn't update as I type.

A: You need to set |denite-option-max-dynamic-update-candidates|. >

	call denite#custom#option('_',
	\ 'max_dynamic_update_candidates', 100000)

Q: I want to define source depend key mappings.

A: It is not supported. But you can define |denite-option-buffer-name| depend
key mappings. >

	autocmd FileType denite call s:denite_my_settings()
	function! s:denite_my_settings() abort
	  if b:denite.buffer_name == 'foo'
	    nnoremap <silent><buffer><expr> p
	    \ denite#do_map('do_action', 'preview')
	  endif
	endfunction

Q: I want to close denite filter window after hitting <ESC>.

A:
>
	autocmd FileType denite-filter call s:denite_filter_my_settings()
	function! s:denite_filter_my_settings() abort
	  imap <silent><buffer> <Esc>       <Plug>(denite_filter_quit)
	endfunction

Q: Is it possible to configure the floating window appearance?  I would like
to add line numbers to it.

A: You can use |User| "denite-preview" autocmd. >

	autocmd User denite-preview call s:denite_preview()
	function! s:denite_preview() abort
	  setlocal number
	endfunction
	
Q: Are there any source which is the same as history/yank in Unite?

A: Use https://github.com/Shougo/neoyank.vim

Q: I want to enable matched highlight in buffer.

A: |denite-option-match-highlight|

Q: I want to grep for loaded buffers like unite.vim's "$buffers" arguments.

A: >
	nnoremap <silent> <C-g> :call denite#start([{'name': 'grep', 'args':
	      \ map(filter(range(1, bufnr('$')),
	      \ { _, val -> buflisted(val) && filereadable(bufname(val)) }),
	      \ { _, val -> bufname(val) })}])<CR>

Q: I want to switch from the filter window into the denite window.

A: You must use |<Plug>(denite_filter_update)| for it.

==============================================================================
COMPATIBILITY						*denite-compatibility*

2021.05.01
* "floating_relative" option is replaced to "floating_relative_cursor" and
  "floating_relative_window".

2021.03.25
* |denite-filter-matcher/regexp| is very slow.  It is disabled in the default
  sources.
* Change fuzzy regex behavior to improve the performance.

2021.02.05
* Quit both filter buffer and denite buffer when |<Plug>(denite_filter_quit)|.
* Change |<Plug>(denite_filter_backspace)| behavior.  When the line is empty,
  close filter window.

2021.01.22
* "choose_action" uses denite UI instead

2020.04.10
* Remove matched highlight feature to optimize update denite buffer.
  But you can use -match-highlight option if you use Vim 8.1.1084+.

2020.02.19
* msgpack 1.0.0+ is required
https://github.com/msgpack/msgpack-python#major-breaking-changes-in-msgpack-10

2020.02.17
* Rename "-previewheight" option to "-preview-height".

2019.05.01
* Version 3.0
* Remove prompt.nvim.
* "-use-default-mappings" option is deprecated.
* Remove suspend feature.
* Change status names in denite#get_status().

2019.03.24
* "-auto-highlight" and "-auto-preview" options are deprecated.
  Please use "-auto-action" option instead.

2019.03.21
* nvim-yarp is needed for Vim8.

2019.03.17
* "file_old", "file_point" and "file_rec" sources are deprecated.

2019.03.04
* Python 3.6.1+ is required.

2019.02.11
* Remove some deprecated options support.

2018.10.20
* Python 3.5+ is required.

2018.04.01
* Remove "-force-quit" and "-no-quit" options.  Please use "post-action"
  option instead.

2018.02.06
* <denite:toggle_sorters> is deprecated.  Please use <denite:change_sorters>
 instead.

2018.01.14
* context["source"] is deprecated.  Please use target["source_context"]
  instead.

2017.09.24
* "short-source-names" option is deprecated.  Added "source-names" option.

2017.06.24
* "line" source default direction is "all" instead of "forward".

2017.06.17
* "directory" kind default action is changed to "narrow".

* "preview" action highlights the position.

* "highlight" action does not open the preview window.

2016.12.17
* "highlight_syntax" is splitted to "highlight" and "define_syntax".
  The sources don't have to define source syntax name.

2016.12.02
* neovim-prompt implementation has been merged.
  Users need to follow the migration-note below.
  https://github.com/Shougo/denite.nvim/wiki/From-v0.1.0-to-v0.5.0-dev

2016.12.08
* -select option is deprecated option.  Please use -cursor-pos option
  instead.

==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:

报错解决办法

E117: Unknown function: defx#get_candidate
E116: Invalid arguments for function has_key
E15: 无效的表达式: has_key(defx#get_candidate(), ‘action__path’)
[denite] option “-start_filter=”: type is invalid.
Pattern:

标签:neovim,denite,option,记录,filter,source,action,name
来源: https://blog.csdn.net/lxyoucan/article/details/117077611