1
0
Fork 0

fix definition of filters, check for readtagscmd

This commit is contained in:
Andrey Orst 2020-03-19 09:13:53 +03:00
parent 302045491c
commit 355f05d832

View file

@ -16,13 +16,20 @@ str fzf_tag_file_name "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
declare-option -hidden bool fzf_tag_filters_defined false
try %{
declare-user-mode fzf-ctags
map global fzf -docstring "select tag type" '<a-t>' '<esc>: fzf-setup-filter-tags; enter-user-mode fzf-ctags<ret>'
}
map global fzf -docstring "select tag type" '<a-t>' '<esc>: enter-user-mode fzf-ctags<ret>'
# this huge try block defines filetype aware filter mappings for separate fzf-ctags mode
define-command -hidden fzf-setup-filter-tags %{
evaluate-commands %sh{
[ "$opt_fzf_tag_filters_defined" = "true" ] && exit
hook global WinSetOption filetype=ada %{
case $kak_opt_filetype in
(ada) printf "%s\n" "
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'
@ -41,16 +48,18 @@ try %{
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 'i' ': fzf-tag i<ret>' -docstring 'loop/set identifers'
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring '(ctags internal use)'
}
hook global WinSetOption filetype=ant %{
set-option buffer fzf_tag_filters_defined true
" ;;
(ant) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(asciidoc) printf "%s\n" "
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'
@ -58,22 +67,25 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(asm) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(asp) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(autoconf) printf "%s\n" "
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'
@ -82,15 +94,17 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(autoit) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(automake) printf "%s\n" "
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'
@ -99,28 +113,33 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(awk) printf "%s\n" "
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
}
hook global WinSetOption filetype=basic %{
set-option buffer fzf_tag_filters_defined true
" ;;
(basic) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(beta) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(clojure) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(cmake) printf "%s\n" "
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'
@ -128,8 +147,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(c) printf "%s\n" "
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'
@ -140,8 +160,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(cpp) printf "%s\n" "
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'
@ -154,17 +175,20 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(cpreprocessor) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(css) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(csharp) printf "%s\n" "
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)'
@ -177,12 +201,14 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(ctags) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(cobol) printf "%s\n" "
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'
@ -191,8 +217,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(cuda) printf "%s\n" "
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'
@ -203,8 +230,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(d) printf "%s\n" "
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'
@ -220,34 +248,40 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(diff) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(dtd) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(dts) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(dosbatch) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(eiffel) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(elm) printf "%s\n" "
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'
@ -255,30 +289,34 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(erlang) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(falcon) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(flex) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(fortran) printf "%s\n" "
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'
@ -296,15 +334,18 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(fypp) printf "%s\n" "
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
}
hook global WinSetOption filetype=gdbinit %{
set-option buffer fzf_tag_filters_defined true
" ;;
(gdbinit) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(go) printf "%s\n" "
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'
@ -316,25 +357,29 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(html) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(iniconf) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(itcl) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(java) printf "%s\n" "
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'
@ -343,11 +388,13 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(javaproperties) printf "%s\n" "
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
}
hook global WinSetOption filetype=javascript %{
set-option buffer fzf_tag_filters_defined true
" ;;
(javascript) printf "%s\n" "
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'
@ -355,41 +402,49 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(json) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(ldscript) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(lisp) printf "%s\n" "
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
}
hook global WinSetOption filetype=lua %{
set-option buffer fzf_tag_filters_defined true
" ;;
(lua) printf "%s\n" "
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
}
hook global WinSetOption filetype=m4 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(m4) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(man) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(make) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(markdown) printf "%s\n" "
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'
@ -397,21 +452,24 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(matlab) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(myrddin) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(objectivec) printf "%s\n" "
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'
@ -425,8 +483,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(ocaml) printf "%s\n" "
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'
@ -437,22 +496,26 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(passwd) printf "%s\n" "
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'user names'
}
hook global WinSetOption filetype=pascal %{
set-option buffer fzf_tag_filters_defined true
" ;;
(pascal) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(perl) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(perl6) printf "%s\n" "
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'
@ -463,8 +526,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(php) printf "%s\n" "
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'
@ -473,29 +537,33 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(pod) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(protobuf) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(puppetmanifest) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(python) printf "%s\n" "
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'
@ -503,59 +571,70 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(pythonloggingconfig) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(qemuhx) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(qtmoc) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(r) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(rspec) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(rexx) printf "%s\n" "
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
}
hook global WinSetOption filetype=robot %{
set-option buffer fzf_tag_filters_defined true
" ;;
(robot) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(rpmspec) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(restructuredtext) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(ruby) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(rust) printf "%s\n" "
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'
@ -568,22 +647,26 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(scheme) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(sh) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(slang) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(sml) printf "%s\n" "
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'
@ -591,8 +674,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(sql) printf "%s\n" "
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'
@ -613,19 +697,23 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(systemdunit) printf "%s\n" "
map global fzf-ctags 'u' ': fzf-tag U<ret>' -docstring 'units'
}
hook global WinSetOption filetype=tcl %{
set-option buffer fzf_tag_filters_defined true
" ;;
(tcl) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(tcloo) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(tex) printf "%s\n" "
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'
@ -635,8 +723,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(ttcn) printf "%s\n" "
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'
@ -652,8 +741,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(vera) printf "%s\n" "
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)'
@ -667,8 +757,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(verilog) printf "%s\n" "
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'
@ -678,8 +769,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(systemverilog) printf "%s\n" "
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'
@ -700,8 +792,9 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(vhdl) printf "%s\n" "
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'
@ -710,16 +803,18 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(vim) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(windres) printf "%s\n" "
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'
@ -728,14 +823,17 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(yacc) printf "%s\n" "
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
}
hook global WinSetOption filetype=yumrepo %{
set-option buffer fzf_tag_filters_defined true
" ;;
(yumrepo) printf "%s\n" "
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'repository id'
}
hook global WinSetOption filetype=zephir %{
set-option buffer fzf_tag_filters_defined true
" ;;
(zephir) printf "%s\n" "
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'
@ -744,50 +842,60 @@ try %{
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(dbusintrospect) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(glade) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(maven2) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(plistxml) printf "%s\n" "
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
}
hook global WinSetOption filetype=relaxng %{
set-option buffer fzf_tag_filters_defined true
" ;;
(relaxng) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(svg) printf "%s\n" "
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'id attributes'
}
hook global WinSetOption filetype=xslt %{
set-option buffer fzf_tag_filters_defined true
" ;;
(xslt) printf "%s\n" "
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 %{
set-option buffer fzf_tag_filters_defined true
" ;;
(yaml) printf "%s\n" "
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'anchors'
}
hook global WinSetOption filetype=ansibleplaybook %{
set-option buffer fzf_tag_filters_defined true
" ;;
(ansibleplaybook) printf "%s\n" "
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'plays'
set-option buffer fzf_tag_filters_defined true
" ;;
esac
}
} catch %{
echo -debug "Error while declaring 'fzf-ctags' mode"
}
define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{
@ -809,18 +917,15 @@ define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{
fi
cmd="cd $path;"
if [ "$(command -v readtags)" ]; then
if [ -n "$(command -v ${kak_opt_readtagscmd})" ]; then
if [ -n "$1" ]; then
cmd="${cmd} readtags -t $kak_opt_fzf_tag_file_name -Q '(eq? \$kind \"$1\")' -l"
cmd="${cmd} ${kak_opt_readtagscmd} -t $kak_opt_fzf_tag_file_name -Q '(eq? \$kind \"$1\")' -l"
else
cmd="${cmd} readtags -t $kak_opt_fzf_tag_file_name -l"
cmd="${cmd} ${kak_opt_readtagscmd} -t $kak_opt_fzf_tag_file_name -l"
fi
else
if [ -n "$1" ]; then
cmd="${cmd} grep '^\b\"$1\"\b.*\$/' $kak_opt_fzf_tag_file_name -o"
else
cmd="${cmd} grep -v '^!_TAG_*' $kak_opt_fzf_tag_file_name"
fi
printf "%s\n" "echo -markup %{{Error}'${kak_opt_readtagscmd}' executable not found. Check if '${kak_opt_readtagscmd}' is installed}"
exit
fi
cmd="${cmd} | cut -f1"