1
0
Fork 0

Merge pull request #26 from andreyorst/v1.0.0

V1.0.0
This commit is contained in:
Andrey Orst 2018-11-25 16:14:52 +03:00 committed by GitHub
commit 8cf3374e08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1280 additions and 1587 deletions

View file

@ -5,25 +5,17 @@
![Github commits (since latest release)](https://img.shields.io/github/commits-since/andreyorst/fzf.kak/latest.svg)
![license](https://img.shields.io/github/license/andreyorst/fzf.kak.svg)
> **fzf.kak** is a plugin for [Kakoune](https://github.com/mawww/kakoune) editor, that brings integration with [fzf](https://github.com/junegunn/fzf)
> tool. This plugin is being tested against Kakoune 2018.09.04.
**fzf.kak** is a plugin for [Kakoune](https://github.com/mawww/kakoune) editor, that brings integration with [fzf](https://github.com/junegunn/fzf)
tool. This plugin is being tested against Kakoune 2018.09.04.
![showcase](https://user-images.githubusercontent.com/19470159/46813471-6ee76800-cd7f-11e8-89aa-123b3a5f9f1b.gif)
### Dependencies
|Tool |Information |
|:--------:|:--------------------------------------------------------------------------------------|
|tmux |Depends on [fzf-tmux](https://github.com/junegunn/fzf/blob/master/bin/fzf-tmux) script.|
|X11 |X11 supported via `termcmd` option. |
|GNU Screen|GNU Screen is not yet supported. |
|ctags |[universal-ctags](https://github.com/universal-ctags/ctags) package. |
## Installation
Recommended way to install is to use [plug.kak](https://github.com/andreyorst/plug.kak) plugin
manager. You can install **fzf.kak** by adding this to your `kakrc`:
```kak
plug andreyorst/fzf.kak
plug "andreyorst/fzf.kak"
```
Then reload Kakoune config or restart Kakoune and run `:plug-install`.
@ -31,24 +23,24 @@ Then reload Kakoune config or restart Kakoune and run `:plug-install`.
Or install this plugin any other preferred way.
## Usage
There's no default key binking to invoke fzf, but **fzf.kak** provides a `fzf-mode` command that can be mapped to preferred key.
There's no default key binding to invoke fzf, but **fzf.kak** provides a `fzf-mode` command that can be mapped to preferred key.
You can set your own mapping to invoke `fzf-mode`:
```
```kak
map global normal <c-p> ': fzf-mode<ret>'
# note that the space after colon is intentional to suppess fzf-mode to show in command history
```
Each fzf subcommand has mnemonic mapping, like `f` for opening files, `t` for tags and so on.
Each fzf sub-command has mnemonic mapping, like `f` for opening files, `t` for tags and so on.
Available mappings:
- <kbd>b</kbd> - Select buffer
- <kbd>c</kbd> - Switch servers working directory
- <kbd>c</kbd> - Switch server's working directory
- <kbd>f</kbd> - Search for file and open it
- <kbd>v</kbd> - Edit file in version control system tree
- <kbd>V</kbd> - Explicitly select which vcs command to run
- <kbd>Alt+v</kbd> - Explicitly select which vcs command to run
- <kbd>s</kbd> - Search over buffer contents and jump to result line
- <kbd>t</kbd> - Browse ctags tags
fzf.kak supports filtering tags on per language basis. For each filetype
press <kbd>alt</kbd>+<kbd>filter key</kbd> specified in the info box to
reload fzf buffer with the desired filter.
- <kbd>Alt+t</kbd> - Select tag kind filter on per language basis
So for example pressing <kbd>Ctrl+p</kbd><kbd>f</kbd> will open fzf at the
bottom of the Kakoune buffer, showing you all possible files.
@ -58,9 +50,9 @@ bottom of the Kakoune buffer, showing you all possible files.
#### Tmux
When using inside tmux, fzf will use bottom split. Height of this split can be changed with `fzf_tmux_height` option.
`fzf_tmux_height_file_preview` option is used to control height of the split when you do file searching.
`fzf_tmux_height_file_preview` option is used to control height of the split when you do file searching with file-preview turned on.
#### Files
#### File with file-preview turned on.
You can configure what command to use to search for files, and it's arguments.
Supported tools are [GNU Find](https://www.gnu.org/software/findutils/), [The Silver Searcher](https://github.com/ggreer/the_silver_searcher), [ripgrep](https://github.com/BurntSushi/ripgrep), [fd](https://github.com/sharkdp/fd). GNU find is used by default, but you can switch to another one. There are some default values for those, so you can go:
@ -90,7 +82,7 @@ You also able to set parameters to vcs command to use to provide project files.
* `fzf_hg_command`
Other VCS are not supported officially. Open a feature request if you want some unsupported VCS to be included.
You also can change one of options to contain your vcs command, and use this command explicitly from vcs submode.
You also can change one of options to contain your VCS command, and use this command explicitly from VCS sub-mode.
#### ctags
It is also possible to add parameters to ctags search executable. like `sort -u` and others:
@ -133,19 +125,22 @@ You can disable the preview window in fzf window by setting `fzf_preview` option
set-option global fzf_preview false
```
## Some demonstration gifs:
### Opening files:
![files](https://user-images.githubusercontent.com/19470159/45917778-3988e200-be85-11e8-890d-b180d013b99e.gif)
## Contributing
### Searching tags with universal-ctags
![ctags](https://user-images.githubusercontent.com/19470159/45917775-3988e200-be85-11e8-8959-d7ddf17961b7.gif)
If you want to contribute to **fzf.kak** by adding a module, you can submit one by providing a pull request,
or just open a feature request and we'll see what can be done.
### Browsing Git tree files
![git](https://user-images.githubusercontent.com/19470159/45917779-3988e200-be85-11e8-9136-c0c830e838bc.gif)
### Writing a module
### Switching buffers
![buffers](https://user-images.githubusercontent.com/19470159/45917774-38f04b80-be85-11e8-963b-5721bd6364b3.gif)
You can write a module for **fzf.kak**. To create one, simply define a function in separate file, located
in `rc/fzf-modules/`, and named after the function. **fzf.kak** provides a general purpose command, that can be called with some
Kakoune command as first parameter, and command that provides list of items for fzf as a second parameter. Third optional parameter is
for defining extra arguments for fzf itself, like additional keybindings.
### Changing directories
![dirs](https://user-images.githubusercontent.com/19470159/45917776-3988e200-be85-11e8-89bf-7c1453806c83.gif)
Overall module structure is:
* Define a `fzf-command` command
* Prepare list of items for fzf, or define an item command
* call `fzf` command and pass needed arguments to it.
Of course modules can and will be more complex, since a good module checks if command for providing item list is available on user's machine,
and supports various settings inside it. Feel free to look how existing modules are made.

View file

@ -0,0 +1,32 @@
# ╭─────────────╥─────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-svn.kak │
# ╞═════════════╩═════════════════════════╡
# │ Submodule for Bzr support for fzf.kak │
# ╞═══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰───────────────────────────────────────╯
declare-option -docstring "command to provide list of files in GNU Bazaar repository to fzf. Arguments are supported
Supported tools:
<package>: <value>:
GNU Bazaar: ""bzr""
Default arguments:
""bzr ls -R --versioned -0""
" \
str fzf_bzr_command "bzr"
map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' '<esc>: fzf-bzr<ret>'
define-command -hidden fzf-bzr %{ evaluate-commands %sh{
case $kak_opt_fzf_bzr_command in
bzr)
cmd="bzr ls -R --versioned -0" ;;
bzr*)
cmd=$kak_opt_fzf_bzr_command ;;
esac
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
}}

View file

@ -0,0 +1,32 @@
# ╭─────────────╥─────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-svn.kak │
# ╞═════════════╩═════════════════════════╡
# │ Submodule for Git support for fzf.kak │
# ╞═══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰───────────────────────────────────────╯
declare-option -docstring "command to provide list of files in git tree to fzf. Arguments are supported
Supported tools:
<package>: <value>:
Git : ""git""
Default arguments:
""git ls-tree --full-tree --name-only -r HEAD""
" \
str fzf_git_command "git"
map global fzf-vcs -docstring "edit file from Git tree" 'g' '<esc>: fzf-git<ret>'
define-command -hidden fzf-git %{ evaluate-commands %sh{
case $kak_opt_fzf_git_command in
git)
cmd="git ls-tree --full-tree --name-only -r HEAD" ;;
git*)
cmd=$kak_opt_fzf_git_command ;;
esac
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
}}

View file

@ -0,0 +1,32 @@
# ╭─────────────╥────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-svn.kak │
# ╞═════════════╩════════════════════════╡
# │ Submodule for Hg support for fzf.kak │
# ╞══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯
declare-option -docstring "command to provide list of files in mercurial repository to fzf. Arguments are supported
Supported tools:
<package>: <value>:
Mercurial SCM: ""hg""
Default arguments:
""hg locate -f -0 -I .hg locate -f -0 -I .""
" \
str fzf_hg_command "hg"
map global fzf-vcs -docstring "edit file from mercurial tree" 'h' '<esc>: fzf-hg<ret>'
define-command -hidden fzf-hg %{ evaluate-commands %sh{
case $kak_opt_fzf_hg_command in
hg)
cmd="hg locate -f -0 -I .hg locate -f -0 -I ." ;;
hg*)
cmd=$kak_opt_fzf_hg_command ;;
esac
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
}}

View file

@ -0,0 +1,32 @@
# ╭─────────────╥─────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-svn.kak │
# ╞═════════════╩═════════════════════════╡
# │ Submodule for Svn support for fzf.kak │
# ╞═══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰───────────────────────────────────────╯
declare-option -docstring "command to provide list of files in svn repository to fzf. Arguments are supported
Supported tools:
<package>: <value>:
Subversion: ""svn""
Default arguments:
""svn list -R . | grep -v '$/' | tr '\\n' '\\0'""
" \
str fzf_svn_command "svn"
map global fzf-vcs -docstring "edit file from Subversion tree" 's' '<esc>: fzf-svn<ret>'
define-command -hidden fzf-svn %{ evaluate-commands %sh{
case $kak_opt_fzf_svn_command in
svn)
cmd="svn list -R . | grep -v '$/' | tr '\\n' '\\0'" ;;
svn*)
cmd=$kak_opt_fzf_svn_command ;;
esac
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
}}

View file

@ -0,0 +1,17 @@
# ╭─────────────╥────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-buffer.kak │
# ╞═════════════╩════════════════════════╡
# │ Module for changing buffers with fzf │
# │ for fzf.kak plugin │
# ╞══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯
map global fzf -docstring "open buffer" 'b' '<esc>: fzf-buffer<ret>'
define-command -hidden fzf-buffer %{ evaluate-commands %sh{
printf "%s\n" "info -title %{fzf buffer} %{Set buffer to edit in current client.}"
buffers=$(printf "%s\n" "$kak_buflist" | sed "s/^'//;s/'$//;s/' '/\n/g")
printf "%s\n" "fzf %{buffer} %{printf \"%s\n\" \"$buffers\"}"
}}

31
rc/fzf-modules/fzf-cd.kak Normal file
View file

@ -0,0 +1,31 @@
# ╭─────────────╥────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-cd.kak │
# ╞═════════════╩════════════════════════╡
# │ Module for changing directories with │
# │ fzf for fzf.kak plugin │
# ╞══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯
declare-option -docstring "command to provide list of directories to fzf.
Default value:
find: (echo .. && find \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type d -print)
" \
str fzf_cd_command "find"
map global fzf -docstring "change directory" 'c' '<esc>: fzf-cd<ret>'
define-command -hidden fzf-cd %{ evaluate-commands %sh{
tmux_height=$kak_opt_fzf_tmux_height
printf '%s\n' "info -title %{fzf change directory} %{Change the server's working directory}"
case $kak_opt_fzf_cd_command in
find)
items_command="(echo .. && find \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type d -print)" ;;
*)
items_command=$kak_opt_fzf_cd_command ;;
esac
printf "%s\n" "fzf %{change-directory} %{$items_command} %{} %{fzf-cd}"
}}

View file

@ -0,0 +1,838 @@
# ╭─────────────╥──────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-ctags.kak │
# ╞═════════════╩══════════════════════════╡
# │ Module for searching tags with fzf │
# │ and universal-ctags for fzf.kak plugin │
# ╞════════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰────────────────────────────────────────╯
declare-option -docstring "command to provide list of ctags to fzf. Arguments are supported
Supported tools:
<package>: <value>:
universal-ctags: ""readtags""
Default arguments:
""readtags -l | cut -f1""
" \
str fzf_tag_command "readtags"
declare-option -docstring "file that should be used by fzf-tag to provide tags.
Default value: tags" \
str fzf_tag_file "tags"
map global fzf -docstring "find tag" 't' '<esc>: fzf-tag<ret>'
# this huge try block defines filetype aware filter mappings for separate fzf-ctags mode
try %{
declare-user-mode fzf-ctags
map global fzf -docstring "select tag type" '<a-t>' '<esc>: enter-user-mode fzf-ctags<ret>'
hook global WinSetOption filetype=ada %{
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'package specifications'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'subtypes'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'record type components'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'enum type literals'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'generic formal parameters'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'constants'
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'user defined exceptions'
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'subprogram specifications'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'subprograms'
map global fzf-ctags '<a-k>' ': fzf-tag K<ret>' -docstring 'task specifications'
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'tasks'
map global fzf-ctags '<a-o>' ': fzf-tag O<ret>' -docstring 'protected data specifications'
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'protected data'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'task/protected data entries'
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'labels'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'loop/declare identifiers'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring '(ctags internal use)'
}
hook global WinSetOption filetype=ant %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'projects'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'properties(global)'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'antfiles'
}
hook global WinSetOption filetype=asciidoc %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'level 2 sections'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'level 3 sections'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'level 4 sections'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'level 5 sections'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'anchors'
}
hook global WinSetOption filetype=asm %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'defines'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types (structs and records)'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
}
hook global WinSetOption filetype=asp %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constants'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
}
hook global WinSetOption filetype=autoconf %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'templates'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'autoconf macros'
map global fzf-ctags 'w' ': fzf-tag w<ret>' -docstring 'options specified with --with-...'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'options specified with --enable-...'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'substitution keys'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'automake conditions'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
}
hook global WinSetOption filetype=autoit %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regions'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global variables'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'local variables'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'included scripts'
}
hook global WinSetOption filetype=automake %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'directories'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'programs'
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'manuals'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'ltlibraries'
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'libraries'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'scripts'
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'datum'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'conditions'
}
hook global WinSetOption filetype=awk %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
}
hook global WinSetOption filetype=basic %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumerations'
}
hook global WinSetOption filetype=beta %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fragment definitions'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'slots (fragment uses)'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'patterns (virtual or rebound)'
}
hook global WinSetOption filetype=clojure %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
}
hook global WinSetOption filetype=cmake %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'options specified with -<a-d>'
map global fzf-ctags 'p' ': fzf-tag P<ret>' -docstring 'projects'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
}
hook global WinSetOption filetype=c %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct, and union members'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
}
hook global WinSetOption filetype=cpp %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
}
hook global WinSetOption filetype=cpreprocessor %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
}
hook global WinSetOption filetype=css %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'selectors'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'identities'
}
hook global WinSetOption filetype=csharp %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'events'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
}
hook global WinSetOption filetype=ctags %{
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'language definitions'
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'kind definitions'
}
hook global WinSetOption filetype=cobol %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'paragraphs'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'data items'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'source code file'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'file descriptions (f<a-d>, <a-s><a-d>, <a-r><a-d>)'
map global fzf-ctags 'g' ': fzf-tag G<ret>' -docstring 'group items'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'program ids'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'divisions'
}
hook global WinSetOption filetype=cuda %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct, and union members'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
}
hook global WinSetOption filetype=d %{
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
map global fzf-ctags '<a-x>' ': fzf-tag X<ret>' -docstring 'mixins'
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'modules'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'templates'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'version statements'
}
hook global WinSetOption filetype=diff %{
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modified files'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'newly created files'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'deleted files'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'hunks'
}
hook global WinSetOption filetype=dtd %{
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'entities'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parameter entities'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'elements'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'attributes'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'notations'
}
hook global WinSetOption filetype=dts %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'phandlers'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
}
hook global WinSetOption filetype=dosbatch %{
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
}
hook global WinSetOption filetype=eiffel %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'features'
}
hook global WinSetOption filetype=elm %{
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'module'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'renamed <a-i>mported <a-m>odule'
map global fzf-ctags 'p' ': fzf-tag P<ret>' -docstring 'port'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type <a-d>efinition'
map global fzf-ctags 'c' ': fzf-tag C<ret>' -docstring 'type <a-c>onstructor'
map global fzf-ctags 'a' ': fzf-tag A<ret>' -docstring 'type <a-a>lias'
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'functions'
}
hook global WinSetOption filetype=erlang %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'record definitions'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
}
hook global WinSetOption filetype=falcon %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class members'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'imports'
}
hook global WinSetOption filetype=flex %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variables'
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'mxtags'
}
hook global WinSetOption filetype=fortran %{
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'block data'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'common blocks'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'entry points'
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'enumerations'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interface contents, generic names, and operators'
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'type and structure components'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'type bound procedures'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namelists'
map global fzf-ctags '<a-n>' ': fzf-tag N<ret>' -docstring 'enumeration values'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'programs'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'derived types and structures'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'program (global) and module variables'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'submodules'
}
hook global WinSetOption filetype=fypp %{
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
}
hook global WinSetOption filetype=gdbinit %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'toplevel variables'
}
hook global WinSetOption filetype=go %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structs'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct members'
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'struct anonymous members'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'unknown'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'name for specifying imported package'
}
hook global WinSetOption filetype=html %{
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'named anchors'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'h1 headings'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'h2 headings'
map global fzf-ctags 'j' ': fzf-tag j<ret>' -docstring 'h3 headings'
}
hook global WinSetOption filetype=iniconf %{
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
}
hook global WinSetOption filetype=itcl %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'object-specific variables'
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'common variables'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures within the class namespace'
}
hook global WinSetOption filetype=java %{
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'annotation declarations'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enum constants'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum types'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
}
hook global WinSetOption filetype=javaproperties %{
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
}
hook global WinSetOption filetype=javascript %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'constants'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variables'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'generators'
}
hook global WinSetOption filetype=json %{
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'objects'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'arrays'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'numbers'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'strings'
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'booleans'
map global fzf-ctags 'z' ': fzf-tag z<ret>' -docstring 'nulls'
}
hook global WinSetOption filetype=ldscript %{
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'sections'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'symbols'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'versions'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'input sections'
}
hook global WinSetOption filetype=lisp %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
}
hook global WinSetOption filetype=lua %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
}
hook global WinSetOption filetype=m4 %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macros'
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'macro files'
}
hook global WinSetOption filetype=man %{
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'titles'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
}
hook global WinSetOption filetype=make %{
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'makefiles'
}
hook global WinSetOption filetype=markdown %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapsters'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'level 4 subsections'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'level 5 subsections'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
}
hook global WinSetOption filetype=matlab %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'class'
}
hook global WinSetOption filetype=myrddin %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'traits'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
}
hook global WinSetOption filetype=objectivec %{
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'class interface'
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'class implementation'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring '<a-p>rotocol'
map global fzf-ctags 'm' ': fzf-tag M<ret>' -docstring 'object's method'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'class' method'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variable'
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring '<a-o>bject field'
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'a function'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'a property'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'a type alias'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'a type structure'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an enumeration'
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-a> preprocessor macro'
}
hook global WinSetOption filetype=ocaml %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'object's method'
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-m>odule or functor'
map global fzf-ctags 'v' ': fzf-tag V<ret>' -docstring 'global variable'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'signature item'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type name'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'a function'
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring '<a-a> constructor'
map global fzf-ctags 'r' ': fzf-tag R<ret>' -docstring 'a 'structure' field'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an exception'
}
hook global WinSetOption filetype=passwd %{
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'user names'
}
hook global WinSetOption filetype=pascal %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
}
hook global WinSetOption filetype=perl %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'formats'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
}
hook global WinSetOption filetype=perl6 %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'grammars'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'modules'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'roles'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'rules'
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'submethods'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tokens'
}
hook global WinSetOption filetype=php %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constant definitions'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'traits'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
}
hook global WinSetOption filetype=pod %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
}
hook global WinSetOption filetype=protobuf %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'messages'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enum constants'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum types'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'services'
}
hook global WinSetOption filetype=puppetmanifest %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'nodes'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'resources'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
}
hook global WinSetOption filetype=python %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class members'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'name referring a module defined in other file'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'modules'
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'name referring a class/variable/function/module defined in other module'
}
hook global WinSetOption filetype=pythonloggingconfig %{
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'logger sections'
map global fzf-ctags 'q' ': fzf-tag q<ret>' -docstring 'logger qualnames'
}
hook global WinSetOption filetype=qemuhx %{
map global fzf-ctags 'q' ': fzf-tag q<ret>' -docstring 'q<a-e><a-m><a-u> <a-m>anagement <a-p>rotocol dispatch table entries'
map global fzf-ctags 'i' ': fzf-tag I<ret>' -docstring 'item in texinfo doc'
}
hook global WinSetOption filetype=qtmoc %{
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'slots'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'signals'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
}
hook global WinSetOption filetype=r %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'libraries'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sources'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global variables'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'function variables'
}
hook global WinSetOption filetype=rspec %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'describes'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'contexts'
}
hook global WinSetOption filetype=rexx %{
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
}
hook global WinSetOption filetype=robot %{
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'testcases'
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keywords'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
}
hook global WinSetOption filetype=rpmspec %{
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tags'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global macros'
}
hook global WinSetOption filetype=restructuredtext %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'targets'
}
hook global WinSetOption filetype=ruby %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'methods'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'singleton methods'
}
hook global WinSetOption filetype=rust %{
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'module'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structural type'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'trait interface'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'implementation'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type <a-a>lias'
map global fzf-ctags 'v' ': fzf-tag V<ret>' -docstring 'global variable'
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-m>acro <a-d>efinition'
map global fzf-ctags 'm' ': fzf-tag M<ret>' -docstring 'a struct field'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an enum variant'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring '<a-a> method'
}
hook global WinSetOption filetype=scheme %{
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'functions'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sets'
}
hook global WinSetOption filetype=sh %{
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'script files'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'label for here document'
}
hook global WinSetOption filetype=slang %{
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
}
hook global WinSetOption filetype=sml %{
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'exception declarations'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'functor definitions'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signature declarations'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'structure declarations'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'value bindings'
}
hook global WinSetOption filetype=sql %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'cursors'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'record fields'
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'block label'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'packages'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subtypes'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tables'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'triggers'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'indexes'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
map global fzf-ctags '<a-u>' ': fzf-tag U<ret>' -docstring 'publications'
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'services'
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'domains'
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'views'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'synonyms'
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'mobi<a-l>ink <a-t>able <a-s>cripts'
map global fzf-ctags 'y' ': fzf-tag Y<ret>' -docstring 'mobi<a-l>ink <a-c>onn <a-s>cripts'
map global fzf-ctags 'z' ': fzf-tag Z<ret>' -docstring 'mobi<a-l>ink <a-p>roperties '
}
hook global WinSetOption filetype=systemdunit %{
map global fzf-ctags 'u' ': fzf-tag U<ret>' -docstring 'units'
}
hook global WinSetOption filetype=tcl %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
}
hook global WinSetOption filetype=tcloo %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
}
hook global WinSetOption filetype=tex %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parts'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'subsections'
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'subsubsections'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'paragraphs'
map global fzf-ctags '<a-g>' ': fzf-tag G<ret>' -docstring 'subparagraphs'
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'includes'
}
hook global WinSetOption filetype=ttcn %{
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'module definition'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definition'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constant definition'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'template definition'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definition'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signature definition'
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'testcase definition'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'altstep definition'
map global fzf-ctags '<a-g>' ': fzf-tag G<ret>' -docstring 'group definition'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'module parameter definition'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable instance'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'timer instance'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'port instance'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'record/set/union member'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumeration value'
}
hook global WinSetOption filetype=vera %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'programs'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signals'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'typedefs'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
}
hook global WinSetOption filetype=verilog %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants (define, parameter, specparam)'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'net data types'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'ports'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'register data types'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'blocks'
}
hook global WinSetOption filetype=systemverilog %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants (define, parameter, specparam, enum values)'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'net data types'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'ports'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'register data types'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'blocks'
map global fzf-ctags '<a-a>' ': fzf-tag A<ret>' -docstring 'assertions'
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'classes'
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'covergroups'
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'enumerators'
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'interfaces'
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'modports'
map global fzf-ctags '<a-k>' ': fzf-tag K<ret>' -docstring 'packages'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'programs'
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'properties'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'structs and unions'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'type declarations'
}
hook global WinSetOption filetype=vhdl %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constant declarations'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'subtype definitions'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'record names'
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'entity declarations'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function prototypes and declarations'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedure prototypes and declarations'
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'package definitions'
}
hook global WinSetOption filetype=vim %{
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'autocommand groups'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'user-defined commands'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'maps'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'vimball filename'
}
hook global WinSetOption filetype=windres %{
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'dialogs'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'menus'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'icons'
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'bitmaps'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'cursors'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fonts'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'versions'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'accelerators'
}
hook global WinSetOption filetype=yacc %{
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
}
hook global WinSetOption filetype=yumrepo %{
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'repository id'
}
hook global WinSetOption filetype=zephir %{
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constant definitions'
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'traits'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
}
hook global WinSetOption filetype=dbusintrospect %{
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signals'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
}
hook global WinSetOption filetype=glade %{
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'identifiers'
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'handlers'
}
hook global WinSetOption filetype=maven2 %{
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'group identifiers'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'artifact identifiers'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'repository identifiers'
}
hook global WinSetOption filetype=plistxml %{
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
}
hook global WinSetOption filetype=relaxng %{
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'elements'
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'attributes'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'named patterns'
}
hook global WinSetOption filetype=svg %{
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'id attributes'
}
hook global WinSetOption filetype=xslt %{
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'stylesheets'
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parameters'
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'matched template'
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'matched template'
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
}
hook global WinSetOption filetype=yaml %{
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'anchors'
}
hook global WinSetOption filetype=ansibleplaybook %{
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'plays'
}
} catch %{
echo -debug "Error while declaring 'fzf-ctags' mode"
}
define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{
path=$PWD
while [ "$path" != "$HOME" ]; do
if [ -e "./$kak_opt_fzf_tag_file" ]; then
break
else
cd ..
path=$PWD
fi
done
if [ "$path" = "$HOME" ] && [ ! -e "./$kak_opt_fzf_tag_file" ]; then
printf "%s\n" "echo -markup %{{Information}No '$kak_opt_fzf_tag_file' file found}"
exit
elif [ "$path" = "$HOME" ] && [ -e "./$kak_opt_fzf_tag_file" ]; then
printf "%s\n" "echo -markup %{{Information}'$kak_opt_fzf_tag_file' file found at $HOME. Check if it is right tag file}"
fi
if [ -n "$1" ]; then
cmd="cd $path; readtags -Q '(eq? \$kind \"$1\")' -l | cut -f1"
else
cmd="cd $path; readtags -l | cut -f1"
fi
message="Jump to a symbol''s definition
<ret>: open tag in new buffer
<c-w>: open tag in new window"
[ -n "${kak_client_env_TMUX}" ] && tmux_keybindings="
<c-s>: open tag in horizontal split
<c-v>: open tag in vertical split"
printf "%s\n" "info -title 'fzf tag' '$message$tmux_keybindings'"
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
printf "%s\n" "set-option -add window ctagsfiles %{$path/$kak_opt_fzf_tag_file}"
printf "%s\n" "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags}"
}}

View file

@ -0,0 +1,62 @@
# ╭─────────────╥────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-file.kak │
# ╞═════════════╩════════════════════════╡
# │ Module for opening files with fzf │
# │ for fzf.kak plugin │
# ╞══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯
declare-option -docstring "command to provide list of files to fzf. Arguments are supported
Supported tools:
<package>: <value>:
GNU Find: ""find""
The Silver Searcher: ""ag""
ripgrep: ""rg""
fd: ""fd""
Default arguments:
find: ""find -type f -follow""
ag: ""ag -l -f --hidden --one-device .""
rg: ""rg -L --hidden --files""
fd: ""fd --type f --follow""
" \
str fzf_file_command "find"
map global fzf -docstring "open file" 'f' '<esc>: fzf-file<ret>'
define-command -hidden fzf-file %{ evaluate-commands %sh{
if [ -z "$(command -v $kak_opt_fzf_file_command)" ]; then
printf "%s\n" "echo -markup '{Information}''$kak_opt_fzf_file_command'' is not installed. Falling back to ''find'''"
kak_opt_fzf_file_command="find"
fi
case $kak_opt_fzf_file_command in
find)
cmd="find -type f -follow" ;;
ag)
cmd="ag -l -f --hidden --one-device . " ;;
rg)
cmd="rg -L --hidden --files" ;;
fd)
cmd="fd --type f --follow" ;;
find*|ag*|rg*|fd*)
cmd=$kak_opt_fzf_file_command ;;
*)
items_executable=$(printf "%s\n" "$kak_opt_fzf_file_command" | grep -o -E "[[:alpha:]]+" | head -1)
printf "%s\n" "echo -markup '{Information}'Warning: '$executable'' is not supported by fzf.kak.'"
cmd=$kak_opt_fzf_file_command ;;
esac
message="Open single or multiple files.
<ret>: open file in new buffer.
<c-w>: open file in new window"
[ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings="
<c-s>: open file in horizontal split
<c-v>: open file in vertical split"
printf "%s\n" "info -title 'fzf file' '$message$tmux_keybindings'"
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
}}

View file

@ -0,0 +1,21 @@
# ╭─────────────╥────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-search.kak │
# ╞═════════════╩════════════════════════╡
# │ Module for searching inside current │
# │ buffer with fzf for fzf.kak │
# ╞══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯
map global fzf -docstring "search in buffer" 's' '<esc>: fzf-buffer-search<ret>'
define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{
title="fzf buffer search"
message="Search buffer with fzf, and jump to result location"
printf "%s\n" "info -title '$title' '$message'"
buffer_content="$(mktemp ${TMPDIR:-/tmp}/fzf-buff-${kak_buffile##*/}.XXXXXX)"
printf "%s\n" "execute-keys -draft %{%<a-|>cat<space>><space>$buffer_content<ret>;}"
printf "%s\n" "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content; rm $buffer_content)} %{--reverse | cut -f 1} %{execute-keys gx}"
}}

View file

@ -0,0 +1,56 @@
# ╭─────────────╥────────────────────────╮
# │ Author: ║ File: │
# │ Andrey Orst ║ fzf-vcs.kak │
# ╞═════════════╩════════════════════════╡
# │ Module that declares VCS submodule │
# │ for various version control systems │
# │ to open files with fzf │
# ╞══════════════════════════════════════╡
# │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯
try %{ declare-user-mode fzf-vcs } catch %{echo -markup "{Error}Can't declare mode 'fzf-vcs' - already exists"}
map global fzf -docstring "edit file from vcs repo" 'v' '<esc>: fzf-vcs<ret>'
map global fzf -docstring "svitch to vcs selection mode" '<a-v>' '<esc>: fzf-vcs-mode<ret>'
define-command -docstring "Enter fzf-vcs-mode.
This mode allows selecting specific vcs command." \
fzf-vcs-mode %{ try %{ evaluate-commands 'enter-user-mode fzf-vcs' } }
define-command -hidden -docstring 'Wrapper command for fzf vcs to automatically decect
used version control system.
Supported vcs:
Git: "git"
Subversion: "svn"
Mercurial SCM: "hg"
GNU Bazaar: "bzr"
' \
fzf-vcs %{ evaluate-commands %sh{
commands="git rev-parse --is-inside-work-tree
svn info
hg --cwd . root
bzr status"
IFS='
'
for cmd in $commands; do
eval $cmd >/dev/null 2>&1
res=$?
if [ "$res" = "0" ]; then
vcs=$(printf "%s\n" "$cmd" | awk '{print $1}')
title="fzf $vcs"
[ ! -z "${kak_client_env_TMUX}" ] && additional_keybindings="
<c-s>: open file in horizontal split
<c-v>: open file in vertical split"
message="Open single or multiple files from git tree.
<ret>: open file in new buffer.
<c-w>: open file in new window $additional_keybindings"
printf "%s\n" "info -title %{$title} %{$message}"
printf "%s\n" "fzf-$vcs"
exit
fi
done
printf "%s\n" "echo -markup '{Information}No VCS found in current folder'"
}}

1631
rc/fzf.kak

File diff suppressed because it is too large Load diff