From f7c94f9b7eba5a847f494d61b991af90ff125810 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sun, 11 Nov 2018 13:00:41 +0300 Subject: [PATCH 01/37] replace some escaped quotes with kakoune strings --- rc/fzf.kak | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 285846c..050d782 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -187,7 +187,7 @@ define-command -hidden fzf-file %{ evaluate-commands %sh{ : open file in new window $additional_keybindings" echo "info -title '$title' '$message'" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - eval echo 'fzf \"edit \$1\" \"$cmd\" \"-m --expect ctrl-w $additional_flags\"' + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} define-command -hidden -docstring "Wrapper command for fzf vcs to automatically decect @@ -234,7 +234,7 @@ define-command -hidden fzf-git %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_git_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - eval echo 'fzf \"edit \$1\" \"$cmd\" \"-m --expect ctrl-w $additional_flags\"' + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} define-command -hidden fzf-hg %{ evaluate-commands %sh{ @@ -245,7 +245,7 @@ define-command -hidden fzf-hg %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_hg_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - eval echo 'fzf \"edit \$1\" \"$cmd\" \"-m --expect ctrl-w $additional_flags\"' + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} define-command -hidden fzf-svn %{ evaluate-commands %sh{ @@ -256,7 +256,7 @@ define-command -hidden fzf-svn %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_svn_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - eval echo 'fzf \"edit \$1\" \"$cmd\" \"-m --expect ctrl-w $additional_flags\"' + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} define-command -hidden fzf-bzr %{ evaluate-commands %sh{ @@ -267,7 +267,7 @@ define-command -hidden fzf-bzr %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_bzr_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - eval echo 'fzf \"edit \$1\" \"$cmd\" \"-m --expect ctrl-w $additional_flags\"' + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} define-command -hidden fzf-cd %{ evaluate-commands %sh{ @@ -280,7 +280,7 @@ define-command -hidden fzf-cd %{ evaluate-commands %sh{ *) cmd=$kak_opt_fzf_cd_command ;; esac - eval echo 'fzf \"change-directory \$1\" \"$cmd\"' + echo "fzf %{change-directory \$1} %{$cmd}" }} define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ @@ -292,7 +292,7 @@ define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ buffer_content=$(mktemp ${TMPDIR:-/tmp}/kak-curr-buff.XXXXXX) echo "execute-keys %{%cat>$buffer_content;}" echo "execute-keys $line g $char l" - echo "fzf \"execute-keys \$1 gx\" \"(nl -b a -n ln $buffer_content\" \"--reverse | cut -f 1; rm $buffer_content)\"" + echo "fzf %{execute-keys \$1 gx} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content)}" }} define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ @@ -303,7 +303,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ items_executable=$(echo $items_command | awk '{print $1}' | tr '(' ' ' | cut -d " " -f 2) if [ -z $(command -v $items_executable) ]; then - echo "fail \'$items_executable' executable not found" + echo "fail %{'$items_executable' executable not found}" exit fi @@ -324,7 +324,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ highlighter=$kak_opt_fzf_highlighter ;; *) executable=$(echo $kak_opt_fzf_highlighter | awk '{print $1}'| tr '(' ' ' | cut -d " " -f 2) - echo "echo -markup '{Information}''$executable'' highlighter is not supported by the script. fzf.kak may not work as you expect.'" + echo "echo -markup %{{Information}'$executable' highlighter is not supported by the script. fzf.kak may not work as you expect.}" highlighter=$kak_opt_fzf_highlighter ;; esac if [ ! -z "${kak_client_env_TMUX}" ]; then @@ -1635,6 +1635,6 @@ Additional filters for $kak_opt_filetype filetype: $additional_message" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - eval echo 'fzf \"ctags-search \$1\" \"$cmd\" \"--expect ctrl-w $additional_flags $additional_keybindings\"' + echo "fzf %{ctags-search \$1} %{$cmd} %{--expect ctrl-w $additional_flags $additional_keybindings}" }} From 08018d5386374463f4b7348aee384924442aefce Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sun, 11 Nov 2018 13:41:15 +0300 Subject: [PATCH 02/37] move fzf commands to submodules --- rc/fzf-modules/VCS/fzf-bzr.kak | 32 + rc/fzf-modules/VCS/fzf-git.kak | 32 + rc/fzf-modules/VCS/fzf-hg.kak | 32 + rc/fzf-modules/VCS/fzf-svn.kak | 32 + rc/fzf-modules/fzf-buffer.kak | 59 ++ rc/fzf-modules/fzf-cd.kak | 31 + rc/fzf-modules/fzf-ctags.kak | 1223 ++++++++++++++++++++++++++ rc/fzf-modules/fzf-file.kak | 61 ++ rc/fzf-modules/fzf-search.kak | 24 + rc/fzf-modules/fzf-vcs.kak | 56 ++ rc/fzf.kak | 1483 -------------------------------- 11 files changed, 1582 insertions(+), 1483 deletions(-) create mode 100644 rc/fzf-modules/VCS/fzf-bzr.kak create mode 100644 rc/fzf-modules/VCS/fzf-git.kak create mode 100644 rc/fzf-modules/VCS/fzf-hg.kak create mode 100644 rc/fzf-modules/VCS/fzf-svn.kak create mode 100644 rc/fzf-modules/fzf-buffer.kak create mode 100644 rc/fzf-modules/fzf-cd.kak create mode 100644 rc/fzf-modules/fzf-ctags.kak create mode 100644 rc/fzf-modules/fzf-file.kak create mode 100644 rc/fzf-modules/fzf-search.kak create mode 100644 rc/fzf-modules/fzf-vcs.kak diff --git a/rc/fzf-modules/VCS/fzf-bzr.kak b/rc/fzf-modules/VCS/fzf-bzr.kak new file mode 100644 index 0000000..1f6bb1a --- /dev/null +++ b/rc/fzf-modules/VCS/fzf-bzr.kak @@ -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: + : : + 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' ': fzf-bzr' + +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" + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" +}} + diff --git a/rc/fzf-modules/VCS/fzf-git.kak b/rc/fzf-modules/VCS/fzf-git.kak new file mode 100644 index 0000000..4e98a84 --- /dev/null +++ b/rc/fzf-modules/VCS/fzf-git.kak @@ -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: + : : + Git : ""git"" + +Default arguments: + ""git ls-tree --name-only -r HEAD"" +" \ +str fzf_git_command "git" + +map global fzf-vcs -docstring "edit file from Git tree" 'g' ': fzf-git' + +define-command -hidden fzf-git %{ evaluate-commands %sh{ + case $kak_opt_fzf_git_command in + git) + cmd="git ls-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" + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" +}} + diff --git a/rc/fzf-modules/VCS/fzf-hg.kak b/rc/fzf-modules/VCS/fzf-hg.kak new file mode 100644 index 0000000..94a2e0c --- /dev/null +++ b/rc/fzf-modules/VCS/fzf-hg.kak @@ -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: + : : + 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' ': fzf-hg' + +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" + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" +}} + diff --git a/rc/fzf-modules/VCS/fzf-svn.kak b/rc/fzf-modules/VCS/fzf-svn.kak new file mode 100644 index 0000000..4e3004d --- /dev/null +++ b/rc/fzf-modules/VCS/fzf-svn.kak @@ -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: + : : + 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' ': fzf-svn' + +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" + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" +}} + diff --git a/rc/fzf-modules/fzf-buffer.kak b/rc/fzf-modules/fzf-buffer.kak new file mode 100644 index 0000000..84bce7f --- /dev/null +++ b/rc/fzf-modules/fzf-buffer.kak @@ -0,0 +1,59 @@ +# ╭─────────────╥────────────────────────╮ +# │ 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' ': fzf-buffer' + +define-command -hidden fzf-buffer %{ evaluate-commands %sh{ + tmp=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-fzf.XXXXXX)) + setbuf=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-setbuf.XXXXXX)) + delbuf=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-delbuf.XXXXXX)) + buffers=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-buffers.XXXXXX)) + IFS="'" + for buffer in $kak_buflist; do + [ ! -z $buffer ] && [ $buffer != ' ' ] && echo $buffer >> $buffers + done + if [ ! -z "${kak_client_env_TMUX}" ]; then + cmd="cat $buffers | fzf-tmux -d $kak_opt_fzf_tmux_height --expect ctrl-d > $tmp" + elif [ ! -z "${kak_opt_termcmd}" ]; then + cmd="$kak_opt_termcmd \"sh -c 'cat $buffers | fzf --expect ctrl-d > $tmp'\"" + else + echo "fail termcmd option is not set" + fi + + echo "info -title 'fzf buffer' 'Set buffer to edit in current client +: delete selected buffer'" + + echo "echo evaluate-commands -client $kak_client \"buffer \'\$1'\" | kak -p $kak_session" > $setbuf + echo "echo evaluate-commands -client $kak_client \"delete-buffer \'\$1'\" | kak -p $kak_session" > $delbuf + echo "echo evaluate-commands -client $kak_client \"fzf-buffer \" | kak -p $kak_session" >> $delbuf + chmod 755 $setbuf + chmod 755 $delbuf + ( + eval "$cmd" + if [ -s $tmp ]; then + ( + read action + read buf + if [ "$action" = "ctrl-d" ]; then + $setbuf $kak_bufname + $delbuf $buf + else + $setbuf $buf + fi + ) < $tmp + else + $setbuf $kak_bufname + fi + rm $tmp + rm $setbuf + rm $delbuf + rm $buffers + ) > /dev/null 2>&1 < /dev/null & +}} diff --git a/rc/fzf-modules/fzf-cd.kak b/rc/fzf-modules/fzf-cd.kak new file mode 100644 index 0000000..dfd7cdb --- /dev/null +++ b/rc/fzf-modules/fzf-cd.kak @@ -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' ': fzf-cd' + +define-command -hidden fzf-cd %{ evaluate-commands %sh{ + title="fzf change directory" + message="Change the server''s working directory" + echo "info -title '$title' '$message'" + case $kak_opt_fzf_cd_command in + find) + cmd="(echo .. && find \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type d -print)" ;; + *) + cmd=$kak_opt_fzf_cd_command ;; + esac + echo "fzf %{change-directory \$1} %{$cmd}" +}} + diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak new file mode 100644 index 0000000..2e15903 --- /dev/null +++ b/rc/fzf-modules/fzf-ctags.kak @@ -0,0 +1,1223 @@ +# ╭─────────────╥──────────────────────────╮ +# │ 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: + : : + universal-ctags: ""readtags"" + +Default arguments: + ""readtags -l | cut -f1"" +" \ +str fzf_tag_command "readtags" + +map global fzf -docstring "find tag" 't' ': fzf-tag' + +declare-option -hidden -docstring "A set of mappings for Ada filetype" \ +str fzf_tag_ada " +: package specifications +: packages +: types +: subtypes +: record type components +: enum type literals +: variables +: generic formal parameters +: constants +: user defined exceptions +: subprogram specifications +: subprograms +: task specifications +: tasks +: protected data specifications +: protected data +: task/protected data entries +: labels +: loop/declare identifiers +: (ctags internal use)" + +declare-option -hidden -docstring "A set of mappings for Ant filetype" \ +str fzf_tag_ant " +: projects +: targets +: properties(global) +: antfiles" + +declare-option -hidden -docstring "A set of mappings for Asciidoc filetype" \ +str fzf_tag_asciidoc " +: chapters +: sections +: level 2 sections +: level 3 sections +: level 4 sections +: level 5 sections +: anchors" + +declare-option -hidden -docstring "A set of mappings for Asm filetype" \ +str fzf_tag_asm " +: defines +: labels +: macros +: types (structs and records) +: sections" + +declare-option -hidden -docstring "A set of mappings for Asp filetype" \ +str fzf_tag_asp " +: constants +: classes +: functions +: subroutines +: variables" + +declare-option -hidden -docstring "A set of mappings for Autoconf filetype" \ +str fzf_tag_autoconf " +: packages +: templates +: autoconf macros +: options specified with --with-... +: options specified with --enable-... +: substitution keys +: automake conditions +: definitions" + +declare-option -hidden -docstring "A set of mappings for AutoIt filetype" \ +str fzf_tag_autoit " +: functions +: regions +: global variables +: local variables +: included scripts" + +declare-option -hidden -docstring "A set of mappings for Automake filetype" \ +str fzf_tag_automake " +: directories +: programs +: manuals +: ltlibraries +: libraries +: scripts +: datum +: conditions" + +declare-option -hidden -docstring "A set of mappings for Awk filetype" \ +str fzf_tag_awk " +: functions" + +declare-option -hidden -docstring "A set of mappings for Basic filetype" \ +str fzf_tag_basic " +: constants +: functions +: labels +: types +: variables +: enumerations" + +declare-option -hidden -docstring "A set of mappings for BETA filetype" \ +str fzf_tag_beta " +: fragment definitions +: slots (fragment uses) +: patterns (virtual or rebound)" + +declare-option -hidden -docstring "A set of mappings for Clojure filetype" \ +str fzf_tag_clojure " +: functions +: namespaces" + +declare-option -hidden -docstring "A set of mappings for CMake filetype" \ +str fzf_tag_cmake " +: functions +: macros +: targets +: variable definitions +: options specified with -D +: projects +: regex" + +declare-option -hidden -docstring "A set of mappings for C filetype" \ +str fzf_tag_c " +: macro definitions +: enumerators (values inside an enumeration) +: function definitions +: enumeration names +: included header files +: struct, and union members +: structure names +: typedefs +: union names +: variable definitions" + +declare-option -hidden -docstring "A set of mappings for C++ filetype" \ +str fzf_tag_cpp " +: macro definitions +: enumerators (values inside an enumeration) +: function definitions +: enumeration names +: included header files +: class, struct, and union members +: structure names +: typedefs +: union names +: variable definitions +: classes +: namespaces" + +declare-option -hidden -docstring "A set of mappings for CPreProcessor filetype" \ +str fzf_tag_cpreprocessor " +: macro definitions +: included header files" + +declare-option -hidden -docstring "A set of mappings for CSS filetype" \ +str fzf_tag_css " +: classes +: selectors +: identities" + +declare-option -hidden -docstring "A set of mappings for C# filetype" \ +str fzf_tag_csharp " +: classes +: macro definitions +: enumerators (values inside an enumeration) +: events +: fields +: enumeration names +: interfaces +: methods +: namespaces +: properties +: structure names +: typedefs" + +declare-option -hidden -docstring "A set of mappings for Ctags filetype" \ +str fzf_tag_ctags " +: language definitions +: kind definitions" + +declare-option -hidden -docstring "A set of mappings for Cobol filetype" \ +str fzf_tag_cobol " +: paragraphs +: data items +: source code file +: file descriptions (FD, SD, RD) +: group items +: program ids +: sections +: divisions" + +declare-option -hidden -docstring "A set of mappings for CUDA filetype" \ +str fzf_tag_cuda " +: macro definitions +: enumerators (values inside an enumeration) +: function definitions +: enumeration names +: included header files +: struct, and union members +: structure names +: typedefs +: union names +: variable definitions" + +declare-option -hidden -docstring "A set of mappings for D filetype" \ +str fzf_tag_d " +: aliases +: classes +: enumeration names +: enumerators (values inside an enumeration) +: function definitions +: interfaces +: class, struct, and union members +: mixins +: modules +: namespaces +: structure names +: templates +: union names +: variable definitions +: version statements" + +declare-option -hidden -docstring "A set of mappings for Diff filetype" \ +str fzf_tag_diff " +: modified files +: newly created files +: deleted files +: hunks" + +declare-option -hidden -docstring "A set of mappings for DTD filetype" \ +str fzf_tag_dtd " +: entities +: parameter entities +: elements +: attributes +: notations" + +declare-option -hidden -docstring "A set of mappings for DTS filetype" \ +str fzf_tag_dts " +: phandlers +: labels +: regex" + +declare-option -hidden -docstring "A set of mappings for DosBatch filetype" \ +str fzf_tag_dosbatch " +: labels +: variables" + +declare-option -hidden -docstring "A set of mappings for Eiffel filetype" \ +str fzf_tag_eiffel " +: classes +: features" + +declare-option -hidden -docstring "A set of mappings for Elm filetype" \ +str fzf_tag_elm " +: Module +: Renamed Imported Module +: Port +: Type Definition +: Type Constructor +: Type Alias +: Functions" + +declare-option -hidden -docstring "A set of mappings for Erlang filetype" \ +str fzf_tag_erlang " +: macro definitions +: functions +: modules +: record definitions +: type definitions" + +declare-option -hidden -docstring "A set of mappings for Falcon filetype" \ +str fzf_tag_falcon " +: classes +: functions +: class members +: variables +: imports" + +declare-option -hidden -docstring "A set of mappings for Flex filetype" \ +str fzf_tag_flex " +: functions +: classes +: methods +: properties +: global variables +: mxtags" + +declare-option -hidden -docstring "A set of mappings for Fortran filetype" \ +str fzf_tag_fortran " +: block data +: common blocks +: entry points +: enumerations +: functions +: interface contents, generic names, and operators +: type and structure components +: labels +: modules +: type bound procedures +: namelists +: enumeration values +: programs +: subroutines +: derived types and structures +: program (global) and module variables +: submodules" + +declare-option -hidden -docstring "A set of mappings for Fypp filetype" \ +str fzf_tag_fypp " +: macros" + +declare-option -hidden -docstring "A set of mappings for Gdbinit filetype" \ +str fzf_tag_gdbinit " +: definitions +: toplevel variables" + +declare-option -hidden -docstring "A set of mappings for Go filetype" \ +str fzf_tag_go " +: packages +: functions +: constants +: types +: variables +: structs +: interfaces +: struct members +: struct anonymous members +: unknown +: name for specifying imported package" + +declare-option -hidden -docstring "A set of mappings for HTML filetype" \ +str fzf_tag_html " +: named anchors +: H1 headings +: H2 headings +: H3 headings" + +declare-option -hidden -docstring "A set of mappings for Iniconf filetype" \ +str fzf_tag_iniconf " +: sections +: keys" + +declare-option -hidden -docstring "A set of mappings for ITcl filetype" \ +str fzf_tag_itcl " +: classes +: methods +: object-specific variables +: common variables +: procedures within the class namespace" + +declare-option -hidden -docstring "A set of mappings for Java filetype" \ +str fzf_tag_java " +: annotation declarations +: classes +: enum constants +: fields +: enum types +: interfaces +: methods +: packages" + +declare-option -hidden -docstring "A set of mappings for JavaProperties filetype" \ +str fzf_tag_javaproperties " +: keys" + +declare-option -hidden -docstring "A set of mappings for JavaScript filetype" \ +str fzf_tag_javascript " +: functions +: classes +: methods +: properties +: constants +: global variables +: generators" + +declare-option -hidden -docstring "A set of mappings for JSON filetype" \ +str fzf_tag_json " +: objects +: arrays +: numbers +: strings +: booleans +: nulls" + +declare-option -hidden -docstring "A set of mappings for LdScript filetype" \ +str fzf_tag_ldscript " +: sections +: symbols +: versions +: input sections" + +declare-option -hidden -docstring "A set of mappings for Lisp filetype" \ +str fzf_tag_lisp " +: functions" + +declare-option -hidden -docstring "A set of mappings for Lua filetype" \ +str fzf_tag_lua " +: functions" + +declare-option -hidden -docstring "A set of mappings for M4 filetype" \ +str fzf_tag_m4 " +: macros +: macro files" + +declare-option -hidden -docstring "A set of mappings for Man filetype" \ +str fzf_tag_man " +: titles +: sections" + +declare-option -hidden -docstring "A set of mappings for Make filetype" \ +str fzf_tag_make " +: macros +: targets +: makefiles" + +declare-option -hidden -docstring "A set of mappings for Markdown filetype" \ +str fzf_tag_markdown " +: chapsters +: sections +: subsections +: subsubsections +: level 4 subsections +: level 5 subsections +: regex" + +declare-option -hidden -docstring "A set of mappings for MatLab filetype" \ +str fzf_tag_matlab " +: function +: variable +: class" + +declare-option -hidden -docstring "A set of mappings for Myrddin filetype" \ +str fzf_tag_myrddin " +: functions +: constants +: variables +: types +: traits +: packages" + +declare-option -hidden -docstring "A set of mappings for ObjectiveC filetype" \ +str fzf_tag_objectivec " +: class interface +: class implementation +: Protocol +: Object's method +: Class' method +: Global variable +: Object field +: A function +: A property +: A type alias +: A type structure +: An enumeration +: A preprocessor macro" + +declare-option -hidden -docstring "A set of mappings for OCaml filetype" \ +str fzf_tag_ocaml " +: classes +: Object's method +: Module or functor +: Global variable +: Signature item +: Type name +: A function +: A constructor +: A 'structure' field +: An exception" + +declare-option -hidden -docstring "A set of mappings for Passwd filetype" \ +str fzf_tag_passwd " +: user names" + +declare-option -hidden -docstring "A set of mappings for Pascal filetype" \ +str fzf_tag_pascal " +: functions +: procedures" + +declare-option -hidden -docstring "A set of mappings for Perl filetype" \ +str fzf_tag_perl " +: constants +: formats +: labels +: packages +: subroutines" + +declare-option -hidden -docstring "A set of mappings for Perl6 filetype" \ +str fzf_tag_perl6 " +: classes +: grammars +: methods +: modules +: packages +: roles +: rules +: submethods +: subroutines +: tokens" + +declare-option -hidden -docstring "A set of mappings for PHP filetype" \ +str fzf_tag_php " +: classes +: constant definitions +: functions +: interfaces +: namespaces +: traits +: variables +: aliases" + +declare-option -hidden -docstring "A set of mappings for Pod filetype" \ +str fzf_tag_pod " +: chapters +: sections +: subsections +: subsubsections" + +declare-option -hidden -docstring "A set of mappings for Protobuf filetype" \ +str fzf_tag_protobuf " +: packages +: messages +: fields +: enum constants +: enum types +: services" + +declare-option -hidden -docstring "A set of mappings for PuppetManifest filetype" \ +str fzf_tag_puppetmanifest " +: classes +: definitions +: nodes +: resources +: variables" + +declare-option -hidden -docstring "A set of mappings for Python filetype" \ +str fzf_tag_python " +: classes +: functions +: class members +: variables +: name referring a module defined in other file +: modules +: name referring a class/variable/function/module defined in other module" + +declare-option -hidden -docstring "A set of mappings for PythonLoggingConfig filetype" \ +str fzf_tag_pythonloggingconfig " +: logger sections +: logger qualnames" + +declare-option -hidden -docstring "A set of mappings for QemuHX filetype" \ +str fzf_tag_qemuhx " +: QEMU Management Protocol dispatch table entries +: item in texinfo doc" + +declare-option -hidden -docstring "A set of mappings for QtMoc filetype" \ +str fzf_tag_qtmoc " +: slots +: signals +: properties" + +declare-option -hidden -docstring "A set of mappings for R filetype" \ +str fzf_tag_r " +: functions +: libraries +: sources +: global variables +: function variables" + +declare-option -hidden -docstring "A set of mappings for RSpec filetype" \ +str fzf_tag_rspec " +: describes +: contexts" + +declare-option -hidden -docstring "A set of mappings for REXX filetype" \ +str fzf_tag_rexx " +: subroutines" + +declare-option -hidden -docstring "A set of mappings for Robot filetype" \ +str fzf_tag_robot " +: testcases +: keywords +: variables" + +declare-option -hidden -docstring "A set of mappings for RpmSpec filetype" \ +str fzf_tag_rpmspec " +: tags +: macros +: packages +: global macros" + +declare-option -hidden -docstring "A set of mappings for ReStructuredText filetype" \ +str fzf_tag_restructuredtext " +: chapters +: sections +: subsections +: subsubsections +: targets" + +declare-option -hidden -docstring "A set of mappings for Ruby filetype" \ +str fzf_tag_ruby " +: classes +: methods +: modules +: singleton methods" + +declare-option -hidden -docstring "A set of mappings for Rust filetype" \ +str fzf_tag_rust " +: module +: structural type +: trait interface +: implementation +: Function +: Enum +: Type Alias +: Global variable +: Macro Definition +: A struct field +: An enum variant +: A method" + +declare-option -hidden -docstring "A set of mappings for Scheme filetype" \ +str fzf_tag_scheme " +: functions +: sets" + +declare-option -hidden -docstring "A set of mappings for Sh filetype" \ +str fzf_tag_sh " +: aliases +: functions +: script files +: label for here document" + +declare-option -hidden -docstring "A set of mappings for SLang filetype" \ +str fzf_tag_slang " +: functions +: namespaces" + +declare-option -hidden -docstring "A set of mappings for SML filetype" \ +str fzf_tag_sml " +: exception declarations +: function definitions +: functor definitions +: signature declarations +: structure declarations +: type definitions +: value bindings" + +declare-option -hidden -docstring "A set of mappings for SQL filetype" \ +str fzf_tag_sql " +: cursors +: functions +: record fields +: block label +: packages +: procedures +: subtypes +: tables +: triggers +: variables +: indexes +: events +: publications +: services +: domains +: views +: synonyms +: MobiLink Table Scripts +: MobiLink Conn Scripts +: MobiLink Properties " + +declare-option -hidden -docstring "A set of mappings for SystemdUnit filetype" \ +str fzf_tag_systemdunit " +: units" + +declare-option -hidden -docstring "A set of mappings for Tcl filetype" \ +str fzf_tag_tcl " +: procedures +: namespaces" + +declare-option -hidden -docstring "A set of mappings for TclOO filetype" \ +str fzf_tag_tcloo " +: classes +: methods" + +declare-option -hidden -docstring "A set of mappings for Tex filetype" \ +str fzf_tag_tex " +: parts +: chapters +: sections +: subsections +: subsubsections +: paragraphs +: subparagraphs +: labels +: includes" + +declare-option -hidden -docstring "A set of mappings for TTCN filetype" \ +str fzf_tag_ttcn " +: module definition +: type definition +: constant definition +: template definition +: function definition +: signature definition +: testcase definition +: altstep definition +: group definition +: module parameter definition +: variable instance +: timer instance +: port instance +: record/set/union member +: enumeration value" + +declare-option -hidden -docstring "A set of mappings for Vera filetype" \ +str fzf_tag_vera " +: classes +: macro definitions +: enumerators (values inside an enumeration) +: function definitions +: enumeration names +: interfaces +: class, struct, and union members +: programs +: signals +: tasks +: typedefs +: variable definitions +: included header files" + +declare-option -hidden -docstring "A set of mappings for Verilog filetype" \ +str fzf_tag_verilog " +: constants (define, parameter, specparam) +: events +: functions +: modules +: net data types +: ports +: register data types +: tasks +: blocks" + +declare-option -hidden -docstring "A set of mappings for SystemVerilog filetype" \ +str fzf_tag_systemverilog " +: constants (define, parameter, specparam, enum values) +: events +: functions +: modules +: net data types +: ports +: register data types +: tasks +: blocks +: assertions +: classes +: covergroups +: enumerators +: interfaces +: modports +: packages +: programs +: properties +: structs and unions +: type declarations" + +declare-option -hidden -docstring "A set of mappings for VHDL filetype" \ +str fzf_tag_vhdl " +: constant declarations +: type definitions +: subtype definitions +: record names +: entity declarations +: function prototypes and declarations +: procedure prototypes and declarations +: package definitions" + +declare-option -hidden -docstring "A set of mappings for Vim filetype" \ +str fzf_tag_vim " +: autocommand groups +: user-defined commands +: function definitions +: maps +: variable definitions +: vimball filename" + +declare-option -hidden -docstring "A set of mappings for WindRes filetype" \ +str fzf_tag_windres " +: dialogs +: menus +: icons +: bitmaps +: cursors +: fonts +: versions +: accelerators" + +declare-option -hidden -docstring "A set of mappings for YACC filetype" \ +str fzf_tag_yacc " +: labels" + +declare-option -hidden -docstring "A set of mappings for YumRepo filetype" \ +str fzf_tag_yumrepo " +: repository id" + +declare-option -hidden -docstring "A set of mappings for Zephir filetype" \ +str fzf_tag_zephir " +: classes +: constant definitions +: functions +: interfaces +: namespaces +: traits +: variables +: aliases" + +declare-option -hidden -docstring "A set of mappings for DBusIntrospect filetype" \ +str fzf_tag_dbusintrospect " +: interfaces +: methods +: signals +: properties" + +declare-option -hidden -docstring "A set of mappings for Glade filetype" \ +str fzf_tag_glade " +: identifiers +: classes +: handlers" + +declare-option -hidden -docstring "A set of mappings for Maven2 filetype" \ +str fzf_tag_maven2 " +: group identifiers +: artifact identifiers +: properties +: repository identifiers" + +declare-option -hidden -docstring "A set of mappings for PlistXML filetype" \ +str fzf_tag_plistxml " +: keys" + +declare-option -hidden -docstring "A set of mappings for RelaxNG filetype" \ +str fzf_tag_relaxng " +: elements +: attributes +: named patterns" + +declare-option -hidden -docstring "A set of mappings for SVG filetype" \ +str fzf_tag_svg " +: id attributes" + +declare-option -hidden -docstring "A set of mappings for XSLT filetype" \ +str fzf_tag_xslt " +: stylesheets +: parameters +: matched template +: matched template +: variables" + +declare-option -hidden -docstring "A set of mappings for Yaml filetype" \ +str fzf_tag_yaml " +: anchors" + +declare-option -hidden -docstring "A set of mappings for AnsiblePlaybook filetype" \ +str fzf_tag_ansibleplaybook " +: plays" + +define-command -hidden fzf-tag -params ..1 %{ evaluate-commands %sh{ + case $kak_opt_filetype in + ada) + additional_keybindings="--expect ctrl-alt-p --expect alt-p --expect ctrl-alt-t --expect alt-t --expect ctrl-alt-u --expect alt-u --expect alt-c --expect alt-l --expect ctrl-alt-v --expect alt-v --expect alt-f --expect alt-n --expect alt-x --expect ctrl-alt-r --expect alt-r --expect ctrl-alt-k --expect alt-k --expect ctrl-alt-o --expect alt-o --expect ctrl-alt-e --expect alt-e --expect alt-b --expect alt-i --expect alt-a --expect alt-y --expect ctrl-alt-s" + additional_message=$kak_opt_fzf_tag_ada ;; + ant) + additional_keybindings="--expect alt-p --expect alt-t --expect ctrl-alt-p --expect alt-i" + additional_message=$kak_opt_fzf_tag_ant ;; + asciidoc) + additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t --expect alt-u --expect alt-a" + additional_message=$kak_opt_fzf_tag_asciidoc ;; + asm) + additional_keybindings="--expect alt-d --expect alt-l --expect alt-m --expect alt-t --expect alt-s" + additional_message=$kak_opt_fzf_tag_asm ;; + asp) + additional_keybindings="--expect alt-d --expect alt-c --expect alt-f --expect alt-s --expect alt-v" + additional_message=$kak_opt_fzf_tag_asp ;; + autoconf) + additional_keybindings="--expect alt-p --expect alt-t --expect alt-m --expect alt-w --expect alt-e --expect alt-s --expect alt-c --expect alt-d" + additional_message=$kak_opt_fzf_tag_autoconf ;; + autoit) + additional_keybindings="--expect alt-f --expect alt-r --expect alt-g --expect alt-l --expect ctrl-alt-s" + additional_message=$kak_opt_fzf_tag_autoit ;; + automake) + additional_keybindings="--expect alt-d --expect ctrl-alt-p --expect ctrl-alt-m --expect ctrl-alt-t --expect ctrl-alt-l --expect ctrl-alt-s --expect ctrl-alt-d --expect alt-c" + additional_message=$kak_opt_fzf_tag_automake ;; + awk) + additional_keybindings="--expect alt-f" + additional_message=$kak_opt_fzf_tag_awk ;; + basic) + additional_keybindings="--expect alt-c --expect alt-f --expect alt-l --expect alt-t --expect alt-v --expect alt-g" + additional_message=$kak_opt_fzf_tag_basic ;; + beta) + additional_keybindings="--expect alt-f --expect alt-p --expect alt-s --expect alt-v" + additional_message=$kak_opt_fzf_tag_beta ;; + clojure) + additional_keybindings="--expect alt-f --expect alt-n" + additional_message=$kak_opt_fzf_tag_clojure ;; + cmake) + additional_keybindings="--expect alt-f --expect alt-m --expect alt-t --expect alt-v --expect ctrl-alt-d --expect alt-p --expect alt-r" + additional_message=$kak_opt_fzf_tag_cmake ;; + c) + additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l" + additional_message=$kak_opt_fzf_tag_c ;; + cpp) + additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l --expect alt-c --expect alt-n --expect ctrl-alt-a --expect ctrl-alt-n --expect ctrl-alt-u" + additional_message=$kak_opt_fzf_tag_cpp ;; + cpreprocessor) + additional_keybindings="--expect alt-d --expect alt-h" + additional_message=$kak_opt_fzf_tag_cpreprocessor ;; + css) + additional_keybindings="--expect alt-c --expect alt-s --expect alt-i" + additional_message=$kak_opt_fzf_tag_css ;; + csharp) + additional_keybindings="--expect alt-c --expect alt-d --expect alt-e --expect ctrl-alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-n --expect alt-p --expect alt-s --expect alt-t" + additional_message=$kak_opt_fzf_tag_csharp ;; + ctags) + additional_keybindings="--expect alt-l --expect alt-k" + additional_message=$kak_opt_fzf_tag_ctags ;; + cobol) + additional_keybindings="--expect alt-p --expect alt-d --expect ctrl-alt-s --expect ctrl-alt-F --expect alt-g --expect ctrl-alt-p --expect alt-s --expect ctrl-alt-d" + additional_message=$kak_opt_fzf_tag_cobol ;; + cuda) + additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l" + additional_message=$kak_opt_fzf_tag_cuda ;; + d) + additional_keybindings="--expect alt-a --expect alt-c --expect alt-g --expect alt-e --expect alt-x --expect alt-f --expect alt-i --expect alt-l --expect alt-m --expect ctrl-alt-x --expect ctrl-alt-m --expect alt-n --expect alt-p --expect alt-s --expect ctrl-alt-t --expect alt-u --expect alt-v --expect ctrl-alt-v" + additional_message=$kak_opt_fzf_tag_d ;; + diff) + additional_keybindings="--expect alt-m --expect alt-n --expect alt-d --expect alt-h" + additional_message=$kak_opt_fzf_tag_diff ;; + dtd) + additional_keybindings="--expect ctrl-alt-e --expect alt-p --expect alt-e --expect alt-a --expect alt-n" + additional_message=$kak_opt_fzf_tag_dtd ;; + dts) + additional_keybindings="--expect alt-p --expect alt-l --expect alt-r" + additional_message=$kak_opt_fzf_tag_dts ;; + dosbatch) + additional_keybindings="--expect alt-l --expect alt-v" + additional_message=$kak_opt_fzf_tag_dosbatch ;; + eiffel) + additional_keybindings="--expect alt-c --expect alt-f --expect alt-l" + additional_message=$kak_opt_fzf_tag_eiffel ;; + elm) + additional_keybindings="--expect ctrl-alt-M --expect ctrl-alt-N --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-C --expect ctrl-alt-A --expect ctrl-alt-F" + additional_message=$kak_opt_fzf_tag_elm ;; + erlang) + additional_keybindings="--expect alt-d --expect alt-f --expect alt-m --expect alt-r --expect alt-t" + additional_message=$kak_opt_fzf_tag_erlang ;; + falcon) + additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect alt-i" + additional_message=$kak_opt_fzf_tag_falcon ;; + flex) + additional_keybindings="--expect alt-f --expect alt-c --expect alt-m --expect alt-p --expect alt-v --expect alt-x" + additional_message=$kak_opt_fzf_tag_flex ;; + fortran) + additional_keybindings="--expect alt-b --expect alt-c --expect alt-e --expect ctrl-alt-e --expect alt-f --expect alt-i --expect alt-k --expect alt-l --expect ctrl-alt-l --expect alt-m --expect ctrl-alt-m --expect alt-n --expect ctrl-alt-n --expect alt-p --expect ctrl-alt-p --expect alt-s --expect alt-t --expect alt-v --expect ctrl-alt-s" + additional_message=$kak_opt_fzf_tag_fortran ;; + fypp) + additional_keybindings="--expect alt-m" + additional_message=$kak_opt_fzf_tag_fypp ;; + gdbinit) + additional_keybindings="--expect alt-d --expect ctrl-alt-d --expect alt-t --expect alt-l" + additional_message=$kak_opt_fzf_tag_gdbinit ;; + go) + additional_keybindings="--expect alt-p --expect alt-f --expect alt-c --expect alt-t --expect alt-v --expect alt-s --expect alt-i --expect alt-m --expect ctrl-alt-m --expect alt-u --expect ctrl-alt-p" + additional_message=$kak_opt_fzf_tag_go ;; + html) + additional_keybindings="--expect alt-a --expect ctrl-alt-H --expect ctrl-alt-I --expect ctrl-alt-J" + additional_message=$kak_opt_fzf_tag_html ;; + iniconf) + additional_keybindings="--expect alt-s --expect alt-k" + additional_message=$kak_opt_fzf_tag_iniconf ;; + itcl) + additional_keybindings="--expect alt-c --expect alt-m --expect alt-v --expect ctrl-alt-c --expect alt-p" + additional_message=$kak_opt_fzf_tag_itcl ;; + java) + additional_keybindings="--expect alt-a --expect alt-c --expect alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-p" + additional_message=$kak_opt_fzf_tag_java ;; + javaproperties) + additional_keybindings="--expect alt-k" + additional_message=$kak_opt_fzf_tag_javaproperties ;; + javascript) + additional_keybindings="--expect alt-f --expect alt-c --expect alt-m --expect alt-p --expect ctrl-alt-c --expect alt-v --expect alt-g" + additional_message=$kak_opt_fzf_tag_javascript ;; + json) + additional_keybindings="--expect alt-o --expect alt-a --expect alt-n --expect alt-s --expect alt-b --expect alt-z" + additional_message=$kak_opt_fzf_tag_json ;; + ldscript) + additional_keybindings="--expect ctrl-alt-s --expect alt-s --expect alt-v --expect alt-i" + additional_message=$kak_opt_fzf_tag_ldscript ;; + lisp) + additional_keybindings="--expect alt-f" + additional_message=$kak_opt_fzf_tag_lisp ;; + lua) + additional_keybindings="--expect alt-f" + additional_message=$kak_opt_fzf_tag_lua ;; + m4) + additional_keybindings="--expect alt-d --expect ctrl-alt-i" + additional_message=$kak_opt_fzf_tag_m4 ;; + man) + additional_keybindings="--expect alt-t --expect alt-s" + additional_message=$kak_opt_fzf_tag_man ;; + make) + additional_keybindings="--expect alt-m --expect alt-t --expect ctrl-alt-i" + additional_message=$kak_opt_fzf_tag_make ;; + markdown) + additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t --expect alt-u --expect alt-r" + additional_message=$kak_opt_fzf_tag_markdown ;; + matlab) + additional_keybindings="--expect alt-f --expect alt-v --expect alt-c" + additional_message=$kak_opt_fzf_tag_matlab ;; + myrddin) + additional_keybindings="--expect alt-f --expect alt-c --expect alt-v --expect alt-t --expect alt-r --expect alt-p" + additional_message=$kak_opt_fzf_tag_myrddin ;; + objectivec) + additional_keybindings="--expect alt-i --expect ctrl-alt-i --expect ctrl-alt-p --expect ctrl-alt-M --expect ctrl-alt-C --expect ctrl-alt-V --expect ctrl-alt-e --expect ctrl-alt-F --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-S --expect ctrl-alt-E --expect ctrl-alt-m" + additional_message=$kak_opt_fzf_tag_objectivec ;; + ocaml) + additional_keybindings="--expect alt-c --expect ctrl-alt-M --expect ctrl-alt-m --expect ctrl-alt-V --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-F --expect ctrl-alt-c --expect ctrl-alt-R --expect ctrl-alt-E" + additional_message=$kak_opt_fzf_tag_ocaml ;; + passwd) + additional_keybindings="--expect alt-u" + additional_message=$kak_opt_fzf_tag_passwd ;; + pascal) + additional_keybindings="--expect alt-f --expect alt-p" + additional_message=$kak_opt_fzf_tag_pascal ;; + perl) + additional_keybindings="--expect alt-c --expect alt-f --expect alt-l --expect alt-p --expect alt-s --expect alt-d" + additional_message=$kak_opt_fzf_tag_perl ;; + perl6) + additional_keybindings="--expect alt-c --expect alt-g --expect alt-m --expect alt-o --expect alt-p --expect alt-r --expect alt-u --expect alt-b --expect alt-s --expect alt-t" + additional_message=$kak_opt_fzf_tag_perl6 ;; + php) + additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect alt-i --expect alt-l --expect alt-n --expect alt-t --expect alt-v --expect alt-a" + additional_message=$kak_opt_fzf_tag_php ;; + pod) + additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t" + additional_message=$kak_opt_fzf_tag_pod ;; + protobuf) + additional_keybindings="--expect alt-p --expect alt-m --expect alt-f --expect alt-e --expect alt-g --expect alt-s --expect ctrl-alt-R" + additional_message=$kak_opt_fzf_tag_protobuf ;; + puppetmanifest) + additional_keybindings="--expect alt-c --expect alt-d --expect alt-n --expect alt-r --expect alt-v" + additional_message=$kak_opt_fzf_tag_puppetmanifest ;; + python) + additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect ctrl-alt-i --expect alt-i --expect alt-x --expect alt-z --expect alt-l" + additional_message=$kak_opt_fzf_tag_python ;; + pythonloggingconfig) + additional_keybindings="--expect ctrl-alt-l --expect alt-q" + additional_message=$kak_opt_fzf_tag_pythonloggingconfig ;; + qemuhx) + additional_keybindings="--expect ctrl-alt-Q --expect alt-i" + additional_message=$kak_opt_fzf_tag_qemuhx ;; + qtmoc) + additional_keybindings="--expect alt-s --expect ctrl-alt-s --expect alt-p" + additional_message=$kak_opt_fzf_tag_qtmoc ;; + r) + additional_keybindings="--expect alt-f --expect alt-l --expect alt-s --expect alt-g --expect alt-v" + additional_message=$kak_opt_fzf_tag_r ;; + rspec) + additional_keybindings="--expect alt-d --expect alt-c" + additional_message=$kak_opt_fzf_tag_rspec ;; + rexx) + additional_keybindings="--expect alt-s" + additional_message=$kak_opt_fzf_tag_rexx ;; + robot) + additional_keybindings="--expect alt-t --expect alt-k --expect alt-v" + additional_message=$kak_opt_fzf_tag_robot ;; + rpmspec) + additional_keybindings="--expect alt-t --expect alt-m --expect alt-p --expect alt-g" + additional_message=$kak_opt_fzf_tag_rpmspec ;; + restructuredtext) + additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t" + additional_message=$kak_opt_fzf_tag_restructuredtext ;; + ruby) + additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect ctrl-alt-s" + additional_message=$kak_opt_fzf_tag_ruby ;; + rust) + additional_keybindings="--expect alt-n --expect alt-s --expect alt-i --expect alt-c --expect ctrl-alt-F --expect ctrl-alt-G --expect ctrl-alt-T --expect ctrl-alt-V --expect ctrl-alt-m --expect ctrl-alt-M --expect ctrl-alt-E --expect ctrl-alt-p" + additional_message=$kak_opt_fzf_tag_rust ;; + scheme) + additional_keybindings="--expect alt-f --expect alt-s" + additional_message=$kak_opt_fzf_tag_scheme ;; + sh) + additional_keybindings="--expect alt-a --expect alt-f --expect alt-s --expect alt-h" + additional_message=$kak_opt_fzf_tag_sh ;; + slang) + additional_keybindings="--expect alt-f --expect alt-n" + additional_message=$kak_opt_fzf_tag_slang ;; + sml) + additional_keybindings="--expect alt-e --expect alt-f --expect alt-c --expect alt-s --expect alt-r --expect alt-t --expect alt-v" + additional_message=$kak_opt_fzf_tag_sml ;; + sql) + additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect ctrl-alt-e --expect alt-l --expect ctrl-alt-l --expect ctrl-alt-p --expect alt-p --expect alt-r --expect alt-s --expect alt-t --expect ctrl-alt-t --expect alt-v --expect alt-i --expect alt-e --expect ctrl-alt-u --expect ctrl-alt-r --expect ctrl-alt-d --expect ctrl-alt-v --expect alt-n --expect ctrl-alt-X --expect ctrl-alt-Y --expect ctrl-alt-Z" + additional_message=$kak_opt_fzf_tag_sql ;; + systemdunit) + additional_keybindings="--expect alt-u" + additional_message=$kak_opt_fzf_tag_systemdunit ;; + tcl) + additional_keybindings="--expect alt-p --expect alt-n" + additional_message=$kak_opt_fzf_tag_tcl ;; + tcloo) + additional_keybindings="--expect alt-c --expect alt-m" + additional_message=$kak_opt_fzf_tag_tcloo ;; + tex) + additional_keybindings="--expect alt-p --expect alt-c --expect alt-s --expect alt-u --expect alt-b --expect ctrl-alt-p --expect ctrl-alt-g --expect alt-l --expect alt-i" + additional_message=$kak_opt_fzf_tag_tex ;; + ttcn) + additional_keybindings="--expect ctrl-alt-m --expect alt-t --expect alt-c --expect alt-d --expect alt-f --expect alt-s --expect ctrl-alt-c --expect alt-a --expect ctrl-alt-g --expect ctrl-alt-p --expect alt-v --expect ctrl-alt-t --expect alt-p --expect alt-m --expect alt-e" + additional_message=$kak_opt_fzf_tag_ttcn ;; + vera) + additional_keybindings="--expect alt-c --expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-p --expect ctrl-alt-p --expect alt-s --expect alt-t --expect ctrl-alt-t --expect alt-v --expect alt-x --expect alt-h" + additional_message=$kak_opt_fzf_tag_vera ;; + verilog) + additional_keybindings="--expect alt-c --expect alt-e --expect alt-f --expect alt-m --expect alt-n --expect alt-p --expect alt-r --expect alt-t --expect alt-b" + additional_message=$kak_opt_fzf_tag_verilog ;; + systemverilog) + additional_keybindings="--expect alt-c --expect alt-e --expect alt-f --expect alt-m --expect alt-n --expect alt-p --expect alt-r --expect alt-t --expect alt-b --expect ctrl-alt-a --expect ctrl-alt-c --expect ctrl-alt-v --expect ctrl-alt-e --expect ctrl-alt-i --expect ctrl-alt-m --expect ctrl-alt-k --expect ctrl-alt-p --expect ctrl-alt-q --expect ctrl-alt-r --expect ctrl-alt-s --expect ctrl-alt-t" + additional_message=$kak_opt_fzf_tag_systemverilog ;; + vhdl) + additional_keybindings="--expect alt-c --expect alt-t --expect ctrl-alt-t --expect alt-r --expect alt-e --expect ctrl-alt-c --expect alt-d --expect alt-f --expect alt-p --expect ctrl-alt-p --expect alt-l" + additional_message=$kak_opt_fzf_tag_vhdl ;; + vim) + additional_keybindings="--expect alt-a --expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect alt-n" + additional_message=$kak_opt_fzf_tag_vim ;; + windres) + additional_keybindings="--expect alt-d --expect alt-m --expect alt-i --expect alt-b --expect alt-c --expect alt-f --expect alt-v --expect alt-a" + additional_message=$kak_opt_fzf_tag_windres ;; + yacc) + additional_keybindings="--expect alt-l" + additional_message=$kak_opt_fzf_tag_yacc ;; + yumrepo) + additional_keybindings="--expect alt-r" + additional_message=$kak_opt_fzf_tag_yumrepo ;; + zephir) + additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect alt-i --expect alt-l --expect alt-n --expect alt-t --expect alt-v --expect alt-a" + additional_message=$kak_opt_fzf_tag_zephir ;; + dbusintrospect) + additional_keybindings="--expect alt-i --expect alt-m --expect alt-s --expect alt-p" + additional_message=$kak_opt_fzf_tag_dbusintrospect ;; + glade) + additional_keybindings="--expect alt-i --expect alt-c --expect alt-h" + additional_message=$kak_opt_fzf_tag_glade ;; + maven2) + additional_keybindings="--expect alt-g --expect alt-a --expect alt-p --expect alt-r" + additional_message=$kak_opt_fzf_tag_maven2 ;; + plistxml) + additional_keybindings="--expect alt-k" + additional_message=$kak_opt_fzf_tag_plistxml ;; + relaxng) + additional_keybindings="--expect alt-e --expect alt-a --expect alt-n" + additional_message=$kak_opt_fzf_tag_relaxng ;; + svg) + additional_keybindings="--expect alt-i" + additional_message=$kak_opt_fzf_tag_svg ;; + xslt) + additional_keybindings="--expect alt-s --expect alt-p --expect alt-m --expect alt-n --expect alt-v" + additional_message=$kak_opt_fzf_tag_xslt ;; + yaml) + additional_keybindings="--expect alt-a" + additional_message=$kak_opt_fzf_tag_yaml ;; + ansibleplaybook) + additional_keybindings="--expect alt-p" + additional_message=$kak_opt_fzf_tag_ansibleplaybook ;; + *) + additional_keybindings= + additional_message= + ;; + esac + + if [ ! -z "$1" ]; then + mode=$(echo "$additional_message" | grep ":" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") + cmd="readtags -Q '(eq? \$kind $1)' -l | cut -f1" + else + cmd="readtags -l | cut -f1" + fi + + [ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings=" +: open tag in horizontal split +: open tag in vertical split" + + message="Jump to a symbol''s definition +: open tag in new buffer +: open tag in new window" + + [ ! -z "$additional_message" ] && message="$message $tmux_keybindings + +Additional filters for $kak_opt_filetype filetype: $additional_message" + + echo "info -title 'fzf tag$mode' '$message'" + + [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" + + echo "fzf %{ctags-search \$1} %{$cmd} %{--expect ctrl-w $additional_flags $additional_keybindings}" +}} diff --git a/rc/fzf-modules/fzf-file.kak b/rc/fzf-modules/fzf-file.kak new file mode 100644 index 0000000..3b36685 --- /dev/null +++ b/rc/fzf-modules/fzf-file.kak @@ -0,0 +1,61 @@ +# ╭─────────────╥────────────────────────╮ +# │ 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: + : : + 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' ': fzf-file' + +define-command -hidden fzf-file %{ evaluate-commands %sh{ + if [ -z $(command -v $kak_opt_fzf_file_command) ]; then + echo "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 ;; + *) + executable=$(echo $kak_opt_fzf_file_command | awk '{print $1'}| tr '(' ' ' | cut -d " " -f 2) + echo "echo -markup '{Information}''$executable'' is not supported by the script. fzf.kak may not work as you expect.'" + cmd=$kak_opt_fzf_file_command ;; + esac + title="fzf file" + [ ! -z "${kak_client_env_TMUX}" ] && additional_keybindings=" +: open file in horizontal split +: open file in vertical split" + message="Open single or multiple files. +: open file in new buffer. +: open file in new window $additional_keybindings" + echo "info -title '$title' '$message'" + [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" + echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" +}} + diff --git a/rc/fzf-modules/fzf-search.kak b/rc/fzf-modules/fzf-search.kak new file mode 100644 index 0000000..5a07f2f --- /dev/null +++ b/rc/fzf-modules/fzf-search.kak @@ -0,0 +1,24 @@ +# ╭─────────────╥────────────────────────╮ +# │ 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' ': fzf-buffer-search' + +define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ + title="fzf buffer search" + message="Search buffer with fzf, and jump to result location" + echo "info -title '$title' '$message'" + line=$kak_cursor_line + char=$(expr $kak_cursor_char_column - 1) + buffer_content=$(mktemp ${TMPDIR:-/tmp}/kak-curr-buff.XXXXXX) + echo "execute-keys %{%cat>$buffer_content;}" + echo "execute-keys $line g $char l" + echo "fzf %{execute-keys \$1 gx} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content)}" +}} + diff --git a/rc/fzf-modules/fzf-vcs.kak b/rc/fzf-modules/fzf-vcs.kak new file mode 100644 index 0000000..6806f9e --- /dev/null +++ b/rc/fzf-modules/fzf-vcs.kak @@ -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' ': fzf-vcs' +map global fzf -docstring "svitch to vcs selection mode" 'V' ': fzf-vcs-mode' + +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=$(echo $cmd | awk '{print $1}') + title="fzf $vcs" + [ ! -z "${kak_client_env_TMUX}" ] && additional_keybindings=" +: open file in horizontal split +: open file in vertical split" + message="Open single or multiple files from git tree. +: open file in new buffer. +: open file in new window $additional_keybindings" + echo "info -title '$title' '$message'" + echo "fzf-$vcs" + exit + fi + done + echo "echo -markup '{Information}No VCS found in current folder'" +}} + diff --git a/rc/fzf.kak b/rc/fzf.kak index 050d782..19d73a3 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -9,75 +9,8 @@ # ╰─────────────────────────────────╯ try %{ declare-user-mode fzf } catch %{echo -markup "{Error}Can't declare mode 'fzf' - already exists"} -try %{ declare-user-mode fzf-vcs } catch %{echo -markup "{Error}Can't declare mode 'fzf-vcs' - already exists"} # Options -declare-option -docstring "command to provide list of files to fzf. Arguments are supported -Supported tools: - : : - 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" - -declare-option -docstring "command to provide list of files in git tree to fzf. Arguments are supported -Supported tools: - : : - Git : ""git"" - -Default arguments: - ""git ls-tree --name-only -r HEAD"" -" \ -str fzf_git_command "git" - -declare-option -docstring "command to provide list of files in svn repository to fzf. Arguments are supported -Supported tools: - : : - Subversion: ""svn"" - -Default arguments: - ""svn list -R . | grep -v '$/' | tr '\\n' '\\0'"" -" \ -str fzf_svn_command "svn" - -declare-option -docstring "command to provide list of files in mercurial repository to fzf. Arguments are supported -Supported tools: - : : - Mercurial SCM: ""hg"" - -Default arguments: - ""hg locate -f -0 -I .hg locate -f -0 -I ."" -" \ -str fzf_hg_command "hg" - -declare-option -docstring "command to provide list of files in GNU Bazaar repository to fzf. Arguments are supported -Supported tools: - : : - GNU Bazaar: ""bzr"" - -Default arguments: - ""bzr ls -R --versioned -0"" -" \ -str fzf_bzr_command "bzr" - -declare-option -docstring "command to provide list of ctags to fzf. Arguments are supported -Supported tools: - : : - universal-ctags: ""readtags"" - -Default arguments: - ""readtags -l | cut -f1"" -" \ -str fzf_tag_command "readtags" - declare-option -docstring "allow showing preview window Default value: true @@ -120,26 +53,6 @@ declare-option -docstring "height of preview window Default value: 60%%" \ str fzf_preview_height '60%' -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" - -# default mappings -map global fzf -docstring "open buffer" 'b' ': fzf-buffer' -map global fzf -docstring "change directory" 'c' ': fzf-cd' -map global fzf -docstring "open file" 'f' ': fzf-file' -map global fzf -docstring "edit file from vcs repo" 'v' ': fzf-vcs' -map global fzf -docstring "svitch to vcs selection mode" 'V' ': fzf-vcs-mode' -map global fzf -docstring "search in buffer" 's' ': fzf-buffer-search' -map global fzf -docstring "find tag" 't' ': fzf-tag' - -map global fzf-vcs -docstring "edit file from Git tree" 'g' ': fzf-git' -map global fzf-vcs -docstring "edit file from Subversion tree" 's' ': fzf-svn' -map global fzf-vcs -docstring "edit file from mercurial tree" 'h' ': fzf-hg' -map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' ': fzf-bzr' - # Commands define-command -docstring "Enter fzf-mode. fzf-mode contains mnemonic key bindings for every fzf.kak command @@ -149,152 +62,6 @@ Best used with mapping like: " \ fzf-mode %{ try %{ evaluate-commands 'enter-user-mode fzf' } } -define-command -docstring "Enter fzf-mode. -fzf-mode contains mnemonic key bindings for every fzf.kak command - -Best used with mapping like: - map global normal '' ': fzf-mode' -" \ -fzf-vcs-mode %{ try %{ evaluate-commands 'enter-user-mode fzf-vcs' } } - -define-command -hidden fzf-file %{ evaluate-commands %sh{ - if [ -z $(command -v $kak_opt_fzf_file_command) ]; then - echo "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 ;; - *) - executable=$(echo $kak_opt_fzf_file_command | awk '{print $1'}| tr '(' ' ' | cut -d " " -f 2) - echo "echo -markup '{Information}''$executable'' is not supported by the script. fzf.kak may not work as you expect.'" - cmd=$kak_opt_fzf_file_command ;; - esac - title="fzf file" - [ ! -z "${kak_client_env_TMUX}" ] && additional_keybindings=" -: open file in horizontal split -: open file in vertical split" - message="Open single or multiple files. -: open file in new buffer. -: open file in new window $additional_keybindings" - echo "info -title '$title' '$message'" - [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" -}} - -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=$(echo $cmd | awk '{print $1}') - title="fzf $vcs" - [ ! -z "${kak_client_env_TMUX}" ] && additional_keybindings=" -: open file in horizontal split -: open file in vertical split" - message="Open single or multiple files from git tree. -: open file in new buffer. -: open file in new window $additional_keybindings" - echo "info -title '$title' '$message'" - echo "fzf-$vcs" - exit - fi - done - echo "echo -markup '{Information}No VCS found in current folder'" -}} - -define-command -hidden fzf-git %{ evaluate-commands %sh{ - case $kak_opt_fzf_git_command in - git) - cmd="git ls-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" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" -}} - -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" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" -}} - -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" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" -}} - -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" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" -}} - -define-command -hidden fzf-cd %{ evaluate-commands %sh{ - title="fzf change directory" - message="Change the server''s working directory" - echo "info -title '$title' '$message'" - case $kak_opt_fzf_cd_command in - find) - cmd="(echo .. && find \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type d -print)" ;; - *) - cmd=$kak_opt_fzf_cd_command ;; - esac - echo "fzf %{change-directory \$1} %{$cmd}" -}} - -define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ - title="fzf buffer search" - message="Search buffer with fzf, and jump to result location" - echo "info -title '$title' '$message'" - line=$kak_cursor_line - char=$(expr $kak_cursor_char_column - 1) - buffer_content=$(mktemp ${TMPDIR:-/tmp}/kak-curr-buff.XXXXXX) - echo "execute-keys %{%cat>$buffer_content;}" - echo "execute-keys $line g $char l" - echo "fzf %{execute-keys \$1 gx} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content)}" -}} - define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ callback=$1 items_command=$2 @@ -388,1253 +155,3 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ ) > /dev/null 2>&1 < /dev/null & }} -define-command -hidden fzf-buffer %{ evaluate-commands %sh{ - tmp=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-fzf.XXXXXX)) - setbuf=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-setbuf.XXXXXX)) - delbuf=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-delbuf.XXXXXX)) - buffers=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-buffers.XXXXXX)) - IFS="'" - for buffer in $kak_buflist; do - [ ! -z $buffer ] && [ $buffer != ' ' ] && echo $buffer >> $buffers - done - if [ ! -z "${kak_client_env_TMUX}" ]; then - cmd="cat $buffers | fzf-tmux -d $kak_opt_fzf_tmux_height --expect ctrl-d > $tmp" - elif [ ! -z "${kak_opt_termcmd}" ]; then - cmd="$kak_opt_termcmd \"sh -c 'cat $buffers | fzf --expect ctrl-d > $tmp'\"" - else - echo "fail termcmd option is not set" - fi - - echo "info -title 'fzf buffer' 'Set buffer to edit in current client -: delete selected buffer'" - - echo "echo evaluate-commands -client $kak_client \"buffer \'\$1'\" | kak -p $kak_session" > $setbuf - echo "echo evaluate-commands -client $kak_client \"delete-buffer \'\$1'\" | kak -p $kak_session" > $delbuf - echo "echo evaluate-commands -client $kak_client \"fzf-buffer \" | kak -p $kak_session" >> $delbuf - chmod 755 $setbuf - chmod 755 $delbuf - ( - eval "$cmd" - if [ -s $tmp ]; then - ( - read action - read buf - if [ "$action" = "ctrl-d" ]; then - $setbuf $kak_bufname - $delbuf $buf - else - $setbuf $buf - fi - ) < $tmp - else - $setbuf $kak_bufname - fi - rm $tmp - rm $setbuf - rm $delbuf - rm $buffers - ) > /dev/null 2>&1 < /dev/null & -}} - -declare-option -hidden -docstring "A set of mappings for Ada filetype" \ -str fzf_tag_ada " -: package specifications -: packages -: types -: subtypes -: record type components -: enum type literals -: variables -: generic formal parameters -: constants -: user defined exceptions -: subprogram specifications -: subprograms -: task specifications -: tasks -: protected data specifications -: protected data -: task/protected data entries -: labels -: loop/declare identifiers -: (ctags internal use)" - -declare-option -hidden -docstring "A set of mappings for Ant filetype" \ -str fzf_tag_ant " -: projects -: targets -: properties(global) -: antfiles" - -declare-option -hidden -docstring "A set of mappings for Asciidoc filetype" \ -str fzf_tag_asciidoc " -: chapters -: sections -: level 2 sections -: level 3 sections -: level 4 sections -: level 5 sections -: anchors" - -declare-option -hidden -docstring "A set of mappings for Asm filetype" \ -str fzf_tag_asm " -: defines -: labels -: macros -: types (structs and records) -: sections" - -declare-option -hidden -docstring "A set of mappings for Asp filetype" \ -str fzf_tag_asp " -: constants -: classes -: functions -: subroutines -: variables" - -declare-option -hidden -docstring "A set of mappings for Autoconf filetype" \ -str fzf_tag_autoconf " -: packages -: templates -: autoconf macros -: options specified with --with-... -: options specified with --enable-... -: substitution keys -: automake conditions -: definitions" - -declare-option -hidden -docstring "A set of mappings for AutoIt filetype" \ -str fzf_tag_autoit " -: functions -: regions -: global variables -: local variables -: included scripts" - -declare-option -hidden -docstring "A set of mappings for Automake filetype" \ -str fzf_tag_automake " -: directories -: programs -: manuals -: ltlibraries -: libraries -: scripts -: datum -: conditions" - -declare-option -hidden -docstring "A set of mappings for Awk filetype" \ -str fzf_tag_awk " -: functions" - -declare-option -hidden -docstring "A set of mappings for Basic filetype" \ -str fzf_tag_basic " -: constants -: functions -: labels -: types -: variables -: enumerations" - -declare-option -hidden -docstring "A set of mappings for BETA filetype" \ -str fzf_tag_beta " -: fragment definitions -: slots (fragment uses) -: patterns (virtual or rebound)" - -declare-option -hidden -docstring "A set of mappings for Clojure filetype" \ -str fzf_tag_clojure " -: functions -: namespaces" - -declare-option -hidden -docstring "A set of mappings for CMake filetype" \ -str fzf_tag_cmake " -: functions -: macros -: targets -: variable definitions -: options specified with -D -: projects -: regex" - -declare-option -hidden -docstring "A set of mappings for C filetype" \ -str fzf_tag_c " -: macro definitions -: enumerators (values inside an enumeration) -: function definitions -: enumeration names -: included header files -: struct, and union members -: structure names -: typedefs -: union names -: variable definitions" - -declare-option -hidden -docstring "A set of mappings for C++ filetype" \ -str fzf_tag_cpp " -: macro definitions -: enumerators (values inside an enumeration) -: function definitions -: enumeration names -: included header files -: class, struct, and union members -: structure names -: typedefs -: union names -: variable definitions -: classes -: namespaces" - -declare-option -hidden -docstring "A set of mappings for CPreProcessor filetype" \ -str fzf_tag_cpreprocessor " -: macro definitions -: included header files" - -declare-option -hidden -docstring "A set of mappings for CSS filetype" \ -str fzf_tag_css " -: classes -: selectors -: identities" - -declare-option -hidden -docstring "A set of mappings for C# filetype" \ -str fzf_tag_csharp " -: classes -: macro definitions -: enumerators (values inside an enumeration) -: events -: fields -: enumeration names -: interfaces -: methods -: namespaces -: properties -: structure names -: typedefs" - -declare-option -hidden -docstring "A set of mappings for Ctags filetype" \ -str fzf_tag_ctags " -: language definitions -: kind definitions" - -declare-option -hidden -docstring "A set of mappings for Cobol filetype" \ -str fzf_tag_cobol " -: paragraphs -: data items -: source code file -: file descriptions (FD, SD, RD) -: group items -: program ids -: sections -: divisions" - -declare-option -hidden -docstring "A set of mappings for CUDA filetype" \ -str fzf_tag_cuda " -: macro definitions -: enumerators (values inside an enumeration) -: function definitions -: enumeration names -: included header files -: struct, and union members -: structure names -: typedefs -: union names -: variable definitions" - -declare-option -hidden -docstring "A set of mappings for D filetype" \ -str fzf_tag_d " -: aliases -: classes -: enumeration names -: enumerators (values inside an enumeration) -: function definitions -: interfaces -: class, struct, and union members -: mixins -: modules -: namespaces -: structure names -: templates -: union names -: variable definitions -: version statements" - -declare-option -hidden -docstring "A set of mappings for Diff filetype" \ -str fzf_tag_diff " -: modified files -: newly created files -: deleted files -: hunks" - -declare-option -hidden -docstring "A set of mappings for DTD filetype" \ -str fzf_tag_dtd " -: entities -: parameter entities -: elements -: attributes -: notations" - -declare-option -hidden -docstring "A set of mappings for DTS filetype" \ -str fzf_tag_dts " -: phandlers -: labels -: regex" - -declare-option -hidden -docstring "A set of mappings for DosBatch filetype" \ -str fzf_tag_dosbatch " -: labels -: variables" - -declare-option -hidden -docstring "A set of mappings for Eiffel filetype" \ -str fzf_tag_eiffel " -: classes -: features" - -declare-option -hidden -docstring "A set of mappings for Elm filetype" \ -str fzf_tag_elm " -: Module -: Renamed Imported Module -: Port -: Type Definition -: Type Constructor -: Type Alias -: Functions" - -declare-option -hidden -docstring "A set of mappings for Erlang filetype" \ -str fzf_tag_erlang " -: macro definitions -: functions -: modules -: record definitions -: type definitions" - -declare-option -hidden -docstring "A set of mappings for Falcon filetype" \ -str fzf_tag_falcon " -: classes -: functions -: class members -: variables -: imports" - -declare-option -hidden -docstring "A set of mappings for Flex filetype" \ -str fzf_tag_flex " -: functions -: classes -: methods -: properties -: global variables -: mxtags" - -declare-option -hidden -docstring "A set of mappings for Fortran filetype" \ -str fzf_tag_fortran " -: block data -: common blocks -: entry points -: enumerations -: functions -: interface contents, generic names, and operators -: type and structure components -: labels -: modules -: type bound procedures -: namelists -: enumeration values -: programs -: subroutines -: derived types and structures -: program (global) and module variables -: submodules" - -declare-option -hidden -docstring "A set of mappings for Fypp filetype" \ -str fzf_tag_fypp " -: macros" - -declare-option -hidden -docstring "A set of mappings for Gdbinit filetype" \ -str fzf_tag_gdbinit " -: definitions -: toplevel variables" - -declare-option -hidden -docstring "A set of mappings for Go filetype" \ -str fzf_tag_go " -: packages -: functions -: constants -: types -: variables -: structs -: interfaces -: struct members -: struct anonymous members -: unknown -: name for specifying imported package" - -declare-option -hidden -docstring "A set of mappings for HTML filetype" \ -str fzf_tag_html " -: named anchors -: H1 headings -: H2 headings -: H3 headings" - -declare-option -hidden -docstring "A set of mappings for Iniconf filetype" \ -str fzf_tag_iniconf " -: sections -: keys" - -declare-option -hidden -docstring "A set of mappings for ITcl filetype" \ -str fzf_tag_itcl " -: classes -: methods -: object-specific variables -: common variables -: procedures within the class namespace" - -declare-option -hidden -docstring "A set of mappings for Java filetype" \ -str fzf_tag_java " -: annotation declarations -: classes -: enum constants -: fields -: enum types -: interfaces -: methods -: packages" - -declare-option -hidden -docstring "A set of mappings for JavaProperties filetype" \ -str fzf_tag_javaproperties " -: keys" - -declare-option -hidden -docstring "A set of mappings for JavaScript filetype" \ -str fzf_tag_javascript " -: functions -: classes -: methods -: properties -: constants -: global variables -: generators" - -declare-option -hidden -docstring "A set of mappings for JSON filetype" \ -str fzf_tag_json " -: objects -: arrays -: numbers -: strings -: booleans -: nulls" - -declare-option -hidden -docstring "A set of mappings for LdScript filetype" \ -str fzf_tag_ldscript " -: sections -: symbols -: versions -: input sections" - -declare-option -hidden -docstring "A set of mappings for Lisp filetype" \ -str fzf_tag_lisp " -: functions" - -declare-option -hidden -docstring "A set of mappings for Lua filetype" \ -str fzf_tag_lua " -: functions" - -declare-option -hidden -docstring "A set of mappings for M4 filetype" \ -str fzf_tag_m4 " -: macros -: macro files" - -declare-option -hidden -docstring "A set of mappings for Man filetype" \ -str fzf_tag_man " -: titles -: sections" - -declare-option -hidden -docstring "A set of mappings for Make filetype" \ -str fzf_tag_make " -: macros -: targets -: makefiles" - -declare-option -hidden -docstring "A set of mappings for Markdown filetype" \ -str fzf_tag_markdown " -: chapsters -: sections -: subsections -: subsubsections -: level 4 subsections -: level 5 subsections -: regex" - -declare-option -hidden -docstring "A set of mappings for MatLab filetype" \ -str fzf_tag_matlab " -: function -: variable -: class" - -declare-option -hidden -docstring "A set of mappings for Myrddin filetype" \ -str fzf_tag_myrddin " -: functions -: constants -: variables -: types -: traits -: packages" - -declare-option -hidden -docstring "A set of mappings for ObjectiveC filetype" \ -str fzf_tag_objectivec " -: class interface -: class implementation -: Protocol -: Object's method -: Class' method -: Global variable -: Object field -: A function -: A property -: A type alias -: A type structure -: An enumeration -: A preprocessor macro" - -declare-option -hidden -docstring "A set of mappings for OCaml filetype" \ -str fzf_tag_ocaml " -: classes -: Object's method -: Module or functor -: Global variable -: Signature item -: Type name -: A function -: A constructor -: A 'structure' field -: An exception" - -declare-option -hidden -docstring "A set of mappings for Passwd filetype" \ -str fzf_tag_passwd " -: user names" - -declare-option -hidden -docstring "A set of mappings for Pascal filetype" \ -str fzf_tag_pascal " -: functions -: procedures" - -declare-option -hidden -docstring "A set of mappings for Perl filetype" \ -str fzf_tag_perl " -: constants -: formats -: labels -: packages -: subroutines" - -declare-option -hidden -docstring "A set of mappings for Perl6 filetype" \ -str fzf_tag_perl6 " -: classes -: grammars -: methods -: modules -: packages -: roles -: rules -: submethods -: subroutines -: tokens" - -declare-option -hidden -docstring "A set of mappings for PHP filetype" \ -str fzf_tag_php " -: classes -: constant definitions -: functions -: interfaces -: namespaces -: traits -: variables -: aliases" - -declare-option -hidden -docstring "A set of mappings for Pod filetype" \ -str fzf_tag_pod " -: chapters -: sections -: subsections -: subsubsections" - -declare-option -hidden -docstring "A set of mappings for Protobuf filetype" \ -str fzf_tag_protobuf " -: packages -: messages -: fields -: enum constants -: enum types -: services" - -declare-option -hidden -docstring "A set of mappings for PuppetManifest filetype" \ -str fzf_tag_puppetmanifest " -: classes -: definitions -: nodes -: resources -: variables" - -declare-option -hidden -docstring "A set of mappings for Python filetype" \ -str fzf_tag_python " -: classes -: functions -: class members -: variables -: name referring a module defined in other file -: modules -: name referring a class/variable/function/module defined in other module" - -declare-option -hidden -docstring "A set of mappings for PythonLoggingConfig filetype" \ -str fzf_tag_pythonloggingconfig " -: logger sections -: logger qualnames" - -declare-option -hidden -docstring "A set of mappings for QemuHX filetype" \ -str fzf_tag_qemuhx " -: QEMU Management Protocol dispatch table entries -: item in texinfo doc" - -declare-option -hidden -docstring "A set of mappings for QtMoc filetype" \ -str fzf_tag_qtmoc " -: slots -: signals -: properties" - -declare-option -hidden -docstring "A set of mappings for R filetype" \ -str fzf_tag_r " -: functions -: libraries -: sources -: global variables -: function variables" - -declare-option -hidden -docstring "A set of mappings for RSpec filetype" \ -str fzf_tag_rspec " -: describes -: contexts" - -declare-option -hidden -docstring "A set of mappings for REXX filetype" \ -str fzf_tag_rexx " -: subroutines" - -declare-option -hidden -docstring "A set of mappings for Robot filetype" \ -str fzf_tag_robot " -: testcases -: keywords -: variables" - -declare-option -hidden -docstring "A set of mappings for RpmSpec filetype" \ -str fzf_tag_rpmspec " -: tags -: macros -: packages -: global macros" - -declare-option -hidden -docstring "A set of mappings for ReStructuredText filetype" \ -str fzf_tag_restructuredtext " -: chapters -: sections -: subsections -: subsubsections -: targets" - -declare-option -hidden -docstring "A set of mappings for Ruby filetype" \ -str fzf_tag_ruby " -: classes -: methods -: modules -: singleton methods" - -declare-option -hidden -docstring "A set of mappings for Rust filetype" \ -str fzf_tag_rust " -: module -: structural type -: trait interface -: implementation -: Function -: Enum -: Type Alias -: Global variable -: Macro Definition -: A struct field -: An enum variant -: A method" - -declare-option -hidden -docstring "A set of mappings for Scheme filetype" \ -str fzf_tag_scheme " -: functions -: sets" - -declare-option -hidden -docstring "A set of mappings for Sh filetype" \ -str fzf_tag_sh " -: aliases -: functions -: script files -: label for here document" - -declare-option -hidden -docstring "A set of mappings for SLang filetype" \ -str fzf_tag_slang " -: functions -: namespaces" - -declare-option -hidden -docstring "A set of mappings for SML filetype" \ -str fzf_tag_sml " -: exception declarations -: function definitions -: functor definitions -: signature declarations -: structure declarations -: type definitions -: value bindings" - -declare-option -hidden -docstring "A set of mappings for SQL filetype" \ -str fzf_tag_sql " -: cursors -: functions -: record fields -: block label -: packages -: procedures -: subtypes -: tables -: triggers -: variables -: indexes -: events -: publications -: services -: domains -: views -: synonyms -: MobiLink Table Scripts -: MobiLink Conn Scripts -: MobiLink Properties " - -declare-option -hidden -docstring "A set of mappings for SystemdUnit filetype" \ -str fzf_tag_systemdunit " -: units" - -declare-option -hidden -docstring "A set of mappings for Tcl filetype" \ -str fzf_tag_tcl " -: procedures -: namespaces" - -declare-option -hidden -docstring "A set of mappings for TclOO filetype" \ -str fzf_tag_tcloo " -: classes -: methods" - -declare-option -hidden -docstring "A set of mappings for Tex filetype" \ -str fzf_tag_tex " -: parts -: chapters -: sections -: subsections -: subsubsections -: paragraphs -: subparagraphs -: labels -: includes" - -declare-option -hidden -docstring "A set of mappings for TTCN filetype" \ -str fzf_tag_ttcn " -: module definition -: type definition -: constant definition -: template definition -: function definition -: signature definition -: testcase definition -: altstep definition -: group definition -: module parameter definition -: variable instance -: timer instance -: port instance -: record/set/union member -: enumeration value" - -declare-option -hidden -docstring "A set of mappings for Vera filetype" \ -str fzf_tag_vera " -: classes -: macro definitions -: enumerators (values inside an enumeration) -: function definitions -: enumeration names -: interfaces -: class, struct, and union members -: programs -: signals -: tasks -: typedefs -: variable definitions -: included header files" - -declare-option -hidden -docstring "A set of mappings for Verilog filetype" \ -str fzf_tag_verilog " -: constants (define, parameter, specparam) -: events -: functions -: modules -: net data types -: ports -: register data types -: tasks -: blocks" - -declare-option -hidden -docstring "A set of mappings for SystemVerilog filetype" \ -str fzf_tag_systemverilog " -: constants (define, parameter, specparam, enum values) -: events -: functions -: modules -: net data types -: ports -: register data types -: tasks -: blocks -: assertions -: classes -: covergroups -: enumerators -: interfaces -: modports -: packages -: programs -: properties -: structs and unions -: type declarations" - -declare-option -hidden -docstring "A set of mappings for VHDL filetype" \ -str fzf_tag_vhdl " -: constant declarations -: type definitions -: subtype definitions -: record names -: entity declarations -: function prototypes and declarations -: procedure prototypes and declarations -: package definitions" - -declare-option -hidden -docstring "A set of mappings for Vim filetype" \ -str fzf_tag_vim " -: autocommand groups -: user-defined commands -: function definitions -: maps -: variable definitions -: vimball filename" - -declare-option -hidden -docstring "A set of mappings for WindRes filetype" \ -str fzf_tag_windres " -: dialogs -: menus -: icons -: bitmaps -: cursors -: fonts -: versions -: accelerators" - -declare-option -hidden -docstring "A set of mappings for YACC filetype" \ -str fzf_tag_yacc " -: labels" - -declare-option -hidden -docstring "A set of mappings for YumRepo filetype" \ -str fzf_tag_yumrepo " -: repository id" - -declare-option -hidden -docstring "A set of mappings for Zephir filetype" \ -str fzf_tag_zephir " -: classes -: constant definitions -: functions -: interfaces -: namespaces -: traits -: variables -: aliases" - -declare-option -hidden -docstring "A set of mappings for DBusIntrospect filetype" \ -str fzf_tag_dbusintrospect " -: interfaces -: methods -: signals -: properties" - -declare-option -hidden -docstring "A set of mappings for Glade filetype" \ -str fzf_tag_glade " -: identifiers -: classes -: handlers" - -declare-option -hidden -docstring "A set of mappings for Maven2 filetype" \ -str fzf_tag_maven2 " -: group identifiers -: artifact identifiers -: properties -: repository identifiers" - -declare-option -hidden -docstring "A set of mappings for PlistXML filetype" \ -str fzf_tag_plistxml " -: keys" - -declare-option -hidden -docstring "A set of mappings for RelaxNG filetype" \ -str fzf_tag_relaxng " -: elements -: attributes -: named patterns" - -declare-option -hidden -docstring "A set of mappings for SVG filetype" \ -str fzf_tag_svg " -: id attributes" - -declare-option -hidden -docstring "A set of mappings for XSLT filetype" \ -str fzf_tag_xslt " -: stylesheets -: parameters -: matched template -: matched template -: variables" - -declare-option -hidden -docstring "A set of mappings for Yaml filetype" \ -str fzf_tag_yaml " -: anchors" - -declare-option -hidden -docstring "A set of mappings for AnsiblePlaybook filetype" \ -str fzf_tag_ansibleplaybook " -: plays" - -define-command -hidden fzf-tag -params ..1 %{ evaluate-commands %sh{ - case $kak_opt_filetype in - ada) - additional_keybindings="--expect ctrl-alt-p --expect alt-p --expect ctrl-alt-t --expect alt-t --expect ctrl-alt-u --expect alt-u --expect alt-c --expect alt-l --expect ctrl-alt-v --expect alt-v --expect alt-f --expect alt-n --expect alt-x --expect ctrl-alt-r --expect alt-r --expect ctrl-alt-k --expect alt-k --expect ctrl-alt-o --expect alt-o --expect ctrl-alt-e --expect alt-e --expect alt-b --expect alt-i --expect alt-a --expect alt-y --expect ctrl-alt-s" - additional_message=$kak_opt_fzf_tag_ada ;; - ant) - additional_keybindings="--expect alt-p --expect alt-t --expect ctrl-alt-p --expect alt-i" - additional_message=$kak_opt_fzf_tag_ant ;; - asciidoc) - additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t --expect alt-u --expect alt-a" - additional_message=$kak_opt_fzf_tag_asciidoc ;; - asm) - additional_keybindings="--expect alt-d --expect alt-l --expect alt-m --expect alt-t --expect alt-s" - additional_message=$kak_opt_fzf_tag_asm ;; - asp) - additional_keybindings="--expect alt-d --expect alt-c --expect alt-f --expect alt-s --expect alt-v" - additional_message=$kak_opt_fzf_tag_asp ;; - autoconf) - additional_keybindings="--expect alt-p --expect alt-t --expect alt-m --expect alt-w --expect alt-e --expect alt-s --expect alt-c --expect alt-d" - additional_message=$kak_opt_fzf_tag_autoconf ;; - autoit) - additional_keybindings="--expect alt-f --expect alt-r --expect alt-g --expect alt-l --expect ctrl-alt-s" - additional_message=$kak_opt_fzf_tag_autoit ;; - automake) - additional_keybindings="--expect alt-d --expect ctrl-alt-p --expect ctrl-alt-m --expect ctrl-alt-t --expect ctrl-alt-l --expect ctrl-alt-s --expect ctrl-alt-d --expect alt-c" - additional_message=$kak_opt_fzf_tag_automake ;; - awk) - additional_keybindings="--expect alt-f" - additional_message=$kak_opt_fzf_tag_awk ;; - basic) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-l --expect alt-t --expect alt-v --expect alt-g" - additional_message=$kak_opt_fzf_tag_basic ;; - beta) - additional_keybindings="--expect alt-f --expect alt-p --expect alt-s --expect alt-v" - additional_message=$kak_opt_fzf_tag_beta ;; - clojure) - additional_keybindings="--expect alt-f --expect alt-n" - additional_message=$kak_opt_fzf_tag_clojure ;; - cmake) - additional_keybindings="--expect alt-f --expect alt-m --expect alt-t --expect alt-v --expect ctrl-alt-d --expect alt-p --expect alt-r" - additional_message=$kak_opt_fzf_tag_cmake ;; - c) - additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l" - additional_message=$kak_opt_fzf_tag_c ;; - cpp) - additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l --expect alt-c --expect alt-n --expect ctrl-alt-a --expect ctrl-alt-n --expect ctrl-alt-u" - additional_message=$kak_opt_fzf_tag_cpp ;; - cpreprocessor) - additional_keybindings="--expect alt-d --expect alt-h" - additional_message=$kak_opt_fzf_tag_cpreprocessor ;; - css) - additional_keybindings="--expect alt-c --expect alt-s --expect alt-i" - additional_message=$kak_opt_fzf_tag_css ;; - csharp) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-e --expect ctrl-alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-n --expect alt-p --expect alt-s --expect alt-t" - additional_message=$kak_opt_fzf_tag_csharp ;; - ctags) - additional_keybindings="--expect alt-l --expect alt-k" - additional_message=$kak_opt_fzf_tag_ctags ;; - cobol) - additional_keybindings="--expect alt-p --expect alt-d --expect ctrl-alt-s --expect ctrl-alt-F --expect alt-g --expect ctrl-alt-p --expect alt-s --expect ctrl-alt-d" - additional_message=$kak_opt_fzf_tag_cobol ;; - cuda) - additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l" - additional_message=$kak_opt_fzf_tag_cuda ;; - d) - additional_keybindings="--expect alt-a --expect alt-c --expect alt-g --expect alt-e --expect alt-x --expect alt-f --expect alt-i --expect alt-l --expect alt-m --expect ctrl-alt-x --expect ctrl-alt-m --expect alt-n --expect alt-p --expect alt-s --expect ctrl-alt-t --expect alt-u --expect alt-v --expect ctrl-alt-v" - additional_message=$kak_opt_fzf_tag_d ;; - diff) - additional_keybindings="--expect alt-m --expect alt-n --expect alt-d --expect alt-h" - additional_message=$kak_opt_fzf_tag_diff ;; - dtd) - additional_keybindings="--expect ctrl-alt-e --expect alt-p --expect alt-e --expect alt-a --expect alt-n" - additional_message=$kak_opt_fzf_tag_dtd ;; - dts) - additional_keybindings="--expect alt-p --expect alt-l --expect alt-r" - additional_message=$kak_opt_fzf_tag_dts ;; - dosbatch) - additional_keybindings="--expect alt-l --expect alt-v" - additional_message=$kak_opt_fzf_tag_dosbatch ;; - eiffel) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-l" - additional_message=$kak_opt_fzf_tag_eiffel ;; - elm) - additional_keybindings="--expect ctrl-alt-M --expect ctrl-alt-N --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-C --expect ctrl-alt-A --expect ctrl-alt-F" - additional_message=$kak_opt_fzf_tag_elm ;; - erlang) - additional_keybindings="--expect alt-d --expect alt-f --expect alt-m --expect alt-r --expect alt-t" - additional_message=$kak_opt_fzf_tag_erlang ;; - falcon) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect alt-i" - additional_message=$kak_opt_fzf_tag_falcon ;; - flex) - additional_keybindings="--expect alt-f --expect alt-c --expect alt-m --expect alt-p --expect alt-v --expect alt-x" - additional_message=$kak_opt_fzf_tag_flex ;; - fortran) - additional_keybindings="--expect alt-b --expect alt-c --expect alt-e --expect ctrl-alt-e --expect alt-f --expect alt-i --expect alt-k --expect alt-l --expect ctrl-alt-l --expect alt-m --expect ctrl-alt-m --expect alt-n --expect ctrl-alt-n --expect alt-p --expect ctrl-alt-p --expect alt-s --expect alt-t --expect alt-v --expect ctrl-alt-s" - additional_message=$kak_opt_fzf_tag_fortran ;; - fypp) - additional_keybindings="--expect alt-m" - additional_message=$kak_opt_fzf_tag_fypp ;; - gdbinit) - additional_keybindings="--expect alt-d --expect ctrl-alt-d --expect alt-t --expect alt-l" - additional_message=$kak_opt_fzf_tag_gdbinit ;; - go) - additional_keybindings="--expect alt-p --expect alt-f --expect alt-c --expect alt-t --expect alt-v --expect alt-s --expect alt-i --expect alt-m --expect ctrl-alt-m --expect alt-u --expect ctrl-alt-p" - additional_message=$kak_opt_fzf_tag_go ;; - html) - additional_keybindings="--expect alt-a --expect ctrl-alt-H --expect ctrl-alt-I --expect ctrl-alt-J" - additional_message=$kak_opt_fzf_tag_html ;; - iniconf) - additional_keybindings="--expect alt-s --expect alt-k" - additional_message=$kak_opt_fzf_tag_iniconf ;; - itcl) - additional_keybindings="--expect alt-c --expect alt-m --expect alt-v --expect ctrl-alt-c --expect alt-p" - additional_message=$kak_opt_fzf_tag_itcl ;; - java) - additional_keybindings="--expect alt-a --expect alt-c --expect alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-p" - additional_message=$kak_opt_fzf_tag_java ;; - javaproperties) - additional_keybindings="--expect alt-k" - additional_message=$kak_opt_fzf_tag_javaproperties ;; - javascript) - additional_keybindings="--expect alt-f --expect alt-c --expect alt-m --expect alt-p --expect ctrl-alt-c --expect alt-v --expect alt-g" - additional_message=$kak_opt_fzf_tag_javascript ;; - json) - additional_keybindings="--expect alt-o --expect alt-a --expect alt-n --expect alt-s --expect alt-b --expect alt-z" - additional_message=$kak_opt_fzf_tag_json ;; - ldscript) - additional_keybindings="--expect ctrl-alt-s --expect alt-s --expect alt-v --expect alt-i" - additional_message=$kak_opt_fzf_tag_ldscript ;; - lisp) - additional_keybindings="--expect alt-f" - additional_message=$kak_opt_fzf_tag_lisp ;; - lua) - additional_keybindings="--expect alt-f" - additional_message=$kak_opt_fzf_tag_lua ;; - m4) - additional_keybindings="--expect alt-d --expect ctrl-alt-i" - additional_message=$kak_opt_fzf_tag_m4 ;; - man) - additional_keybindings="--expect alt-t --expect alt-s" - additional_message=$kak_opt_fzf_tag_man ;; - make) - additional_keybindings="--expect alt-m --expect alt-t --expect ctrl-alt-i" - additional_message=$kak_opt_fzf_tag_make ;; - markdown) - additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t --expect alt-u --expect alt-r" - additional_message=$kak_opt_fzf_tag_markdown ;; - matlab) - additional_keybindings="--expect alt-f --expect alt-v --expect alt-c" - additional_message=$kak_opt_fzf_tag_matlab ;; - myrddin) - additional_keybindings="--expect alt-f --expect alt-c --expect alt-v --expect alt-t --expect alt-r --expect alt-p" - additional_message=$kak_opt_fzf_tag_myrddin ;; - objectivec) - additional_keybindings="--expect alt-i --expect ctrl-alt-i --expect ctrl-alt-p --expect ctrl-alt-M --expect ctrl-alt-C --expect ctrl-alt-V --expect ctrl-alt-e --expect ctrl-alt-F --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-S --expect ctrl-alt-E --expect ctrl-alt-m" - additional_message=$kak_opt_fzf_tag_objectivec ;; - ocaml) - additional_keybindings="--expect alt-c --expect ctrl-alt-M --expect ctrl-alt-m --expect ctrl-alt-V --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-F --expect ctrl-alt-c --expect ctrl-alt-R --expect ctrl-alt-E" - additional_message=$kak_opt_fzf_tag_ocaml ;; - passwd) - additional_keybindings="--expect alt-u" - additional_message=$kak_opt_fzf_tag_passwd ;; - pascal) - additional_keybindings="--expect alt-f --expect alt-p" - additional_message=$kak_opt_fzf_tag_pascal ;; - perl) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-l --expect alt-p --expect alt-s --expect alt-d" - additional_message=$kak_opt_fzf_tag_perl ;; - perl6) - additional_keybindings="--expect alt-c --expect alt-g --expect alt-m --expect alt-o --expect alt-p --expect alt-r --expect alt-u --expect alt-b --expect alt-s --expect alt-t" - additional_message=$kak_opt_fzf_tag_perl6 ;; - php) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect alt-i --expect alt-l --expect alt-n --expect alt-t --expect alt-v --expect alt-a" - additional_message=$kak_opt_fzf_tag_php ;; - pod) - additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t" - additional_message=$kak_opt_fzf_tag_pod ;; - protobuf) - additional_keybindings="--expect alt-p --expect alt-m --expect alt-f --expect alt-e --expect alt-g --expect alt-s --expect ctrl-alt-R" - additional_message=$kak_opt_fzf_tag_protobuf ;; - puppetmanifest) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-n --expect alt-r --expect alt-v" - additional_message=$kak_opt_fzf_tag_puppetmanifest ;; - python) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect ctrl-alt-i --expect alt-i --expect alt-x --expect alt-z --expect alt-l" - additional_message=$kak_opt_fzf_tag_python ;; - pythonloggingconfig) - additional_keybindings="--expect ctrl-alt-l --expect alt-q" - additional_message=$kak_opt_fzf_tag_pythonloggingconfig ;; - qemuhx) - additional_keybindings="--expect ctrl-alt-Q --expect alt-i" - additional_message=$kak_opt_fzf_tag_qemuhx ;; - qtmoc) - additional_keybindings="--expect alt-s --expect ctrl-alt-s --expect alt-p" - additional_message=$kak_opt_fzf_tag_qtmoc ;; - r) - additional_keybindings="--expect alt-f --expect alt-l --expect alt-s --expect alt-g --expect alt-v" - additional_message=$kak_opt_fzf_tag_r ;; - rspec) - additional_keybindings="--expect alt-d --expect alt-c" - additional_message=$kak_opt_fzf_tag_rspec ;; - rexx) - additional_keybindings="--expect alt-s" - additional_message=$kak_opt_fzf_tag_rexx ;; - robot) - additional_keybindings="--expect alt-t --expect alt-k --expect alt-v" - additional_message=$kak_opt_fzf_tag_robot ;; - rpmspec) - additional_keybindings="--expect alt-t --expect alt-m --expect alt-p --expect alt-g" - additional_message=$kak_opt_fzf_tag_rpmspec ;; - restructuredtext) - additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t" - additional_message=$kak_opt_fzf_tag_restructuredtext ;; - ruby) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect ctrl-alt-s" - additional_message=$kak_opt_fzf_tag_ruby ;; - rust) - additional_keybindings="--expect alt-n --expect alt-s --expect alt-i --expect alt-c --expect ctrl-alt-F --expect ctrl-alt-G --expect ctrl-alt-T --expect ctrl-alt-V --expect ctrl-alt-m --expect ctrl-alt-M --expect ctrl-alt-E --expect ctrl-alt-p" - additional_message=$kak_opt_fzf_tag_rust ;; - scheme) - additional_keybindings="--expect alt-f --expect alt-s" - additional_message=$kak_opt_fzf_tag_scheme ;; - sh) - additional_keybindings="--expect alt-a --expect alt-f --expect alt-s --expect alt-h" - additional_message=$kak_opt_fzf_tag_sh ;; - slang) - additional_keybindings="--expect alt-f --expect alt-n" - additional_message=$kak_opt_fzf_tag_slang ;; - sml) - additional_keybindings="--expect alt-e --expect alt-f --expect alt-c --expect alt-s --expect alt-r --expect alt-t --expect alt-v" - additional_message=$kak_opt_fzf_tag_sml ;; - sql) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect ctrl-alt-e --expect alt-l --expect ctrl-alt-l --expect ctrl-alt-p --expect alt-p --expect alt-r --expect alt-s --expect alt-t --expect ctrl-alt-t --expect alt-v --expect alt-i --expect alt-e --expect ctrl-alt-u --expect ctrl-alt-r --expect ctrl-alt-d --expect ctrl-alt-v --expect alt-n --expect ctrl-alt-X --expect ctrl-alt-Y --expect ctrl-alt-Z" - additional_message=$kak_opt_fzf_tag_sql ;; - systemdunit) - additional_keybindings="--expect alt-u" - additional_message=$kak_opt_fzf_tag_systemdunit ;; - tcl) - additional_keybindings="--expect alt-p --expect alt-n" - additional_message=$kak_opt_fzf_tag_tcl ;; - tcloo) - additional_keybindings="--expect alt-c --expect alt-m" - additional_message=$kak_opt_fzf_tag_tcloo ;; - tex) - additional_keybindings="--expect alt-p --expect alt-c --expect alt-s --expect alt-u --expect alt-b --expect ctrl-alt-p --expect ctrl-alt-g --expect alt-l --expect alt-i" - additional_message=$kak_opt_fzf_tag_tex ;; - ttcn) - additional_keybindings="--expect ctrl-alt-m --expect alt-t --expect alt-c --expect alt-d --expect alt-f --expect alt-s --expect ctrl-alt-c --expect alt-a --expect ctrl-alt-g --expect ctrl-alt-p --expect alt-v --expect ctrl-alt-t --expect alt-p --expect alt-m --expect alt-e" - additional_message=$kak_opt_fzf_tag_ttcn ;; - vera) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-p --expect ctrl-alt-p --expect alt-s --expect alt-t --expect ctrl-alt-t --expect alt-v --expect alt-x --expect alt-h" - additional_message=$kak_opt_fzf_tag_vera ;; - verilog) - additional_keybindings="--expect alt-c --expect alt-e --expect alt-f --expect alt-m --expect alt-n --expect alt-p --expect alt-r --expect alt-t --expect alt-b" - additional_message=$kak_opt_fzf_tag_verilog ;; - systemverilog) - additional_keybindings="--expect alt-c --expect alt-e --expect alt-f --expect alt-m --expect alt-n --expect alt-p --expect alt-r --expect alt-t --expect alt-b --expect ctrl-alt-a --expect ctrl-alt-c --expect ctrl-alt-v --expect ctrl-alt-e --expect ctrl-alt-i --expect ctrl-alt-m --expect ctrl-alt-k --expect ctrl-alt-p --expect ctrl-alt-q --expect ctrl-alt-r --expect ctrl-alt-s --expect ctrl-alt-t" - additional_message=$kak_opt_fzf_tag_systemverilog ;; - vhdl) - additional_keybindings="--expect alt-c --expect alt-t --expect ctrl-alt-t --expect alt-r --expect alt-e --expect ctrl-alt-c --expect alt-d --expect alt-f --expect alt-p --expect ctrl-alt-p --expect alt-l" - additional_message=$kak_opt_fzf_tag_vhdl ;; - vim) - additional_keybindings="--expect alt-a --expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect alt-n" - additional_message=$kak_opt_fzf_tag_vim ;; - windres) - additional_keybindings="--expect alt-d --expect alt-m --expect alt-i --expect alt-b --expect alt-c --expect alt-f --expect alt-v --expect alt-a" - additional_message=$kak_opt_fzf_tag_windres ;; - yacc) - additional_keybindings="--expect alt-l" - additional_message=$kak_opt_fzf_tag_yacc ;; - yumrepo) - additional_keybindings="--expect alt-r" - additional_message=$kak_opt_fzf_tag_yumrepo ;; - zephir) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect alt-i --expect alt-l --expect alt-n --expect alt-t --expect alt-v --expect alt-a" - additional_message=$kak_opt_fzf_tag_zephir ;; - dbusintrospect) - additional_keybindings="--expect alt-i --expect alt-m --expect alt-s --expect alt-p" - additional_message=$kak_opt_fzf_tag_dbusintrospect ;; - glade) - additional_keybindings="--expect alt-i --expect alt-c --expect alt-h" - additional_message=$kak_opt_fzf_tag_glade ;; - maven2) - additional_keybindings="--expect alt-g --expect alt-a --expect alt-p --expect alt-r" - additional_message=$kak_opt_fzf_tag_maven2 ;; - plistxml) - additional_keybindings="--expect alt-k" - additional_message=$kak_opt_fzf_tag_plistxml ;; - relaxng) - additional_keybindings="--expect alt-e --expect alt-a --expect alt-n" - additional_message=$kak_opt_fzf_tag_relaxng ;; - svg) - additional_keybindings="--expect alt-i" - additional_message=$kak_opt_fzf_tag_svg ;; - xslt) - additional_keybindings="--expect alt-s --expect alt-p --expect alt-m --expect alt-n --expect alt-v" - additional_message=$kak_opt_fzf_tag_xslt ;; - yaml) - additional_keybindings="--expect alt-a" - additional_message=$kak_opt_fzf_tag_yaml ;; - ansibleplaybook) - additional_keybindings="--expect alt-p" - additional_message=$kak_opt_fzf_tag_ansibleplaybook ;; - *) - additional_keybindings= - additional_message= - ;; - esac - - if [ ! -z "$1" ]; then - mode=$(echo "$additional_message" | grep ":" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") - cmd="readtags -Q '(eq? \$kind $1)' -l | cut -f1" - else - cmd="readtags -l | cut -f1" - fi - - [ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings=" -: open tag in horizontal split -: open tag in vertical split" - - message="Jump to a symbol''s definition -: open tag in new buffer -: open tag in new window" - - [ ! -z "$additional_message" ] && message="$message $tmux_keybindings - -Additional filters for $kak_opt_filetype filetype: $additional_message" - - echo "info -title 'fzf tag$mode' '$message'" - - [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - - echo "fzf %{ctags-search \$1} %{$cmd} %{--expect ctrl-w $additional_flags $additional_keybindings}" -}} - From e9f46dbeaff20fec1f3068992c44b593f77209e9 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Fri, 16 Nov 2018 17:54:53 +0300 Subject: [PATCH 03/37] search for tag file until home directory reached --- rc/fzf-modules/fzf-ctags.kak | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index 2e15903..bd724a3 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -1196,11 +1196,27 @@ define-command -hidden fzf-tag -params ..1 %{ evaluate-commands %sh{ ;; esac + path=$PWD + while [ "$path" != "$HOME" ]; do + if [ -e "./${kak_opt_tagfile:-tags}" ]; then + break + else + cd .. + path=$PWD + fi + done + if [ "$path" = "$HOME" ] && [ ! -e "./${kak_opt_tagfile:-tags}" ]; then + echo "echo -markup %{{Information}No '${kak_opt_tagfile:-tags}' found}" + exit + elif [ "$path" = "$HOME" ] && [ -e "./${kak_opt_tagfile:-tags}" ]; then + echo "echo -markup %{{Information}'${kak_opt_tagfile:-tags}' found at $HOME. Check if it is right tag file}" + fi + if [ ! -z "$1" ]; then mode=$(echo "$additional_message" | grep ":" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") - cmd="readtags -Q '(eq? \$kind $1)' -l | cut -f1" + cmd="cd $path; readtags -Q '(eq? \$kind $1)' -l | cut -f1" else - cmd="readtags -l | cut -f1" + cmd="cd $path; readtags -l | cut -f1" fi [ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings=" From bffe65c4052dec8dcbd9c4bcebf001ac5b569064 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Fri, 16 Nov 2018 18:57:30 +0300 Subject: [PATCH 04/37] fix opening tags from different directory --- rc/fzf-modules/fzf-ctags.kak | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index bd724a3..3ed3636 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -1218,7 +1218,6 @@ define-command -hidden fzf-tag -params ..1 %{ evaluate-commands %sh{ else cmd="cd $path; readtags -l | cut -f1" fi - [ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings=" : open tag in horizontal split : open tag in vertical split" @@ -1234,6 +1233,6 @@ Additional filters for $kak_opt_filetype filetype: $additional_message" echo "info -title 'fzf tag$mode' '$message'" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - + echo "set-option window ctagsfiles %{$path/${kak_opt_tagfile:-tags}}" echo "fzf %{ctags-search \$1} %{$cmd} %{--expect ctrl-w $additional_flags $additional_keybindings}" }} From 7c4d921a74e23cd15daa32fe08141cc0daefcab4 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Wed, 21 Nov 2018 15:40:02 +0300 Subject: [PATCH 05/37] get rid of escaping hell --- rc/fzf.kak | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 19d73a3..e423053 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -11,45 +11,47 @@ try %{ declare-user-mode fzf } catch %{echo -markup "{Error}Can't declare mode 'fzf' - already exists"} # Options -declare-option -docstring "allow showing preview window +declare-option -docstring 'allow showing preview window Default value: true -" \ +' \ bool fzf_preview true -declare-option -docstring "amount of lines to pass to preview window -Default value: 100" \ +declare-option -docstring 'amount of lines to pass to preview window +Default value: 100' \ int fzf_preview_lines 100 -declare-option -docstring "highlighter to use in preview window +declare-option -docstring 'Highlighter to use in preview window. You can provide +only the name of the tool that you want to use, or specify a command. Supported tools: : : - Bat: ""bat"" - Coderay: ""coderay"" - Highlight: ""highlight"" - Rouge: ""rouge"" + Bat: "bat" + Coderay: "coderay" + Highlight: "highlight" + Rouge: "rouge" -Default arguments: - bat: ""bat --color=always --style=header,grid,numbers {}"" - coderay: ""coderay {}"" - highlight: ""highlight --failsafe -O ansi {}"" - rouge: ""rougify {}"" -" \ +These are default arguments for the tools above: + : : + bat: "bat --color=always --style=header,grid,numbers {}" + coderay: "coderay {}" + highlight: "highlight --failsafe -O ansi {}" + rouge: "rougify {}" +' \ str fzf_highlighter "highlight" -declare-option -docstring "height of fzf tmux split in screen lines or percents +declare-option -docstring "height of fzf tmux split in screen lines or percents. Default value: 25%%" \ str fzf_tmux_height '25%' -declare-option -docstring "height of fzf tmux split for file preview in screen lines or percents +declare-option -docstring "height of fzf tmux split for file preview in screen lines or percents. Default value: 70%%" \ str fzf_tmux_height_file_preview '70%' -declare-option -docstring "width of preview window +declare-option -docstring "width of preview window. Default value: 50%%" \ str fzf_preview_width '50%' -declare-option -docstring "height of preview window +declare-option -docstring "height of preview window. Default value: 60%%" \ str fzf_preview_height '60%' @@ -98,21 +100,18 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ preview_pos="pos=right:$kak_opt_fzf_preview_width;" tmux_height=$kak_opt_fzf_tmux_height_file_preview else - preview_pos='sleep 0.1; if [ \$(tput cols) -gt \$(expr \$(tput lines) \* 2) ]; then pos=right:'$kak_opt_fzf_preview_width'; else pos=top:'$kak_opt_fzf_preview_height'; fi;' + preview_pos='sleep 0.1; if [ $(tput cols) -gt $(expr $(tput lines) \* 2) ]; then pos=right:'$kak_opt_fzf_preview_width'; else pos=top:'$kak_opt_fzf_preview_height'; fi;' fi additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\$pos $additional_flags" fi if [ ! -z "${kak_client_env_TMUX}" ]; then - [ -z "${items_command##*Q*}" ] && items_command=$(echo $items_command | sed 's:$kind \(\w\):\$kind \"\1\":') - [ "$(echo $callback | awk '{print $1}')" = "ctags-search" ] && items_command="$items_command | awk '!a[\$0]++'" cmd="$preview_pos $items_command | fzf-tmux -d $tmux_height --expect ctrl-q $additional_flags > $tmp" elif [ ! -z "${kak_opt_termcmd}" ]; then - path=$(pwd) - additional_flags=$(echo $additional_flags | sed 's:\$pos:\\\\\\\$pos:') - [ -z "${items_command##*Q*}" ] && items_command=$(echo $items_command | sed 's:$kind \(\w\):\\\\\\$kind \\\\\\\"\1\\\\\\\":') - [ "$(echo $callback | awk '{print $1}')" = "ctags-search" ] && items_command="$items_command | awk '!a[\\\\\\\$0]++'" - cmd="$kak_opt_termcmd \"sh -c \\\"sh=$(command -v sh); SHELL=\\\$sh; export SHELL; cd $path && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp\\\"\"" + tmp2=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-tmp2.XXXXXX)) + chmod 755 $tmp2 + echo "cd $PWD && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags" > $tmp2 + cmd="$kak_opt_termcmd \"sh -c $tmp2\" > $tmp" else echo "fail termcmd option is not set" exit From f4d059ff785e326c927206ae6276fd173a098df2 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Wed, 21 Nov 2018 15:53:00 +0300 Subject: [PATCH 06/37] move sorting thing to module to simplify internal fzf command --- rc/fzf-modules/fzf-ctags.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index 3ed3636..025831d 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -1234,5 +1234,5 @@ Additional filters for $kak_opt_filetype filetype: $additional_message" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" echo "set-option window ctagsfiles %{$path/${kak_opt_tagfile:-tags}}" - echo "fzf %{ctags-search \$1} %{$cmd} %{--expect ctrl-w $additional_flags $additional_keybindings}" + echo "fzf %{ctags-search \$1} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags $additional_keybindings}" }} From f4136d7a7477c16e9198efa99a5311adb668652d Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Wed, 21 Nov 2018 22:38:23 +0300 Subject: [PATCH 07/37] replace awk with grep, change redirection in second command --- rc/fzf.kak | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index e423053..aadae19 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -70,7 +70,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ additional_flags=$3 tmux_height=$kak_opt_fzf_tmux_height - items_executable=$(echo $items_command | awk '{print $1}' | tr '(' ' ' | cut -d " " -f 2) + items_executable=$(echo $items_command | grep -o -E "[[:alpha:]]+" | head -1) if [ -z $(command -v $items_executable) ]; then echo "fail %{'$items_executable' executable not found}" exit @@ -79,7 +79,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ tmp=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-fzf.XXXXXX)) exec=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-exec.XXXXXX)) - if [ "$(echo $callback | awk '{print $1}')" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then + if [ "$(echo $callback | grep -o -E '[[:alpha:]]+' | head -1)" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then case $kak_opt_fzf_highlighter in bat) highlighter="bat --color=always --style=header,grid,numbers {}" ;; @@ -92,7 +92,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ bat*|coderay*|highlight*|rougify*) highlighter=$kak_opt_fzf_highlighter ;; *) - executable=$(echo $kak_opt_fzf_highlighter | awk '{print $1}'| tr '(' ' ' | cut -d " " -f 2) + executable=$(echo $kak_opt_fzf_highlighter | grep -o -E '[[:alpha:]]+' | head -1) echo "echo -markup %{{Information}'$executable' highlighter is not supported by the script. fzf.kak may not work as you expect.}" highlighter=$kak_opt_fzf_highlighter ;; esac @@ -108,10 +108,10 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ if [ ! -z "${kak_client_env_TMUX}" ]; then cmd="$preview_pos $items_command | fzf-tmux -d $tmux_height --expect ctrl-q $additional_flags > $tmp" elif [ ! -z "${kak_opt_termcmd}" ]; then - tmp2=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-tmp2.XXXXXX)) - chmod 755 $tmp2 - echo "cd $PWD && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags" > $tmp2 - cmd="$kak_opt_termcmd \"sh -c $tmp2\" > $tmp" + fzfcmd=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX)) + chmod 755 $fzfcmd + echo "cd $PWD && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp" > $fzfcmd + cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" else echo "fail termcmd option is not set" exit @@ -151,6 +151,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ fi rm $tmp rm $exec + [ -z "$fzfcmd" ] && rm $fzfcmd ) > /dev/null 2>&1 < /dev/null & }} From ffd12b303e6bf879bb83f5876d9a9d2db2f9454e Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Wed, 21 Nov 2018 22:38:39 +0300 Subject: [PATCH 08/37] remove escaping hell --- rc/fzf-modules/fzf-ctags.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index 025831d..4da1c7d 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -1214,7 +1214,7 @@ define-command -hidden fzf-tag -params ..1 %{ evaluate-commands %sh{ if [ ! -z "$1" ]; then mode=$(echo "$additional_message" | grep ":" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") - cmd="cd $path; readtags -Q '(eq? \$kind $1)' -l | cut -f1" + cmd="cd $path; readtags -Q '(eq? \$kind \"$1\")' -l | cut -f1" else cmd="cd $path; readtags -l | cut -f1" fi From d8ad0f7e0086dce44d97a2ed5245e3283aff892d Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Thu, 22 Nov 2018 08:54:42 +0300 Subject: [PATCH 09/37] refactor main script to use function instead of chmodding file. Rework other files accordingly --- rc/fzf-modules/VCS/fzf-bzr.kak | 2 +- rc/fzf-modules/VCS/fzf-git.kak | 2 +- rc/fzf-modules/VCS/fzf-hg.kak | 2 +- rc/fzf-modules/VCS/fzf-svn.kak | 2 +- rc/fzf-modules/fzf-cd.kak | 2 +- rc/fzf-modules/fzf-ctags.kak | 4 ++-- rc/fzf-modules/fzf-file.kak | 4 ++-- rc/fzf-modules/fzf-search.kak | 2 +- rc/fzf.kak | 19 ++++++++++--------- 9 files changed, 20 insertions(+), 19 deletions(-) diff --git a/rc/fzf-modules/VCS/fzf-bzr.kak b/rc/fzf-modules/VCS/fzf-bzr.kak index 1f6bb1a..ecdee58 100644 --- a/rc/fzf-modules/VCS/fzf-bzr.kak +++ b/rc/fzf-modules/VCS/fzf-bzr.kak @@ -27,6 +27,6 @@ define-command -hidden fzf-bzr %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_bzr_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/VCS/fzf-git.kak b/rc/fzf-modules/VCS/fzf-git.kak index 4e98a84..dada37a 100644 --- a/rc/fzf-modules/VCS/fzf-git.kak +++ b/rc/fzf-modules/VCS/fzf-git.kak @@ -27,6 +27,6 @@ define-command -hidden fzf-git %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_git_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/VCS/fzf-hg.kak b/rc/fzf-modules/VCS/fzf-hg.kak index 94a2e0c..6a49de1 100644 --- a/rc/fzf-modules/VCS/fzf-hg.kak +++ b/rc/fzf-modules/VCS/fzf-hg.kak @@ -27,6 +27,6 @@ define-command -hidden fzf-hg %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_hg_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/VCS/fzf-svn.kak b/rc/fzf-modules/VCS/fzf-svn.kak index 4e3004d..0a439de 100644 --- a/rc/fzf-modules/VCS/fzf-svn.kak +++ b/rc/fzf-modules/VCS/fzf-svn.kak @@ -27,6 +27,6 @@ define-command -hidden fzf-svn %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_svn_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/fzf-cd.kak b/rc/fzf-modules/fzf-cd.kak index dfd7cdb..f73a06e 100644 --- a/rc/fzf-modules/fzf-cd.kak +++ b/rc/fzf-modules/fzf-cd.kak @@ -26,6 +26,6 @@ define-command -hidden fzf-cd %{ evaluate-commands %sh{ *) cmd=$kak_opt_fzf_cd_command ;; esac - echo "fzf %{change-directory \$1} %{$cmd}" + echo "fzf %{change-directory} %{$cmd}" }} diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index 4da1c7d..1b72470 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -885,7 +885,7 @@ declare-option -hidden -docstring "A set of mappings for AnsiblePlaybook filetyp str fzf_tag_ansibleplaybook " : plays" -define-command -hidden fzf-tag -params ..1 %{ evaluate-commands %sh{ +define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{ case $kak_opt_filetype in ada) additional_keybindings="--expect ctrl-alt-p --expect alt-p --expect ctrl-alt-t --expect alt-t --expect ctrl-alt-u --expect alt-u --expect alt-c --expect alt-l --expect ctrl-alt-v --expect alt-v --expect alt-f --expect alt-n --expect alt-x --expect ctrl-alt-r --expect alt-r --expect ctrl-alt-k --expect alt-k --expect ctrl-alt-o --expect alt-o --expect ctrl-alt-e --expect alt-e --expect alt-b --expect alt-i --expect alt-a --expect alt-y --expect ctrl-alt-s" @@ -1234,5 +1234,5 @@ Additional filters for $kak_opt_filetype filetype: $additional_message" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" echo "set-option window ctagsfiles %{$path/${kak_opt_tagfile:-tags}}" - echo "fzf %{ctags-search \$1} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags $additional_keybindings}" + echo "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags $additional_keybindings}" }} diff --git a/rc/fzf-modules/fzf-file.kak b/rc/fzf-modules/fzf-file.kak index 3b36685..748e047 100644 --- a/rc/fzf-modules/fzf-file.kak +++ b/rc/fzf-modules/fzf-file.kak @@ -27,7 +27,7 @@ str fzf_file_command "find" map global fzf -docstring "open file" 'f' ': fzf-file' define-command -hidden fzf-file %{ evaluate-commands %sh{ - if [ -z $(command -v $kak_opt_fzf_file_command) ]; then + if [ -z "$(command -v $kak_opt_fzf_file_command)" ]; then echo "echo -markup '{Information}''$kak_opt_fzf_file_command'' is not installed. Falling back to ''find'''" kak_opt_fzf_file_command="find" fi @@ -56,6 +56,6 @@ define-command -hidden fzf-file %{ evaluate-commands %sh{ : open file in new window $additional_keybindings" echo "info -title '$title' '$message'" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit \$1} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/fzf-search.kak b/rc/fzf-modules/fzf-search.kak index 5a07f2f..bf8e5cb 100644 --- a/rc/fzf-modules/fzf-search.kak +++ b/rc/fzf-modules/fzf-search.kak @@ -19,6 +19,6 @@ define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ buffer_content=$(mktemp ${TMPDIR:-/tmp}/kak-curr-buff.XXXXXX) echo "execute-keys %{%cat>$buffer_content;}" echo "execute-keys $line g $char l" - echo "fzf %{execute-keys \$1 gx} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content)}" + echo "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content; echo 'gx')}" }} diff --git a/rc/fzf.kak b/rc/fzf.kak index aadae19..ff85cfa 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -55,7 +55,6 @@ declare-option -docstring "height of preview window. Default value: 60%%" \ str fzf_preview_height '60%' -# Commands define-command -docstring "Enter fzf-mode. fzf-mode contains mnemonic key bindings for every fzf.kak command @@ -77,7 +76,6 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ fi tmp=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-fzf.XXXXXX)) - exec=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-exec.XXXXXX)) if [ "$(echo $callback | grep -o -E '[[:alpha:]]+' | head -1)" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then case $kak_opt_fzf_highlighter in @@ -138,19 +136,22 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ wincmd= ;; esac callback="$wincmd$callback" - echo "echo evaluate-commands -client $kak_client \"$callback\" | kak -p $kak_session" > $exec + kakoune_command () { + echo "evaluate-commands -client $kak_client '$callback' '$1'" + } else - echo "echo evaluate-commands -client $kak_client \"$callback\" | kak -p $kak_session" > $exec - echo "echo evaluate-commands -client $kak_client \"fzf-cd\" | kak -p $kak_session" >> $exec + kakoune_command() { + echo "evaluate-commands -client $kak_client '$callback' '$1'" + echo "evaluate-commands -client $kak_client fzf-cd" + } fi - chmod 755 $exec - while read file; do - $exec "\'$file'" + while read item; do + kakoune_command "$item" | kak -p $kak_session done ) < $tmp fi rm $tmp - rm $exec + rm $kakoune_command [ -z "$fzfcmd" ] && rm $fzfcmd ) > /dev/null 2>&1 < /dev/null & }} From 1652f92b720ebc88fed5b4f2cf8c9fe77612628e Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Thu, 22 Nov 2018 15:36:11 +0300 Subject: [PATCH 10/37] use print instead of echo --- rc/fzf-modules/VCS/fzf-bzr.kak | 2 +- rc/fzf-modules/VCS/fzf-git.kak | 2 +- rc/fzf-modules/VCS/fzf-hg.kak | 2 +- rc/fzf-modules/VCS/fzf-svn.kak | 4 ++-- rc/fzf-modules/fzf-ctags.kak | 12 ++++++------ rc/fzf-modules/fzf-file.kak | 10 +++++----- rc/fzf-modules/fzf-search.kak | 13 +++++-------- rc/fzf-modules/fzf-vcs.kak | 8 ++++---- 8 files changed, 25 insertions(+), 28 deletions(-) diff --git a/rc/fzf-modules/VCS/fzf-bzr.kak b/rc/fzf-modules/VCS/fzf-bzr.kak index ecdee58..e2d7e7b 100644 --- a/rc/fzf-modules/VCS/fzf-bzr.kak +++ b/rc/fzf-modules/VCS/fzf-bzr.kak @@ -27,6 +27,6 @@ define-command -hidden fzf-bzr %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_bzr_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/VCS/fzf-git.kak b/rc/fzf-modules/VCS/fzf-git.kak index dada37a..58215c3 100644 --- a/rc/fzf-modules/VCS/fzf-git.kak +++ b/rc/fzf-modules/VCS/fzf-git.kak @@ -27,6 +27,6 @@ define-command -hidden fzf-git %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_git_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/VCS/fzf-hg.kak b/rc/fzf-modules/VCS/fzf-hg.kak index 6a49de1..9912f12 100644 --- a/rc/fzf-modules/VCS/fzf-hg.kak +++ b/rc/fzf-modules/VCS/fzf-hg.kak @@ -27,6 +27,6 @@ define-command -hidden fzf-hg %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_hg_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/VCS/fzf-svn.kak b/rc/fzf-modules/VCS/fzf-svn.kak index 0a439de..ee89fc2 100644 --- a/rc/fzf-modules/VCS/fzf-svn.kak +++ b/rc/fzf-modules/VCS/fzf-svn.kak @@ -2,7 +2,7 @@ # │ Author: ║ File: │ # │ Andrey Orst ║ fzf-svn.kak │ # ╞═════════════╩═════════════════════════╡ -# │ Submodule for SVN support for fzf.kak │ +# │ Submodule for Svn support for fzf.kak │ # ╞═══════════════════════════════════════╡ # │ GitHub.com/andreyorst/fzf.kak │ # ╰───────────────────────────────────────╯ @@ -27,6 +27,6 @@ define-command -hidden fzf-svn %{ evaluate-commands %sh{ cmd=$kak_opt_fzf_svn_command ;; esac [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index 1b72470..fd38d1d 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -1206,14 +1206,14 @@ define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{ fi done if [ "$path" = "$HOME" ] && [ ! -e "./${kak_opt_tagfile:-tags}" ]; then - echo "echo -markup %{{Information}No '${kak_opt_tagfile:-tags}' found}" + printf "%s\n" "echo -markup %{{Information}No '${kak_opt_tagfile:-tags}' found}" exit elif [ "$path" = "$HOME" ] && [ -e "./${kak_opt_tagfile:-tags}" ]; then - echo "echo -markup %{{Information}'${kak_opt_tagfile:-tags}' found at $HOME. Check if it is right tag file}" + printf "%s\n" "echo -markup %{{Information}'${kak_opt_tagfile:-tags}' found at $HOME. Check if it is right tag file}" fi if [ ! -z "$1" ]; then - mode=$(echo "$additional_message" | grep ":" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") + mode=$(printf "%s\n" "$additional_message" | grep ":" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") cmd="cd $path; readtags -Q '(eq? \$kind \"$1\")' -l | cut -f1" else cmd="cd $path; readtags -l | cut -f1" @@ -1230,9 +1230,9 @@ define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{ Additional filters for $kak_opt_filetype filetype: $additional_message" - echo "info -title 'fzf tag$mode' '$message'" + printf "%s\n" "info -title 'fzf tag$mode' '$message'" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "set-option window ctagsfiles %{$path/${kak_opt_tagfile:-tags}}" - echo "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags $additional_keybindings}" + printf "%s\n" "set-option window ctagsfiles %{$path/${kak_opt_tagfile:-tags}}" + printf "%s\n" "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags $additional_keybindings}" }} diff --git a/rc/fzf-modules/fzf-file.kak b/rc/fzf-modules/fzf-file.kak index 748e047..f260688 100644 --- a/rc/fzf-modules/fzf-file.kak +++ b/rc/fzf-modules/fzf-file.kak @@ -28,7 +28,7 @@ map global fzf -docstring "open file" 'f' ': fzf-file' define-command -hidden fzf-file %{ evaluate-commands %sh{ if [ -z "$(command -v $kak_opt_fzf_file_command)" ]; then - echo "echo -markup '{Information}''$kak_opt_fzf_file_command'' is not installed. Falling back to ''find'''" + 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 @@ -43,8 +43,8 @@ define-command -hidden fzf-file %{ evaluate-commands %sh{ find*|ag*|rg*|fd*) cmd=$kak_opt_fzf_file_command ;; *) - executable=$(echo $kak_opt_fzf_file_command | awk '{print $1'}| tr '(' ' ' | cut -d " " -f 2) - echo "echo -markup '{Information}''$executable'' is not supported by the script. fzf.kak may not work as you expect.'" + items_executable=$(printf "%s\n" "$kak_opt_fzf_file_command" | grep -o -E "[[:alpha:]]+" | head -1) + printf "%s\n" "echo -markup '{Information}''$executable'' is not supported by the script. fzf.kak may not work as you expect.'" cmd=$kak_opt_fzf_file_command ;; esac title="fzf file" @@ -54,8 +54,8 @@ define-command -hidden fzf-file %{ evaluate-commands %sh{ message="Open single or multiple files. : open file in new buffer. : open file in new window $additional_keybindings" - echo "info -title '$title' '$message'" + printf "%s\n" "info -title '$title' '$message'" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - echo "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" + printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}" }} diff --git a/rc/fzf-modules/fzf-search.kak b/rc/fzf-modules/fzf-search.kak index bf8e5cb..c954a16 100644 --- a/rc/fzf-modules/fzf-search.kak +++ b/rc/fzf-modules/fzf-search.kak @@ -8,17 +8,14 @@ # │ GitHub.com/andreyorst/fzf.kak │ # ╰──────────────────────────────────────╯ -map global fzf -docstring "search in buffer" 's' ': fzf-buffer-search' +map global fzf -docstring "search in buffer" 's' ': fzf-buffer-search' define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ title="fzf buffer search" message="Search buffer with fzf, and jump to result location" - echo "info -title '$title' '$message'" - line=$kak_cursor_line - char=$(expr $kak_cursor_char_column - 1) - buffer_content=$(mktemp ${TMPDIR:-/tmp}/kak-curr-buff.XXXXXX) - echo "execute-keys %{%cat>$buffer_content;}" - echo "execute-keys $line g $char l" - echo "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content; echo 'gx')}" + printf "%s\n" "info -title '$title' '$message'" + buffer_content=$(mktemp ${TMPDIR:-/tmp}/fzf-buff-${kak_buffile##*/}.XXXXXX) + printf "%s\n" "execute-keys -draft %{%cat>$buffer_content;}" + printf "%s\n" "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content; echo 'gx')}" }} diff --git a/rc/fzf-modules/fzf-vcs.kak b/rc/fzf-modules/fzf-vcs.kak index 6806f9e..8dc4eac 100644 --- a/rc/fzf-modules/fzf-vcs.kak +++ b/rc/fzf-modules/fzf-vcs.kak @@ -38,7 +38,7 @@ bzr status" eval $cmd >/dev/null 2>&1 res=$? if [ "$res" = "0" ]; then - vcs=$(echo $cmd | awk '{print $1}') + vcs=$(printf "%s\n" "$cmd" | awk '{print $1}') title="fzf $vcs" [ ! -z "${kak_client_env_TMUX}" ] && additional_keybindings=" : open file in horizontal split @@ -46,11 +46,11 @@ bzr status" message="Open single or multiple files from git tree. : open file in new buffer. : open file in new window $additional_keybindings" - echo "info -title '$title' '$message'" - echo "fzf-$vcs" + printf "%s\n" "info -title %{$title} %{$message}" + printf "%s\n" "fzf-$vcs" exit fi done - echo "echo -markup '{Information}No VCS found in current folder'" + printf "%s\n" "echo -markup '{Information}No VCS found in current folder'" }} From 72fd5719a5e5ff37d6eea9097dc820673a9df8ff Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Thu, 22 Nov 2018 15:36:32 +0300 Subject: [PATCH 11/37] make cd separate simplified funtion --- rc/fzf-modules/fzf-cd.kak | 55 +++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/rc/fzf-modules/fzf-cd.kak b/rc/fzf-modules/fzf-cd.kak index f73a06e..d7434e8 100644 --- a/rc/fzf-modules/fzf-cd.kak +++ b/rc/fzf-modules/fzf-cd.kak @@ -17,15 +17,48 @@ str fzf_cd_command "find" map global fzf -docstring "change directory" 'c' ': fzf-cd' define-command -hidden fzf-cd %{ evaluate-commands %sh{ - title="fzf change directory" - message="Change the server''s working directory" - echo "info -title '$title' '$message'" - case $kak_opt_fzf_cd_command in - find) - cmd="(echo .. && find \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type d -print)" ;; - *) - cmd=$kak_opt_fzf_cd_command ;; - esac - echo "fzf %{change-directory} %{$cmd}" -}} + 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 + + tmux_height=$kak_opt_fzf_tmux_height + + items_executable=$(printf "%s\n" "$items_command" | grep -o -E "[[:alpha:]]+" | head -1) + if [ -z $(command -v $items_executable) ]; then + printf "%s\n" "fail %{'$items_executable' executable not found}" + exit + fi + + tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf.XXXXXX) + + if [ ! -z "${kak_client_env_TMUX}" ]; then + cmd="$items_command | fzf-tmux -d $tmux_height > $tmp" + elif [ ! -z "${kak_opt_termcmd}" ]; then + fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) + chmod 755 $fzfcmd + printf "%s\n" "cd $PWD && $items_command | fzf > $tmp" > $fzfcmd + cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" + else + printf "%s\n" "fail termcmd option is not set" + exit + fi + + ( + eval "$cmd" + if [ -s $tmp ]; then + ( + while read item; do + printf "%s\n" "evaluate-commands -client $kak_client 'change-directory' '$item'" | kak -p $kak_session + printf "%s\n" "evaluate-commands -client $kak_client fzf-cd" | kak -p $kak_session + done + ) < $tmp + fi + rm $tmp + [ -z "$fzfcmd" ] && rm $fzfcmd + ) > /dev/null 2>&1 < /dev/null & +}} From ce91198a89658192b0ed867d0c873899114eb35e Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Thu, 22 Nov 2018 15:37:06 +0300 Subject: [PATCH 12/37] use printf, simplify everything, remove cd part --- rc/fzf.kak | 65 +++++++++++++++++++++++------------------------------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index ff85cfa..df2bed6 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -67,17 +67,17 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ callback=$1 items_command=$2 additional_flags=$3 - tmux_height=$kak_opt_fzf_tmux_height - items_executable=$(echo $items_command | grep -o -E "[[:alpha:]]+" | head -1) + items_executable=$(printf "%s\n" "$items_command" | grep -o -E "[[:alpha:]]+" | head -1) if [ -z $(command -v $items_executable) ]; then - echo "fail %{'$items_executable' executable not found}" + printf "%s\n" "fail %{'$items_executable' executable not found}" exit fi - tmp=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-fzf.XXXXXX)) + tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf.XXXXXX) - if [ "$(echo $callback | grep -o -E '[[:alpha:]]+' | head -1)" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then + tmux_height=$kak_opt_fzf_tmux_height + if [ "$callback" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then case $kak_opt_fzf_highlighter in bat) highlighter="bat --color=always --style=header,grid,numbers {}" ;; @@ -90,15 +90,15 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ bat*|coderay*|highlight*|rougify*) highlighter=$kak_opt_fzf_highlighter ;; *) - executable=$(echo $kak_opt_fzf_highlighter | grep -o -E '[[:alpha:]]+' | head -1) - echo "echo -markup %{{Information}'$executable' highlighter is not supported by the script. fzf.kak may not work as you expect.}" + executable=$(printf "%s\n" "$kak_opt_fzf_highlighter" | grep -o -E '[[:alpha:]]+' | head -1) + printf "%s\n" "echo -markup %{{Information}'$executable' highlighter is not supported by the script. fzf.kak may not work as you expect.}" highlighter=$kak_opt_fzf_highlighter ;; esac if [ ! -z "${kak_client_env_TMUX}" ]; then preview_pos="pos=right:$kak_opt_fzf_preview_width;" tmux_height=$kak_opt_fzf_tmux_height_file_preview else - preview_pos='sleep 0.1; if [ $(tput cols) -gt $(expr $(tput lines) \* 2) ]; then pos=right:'$kak_opt_fzf_preview_width'; else pos=top:'$kak_opt_fzf_preview_height'; fi;' + preview_pos="sleep 0.1; [ \$(tput cols) -gt \$(expr \$(tput lines) \* 2) ] && pos=right:$kak_opt_fzf_preview_width || pos=top:$kak_opt_fzf_preview_height;" fi additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\$pos $additional_flags" fi @@ -106,12 +106,12 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ if [ ! -z "${kak_client_env_TMUX}" ]; then cmd="$preview_pos $items_command | fzf-tmux -d $tmux_height --expect ctrl-q $additional_flags > $tmp" elif [ ! -z "${kak_opt_termcmd}" ]; then - fzfcmd=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX)) + fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) chmod 755 $fzfcmd - echo "cd $PWD && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp" > $fzfcmd + printf "%s\n" "cd $PWD && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp" > $fzfcmd cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" else - echo "fail termcmd option is not set" + printf "%s\n" "fail termcmd option is not set" exit fi @@ -120,38 +120,29 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ if [ -s $tmp ]; then ( read action - if [ "${callback% *}" != "change-directory" ]; then - case $action in - ctrl-w) - wincmd="x11-new " - [ ! -z "${kak_client_env_TMUX}" ] && wincmd="tmux-new-window " ;; - ctrl-s) - wincmd="tmux-new-vertical " ;; - ctrl-v) - wincmd="tmux-new-horizontal " ;; - alt-*) - kind="${action##*-}" - callback="fzf-tag $kind" ;; - *) - wincmd= ;; - esac - callback="$wincmd$callback" - kakoune_command () { - echo "evaluate-commands -client $kak_client '$callback' '$1'" - } - else - kakoune_command() { - echo "evaluate-commands -client $kak_client '$callback' '$1'" - echo "evaluate-commands -client $kak_client fzf-cd" - } - fi + case $action in + ctrl-w) + [ ! -z "${kak_client_env_TMUX}" ] && wincmd="tmux-new-window" || wincmd="x11-new" ;; + ctrl-s) + wincmd="tmux-new-vertical" ;; + ctrl-v) + wincmd="tmux-new-horizontal" ;; + alt-*) + kind="${action##*-}" + callback="fzf-tag $kind" ;; + *) + wincmd= ;; + esac + callback="$wincmd $callback" + kakoune_command () { + printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$1'" + } while read item; do kakoune_command "$item" | kak -p $kak_session done ) < $tmp fi rm $tmp - rm $kakoune_command [ -z "$fzfcmd" ] && rm $fzfcmd ) > /dev/null 2>&1 < /dev/null & }} From f329806d00c249025adf7b3c86b5cc9aad34e9ab Mon Sep 17 00:00:00 2001 From: andreyorst Date: Thu, 22 Nov 2018 20:29:46 +0300 Subject: [PATCH 13/37] use instead of V to keep with kakoune stylefor nonsmart keys --- README.md | 2 +- rc/fzf-modules/fzf-vcs.kak | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e75992a..0b8b165 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Available mappings: - c - Switch servers working directory - f - Search for file and open it - v - Edit file in version control system tree -- V - Explicitly select which vcs command to run +- - Explicitly select which vcs command to run - s - Search over buffer contents and jump to result line - t - Browse ctags tags fzf.kak supports filtering tags on per language basis. For each filetype diff --git a/rc/fzf-modules/fzf-vcs.kak b/rc/fzf-modules/fzf-vcs.kak index 8dc4eac..bcc5eee 100644 --- a/rc/fzf-modules/fzf-vcs.kak +++ b/rc/fzf-modules/fzf-vcs.kak @@ -11,22 +11,22 @@ 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' ': fzf-vcs' -map global fzf -docstring "svitch to vcs selection mode" 'V' ': fzf-vcs-mode' +map global fzf -docstring "edit file from vcs repo" 'v' ': fzf-vcs' +map global fzf -docstring "svitch to vcs selection mode" '' ': fzf-vcs-mode' 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 +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"" -" \ + 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 From 9520b1d72c88fad8bc6926498b7e48d1eb26d85a Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Thu, 22 Nov 2018 22:58:46 +0300 Subject: [PATCH 14/37] remove unused ctrl-q shortcut, that was provided for portability, since it's not needed anymore --- rc/fzf.kak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index df2bed6..12f9783 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -104,11 +104,11 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ fi if [ ! -z "${kak_client_env_TMUX}" ]; then - cmd="$preview_pos $items_command | fzf-tmux -d $tmux_height --expect ctrl-q $additional_flags > $tmp" + cmd="$preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" elif [ ! -z "${kak_opt_termcmd}" ]; then fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) chmod 755 $fzfcmd - printf "%s\n" "cd $PWD && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp" > $fzfcmd + printf "%s\n" "cd $PWD && $preview_pos $items_command | fzf $additional_flags > $tmp" > $fzfcmd cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" else printf "%s\n" "fail termcmd option is not set" @@ -131,10 +131,10 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ kind="${action##*-}" callback="fzf-tag $kind" ;; *) - wincmd= ;; + printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$action'" | kak -p $kak_session ;; esac callback="$wincmd $callback" - kakoune_command () { + kakoune_command() { printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$1'" } while read item; do From b5f5dfe3dd23b2c2ffd3af74344c2df254d6e296 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Fri, 23 Nov 2018 10:26:34 +0300 Subject: [PATCH 15/37] export shell --- rc/fzf.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 12f9783..af67934 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -104,11 +104,11 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ fi if [ ! -z "${kak_client_env_TMUX}" ]; then - cmd="$preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" + cmd="shell=$(command -v sh); SHELL=$shell; export SHELL; $preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" elif [ ! -z "${kak_opt_termcmd}" ]; then fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) chmod 755 $fzfcmd - printf "%s\n" "cd $PWD && $preview_pos $items_command | fzf $additional_flags > $tmp" > $fzfcmd + printf "%s\n" "shell=$(command -v sh); SHELL=$shell; export SHELL; cd $PWD && $preview_pos $items_command | fzf $additional_flags > $tmp" > $fzfcmd cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" else printf "%s\n" "fail termcmd option is not set" From eef44339f57dd2ef8099e7acbb015ca8a4291b73 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Fri, 23 Nov 2018 14:43:42 +0300 Subject: [PATCH 16/37] further simplifications --- rc/fzf.kak | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index af67934..9d69b6d 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -32,7 +32,7 @@ Supported tools: These are default arguments for the tools above: : : - bat: "bat --color=always --style=header,grid,numbers {}" + bat: "bat --color=always --style=plain {}" coderay: "coderay {}" highlight: "highlight --failsafe -O ansi {}" rouge: "rougify {}" @@ -80,7 +80,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ if [ "$callback" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then case $kak_opt_fzf_highlighter in bat) - highlighter="bat --color=always --style=header,grid,numbers {}" ;; + highlighter="bat --color=always --style=plain {}" ;; coderay) highlighter="coderay {}" ;; highlight) @@ -94,24 +94,27 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ printf "%s\n" "echo -markup %{{Information}'$executable' highlighter is not supported by the script. fzf.kak may not work as you expect.}" highlighter=$kak_opt_fzf_highlighter ;; esac + if [ ! -z "${kak_client_env_TMUX}" ]; then preview_pos="pos=right:$kak_opt_fzf_preview_width;" tmux_height=$kak_opt_fzf_tmux_height_file_preview else preview_pos="sleep 0.1; [ \$(tput cols) -gt \$(expr \$(tput lines) \* 2) ] && pos=right:$kak_opt_fzf_preview_width || pos=top:$kak_opt_fzf_preview_height;" fi + additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\$pos $additional_flags" fi + shell=$(command -v sh) if [ ! -z "${kak_client_env_TMUX}" ]; then - cmd="shell=$(command -v sh); SHELL=$shell; export SHELL; $preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" + cmd="export SHELL=$shell; $preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" elif [ ! -z "${kak_opt_termcmd}" ]; then fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) chmod 755 $fzfcmd - printf "%s\n" "shell=$(command -v sh); SHELL=$shell; export SHELL; cd $PWD && $preview_pos $items_command | fzf $additional_flags > $tmp" > $fzfcmd + printf "%s\n" "export SHELL=$shell; cd $PWD && $preview_pos $items_command | fzf $additional_flags > $tmp" > $fzfcmd cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" else - printf "%s\n" "fail termcmd option is not set" + printf "%s\n" "fail %{termcmd option is not set}" exit fi @@ -127,15 +130,14 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ wincmd="tmux-new-vertical" ;; ctrl-v) wincmd="tmux-new-horizontal" ;; - alt-*) - kind="${action##*-}" - callback="fzf-tag $kind" ;; *) - printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$action'" | kak -p $kak_session ;; + if [ -n "$action" ]; then + printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$action'" | kak -p $kak_session + fi + ;; esac - callback="$wincmd $callback" kakoune_command() { - printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$1'" + printf "%s\n" "evaluate-commands -client $kak_client '$wincmd $callback' '$1'" } while read item; do kakoune_command "$item" | kak -p $kak_session From e667e1284431954386114f1db4c6d1142c9b5cb3 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Fri, 23 Nov 2018 14:44:41 +0300 Subject: [PATCH 17/37] rework fzf-ctags. Provide separate module for tag kinds, add ability to define tag file name --- rc/fzf-modules/fzf-ctags.kak | 2076 +++++++++++++++------------------- 1 file changed, 889 insertions(+), 1187 deletions(-) diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index fd38d1d..0bbfde3 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -18,1207 +18,911 @@ Default arguments: " \ 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' ': fzf-tag' -declare-option -hidden -docstring "A set of mappings for Ada filetype" \ -str fzf_tag_ada " -: package specifications -: packages -: types -: subtypes -: record type components -: enum type literals -: variables -: generic formal parameters -: constants -: user defined exceptions -: subprogram specifications -: subprograms -: task specifications -: tasks -: protected data specifications -: protected data -: task/protected data entries -: labels -: loop/declare identifiers -: (ctags internal use)" - -declare-option -hidden -docstring "A set of mappings for Ant filetype" \ -str fzf_tag_ant " -: projects -: targets -: properties(global) -: antfiles" - -declare-option -hidden -docstring "A set of mappings for Asciidoc filetype" \ -str fzf_tag_asciidoc " -: chapters -: sections -: level 2 sections -: level 3 sections -: level 4 sections -: level 5 sections -: anchors" - -declare-option -hidden -docstring "A set of mappings for Asm filetype" \ -str fzf_tag_asm " -: defines -: labels -: macros -: types (structs and records) -: sections" - -declare-option -hidden -docstring "A set of mappings for Asp filetype" \ -str fzf_tag_asp " -: constants -: classes -: functions -: subroutines -: variables" - -declare-option -hidden -docstring "A set of mappings for Autoconf filetype" \ -str fzf_tag_autoconf " -: packages -: templates -: autoconf macros -: options specified with --with-... -: options specified with --enable-... -: substitution keys -: automake conditions -: definitions" - -declare-option -hidden -docstring "A set of mappings for AutoIt filetype" \ -str fzf_tag_autoit " -: functions -: regions -: global variables -: local variables -: included scripts" - -declare-option -hidden -docstring "A set of mappings for Automake filetype" \ -str fzf_tag_automake " -: directories -: programs -: manuals -: ltlibraries -: libraries -: scripts -: datum -: conditions" - -declare-option -hidden -docstring "A set of mappings for Awk filetype" \ -str fzf_tag_awk " -: functions" - -declare-option -hidden -docstring "A set of mappings for Basic filetype" \ -str fzf_tag_basic " -: constants -: functions -: labels -: types -: variables -: enumerations" - -declare-option -hidden -docstring "A set of mappings for BETA filetype" \ -str fzf_tag_beta " -: fragment definitions -: slots (fragment uses) -: patterns (virtual or rebound)" - -declare-option -hidden -docstring "A set of mappings for Clojure filetype" \ -str fzf_tag_clojure " -: functions -: namespaces" - -declare-option -hidden -docstring "A set of mappings for CMake filetype" \ -str fzf_tag_cmake " -: functions -: macros -: targets -: variable definitions -: options specified with -D -: projects -: regex" - -declare-option -hidden -docstring "A set of mappings for C filetype" \ -str fzf_tag_c " -: macro definitions -: enumerators (values inside an enumeration) -: function definitions -: enumeration names -: included header files -: struct, and union members -: structure names -: typedefs -: union names -: variable definitions" - -declare-option -hidden -docstring "A set of mappings for C++ filetype" \ -str fzf_tag_cpp " -: macro definitions -: enumerators (values inside an enumeration) -: function definitions -: enumeration names -: included header files -: class, struct, and union members -: structure names -: typedefs -: union names -: variable definitions -: classes -: namespaces" - -declare-option -hidden -docstring "A set of mappings for CPreProcessor filetype" \ -str fzf_tag_cpreprocessor " -: macro definitions -: included header files" - -declare-option -hidden -docstring "A set of mappings for CSS filetype" \ -str fzf_tag_css " -: classes -: selectors -: identities" - -declare-option -hidden -docstring "A set of mappings for C# filetype" \ -str fzf_tag_csharp " -: classes -: macro definitions -: enumerators (values inside an enumeration) -: events -: fields -: enumeration names -: interfaces -: methods -: namespaces -: properties -: structure names -: typedefs" - -declare-option -hidden -docstring "A set of mappings for Ctags filetype" \ -str fzf_tag_ctags " -: language definitions -: kind definitions" - -declare-option -hidden -docstring "A set of mappings for Cobol filetype" \ -str fzf_tag_cobol " -: paragraphs -: data items -: source code file -: file descriptions (FD, SD, RD) -: group items -: program ids -: sections -: divisions" - -declare-option -hidden -docstring "A set of mappings for CUDA filetype" \ -str fzf_tag_cuda " -: macro definitions -: enumerators (values inside an enumeration) -: function definitions -: enumeration names -: included header files -: struct, and union members -: structure names -: typedefs -: union names -: variable definitions" - -declare-option -hidden -docstring "A set of mappings for D filetype" \ -str fzf_tag_d " -: aliases -: classes -: enumeration names -: enumerators (values inside an enumeration) -: function definitions -: interfaces -: class, struct, and union members -: mixins -: modules -: namespaces -: structure names -: templates -: union names -: variable definitions -: version statements" - -declare-option -hidden -docstring "A set of mappings for Diff filetype" \ -str fzf_tag_diff " -: modified files -: newly created files -: deleted files -: hunks" - -declare-option -hidden -docstring "A set of mappings for DTD filetype" \ -str fzf_tag_dtd " -: entities -: parameter entities -: elements -: attributes -: notations" - -declare-option -hidden -docstring "A set of mappings for DTS filetype" \ -str fzf_tag_dts " -: phandlers -: labels -: regex" - -declare-option -hidden -docstring "A set of mappings for DosBatch filetype" \ -str fzf_tag_dosbatch " -: labels -: variables" - -declare-option -hidden -docstring "A set of mappings for Eiffel filetype" \ -str fzf_tag_eiffel " -: classes -: features" - -declare-option -hidden -docstring "A set of mappings for Elm filetype" \ -str fzf_tag_elm " -: Module -: Renamed Imported Module -: Port -: Type Definition -: Type Constructor -: Type Alias -: Functions" - -declare-option -hidden -docstring "A set of mappings for Erlang filetype" \ -str fzf_tag_erlang " -: macro definitions -: functions -: modules -: record definitions -: type definitions" - -declare-option -hidden -docstring "A set of mappings for Falcon filetype" \ -str fzf_tag_falcon " -: classes -: functions -: class members -: variables -: imports" - -declare-option -hidden -docstring "A set of mappings for Flex filetype" \ -str fzf_tag_flex " -: functions -: classes -: methods -: properties -: global variables -: mxtags" - -declare-option -hidden -docstring "A set of mappings for Fortran filetype" \ -str fzf_tag_fortran " -: block data -: common blocks -: entry points -: enumerations -: functions -: interface contents, generic names, and operators -: type and structure components -: labels -: modules -: type bound procedures -: namelists -: enumeration values -: programs -: subroutines -: derived types and structures -: program (global) and module variables -: submodules" - -declare-option -hidden -docstring "A set of mappings for Fypp filetype" \ -str fzf_tag_fypp " -: macros" - -declare-option -hidden -docstring "A set of mappings for Gdbinit filetype" \ -str fzf_tag_gdbinit " -: definitions -: toplevel variables" - -declare-option -hidden -docstring "A set of mappings for Go filetype" \ -str fzf_tag_go " -: packages -: functions -: constants -: types -: variables -: structs -: interfaces -: struct members -: struct anonymous members -: unknown -: name for specifying imported package" - -declare-option -hidden -docstring "A set of mappings for HTML filetype" \ -str fzf_tag_html " -: named anchors -: H1 headings -: H2 headings -: H3 headings" - -declare-option -hidden -docstring "A set of mappings for Iniconf filetype" \ -str fzf_tag_iniconf " -: sections -: keys" - -declare-option -hidden -docstring "A set of mappings for ITcl filetype" \ -str fzf_tag_itcl " -: classes -: methods -: object-specific variables -: common variables -: procedures within the class namespace" - -declare-option -hidden -docstring "A set of mappings for Java filetype" \ -str fzf_tag_java " -: annotation declarations -: classes -: enum constants -: fields -: enum types -: interfaces -: methods -: packages" - -declare-option -hidden -docstring "A set of mappings for JavaProperties filetype" \ -str fzf_tag_javaproperties " -: keys" - -declare-option -hidden -docstring "A set of mappings for JavaScript filetype" \ -str fzf_tag_javascript " -: functions -: classes -: methods -: properties -: constants -: global variables -: generators" - -declare-option -hidden -docstring "A set of mappings for JSON filetype" \ -str fzf_tag_json " -: objects -: arrays -: numbers -: strings -: booleans -: nulls" - -declare-option -hidden -docstring "A set of mappings for LdScript filetype" \ -str fzf_tag_ldscript " -: sections -: symbols -: versions -: input sections" - -declare-option -hidden -docstring "A set of mappings for Lisp filetype" \ -str fzf_tag_lisp " -: functions" - -declare-option -hidden -docstring "A set of mappings for Lua filetype" \ -str fzf_tag_lua " -: functions" - -declare-option -hidden -docstring "A set of mappings for M4 filetype" \ -str fzf_tag_m4 " -: macros -: macro files" - -declare-option -hidden -docstring "A set of mappings for Man filetype" \ -str fzf_tag_man " -: titles -: sections" - -declare-option -hidden -docstring "A set of mappings for Make filetype" \ -str fzf_tag_make " -: macros -: targets -: makefiles" - -declare-option -hidden -docstring "A set of mappings for Markdown filetype" \ -str fzf_tag_markdown " -: chapsters -: sections -: subsections -: subsubsections -: level 4 subsections -: level 5 subsections -: regex" - -declare-option -hidden -docstring "A set of mappings for MatLab filetype" \ -str fzf_tag_matlab " -: function -: variable -: class" - -declare-option -hidden -docstring "A set of mappings for Myrddin filetype" \ -str fzf_tag_myrddin " -: functions -: constants -: variables -: types -: traits -: packages" - -declare-option -hidden -docstring "A set of mappings for ObjectiveC filetype" \ -str fzf_tag_objectivec " -: class interface -: class implementation -: Protocol -: Object's method -: Class' method -: Global variable -: Object field -: A function -: A property -: A type alias -: A type structure -: An enumeration -: A preprocessor macro" - -declare-option -hidden -docstring "A set of mappings for OCaml filetype" \ -str fzf_tag_ocaml " -: classes -: Object's method -: Module or functor -: Global variable -: Signature item -: Type name -: A function -: A constructor -: A 'structure' field -: An exception" - -declare-option -hidden -docstring "A set of mappings for Passwd filetype" \ -str fzf_tag_passwd " -: user names" - -declare-option -hidden -docstring "A set of mappings for Pascal filetype" \ -str fzf_tag_pascal " -: functions -: procedures" - -declare-option -hidden -docstring "A set of mappings for Perl filetype" \ -str fzf_tag_perl " -: constants -: formats -: labels -: packages -: subroutines" - -declare-option -hidden -docstring "A set of mappings for Perl6 filetype" \ -str fzf_tag_perl6 " -: classes -: grammars -: methods -: modules -: packages -: roles -: rules -: submethods -: subroutines -: tokens" - -declare-option -hidden -docstring "A set of mappings for PHP filetype" \ -str fzf_tag_php " -: classes -: constant definitions -: functions -: interfaces -: namespaces -: traits -: variables -: aliases" - -declare-option -hidden -docstring "A set of mappings for Pod filetype" \ -str fzf_tag_pod " -: chapters -: sections -: subsections -: subsubsections" - -declare-option -hidden -docstring "A set of mappings for Protobuf filetype" \ -str fzf_tag_protobuf " -: packages -: messages -: fields -: enum constants -: enum types -: services" - -declare-option -hidden -docstring "A set of mappings for PuppetManifest filetype" \ -str fzf_tag_puppetmanifest " -: classes -: definitions -: nodes -: resources -: variables" - -declare-option -hidden -docstring "A set of mappings for Python filetype" \ -str fzf_tag_python " -: classes -: functions -: class members -: variables -: name referring a module defined in other file -: modules -: name referring a class/variable/function/module defined in other module" - -declare-option -hidden -docstring "A set of mappings for PythonLoggingConfig filetype" \ -str fzf_tag_pythonloggingconfig " -: logger sections -: logger qualnames" - -declare-option -hidden -docstring "A set of mappings for QemuHX filetype" \ -str fzf_tag_qemuhx " -: QEMU Management Protocol dispatch table entries -: item in texinfo doc" - -declare-option -hidden -docstring "A set of mappings for QtMoc filetype" \ -str fzf_tag_qtmoc " -: slots -: signals -: properties" - -declare-option -hidden -docstring "A set of mappings for R filetype" \ -str fzf_tag_r " -: functions -: libraries -: sources -: global variables -: function variables" - -declare-option -hidden -docstring "A set of mappings for RSpec filetype" \ -str fzf_tag_rspec " -: describes -: contexts" - -declare-option -hidden -docstring "A set of mappings for REXX filetype" \ -str fzf_tag_rexx " -: subroutines" - -declare-option -hidden -docstring "A set of mappings for Robot filetype" \ -str fzf_tag_robot " -: testcases -: keywords -: variables" - -declare-option -hidden -docstring "A set of mappings for RpmSpec filetype" \ -str fzf_tag_rpmspec " -: tags -: macros -: packages -: global macros" - -declare-option -hidden -docstring "A set of mappings for ReStructuredText filetype" \ -str fzf_tag_restructuredtext " -: chapters -: sections -: subsections -: subsubsections -: targets" - -declare-option -hidden -docstring "A set of mappings for Ruby filetype" \ -str fzf_tag_ruby " -: classes -: methods -: modules -: singleton methods" - -declare-option -hidden -docstring "A set of mappings for Rust filetype" \ -str fzf_tag_rust " -: module -: structural type -: trait interface -: implementation -: Function -: Enum -: Type Alias -: Global variable -: Macro Definition -: A struct field -: An enum variant -: A method" - -declare-option -hidden -docstring "A set of mappings for Scheme filetype" \ -str fzf_tag_scheme " -: functions -: sets" - -declare-option -hidden -docstring "A set of mappings for Sh filetype" \ -str fzf_tag_sh " -: aliases -: functions -: script files -: label for here document" - -declare-option -hidden -docstring "A set of mappings for SLang filetype" \ -str fzf_tag_slang " -: functions -: namespaces" - -declare-option -hidden -docstring "A set of mappings for SML filetype" \ -str fzf_tag_sml " -: exception declarations -: function definitions -: functor definitions -: signature declarations -: structure declarations -: type definitions -: value bindings" - -declare-option -hidden -docstring "A set of mappings for SQL filetype" \ -str fzf_tag_sql " -: cursors -: functions -: record fields -: block label -: packages -: procedures -: subtypes -: tables -: triggers -: variables -: indexes -: events -: publications -: services -: domains -: views -: synonyms -: MobiLink Table Scripts -: MobiLink Conn Scripts -: MobiLink Properties " - -declare-option -hidden -docstring "A set of mappings for SystemdUnit filetype" \ -str fzf_tag_systemdunit " -: units" - -declare-option -hidden -docstring "A set of mappings for Tcl filetype" \ -str fzf_tag_tcl " -: procedures -: namespaces" - -declare-option -hidden -docstring "A set of mappings for TclOO filetype" \ -str fzf_tag_tcloo " -: classes -: methods" - -declare-option -hidden -docstring "A set of mappings for Tex filetype" \ -str fzf_tag_tex " -: parts -: chapters -: sections -: subsections -: subsubsections -: paragraphs -: subparagraphs -: labels -: includes" - -declare-option -hidden -docstring "A set of mappings for TTCN filetype" \ -str fzf_tag_ttcn " -: module definition -: type definition -: constant definition -: template definition -: function definition -: signature definition -: testcase definition -: altstep definition -: group definition -: module parameter definition -: variable instance -: timer instance -: port instance -: record/set/union member -: enumeration value" - -declare-option -hidden -docstring "A set of mappings for Vera filetype" \ -str fzf_tag_vera " -: classes -: macro definitions -: enumerators (values inside an enumeration) -: function definitions -: enumeration names -: interfaces -: class, struct, and union members -: programs -: signals -: tasks -: typedefs -: variable definitions -: included header files" - -declare-option -hidden -docstring "A set of mappings for Verilog filetype" \ -str fzf_tag_verilog " -: constants (define, parameter, specparam) -: events -: functions -: modules -: net data types -: ports -: register data types -: tasks -: blocks" - -declare-option -hidden -docstring "A set of mappings for SystemVerilog filetype" \ -str fzf_tag_systemverilog " -: constants (define, parameter, specparam, enum values) -: events -: functions -: modules -: net data types -: ports -: register data types -: tasks -: blocks -: assertions -: classes -: covergroups -: enumerators -: interfaces -: modports -: packages -: programs -: properties -: structs and unions -: type declarations" - -declare-option -hidden -docstring "A set of mappings for VHDL filetype" \ -str fzf_tag_vhdl " -: constant declarations -: type definitions -: subtype definitions -: record names -: entity declarations -: function prototypes and declarations -: procedure prototypes and declarations -: package definitions" - -declare-option -hidden -docstring "A set of mappings for Vim filetype" \ -str fzf_tag_vim " -: autocommand groups -: user-defined commands -: function definitions -: maps -: variable definitions -: vimball filename" - -declare-option -hidden -docstring "A set of mappings for WindRes filetype" \ -str fzf_tag_windres " -: dialogs -: menus -: icons -: bitmaps -: cursors -: fonts -: versions -: accelerators" - -declare-option -hidden -docstring "A set of mappings for YACC filetype" \ -str fzf_tag_yacc " -: labels" - -declare-option -hidden -docstring "A set of mappings for YumRepo filetype" \ -str fzf_tag_yumrepo " -: repository id" - -declare-option -hidden -docstring "A set of mappings for Zephir filetype" \ -str fzf_tag_zephir " -: classes -: constant definitions -: functions -: interfaces -: namespaces -: traits -: variables -: aliases" - -declare-option -hidden -docstring "A set of mappings for DBusIntrospect filetype" \ -str fzf_tag_dbusintrospect " -: interfaces -: methods -: signals -: properties" - -declare-option -hidden -docstring "A set of mappings for Glade filetype" \ -str fzf_tag_glade " -: identifiers -: classes -: handlers" - -declare-option -hidden -docstring "A set of mappings for Maven2 filetype" \ -str fzf_tag_maven2 " -: group identifiers -: artifact identifiers -: properties -: repository identifiers" - -declare-option -hidden -docstring "A set of mappings for PlistXML filetype" \ -str fzf_tag_plistxml " -: keys" - -declare-option -hidden -docstring "A set of mappings for RelaxNG filetype" \ -str fzf_tag_relaxng " -: elements -: attributes -: named patterns" - -declare-option -hidden -docstring "A set of mappings for SVG filetype" \ -str fzf_tag_svg " -: id attributes" - -declare-option -hidden -docstring "A set of mappings for XSLT filetype" \ -str fzf_tag_xslt " -: stylesheets -: parameters -: matched template -: matched template -: variables" - -declare-option -hidden -docstring "A set of mappings for Yaml filetype" \ -str fzf_tag_yaml " -: anchors" - -declare-option -hidden -docstring "A set of mappings for AnsiblePlaybook filetype" \ -str fzf_tag_ansibleplaybook " -: plays" +# 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" '' ': enter-user-mode fzf-ctags' + + hook global WinSetOption filetype=ada %{ + map global fzf-ctags '' ': fzf-tag P' -docstring "package specifications" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 't' ': fzf-tag t' -docstring "types" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "subtypes" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "record type components" + map global fzf-ctags 'l' ': fzf-tag l' -docstring "enum type literals" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "generic formal parameters" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "constants" + map global fzf-ctags 'x' ': fzf-tag x' -docstring "user defined exceptions" + map global fzf-ctags '' ': fzf-tag R' -docstring "subprogram specifications" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "subprograms" + map global fzf-ctags '' ': fzf-tag K' -docstring "task specifications" + map global fzf-ctags 'k' ': fzf-tag k' -docstring "tasks" + map global fzf-ctags '' ': fzf-tag O' -docstring "protected data specifications" + map global fzf-ctags 'o' ': fzf-tag o' -docstring "protected data" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "task/protected data entries" + map global fzf-ctags 'b' ': fzf-tag b' -docstring "labels" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "projects" + map global fzf-ctags 't' ': fzf-tag t' -docstring "targets" + } + + hook global WinSetOption filetype=ant %{ + map global fzf-ctags '' ': fzf-tag P' -docstring "properties(global)" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "antfiles" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapters" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + } + + hook global WinSetOption filetype=asciidoc %{ + map global fzf-ctags '' ': fzf-tag S' -docstring "level 2 sections" + map global fzf-ctags 't' ': fzf-tag t' -docstring "level 3 sections" + map global fzf-ctags '' ': fzf-tag T' -docstring "level 4 sections" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "level 5 sections" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "anchors" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "defines" + map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + } + + hook global WinSetOption filetype=asm %{ + map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" + map global fzf-ctags 't' ': fzf-tag t' -docstring "types (structs and records)" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "constants" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + } + + hook global WinSetOption filetype=asp %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 't' ': fzf-tag t' -docstring "templates" + } + + hook global WinSetOption filetype=autoconf %{ + map global fzf-ctags 'm' ': fzf-tag m' -docstring "autoconf macros" + map global fzf-ctags 'w' ': fzf-tag w' -docstring "options specified with --with-..." + map global fzf-ctags 'e' ': fzf-tag e' -docstring "options specified with --enable-..." + map global fzf-ctags 's' ': fzf-tag s' -docstring "substitution keys" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "automake conditions" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "definitions" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "regions" + } + + hook global WinSetOption filetype=autoit %{ + map global fzf-ctags 'g' ': fzf-tag g' -docstring "global variables" + map global fzf-ctags 'l' ': fzf-tag l' -docstring "local variables" + map global fzf-ctags '' ': fzf-tag S' -docstring "included scripts" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "directories" + map global fzf-ctags '' ': fzf-tag P' -docstring "programs" + } + + hook global WinSetOption filetype=automake %{ + map global fzf-ctags '' ': fzf-tag M' -docstring "manuals" + map global fzf-ctags '' ': fzf-tag T' -docstring "ltlibraries" + map global fzf-ctags '' ': fzf-tag L' -docstring "libraries" + map global fzf-ctags '' ': fzf-tag S' -docstring "scripts" + map global fzf-ctags '' ': fzf-tag D' -docstring "datum" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "conditions" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants" + } + + hook global WinSetOption filetype=awk %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + } + + hook global WinSetOption filetype=basic %{ + map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + map global fzf-ctags 't' ': fzf-tag t' -docstring "types" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumerations" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "fragment definitions" + map global fzf-ctags 's' ': fzf-tag s' -docstring "slots (fragment uses)" + } + + hook global WinSetOption filetype=beta %{ + map global fzf-ctags 'v' ': fzf-tag v' -docstring "patterns (virtual or rebound)" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + } + + hook global WinSetOption filetype=clojure %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" + } + + hook global WinSetOption filetype=cmake %{ + map global fzf-ctags 't' ': fzf-tag t' -docstring "targets" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" + map global fzf-ctags '' ': fzf-tag D' -docstring "options specified with -D" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "projects" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "regex" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + } + + hook global WinSetOption filetype=c %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" + map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "struct, and union members" + map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" + map global fzf-ctags 't' ': fzf-tag t' -docstring "typedefs" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "union names" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + } + + hook global WinSetOption filetype=cpp %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" + map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "class, struct, and union members" + map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" + map global fzf-ctags 't' ': fzf-tag t' -docstring "typedefs" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "union names" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" + map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" + } + + hook global WinSetOption filetype=cpreprocessor %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 's' ': fzf-tag s' -docstring "selectors" + } + + hook global WinSetOption filetype=css %{ + map global fzf-ctags 'i' ': fzf-tag i' -docstring "identities" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" + } + + hook global WinSetOption filetype=csharp %{ + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + map global fzf-ctags '' ': fzf-tag E' -docstring "events" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "fields" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" + map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" + map global fzf-ctags 't' ': fzf-tag t' -docstring "typedefs" + map global fzf-ctags 'l' ': fzf-tag l' -docstring "language definitions" + map global fzf-ctags 'k' ': fzf-tag k' -docstring "kind definitions" + } + + hook global WinSetOption filetype=ctags %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "paragraphs" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "data items" + } + + hook global WinSetOption filetype=cobol %{ + map global fzf-ctags '' ': fzf-tag S' -docstring "source code file" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "file descriptions (FD, SD, RD)" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "group items" + map global fzf-ctags '' ': fzf-tag P' -docstring "program ids" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags '' ': fzf-tag D' -docstring "divisions" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + } + + hook global WinSetOption filetype=cuda %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" + map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "struct, and union members" + map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" + map global fzf-ctags 't' ': fzf-tag t' -docstring "typedefs" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "union names" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "aliases" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + } + + hook global WinSetOption filetype=d %{ + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "class, struct, and union members" + map global fzf-ctags '' ': fzf-tag X' -docstring "mixins" + map global fzf-ctags '' ': fzf-tag M' -docstring "modules" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" + map global fzf-ctags '' ': fzf-tag T' -docstring "templates" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "union names" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" + map global fzf-ctags '' ': fzf-tag V' -docstring "version statements" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "modified files" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "newly created files" + } + + hook global WinSetOption filetype=diff %{ + map global fzf-ctags 'd' ': fzf-tag d' -docstring "deleted files" + map global fzf-ctags 'h' ': fzf-tag h' -docstring "hunks" + map global fzf-ctags '' ': fzf-tag E' -docstring "entities" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "parameter entities" + } + + hook global WinSetOption filetype=dtd %{ + map global fzf-ctags 'e' ': fzf-tag e' -docstring "elements" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "attributes" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "notations" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "phandlers" + map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + } + + hook global WinSetOption filetype=dts %{ + map global fzf-ctags 'r' ': fzf-tag r' -docstring "regex" + map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + } + + hook global WinSetOption filetype=dosbatch %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "features" + } + + hook global WinSetOption filetype=eiffel %{ + map global fzf-ctags 'm' ': fzf-tag m' -docstring "Module" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "Renamed Imported Module" + } + + hook global WinSetOption filetype=elm %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "Port" + map global fzf-ctags 't' ': fzf-tag t' -docstring "Type Definition" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "Type Constructor" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "Type Alias" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "Functions" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + } + + hook global WinSetOption filetype=erlang %{ + map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "record definitions" + map global fzf-ctags 't' ': fzf-tag t' -docstring "type definitions" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + } + + hook global WinSetOption filetype=falcon %{ + map global fzf-ctags 'm' ': fzf-tag m' -docstring "class members" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "imports" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + } + + hook global WinSetOption filetype=flex %{ + map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "global variables" + map global fzf-ctags 'x' ': fzf-tag x' -docstring "mxtags" + map global fzf-ctags 'b' ': fzf-tag b' -docstring "block data" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "common blocks" + } + + hook global WinSetOption filetype=fortran %{ + map global fzf-ctags 'e' ': fzf-tag e' -docstring "entry points" + map global fzf-ctags '' ': fzf-tag E' -docstring "enumerations" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interface contents, generic names, and operators" + map global fzf-ctags 'k' ': fzf-tag k' -docstring "type and structure components" + map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" + map global fzf-ctags '' ': fzf-tag M' -docstring "type bound procedures" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namelists" + map global fzf-ctags '' ': fzf-tag N' -docstring "enumeration values" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "programs" + map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" + map global fzf-ctags 't' ': fzf-tag t' -docstring "derived types and structures" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "program (global) and module variables" + map global fzf-ctags '' ': fzf-tag S' -docstring "submodules" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "definitions" + } + + hook global WinSetOption filetype=fypp %{ + map global fzf-ctags 't' ': fzf-tag t' -docstring "toplevel variables" + } + + hook global WinSetOption filetype=gdbinit %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + } + + hook global WinSetOption filetype=go %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants" + map global fzf-ctags 't' ': fzf-tag t' -docstring "types" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 's' ': fzf-tag s' -docstring "structs" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "struct members" + map global fzf-ctags '' ': fzf-tag M' -docstring "struct anonymous members" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "unknown" + map global fzf-ctags '' ': fzf-tag P' -docstring "name for specifying imported package" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "named anchors" + map global fzf-ctags 'h' ': fzf-tag h' -docstring "H1 headings" + } + + hook global WinSetOption filetype=html %{ + map global fzf-ctags 'i' ': fzf-tag i' -docstring "H2 headings" + map global fzf-ctags 'j' ': fzf-tag j' -docstring "H3 headings" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags 'k' ': fzf-tag k' -docstring "keys" + } + + hook global WinSetOption filetype=iniconf %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + } + + hook global WinSetOption filetype=itcl %{ + map global fzf-ctags 'v' ': fzf-tag v' -docstring "object-specific variables" + map global fzf-ctags '' ': fzf-tag C' -docstring "common variables" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "procedures within the class namespace" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enum constants" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "fields" + } + + hook global WinSetOption filetype=java %{ + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enum types" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 'k' ': fzf-tag k' -docstring "keys" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + } + + hook global WinSetOption filetype=javaproperties %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" + } + + hook global WinSetOption filetype=javascript %{ + map global fzf-ctags '' ': fzf-tag C' -docstring "constants" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "global variables" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "generators" + map global fzf-ctags 'o' ': fzf-tag o' -docstring "objects" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "arrays" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "numbers" + map global fzf-ctags 's' ': fzf-tag s' -docstring "strings" + } + + hook global WinSetOption filetype=json %{ + map global fzf-ctags 'b' ': fzf-tag b' -docstring "booleans" + map global fzf-ctags 'z' ': fzf-tag z' -docstring "nulls" + map global fzf-ctags '' ': fzf-tag S' -docstring "sections" + map global fzf-ctags 's' ': fzf-tag s' -docstring "symbols" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "versions" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "input sections" + } + + hook global WinSetOption filetype=ldscript %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "macros" + map global fzf-ctags '' ': fzf-tag I' -docstring "macro files" + } + + hook global WinSetOption filetype=lisp %{ + map global fzf-ctags 't' ': fzf-tag t' -docstring "titles" + } + + hook global WinSetOption filetype=lua %{ + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + } + + hook global WinSetOption filetype=m4 %{ + map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" + map global fzf-ctags 't' ': fzf-tag t' -docstring "targets" + } + + hook global WinSetOption filetype=man %{ + map global fzf-ctags '' ': fzf-tag I' -docstring "makefiles" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapsters" + } + + hook global WinSetOption filetype=make %{ + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags '' ': fzf-tag S' -docstring "subsections" + map global fzf-ctags 't' ': fzf-tag t' -docstring "subsubsections" + } + + hook global WinSetOption filetype=markdown %{ + map global fzf-ctags '' ': fzf-tag T' -docstring "level 4 subsections" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "level 5 subsections" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "regex" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "function" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "class" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + } + + hook global WinSetOption filetype=matlab %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 't' ': fzf-tag t' -docstring "types" + } + + hook global WinSetOption filetype=myrddin %{ + map global fzf-ctags 'r' ': fzf-tag r' -docstring "traits" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "class interface" + map global fzf-ctags '' ': fzf-tag I' -docstring "class implementation" + map global fzf-ctags '' ': fzf-tag P' -docstring "Protocol" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "Object's method" + } + + hook global WinSetOption filetype=objectivec %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "Class' method" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "Global variable" + map global fzf-ctags '' ': fzf-tag E' -docstring "Object field" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "A function" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "A property" + map global fzf-ctags 't' ': fzf-tag t' -docstring "A type alias" + map global fzf-ctags 's' ': fzf-tag s' -docstring "A type structure" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "An enumeration" + map global fzf-ctags '' ': fzf-tag M' -docstring "A preprocessor macro" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "Object's method" + map global fzf-ctags '' ': fzf-tag M' -docstring "Module or functor" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "Global variable" + } + + hook global WinSetOption filetype=ocaml %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "Signature item" + map global fzf-ctags 't' ': fzf-tag t' -docstring "Type name" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "A function" + map global fzf-ctags '' ': fzf-tag C' -docstring "A constructor" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "A 'structure' field" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "An exception" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "user names" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "procedures" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants" + } + + hook global WinSetOption filetype=passwd %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "formats" + } + + hook global WinSetOption filetype=pascal %{ + map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + } + + hook global WinSetOption filetype=perl %{ + map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "grammars" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + map global fzf-ctags 'o' ': fzf-tag o' -docstring "modules" + } + + hook global WinSetOption filetype=perl6 %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "roles" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "rules" + map global fzf-ctags 'b' ': fzf-tag b' -docstring "submethods" + map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" + map global fzf-ctags 't' ': fzf-tag t' -docstring "tokens" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "constant definitions" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + } + + hook global WinSetOption filetype=php %{ + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + map global fzf-ctags 't' ': fzf-tag t' -docstring "traits" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "aliases" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapters" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags '' ': fzf-tag S' -docstring "subsections" + map global fzf-ctags 't' ': fzf-tag t' -docstring "subsubsections" + } + + hook global WinSetOption filetype=pod %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "messages" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "fields" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enum constants" + } + + hook global WinSetOption filetype=protobuf %{ + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enum types" + map global fzf-ctags 's' ': fzf-tag s' -docstring "services" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "definitions" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "nodes" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "resources" + } + + hook global WinSetOption filetype=puppetmanifest %{ + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "class members" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + } + + hook global WinSetOption filetype=python %{ + map global fzf-ctags '' ': fzf-tag I' -docstring "name referring a module defined in other file" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "modules" + map global fzf-ctags 'x' ': fzf-tag x' -docstring "name referring a class/variable/function/module defined in other module" + map global fzf-ctags '' ': fzf-tag L' -docstring "logger sections" + map global fzf-ctags 'q' ': fzf-tag q' -docstring "logger qualnames" + map global fzf-ctags 'q' ': fzf-tag q' -docstring "QEMU Management Protocol dispatch table entries" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "item in texinfo doc" + } + + hook global WinSetOption filetype=pythonloggingconfig %{ + map global fzf-ctags 's' ': fzf-tag s' -docstring "slots" + map global fzf-ctags '' ': fzf-tag S' -docstring "signals" + } + + hook global WinSetOption filetype=qemuhx %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + } + + hook global WinSetOption filetype=qtmoc %{ + map global fzf-ctags 'l' ': fzf-tag l' -docstring "libraries" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sources" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "global variables" + } + + hook global WinSetOption filetype=r %{ + map global fzf-ctags 'v' ': fzf-tag v' -docstring "function variables" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "describes" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "contexts" + map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" + map global fzf-ctags 't' ': fzf-tag t' -docstring "testcases" + } + + hook global WinSetOption filetype=rspec %{ + map global fzf-ctags 'k' ': fzf-tag k' -docstring "keywords" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + } + + hook global WinSetOption filetype=rexx %{ + map global fzf-ctags 't' ': fzf-tag t' -docstring "tags" + } + + hook global WinSetOption filetype=robot %{ + map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "global macros" + } + + hook global WinSetOption filetype=rpmspec %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapters" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags '' ': fzf-tag S' -docstring "subsections" + map global fzf-ctags 't' ': fzf-tag t' -docstring "subsubsections" + } + + hook global WinSetOption filetype=restructuredtext %{ + map global fzf-ctags '' ': fzf-tag T' -docstring "targets" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "methods" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" + map global fzf-ctags '' ': fzf-tag S' -docstring "singleton methods" + } + + hook global WinSetOption filetype=ruby %{ + map global fzf-ctags 'n' ': fzf-tag n' -docstring "module" + map global fzf-ctags 's' ': fzf-tag s' -docstring "structural type" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "trait interface" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "implementation" + } + + hook global WinSetOption filetype=rust %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "Function" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "Enum" + map global fzf-ctags 't' ': fzf-tag t' -docstring "Type Alias" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "Global variable" + map global fzf-ctags '' ': fzf-tag M' -docstring "Macro Definition" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "A struct field" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "An enum variant" + map global fzf-ctags '' ': fzf-tag P' -docstring "A method" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sets" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "aliases" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + } + + hook global WinSetOption filetype=scheme %{ + map global fzf-ctags 's' ': fzf-tag s' -docstring "script files" + map global fzf-ctags 'h' ': fzf-tag h' -docstring "label for here document" + } + + hook global WinSetOption filetype=sh %{ + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "functor definitions" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "value bindings" + } + + hook global WinSetOption filetype=slang %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "cursors" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + } + + hook global WinSetOption filetype=sml %{ + map global fzf-ctags '' ': fzf-tag E' -docstring "record fields" + map global fzf-ctags '' ': fzf-tag L' -docstring "block label" + map global fzf-ctags '' ': fzf-tag P' -docstring "packages" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "procedures" + map global fzf-ctags 's' ': fzf-tag s' -docstring "subtypes" + map global fzf-ctags 't' ': fzf-tag t' -docstring "tables" + map global fzf-ctags '' ': fzf-tag T' -docstring "triggers" + } + + hook global WinSetOption filetype=sql %{ + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "indexes" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "events" + map global fzf-ctags '' ': fzf-tag U' -docstring "publications" + map global fzf-ctags '' ': fzf-tag R' -docstring "services" + map global fzf-ctags '' ': fzf-tag D' -docstring "domains" + map global fzf-ctags '' ': fzf-tag V' -docstring "views" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "synonyms" + map global fzf-ctags 'x' ': fzf-tag x' -docstring "MobiLink Table Scripts" + map global fzf-ctags 'y' ': fzf-tag y' -docstring "MobiLink Conn Scripts" + map global fzf-ctags 'z' ': fzf-tag z' -docstring "MobiLink Properties " + map global fzf-ctags 'u' ': fzf-tag u' -docstring "units" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "procedures" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "parts" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapters" + map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags 'u' ': fzf-tag u' -docstring "subsections" + } + + hook global WinSetOption filetype=systemdunit %{ + map global fzf-ctags 'b' ': fzf-tag b' -docstring "subsubsections" + } + + hook global WinSetOption filetype=tcl %{ + map global fzf-ctags '' ': fzf-tag P' -docstring "paragraphs" + map global fzf-ctags '' ': fzf-tag G' -docstring "subparagraphs" + } + + hook global WinSetOption filetype=tcloo %{ + map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "includes" + } + + hook global WinSetOption filetype=tex %{ + map global fzf-ctags '' ': fzf-tag M' -docstring "module definition" + map global fzf-ctags 't' ': fzf-tag t' -docstring "type definition" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "constant definition" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "template definition" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definition" + map global fzf-ctags 's' ': fzf-tag s' -docstring "signature definition" + map global fzf-ctags '' ': fzf-tag C' -docstring "testcase definition" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "altstep definition" + map global fzf-ctags '' ': fzf-tag G' -docstring "group definition" + } + + hook global WinSetOption filetype=ttcn %{ + map global fzf-ctags '' ': fzf-tag P' -docstring "module parameter definition" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable instance" + map global fzf-ctags '' ': fzf-tag T' -docstring "timer instance" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "port instance" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "record/set/union member" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumeration value" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" + map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "class, struct, and union members" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "programs" + map global fzf-ctags 's' ': fzf-tag s' -docstring "signals" + } + + hook global WinSetOption filetype=vera %{ + map global fzf-ctags 't' ': fzf-tag t' -docstring "tasks" + map global fzf-ctags '' ': fzf-tag T' -docstring "typedefs" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" + map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants (define, parameter, specparam)" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "events" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "net data types" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "ports" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "register data types" + map global fzf-ctags 't' ': fzf-tag t' -docstring "tasks" + map global fzf-ctags 'b' ': fzf-tag b' -docstring "blocks" + } + + hook global WinSetOption filetype=verilog %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants (define, parameter, specparam, enum values)" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "events" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "net data types" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "ports" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "register data types" + map global fzf-ctags 't' ': fzf-tag t' -docstring "tasks" + map global fzf-ctags 'b' ': fzf-tag b' -docstring "blocks" + } + + hook global WinSetOption filetype=systemverilog %{ + map global fzf-ctags '' ': fzf-tag A' -docstring "assertions" + map global fzf-ctags '' ': fzf-tag C' -docstring "classes" + map global fzf-ctags '' ': fzf-tag V' -docstring "covergroups" + map global fzf-ctags '' ': fzf-tag E' -docstring "enumerators" + map global fzf-ctags '' ': fzf-tag I' -docstring "interfaces" + map global fzf-ctags '' ': fzf-tag M' -docstring "modports" + map global fzf-ctags '' ': fzf-tag K' -docstring "packages" + map global fzf-ctags '' ': fzf-tag P' -docstring "programs" + map global fzf-ctags '' ': fzf-tag R' -docstring "properties" + map global fzf-ctags '' ': fzf-tag S' -docstring "structs and unions" + map global fzf-ctags '' ': fzf-tag T' -docstring "subtype definitions" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "record names" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "autocommand groups" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "user-defined commands" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "maps" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "vimball filename" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "dialogs" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "menus" + } + + hook global WinSetOption filetype=vhdl %{ + map global fzf-ctags 'i' ': fzf-tag i' -docstring "icons" + map global fzf-ctags 'b' ': fzf-tag b' -docstring "bitmaps" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "cursors" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "fonts" + map global fzf-ctags 'v' ': fzf-tag v' -docstring "versions" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "accelerators" + map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "repository id" + } + + hook global WinSetOption filetype=vim %{ + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'd' ': fzf-tag d' -docstring "constant definitions" + map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + map global fzf-ctags 't' ': fzf-tag t' -docstring "traits" + } + + hook global WinSetOption filetype=windres %{ + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "aliases" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + map global fzf-ctags 's' ': fzf-tag s' -docstring "signals" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "identifiers" + map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + } + + hook global WinSetOption filetype=yacc %{ + map global fzf-ctags 'h' ': fzf-tag h' -docstring "handlers" + } + + hook global WinSetOption filetype=yumrepo %{ + map global fzf-ctags 'g' ': fzf-tag g' -docstring "group identifiers" + } + + hook global WinSetOption filetype=zephir %{ + map global fzf-ctags 'a' ': fzf-tag a' -docstring "artifact identifiers" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" + map global fzf-ctags 'r' ': fzf-tag r' -docstring "repository identifiers" + map global fzf-ctags 'k' ': fzf-tag k' -docstring "keys" + map global fzf-ctags 'e' ': fzf-tag e' -docstring "elements" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "attributes" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "named patterns" + map global fzf-ctags 'i' ': fzf-tag i' -docstring "id attributes" + } + + hook global WinSetOption filetype=dbusintrospect %{ + map global fzf-ctags 's' ': fzf-tag s' -docstring "stylesheets" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "parameters" + map global fzf-ctags 'm' ': fzf-tag m' -docstring "matched template" + map global fzf-ctags 'n' ': fzf-tag n' -docstring "matched template" + } + + hook global WinSetOption filetype=glade %{ + map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'a' ': fzf-tag a' -docstring "anchors" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + } + + hook global WinSetOption filetype=maven2 %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + } + + hook global WinSetOption filetype=plistxml %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + } + + hook global WinSetOption filetype=relaxng %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + } + + hook global WinSetOption filetype=svg %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + } + + hook global WinSetOption filetype=xslt %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + } + + hook global WinSetOption filetype=yaml %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + } + + hook global WinSetOption filetype=ansibleplaybook %{ + map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + } +} catch %{ + echo -debug "Error while declaring 'fzf-ctags' mode" +} define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{ - case $kak_opt_filetype in - ada) - additional_keybindings="--expect ctrl-alt-p --expect alt-p --expect ctrl-alt-t --expect alt-t --expect ctrl-alt-u --expect alt-u --expect alt-c --expect alt-l --expect ctrl-alt-v --expect alt-v --expect alt-f --expect alt-n --expect alt-x --expect ctrl-alt-r --expect alt-r --expect ctrl-alt-k --expect alt-k --expect ctrl-alt-o --expect alt-o --expect ctrl-alt-e --expect alt-e --expect alt-b --expect alt-i --expect alt-a --expect alt-y --expect ctrl-alt-s" - additional_message=$kak_opt_fzf_tag_ada ;; - ant) - additional_keybindings="--expect alt-p --expect alt-t --expect ctrl-alt-p --expect alt-i" - additional_message=$kak_opt_fzf_tag_ant ;; - asciidoc) - additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t --expect alt-u --expect alt-a" - additional_message=$kak_opt_fzf_tag_asciidoc ;; - asm) - additional_keybindings="--expect alt-d --expect alt-l --expect alt-m --expect alt-t --expect alt-s" - additional_message=$kak_opt_fzf_tag_asm ;; - asp) - additional_keybindings="--expect alt-d --expect alt-c --expect alt-f --expect alt-s --expect alt-v" - additional_message=$kak_opt_fzf_tag_asp ;; - autoconf) - additional_keybindings="--expect alt-p --expect alt-t --expect alt-m --expect alt-w --expect alt-e --expect alt-s --expect alt-c --expect alt-d" - additional_message=$kak_opt_fzf_tag_autoconf ;; - autoit) - additional_keybindings="--expect alt-f --expect alt-r --expect alt-g --expect alt-l --expect ctrl-alt-s" - additional_message=$kak_opt_fzf_tag_autoit ;; - automake) - additional_keybindings="--expect alt-d --expect ctrl-alt-p --expect ctrl-alt-m --expect ctrl-alt-t --expect ctrl-alt-l --expect ctrl-alt-s --expect ctrl-alt-d --expect alt-c" - additional_message=$kak_opt_fzf_tag_automake ;; - awk) - additional_keybindings="--expect alt-f" - additional_message=$kak_opt_fzf_tag_awk ;; - basic) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-l --expect alt-t --expect alt-v --expect alt-g" - additional_message=$kak_opt_fzf_tag_basic ;; - beta) - additional_keybindings="--expect alt-f --expect alt-p --expect alt-s --expect alt-v" - additional_message=$kak_opt_fzf_tag_beta ;; - clojure) - additional_keybindings="--expect alt-f --expect alt-n" - additional_message=$kak_opt_fzf_tag_clojure ;; - cmake) - additional_keybindings="--expect alt-f --expect alt-m --expect alt-t --expect alt-v --expect ctrl-alt-d --expect alt-p --expect alt-r" - additional_message=$kak_opt_fzf_tag_cmake ;; - c) - additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l" - additional_message=$kak_opt_fzf_tag_c ;; - cpp) - additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l --expect alt-c --expect alt-n --expect ctrl-alt-a --expect ctrl-alt-n --expect ctrl-alt-u" - additional_message=$kak_opt_fzf_tag_cpp ;; - cpreprocessor) - additional_keybindings="--expect alt-d --expect alt-h" - additional_message=$kak_opt_fzf_tag_cpreprocessor ;; - css) - additional_keybindings="--expect alt-c --expect alt-s --expect alt-i" - additional_message=$kak_opt_fzf_tag_css ;; - csharp) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-e --expect ctrl-alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-n --expect alt-p --expect alt-s --expect alt-t" - additional_message=$kak_opt_fzf_tag_csharp ;; - ctags) - additional_keybindings="--expect alt-l --expect alt-k" - additional_message=$kak_opt_fzf_tag_ctags ;; - cobol) - additional_keybindings="--expect alt-p --expect alt-d --expect ctrl-alt-s --expect ctrl-alt-F --expect alt-g --expect ctrl-alt-p --expect alt-s --expect ctrl-alt-d" - additional_message=$kak_opt_fzf_tag_cobol ;; - cuda) - additional_keybindings="--expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-h --expect alt-l --expect alt-m --expect alt-p --expect alt-s --expect alt-t --expect alt-u --expect alt-v --expect alt-x --expect alt-z --expect ctrl-alt-l" - additional_message=$kak_opt_fzf_tag_cuda ;; - d) - additional_keybindings="--expect alt-a --expect alt-c --expect alt-g --expect alt-e --expect alt-x --expect alt-f --expect alt-i --expect alt-l --expect alt-m --expect ctrl-alt-x --expect ctrl-alt-m --expect alt-n --expect alt-p --expect alt-s --expect ctrl-alt-t --expect alt-u --expect alt-v --expect ctrl-alt-v" - additional_message=$kak_opt_fzf_tag_d ;; - diff) - additional_keybindings="--expect alt-m --expect alt-n --expect alt-d --expect alt-h" - additional_message=$kak_opt_fzf_tag_diff ;; - dtd) - additional_keybindings="--expect ctrl-alt-e --expect alt-p --expect alt-e --expect alt-a --expect alt-n" - additional_message=$kak_opt_fzf_tag_dtd ;; - dts) - additional_keybindings="--expect alt-p --expect alt-l --expect alt-r" - additional_message=$kak_opt_fzf_tag_dts ;; - dosbatch) - additional_keybindings="--expect alt-l --expect alt-v" - additional_message=$kak_opt_fzf_tag_dosbatch ;; - eiffel) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-l" - additional_message=$kak_opt_fzf_tag_eiffel ;; - elm) - additional_keybindings="--expect ctrl-alt-M --expect ctrl-alt-N --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-C --expect ctrl-alt-A --expect ctrl-alt-F" - additional_message=$kak_opt_fzf_tag_elm ;; - erlang) - additional_keybindings="--expect alt-d --expect alt-f --expect alt-m --expect alt-r --expect alt-t" - additional_message=$kak_opt_fzf_tag_erlang ;; - falcon) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect alt-i" - additional_message=$kak_opt_fzf_tag_falcon ;; - flex) - additional_keybindings="--expect alt-f --expect alt-c --expect alt-m --expect alt-p --expect alt-v --expect alt-x" - additional_message=$kak_opt_fzf_tag_flex ;; - fortran) - additional_keybindings="--expect alt-b --expect alt-c --expect alt-e --expect ctrl-alt-e --expect alt-f --expect alt-i --expect alt-k --expect alt-l --expect ctrl-alt-l --expect alt-m --expect ctrl-alt-m --expect alt-n --expect ctrl-alt-n --expect alt-p --expect ctrl-alt-p --expect alt-s --expect alt-t --expect alt-v --expect ctrl-alt-s" - additional_message=$kak_opt_fzf_tag_fortran ;; - fypp) - additional_keybindings="--expect alt-m" - additional_message=$kak_opt_fzf_tag_fypp ;; - gdbinit) - additional_keybindings="--expect alt-d --expect ctrl-alt-d --expect alt-t --expect alt-l" - additional_message=$kak_opt_fzf_tag_gdbinit ;; - go) - additional_keybindings="--expect alt-p --expect alt-f --expect alt-c --expect alt-t --expect alt-v --expect alt-s --expect alt-i --expect alt-m --expect ctrl-alt-m --expect alt-u --expect ctrl-alt-p" - additional_message=$kak_opt_fzf_tag_go ;; - html) - additional_keybindings="--expect alt-a --expect ctrl-alt-H --expect ctrl-alt-I --expect ctrl-alt-J" - additional_message=$kak_opt_fzf_tag_html ;; - iniconf) - additional_keybindings="--expect alt-s --expect alt-k" - additional_message=$kak_opt_fzf_tag_iniconf ;; - itcl) - additional_keybindings="--expect alt-c --expect alt-m --expect alt-v --expect ctrl-alt-c --expect alt-p" - additional_message=$kak_opt_fzf_tag_itcl ;; - java) - additional_keybindings="--expect alt-a --expect alt-c --expect alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-p" - additional_message=$kak_opt_fzf_tag_java ;; - javaproperties) - additional_keybindings="--expect alt-k" - additional_message=$kak_opt_fzf_tag_javaproperties ;; - javascript) - additional_keybindings="--expect alt-f --expect alt-c --expect alt-m --expect alt-p --expect ctrl-alt-c --expect alt-v --expect alt-g" - additional_message=$kak_opt_fzf_tag_javascript ;; - json) - additional_keybindings="--expect alt-o --expect alt-a --expect alt-n --expect alt-s --expect alt-b --expect alt-z" - additional_message=$kak_opt_fzf_tag_json ;; - ldscript) - additional_keybindings="--expect ctrl-alt-s --expect alt-s --expect alt-v --expect alt-i" - additional_message=$kak_opt_fzf_tag_ldscript ;; - lisp) - additional_keybindings="--expect alt-f" - additional_message=$kak_opt_fzf_tag_lisp ;; - lua) - additional_keybindings="--expect alt-f" - additional_message=$kak_opt_fzf_tag_lua ;; - m4) - additional_keybindings="--expect alt-d --expect ctrl-alt-i" - additional_message=$kak_opt_fzf_tag_m4 ;; - man) - additional_keybindings="--expect alt-t --expect alt-s" - additional_message=$kak_opt_fzf_tag_man ;; - make) - additional_keybindings="--expect alt-m --expect alt-t --expect ctrl-alt-i" - additional_message=$kak_opt_fzf_tag_make ;; - markdown) - additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t --expect alt-u --expect alt-r" - additional_message=$kak_opt_fzf_tag_markdown ;; - matlab) - additional_keybindings="--expect alt-f --expect alt-v --expect alt-c" - additional_message=$kak_opt_fzf_tag_matlab ;; - myrddin) - additional_keybindings="--expect alt-f --expect alt-c --expect alt-v --expect alt-t --expect alt-r --expect alt-p" - additional_message=$kak_opt_fzf_tag_myrddin ;; - objectivec) - additional_keybindings="--expect alt-i --expect ctrl-alt-i --expect ctrl-alt-p --expect ctrl-alt-M --expect ctrl-alt-C --expect ctrl-alt-V --expect ctrl-alt-e --expect ctrl-alt-F --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-S --expect ctrl-alt-E --expect ctrl-alt-m" - additional_message=$kak_opt_fzf_tag_objectivec ;; - ocaml) - additional_keybindings="--expect alt-c --expect ctrl-alt-M --expect ctrl-alt-m --expect ctrl-alt-V --expect ctrl-alt-P --expect ctrl-alt-T --expect ctrl-alt-F --expect ctrl-alt-c --expect ctrl-alt-R --expect ctrl-alt-E" - additional_message=$kak_opt_fzf_tag_ocaml ;; - passwd) - additional_keybindings="--expect alt-u" - additional_message=$kak_opt_fzf_tag_passwd ;; - pascal) - additional_keybindings="--expect alt-f --expect alt-p" - additional_message=$kak_opt_fzf_tag_pascal ;; - perl) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-l --expect alt-p --expect alt-s --expect alt-d" - additional_message=$kak_opt_fzf_tag_perl ;; - perl6) - additional_keybindings="--expect alt-c --expect alt-g --expect alt-m --expect alt-o --expect alt-p --expect alt-r --expect alt-u --expect alt-b --expect alt-s --expect alt-t" - additional_message=$kak_opt_fzf_tag_perl6 ;; - php) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect alt-i --expect alt-l --expect alt-n --expect alt-t --expect alt-v --expect alt-a" - additional_message=$kak_opt_fzf_tag_php ;; - pod) - additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t" - additional_message=$kak_opt_fzf_tag_pod ;; - protobuf) - additional_keybindings="--expect alt-p --expect alt-m --expect alt-f --expect alt-e --expect alt-g --expect alt-s --expect ctrl-alt-R" - additional_message=$kak_opt_fzf_tag_protobuf ;; - puppetmanifest) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-n --expect alt-r --expect alt-v" - additional_message=$kak_opt_fzf_tag_puppetmanifest ;; - python) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect ctrl-alt-i --expect alt-i --expect alt-x --expect alt-z --expect alt-l" - additional_message=$kak_opt_fzf_tag_python ;; - pythonloggingconfig) - additional_keybindings="--expect ctrl-alt-l --expect alt-q" - additional_message=$kak_opt_fzf_tag_pythonloggingconfig ;; - qemuhx) - additional_keybindings="--expect ctrl-alt-Q --expect alt-i" - additional_message=$kak_opt_fzf_tag_qemuhx ;; - qtmoc) - additional_keybindings="--expect alt-s --expect ctrl-alt-s --expect alt-p" - additional_message=$kak_opt_fzf_tag_qtmoc ;; - r) - additional_keybindings="--expect alt-f --expect alt-l --expect alt-s --expect alt-g --expect alt-v" - additional_message=$kak_opt_fzf_tag_r ;; - rspec) - additional_keybindings="--expect alt-d --expect alt-c" - additional_message=$kak_opt_fzf_tag_rspec ;; - rexx) - additional_keybindings="--expect alt-s" - additional_message=$kak_opt_fzf_tag_rexx ;; - robot) - additional_keybindings="--expect alt-t --expect alt-k --expect alt-v" - additional_message=$kak_opt_fzf_tag_robot ;; - rpmspec) - additional_keybindings="--expect alt-t --expect alt-m --expect alt-p --expect alt-g" - additional_message=$kak_opt_fzf_tag_rpmspec ;; - restructuredtext) - additional_keybindings="--expect alt-c --expect alt-s --expect ctrl-alt-s --expect alt-t --expect ctrl-alt-t" - additional_message=$kak_opt_fzf_tag_restructuredtext ;; - ruby) - additional_keybindings="--expect alt-c --expect alt-f --expect alt-m --expect ctrl-alt-s" - additional_message=$kak_opt_fzf_tag_ruby ;; - rust) - additional_keybindings="--expect alt-n --expect alt-s --expect alt-i --expect alt-c --expect ctrl-alt-F --expect ctrl-alt-G --expect ctrl-alt-T --expect ctrl-alt-V --expect ctrl-alt-m --expect ctrl-alt-M --expect ctrl-alt-E --expect ctrl-alt-p" - additional_message=$kak_opt_fzf_tag_rust ;; - scheme) - additional_keybindings="--expect alt-f --expect alt-s" - additional_message=$kak_opt_fzf_tag_scheme ;; - sh) - additional_keybindings="--expect alt-a --expect alt-f --expect alt-s --expect alt-h" - additional_message=$kak_opt_fzf_tag_sh ;; - slang) - additional_keybindings="--expect alt-f --expect alt-n" - additional_message=$kak_opt_fzf_tag_slang ;; - sml) - additional_keybindings="--expect alt-e --expect alt-f --expect alt-c --expect alt-s --expect alt-r --expect alt-t --expect alt-v" - additional_message=$kak_opt_fzf_tag_sml ;; - sql) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect ctrl-alt-e --expect alt-l --expect ctrl-alt-l --expect ctrl-alt-p --expect alt-p --expect alt-r --expect alt-s --expect alt-t --expect ctrl-alt-t --expect alt-v --expect alt-i --expect alt-e --expect ctrl-alt-u --expect ctrl-alt-r --expect ctrl-alt-d --expect ctrl-alt-v --expect alt-n --expect ctrl-alt-X --expect ctrl-alt-Y --expect ctrl-alt-Z" - additional_message=$kak_opt_fzf_tag_sql ;; - systemdunit) - additional_keybindings="--expect alt-u" - additional_message=$kak_opt_fzf_tag_systemdunit ;; - tcl) - additional_keybindings="--expect alt-p --expect alt-n" - additional_message=$kak_opt_fzf_tag_tcl ;; - tcloo) - additional_keybindings="--expect alt-c --expect alt-m" - additional_message=$kak_opt_fzf_tag_tcloo ;; - tex) - additional_keybindings="--expect alt-p --expect alt-c --expect alt-s --expect alt-u --expect alt-b --expect ctrl-alt-p --expect ctrl-alt-g --expect alt-l --expect alt-i" - additional_message=$kak_opt_fzf_tag_tex ;; - ttcn) - additional_keybindings="--expect ctrl-alt-m --expect alt-t --expect alt-c --expect alt-d --expect alt-f --expect alt-s --expect ctrl-alt-c --expect alt-a --expect ctrl-alt-g --expect ctrl-alt-p --expect alt-v --expect ctrl-alt-t --expect alt-p --expect alt-m --expect alt-e" - additional_message=$kak_opt_fzf_tag_ttcn ;; - vera) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-e --expect alt-f --expect alt-g --expect alt-i --expect alt-l --expect alt-m --expect alt-p --expect ctrl-alt-p --expect alt-s --expect alt-t --expect ctrl-alt-t --expect alt-v --expect alt-x --expect alt-h" - additional_message=$kak_opt_fzf_tag_vera ;; - verilog) - additional_keybindings="--expect alt-c --expect alt-e --expect alt-f --expect alt-m --expect alt-n --expect alt-p --expect alt-r --expect alt-t --expect alt-b" - additional_message=$kak_opt_fzf_tag_verilog ;; - systemverilog) - additional_keybindings="--expect alt-c --expect alt-e --expect alt-f --expect alt-m --expect alt-n --expect alt-p --expect alt-r --expect alt-t --expect alt-b --expect ctrl-alt-a --expect ctrl-alt-c --expect ctrl-alt-v --expect ctrl-alt-e --expect ctrl-alt-i --expect ctrl-alt-m --expect ctrl-alt-k --expect ctrl-alt-p --expect ctrl-alt-q --expect ctrl-alt-r --expect ctrl-alt-s --expect ctrl-alt-t" - additional_message=$kak_opt_fzf_tag_systemverilog ;; - vhdl) - additional_keybindings="--expect alt-c --expect alt-t --expect ctrl-alt-t --expect alt-r --expect alt-e --expect ctrl-alt-c --expect alt-d --expect alt-f --expect alt-p --expect ctrl-alt-p --expect alt-l" - additional_message=$kak_opt_fzf_tag_vhdl ;; - vim) - additional_keybindings="--expect alt-a --expect alt-c --expect alt-f --expect alt-m --expect alt-v --expect alt-n" - additional_message=$kak_opt_fzf_tag_vim ;; - windres) - additional_keybindings="--expect alt-d --expect alt-m --expect alt-i --expect alt-b --expect alt-c --expect alt-f --expect alt-v --expect alt-a" - additional_message=$kak_opt_fzf_tag_windres ;; - yacc) - additional_keybindings="--expect alt-l" - additional_message=$kak_opt_fzf_tag_yacc ;; - yumrepo) - additional_keybindings="--expect alt-r" - additional_message=$kak_opt_fzf_tag_yumrepo ;; - zephir) - additional_keybindings="--expect alt-c --expect alt-d --expect alt-f --expect alt-i --expect alt-l --expect alt-n --expect alt-t --expect alt-v --expect alt-a" - additional_message=$kak_opt_fzf_tag_zephir ;; - dbusintrospect) - additional_keybindings="--expect alt-i --expect alt-m --expect alt-s --expect alt-p" - additional_message=$kak_opt_fzf_tag_dbusintrospect ;; - glade) - additional_keybindings="--expect alt-i --expect alt-c --expect alt-h" - additional_message=$kak_opt_fzf_tag_glade ;; - maven2) - additional_keybindings="--expect alt-g --expect alt-a --expect alt-p --expect alt-r" - additional_message=$kak_opt_fzf_tag_maven2 ;; - plistxml) - additional_keybindings="--expect alt-k" - additional_message=$kak_opt_fzf_tag_plistxml ;; - relaxng) - additional_keybindings="--expect alt-e --expect alt-a --expect alt-n" - additional_message=$kak_opt_fzf_tag_relaxng ;; - svg) - additional_keybindings="--expect alt-i" - additional_message=$kak_opt_fzf_tag_svg ;; - xslt) - additional_keybindings="--expect alt-s --expect alt-p --expect alt-m --expect alt-n --expect alt-v" - additional_message=$kak_opt_fzf_tag_xslt ;; - yaml) - additional_keybindings="--expect alt-a" - additional_message=$kak_opt_fzf_tag_yaml ;; - ansibleplaybook) - additional_keybindings="--expect alt-p" - additional_message=$kak_opt_fzf_tag_ansibleplaybook ;; - *) - additional_keybindings= - additional_message= - ;; - esac - path=$PWD while [ "$path" != "$HOME" ]; do - if [ -e "./${kak_opt_tagfile:-tags}" ]; then + if [ -e "./$kak_opt_fzf_tag_file" ]; then break else cd .. path=$PWD fi done - if [ "$path" = "$HOME" ] && [ ! -e "./${kak_opt_tagfile:-tags}" ]; then - printf "%s\n" "echo -markup %{{Information}No '${kak_opt_tagfile:-tags}' found}" + + 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_tagfile:-tags}" ]; then - printf "%s\n" "echo -markup %{{Information}'${kak_opt_tagfile:-tags}' found at $HOME. Check if it is right tag file}" + 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 [ ! -z "$1" ]; then - mode=$(printf "%s\n" "$additional_message" | grep ":" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") + if [ -n "$1" ]; then cmd="cd $path; readtags -Q '(eq? \$kind \"$1\")' -l | cut -f1" else cmd="cd $path; readtags -l | cut -f1" fi - [ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings=" + + [ -n "${kak_client_env_TMUX}" ] && tmux_keybindings=" : open tag in horizontal split : open tag in vertical split" @@ -1226,13 +930,11 @@ define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{ : open tag in new buffer : open tag in new window" - [ ! -z "$additional_message" ] && message="$message $tmux_keybindings + message="$message$tmux_keybindings" -Additional filters for $kak_opt_filetype filetype: $additional_message" - - printf "%s\n" "info -title 'fzf tag$mode' '$message'" + printf "%s\n" "info -title 'fzf tag' '$message'" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s" - printf "%s\n" "set-option window ctagsfiles %{$path/${kak_opt_tagfile:-tags}}" + printf "%s\n" "set-option window ctagsfiles %{$path/$kak_opt_fzf_tag_file}" printf "%s\n" "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags $additional_keybindings}" }} From e098ff81c93d2f90cbe003d34b0f193b09e37e38 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Fri, 23 Nov 2018 15:17:29 +0300 Subject: [PATCH 18/37] fix some placings of files, and other minor things --- rc/fzf.kak | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 9d69b6d..0165e6b 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -67,16 +67,14 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ callback=$1 items_command=$2 additional_flags=$3 + tmux_height=$kak_opt_fzf_tmux_height items_executable=$(printf "%s\n" "$items_command" | grep -o -E "[[:alpha:]]+" | head -1) - if [ -z $(command -v $items_executable) ]; then + if [ -z "$(command -v $items_executable)" ]; then printf "%s\n" "fail %{'$items_executable' executable not found}" exit fi - tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf.XXXXXX) - - tmux_height=$kak_opt_fzf_tmux_height if [ "$callback" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then case $kak_opt_fzf_highlighter in bat) @@ -105,6 +103,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\$pos $additional_flags" fi + tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf.XXXXXX) shell=$(command -v sh) if [ ! -z "${kak_client_env_TMUX}" ]; then cmd="export SHELL=$shell; $preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" @@ -131,10 +130,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ ctrl-v) wincmd="tmux-new-horizontal" ;; *) - if [ -n "$action" ]; then - printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$action'" | kak -p $kak_session - fi - ;; + [ -n "$action" ] && printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$action'" | kak -p $kak_session ;; esac kakoune_command() { printf "%s\n" "evaluate-commands -client $kak_client '$wincmd $callback' '$1'" @@ -145,7 +141,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ ) < $tmp fi rm $tmp - [ -z "$fzfcmd" ] && rm $fzfcmd + [ -n "$fzfcmd" ] && rm $fzfcmd ) > /dev/null 2>&1 < /dev/null & }} From 33ac8ff35140cd003925af03c813ffc72796aa18 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Fri, 23 Nov 2018 19:13:46 +0300 Subject: [PATCH 19/37] remove export --- rc/fzf.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 0165e6b..45c97e3 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -106,11 +106,11 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf.XXXXXX) shell=$(command -v sh) if [ ! -z "${kak_client_env_TMUX}" ]; then - cmd="export SHELL=$shell; $preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" + cmd="$preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" elif [ ! -z "${kak_opt_termcmd}" ]; then fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) chmod 755 $fzfcmd - printf "%s\n" "export SHELL=$shell; cd $PWD && $preview_pos $items_command | fzf $additional_flags > $tmp" > $fzfcmd + printf "%s\n" "cd $PWD && $preview_pos $items_command | SHELL=$shell fzf $additional_flags > $tmp" > $fzfcmd cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" else printf "%s\n" "fail %{termcmd option is not set}" From 9362723bde27b17a593ab7040fed86e794a5ec02 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 11:51:15 +0300 Subject: [PATCH 20/37] remove fzf-tmux dependency --- rc/fzf.kak | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 45c97e3..3083563 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -93,7 +93,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ highlighter=$kak_opt_fzf_highlighter ;; esac - if [ ! -z "${kak_client_env_TMUX}" ]; then + if [ -n "$kak_client_env_TMUX" ]; then preview_pos="pos=right:$kak_opt_fzf_preview_width;" tmux_height=$kak_opt_fzf_tmux_height_file_preview else @@ -103,28 +103,34 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\$pos $additional_flags" fi - tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf.XXXXXX) - shell=$(command -v sh) - if [ ! -z "${kak_client_env_TMUX}" ]; then - cmd="$preview_pos $items_command | fzf-tmux -d $tmux_height $additional_flags > $tmp" - elif [ ! -z "${kak_opt_termcmd}" ]; then - fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) - chmod 755 $fzfcmd - printf "%s\n" "cd $PWD && $preview_pos $items_command | SHELL=$shell fzf $additional_flags > $tmp" > $fzfcmd - cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" + tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf-tmp.XXXXXX) + fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) + printf "%s\n" "cd $PWD && $preview_pos $items_command | SHELL=$(command -v sh) fzf $additional_flags > $tmp" > $fzfcmd + chmod 755 $fzfcmd + + if [ -n "$kak_client_env_TMUX" ]; then + [ -n "${tmux_height%%*%}" ] && measure="-p" || measure="-p" + cmd="command tmux split-window $measure ${tmux_height%%%*} 'sh -c $fzfcmd; rm $fzfcmd'" + elif [ -n "$kak_opt_termcmd" ]; then + cmd="$kak_opt_termcmd 'sh -c $fzfcmd; rm $fzfcmd'" else printf "%s\n" "fail %{termcmd option is not set}" + rm $fzfcmd + rm $tmp exit fi ( eval "$cmd" + while [ -e $fzfcmd ]; do + sleep 0.1 + done if [ -s $tmp ]; then ( read action case $action in ctrl-w) - [ ! -z "${kak_client_env_TMUX}" ] && wincmd="tmux-new-window" || wincmd="x11-new" ;; + [ -n "$kak_client_env_TMUX" ] && wincmd="tmux-new-window" || wincmd="x11-new" ;; ctrl-s) wincmd="tmux-new-vertical" ;; ctrl-v) @@ -141,7 +147,6 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ ) < $tmp fi rm $tmp - [ -n "$fzfcmd" ] && rm $fzfcmd ) > /dev/null 2>&1 < /dev/null & }} From a95e3003c384cb6f736cbec75a16f748f562cd21 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 13:00:47 +0300 Subject: [PATCH 21/37] remove fzf-tmux dependency --- rc/fzf-modules/fzf-buffer.kak | 55 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/rc/fzf-modules/fzf-buffer.kak b/rc/fzf-modules/fzf-buffer.kak index 84bce7f..2c213a0 100644 --- a/rc/fzf-modules/fzf-buffer.kak +++ b/rc/fzf-modules/fzf-buffer.kak @@ -11,49 +11,48 @@ map global fzf -docstring "open buffer" 'b' ': fzf-buffer' define-command -hidden fzf-buffer %{ evaluate-commands %sh{ - tmp=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-fzf.XXXXXX)) - setbuf=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-setbuf.XXXXXX)) - delbuf=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-delbuf.XXXXXX)) - buffers=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-buffers.XXXXXX)) - IFS="'" - for buffer in $kak_buflist; do - [ ! -z $buffer ] && [ $buffer != ' ' ] && echo $buffer >> $buffers - done - if [ ! -z "${kak_client_env_TMUX}" ]; then - cmd="cat $buffers | fzf-tmux -d $kak_opt_fzf_tmux_height --expect ctrl-d > $tmp" - elif [ ! -z "${kak_opt_termcmd}" ]; then - cmd="$kak_opt_termcmd \"sh -c 'cat $buffers | fzf --expect ctrl-d > $tmp'\"" - else - echo "fail termcmd option is not set" - fi - echo "info -title 'fzf buffer' 'Set buffer to edit in current client : delete selected buffer'" - echo "echo evaluate-commands -client $kak_client \"buffer \'\$1'\" | kak -p $kak_session" > $setbuf - echo "echo evaluate-commands -client $kak_client \"delete-buffer \'\$1'\" | kak -p $kak_session" > $delbuf - echo "echo evaluate-commands -client $kak_client \"fzf-buffer \" | kak -p $kak_session" >> $delbuf - chmod 755 $setbuf - chmod 755 $delbuf + tmux_height=$kak_opt_fzf_tmux_height + buffers=$(printf "%s\n" "$kak_buflist" | sed "s/^'//;s/'$//;s/' '/\n/g") + + tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf-tmp.XXXXXX) + fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) + printf "%s\n" "printf '%s\n' '$buffers' | SHELL=$(command -v sh) fzf --expect ctrl-d > $tmp" > $fzfcmd + chmod 755 $fzfcmd + + if [ -n "$kak_client_env_TMUX" ]; then + [ -n "${tmux_height%%*%}" ] && measure="-p" || measure="-p" + cmd="command tmux split-window $measure ${tmux_height%%%*} 'sh -c $fzfcmd; rm $fzfcmd'" + elif [ -n "$kak_opt_termcmd" ]; then + cmd="$kak_opt_termcmd 'sh -c $fzfcmd; rm $fzfcmd'" + else + printf "%s\n" "fail %{termcmd option is not set}" + rm $fzfcmd + rm $tmp + exit + fi + ( eval "$cmd" + while [ -e $fzfcmd ]; do + sleep 0.1 + done if [ -s $tmp ]; then ( read action read buf if [ "$action" = "ctrl-d" ]; then - $setbuf $kak_bufname - $delbuf $buf + printf "%s\n" "evaluate-commands -client $kak_client delete-buffer $buf" | kak -p $kak_session + printf "%s\n" "evaluate-commands -client $kak_client fzf-buffer" | kak -p $kak_session else - $setbuf $buf + printf "%s\n" "evaluate-commands -client $kak_client buffer $buf" | kak -p $kak_session fi ) < $tmp else - $setbuf $kak_bufname + printf "%s\n" "evaluate-commands -client $kak_client buffer $kak_bufname" | kak -p $kak_session fi rm $tmp - rm $setbuf - rm $delbuf - rm $buffers ) > /dev/null 2>&1 < /dev/null & }} From f4d4ad40f599db7fb7f55cb0d7982761ec86fa35 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 14:39:54 +0300 Subject: [PATCH 22/37] remove fzf-tmux dependency --- rc/fzf-modules/fzf-cd.kak | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/rc/fzf-modules/fzf-cd.kak b/rc/fzf-modules/fzf-cd.kak index d7434e8..9b040f8 100644 --- a/rc/fzf-modules/fzf-cd.kak +++ b/rc/fzf-modules/fzf-cd.kak @@ -17,6 +17,7 @@ str fzf_cd_command "find" map global fzf -docstring "change directory" 'c' ': fzf-cd' 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 @@ -26,39 +27,37 @@ define-command -hidden fzf-cd %{ evaluate-commands %sh{ items_command=$kak_opt_fzf_cd_command ;; esac - tmux_height=$kak_opt_fzf_tmux_height + tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf-tmp.XXXXXX) + fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) + printf "%s\n" "cd $PWD && $items_command | SHELL=$(command -v sh) fzf > $tmp" > $fzfcmd + chmod 755 $fzfcmd - items_executable=$(printf "%s\n" "$items_command" | grep -o -E "[[:alpha:]]+" | head -1) - if [ -z $(command -v $items_executable) ]; then - printf "%s\n" "fail %{'$items_executable' executable not found}" - exit - fi - - tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf.XXXXXX) - - if [ ! -z "${kak_client_env_TMUX}" ]; then - cmd="$items_command | fzf-tmux -d $tmux_height > $tmp" - elif [ ! -z "${kak_opt_termcmd}" ]; then - fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) - chmod 755 $fzfcmd - printf "%s\n" "cd $PWD && $items_command | fzf > $tmp" > $fzfcmd - cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" + if [ -n "$kak_client_env_TMUX" ]; then + [ -n "${tmux_height%%*%}" ] && measure="-p" || measure="-p" + cmd="command tmux split-window $measure ${tmux_height%%%*} 'sh -c $fzfcmd; rm $fzfcmd'" + elif [ -n "$kak_opt_termcmd" ]; then + cmd="$kak_opt_termcmd 'sh -c $fzfcmd; rm $fzfcmd'" else - printf "%s\n" "fail termcmd option is not set" + printf "%s\n" "fail %{termcmd option is not set}" + rm $fzfcmd + rm $tmp exit fi ( eval "$cmd" + while [ -e $fzfcmd ]; do + sleep 0.1 + done if [ -s $tmp ]; then ( while read item; do - printf "%s\n" "evaluate-commands -client $kak_client 'change-directory' '$item'" | kak -p $kak_session + printf "%s\n" "evaluate-commands -client $kak_client change-directory %{$item}" | kak -p $kak_session printf "%s\n" "evaluate-commands -client $kak_client fzf-cd" | kak -p $kak_session done ) < $tmp fi rm $tmp - [ -z "$fzfcmd" ] && rm $fzfcmd ) > /dev/null 2>&1 < /dev/null & }} + From fa7d53c6bc6cbd562c4dc60205382dd304070a05 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 15:24:07 +0300 Subject: [PATCH 23/37] tweak messages --- rc/fzf-modules/fzf-buffer.kak | 2 +- rc/fzf-modules/fzf-file.kak | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/rc/fzf-modules/fzf-buffer.kak b/rc/fzf-modules/fzf-buffer.kak index 2c213a0..0d65016 100644 --- a/rc/fzf-modules/fzf-buffer.kak +++ b/rc/fzf-modules/fzf-buffer.kak @@ -11,7 +11,7 @@ map global fzf -docstring "open buffer" 'b' ': fzf-buffer' define-command -hidden fzf-buffer %{ evaluate-commands %sh{ - echo "info -title 'fzf buffer' 'Set buffer to edit in current client + echo "info -title 'fzf buffer' 'Set buffer to edit in current client. : delete selected buffer'" tmux_height=$kak_opt_fzf_tmux_height diff --git a/rc/fzf-modules/fzf-file.kak b/rc/fzf-modules/fzf-file.kak index f260688..812cbac 100644 --- a/rc/fzf-modules/fzf-file.kak +++ b/rc/fzf-modules/fzf-file.kak @@ -44,17 +44,18 @@ define-command -hidden fzf-file %{ evaluate-commands %sh{ 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}''$executable'' is not supported by the script. fzf.kak may not work as you expect.'" + printf "%s\n" "echo -markup '{Information}'Warning: '$executable'' is not supported by fzf.kak.'" cmd=$kak_opt_fzf_file_command ;; esac - title="fzf file" - [ ! -z "${kak_client_env_TMUX}" ] && additional_keybindings=" -: open file in horizontal split -: open file in vertical split" + message="Open single or multiple files. : open file in new buffer. -: open file in new window $additional_keybindings" - printf "%s\n" "info -title '$title' '$message'" +: open file in new window" + [ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings=" +: open file in horizontal split +: 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}" }} From e801efb3aea94624f52151a049c9f80f2b5b687f Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 15:26:18 +0300 Subject: [PATCH 24/37] fix custom mappings --- rc/fzf-modules/fzf-ctags.kak | 1236 ++++++++++++++++------------------ 1 file changed, 567 insertions(+), 669 deletions(-) diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index 0bbfde3..ed0cbf5 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -31,868 +31,768 @@ try %{ map global fzf -docstring "select tag type" '' ': enter-user-mode fzf-ctags' hook global WinSetOption filetype=ada %{ - map global fzf-ctags '' ': fzf-tag P' -docstring "package specifications" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" - map global fzf-ctags 't' ': fzf-tag t' -docstring "types" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "subtypes" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "record type components" - map global fzf-ctags 'l' ': fzf-tag l' -docstring "enum type literals" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "generic formal parameters" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "constants" - map global fzf-ctags 'x' ': fzf-tag x' -docstring "user defined exceptions" - map global fzf-ctags '' ': fzf-tag R' -docstring "subprogram specifications" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "subprograms" - map global fzf-ctags '' ': fzf-tag K' -docstring "task specifications" - map global fzf-ctags 'k' ': fzf-tag k' -docstring "tasks" - map global fzf-ctags '' ': fzf-tag O' -docstring "protected data specifications" - map global fzf-ctags 'o' ': fzf-tag o' -docstring "protected data" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "task/protected data entries" - map global fzf-ctags 'b' ': fzf-tag b' -docstring "labels" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "projects" - map global fzf-ctags 't' ': fzf-tag t' -docstring "targets" + map global fzf-ctags '' ': fzf-tag P' -docstring 'package specifications' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'types' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'subtypes' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'record type components' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'enum type literals' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'generic formal parameters' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'constants' + map global fzf-ctags 'x' ': fzf-tag x' -docstring 'user defined exceptions' + map global fzf-ctags '' ': fzf-tag R' -docstring 'subprogram specifications' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'subprograms' + map global fzf-ctags '' ': fzf-tag K' -docstring 'task specifications' + map global fzf-ctags 'k' ': fzf-tag k' -docstring 'tasks' + map global fzf-ctags '' ': fzf-tag O' -docstring 'protected data specifications' + map global fzf-ctags 'o' ': fzf-tag o' -docstring 'protected data' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'task/protected data entries' + map global fzf-ctags 'b' ': fzf-tag b' -docstring 'labels' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'loop/declare identifiers' + map global fzf-ctags '' ': fzf-tag S' -docstring '(ctags internal use)' } - hook global WinSetOption filetype=ant %{ - map global fzf-ctags '' ': fzf-tag P' -docstring "properties(global)" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "antfiles" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapters" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'projects' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'targets' + map global fzf-ctags '' ': fzf-tag P' -docstring 'properties(global)' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'antfiles' } - hook global WinSetOption filetype=asciidoc %{ - map global fzf-ctags '' ': fzf-tag S' -docstring "level 2 sections" - map global fzf-ctags 't' ': fzf-tag t' -docstring "level 3 sections" - map global fzf-ctags '' ': fzf-tag T' -docstring "level 4 sections" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "level 5 sections" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "anchors" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "defines" - map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'chapters' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' + map global fzf-ctags '' ': fzf-tag S' -docstring 'level 2 sections' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'level 3 sections' + map global fzf-ctags '' ': fzf-tag T' -docstring 'level 4 sections' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'level 5 sections' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'anchors' } - hook global WinSetOption filetype=asm %{ - map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" - map global fzf-ctags 't' ': fzf-tag t' -docstring "types (structs and records)" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "constants" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'defines' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'labels' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'macros' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'types (structs and records)' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' } - hook global WinSetOption filetype=asp %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" - map global fzf-ctags 't' ': fzf-tag t' -docstring "templates" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'constants' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'subroutines' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' } - hook global WinSetOption filetype=autoconf %{ - map global fzf-ctags 'm' ': fzf-tag m' -docstring "autoconf macros" - map global fzf-ctags 'w' ': fzf-tag w' -docstring "options specified with --with-..." - map global fzf-ctags 'e' ': fzf-tag e' -docstring "options specified with --enable-..." - map global fzf-ctags 's' ': fzf-tag s' -docstring "substitution keys" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "automake conditions" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "definitions" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "regions" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'templates' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'autoconf macros' + map global fzf-ctags 'w' ': fzf-tag w' -docstring 'options specified with --with-...' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'options specified with --enable-...' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'substitution keys' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'automake conditions' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'definitions' } - hook global WinSetOption filetype=autoit %{ - map global fzf-ctags 'g' ': fzf-tag g' -docstring "global variables" - map global fzf-ctags 'l' ': fzf-tag l' -docstring "local variables" - map global fzf-ctags '' ': fzf-tag S' -docstring "included scripts" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "directories" - map global fzf-ctags '' ': fzf-tag P' -docstring "programs" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'regions' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'global variables' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'local variables' + map global fzf-ctags '' ': fzf-tag S' -docstring 'included scripts' } - hook global WinSetOption filetype=automake %{ - map global fzf-ctags '' ': fzf-tag M' -docstring "manuals" - map global fzf-ctags '' ': fzf-tag T' -docstring "ltlibraries" - map global fzf-ctags '' ': fzf-tag L' -docstring "libraries" - map global fzf-ctags '' ': fzf-tag S' -docstring "scripts" - map global fzf-ctags '' ': fzf-tag D' -docstring "datum" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "conditions" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'directories' + map global fzf-ctags '' ': fzf-tag P' -docstring 'programs' + map global fzf-ctags '' ': fzf-tag M' -docstring 'manuals' + map global fzf-ctags '' ': fzf-tag T' -docstring 'ltlibraries' + map global fzf-ctags '' ': fzf-tag L' -docstring 'libraries' + map global fzf-ctags '' ': fzf-tag S' -docstring 'scripts' + map global fzf-ctags '' ': fzf-tag D' -docstring 'datum' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'conditions' } - hook global WinSetOption filetype=awk %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' } - hook global WinSetOption filetype=basic %{ - map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" - map global fzf-ctags 't' ': fzf-tag t' -docstring "types" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumerations" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "fragment definitions" - map global fzf-ctags 's' ': fzf-tag s' -docstring "slots (fragment uses)" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'constants' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'labels' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'types' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enumerations' } - hook global WinSetOption filetype=beta %{ - map global fzf-ctags 'v' ': fzf-tag v' -docstring "patterns (virtual or rebound)" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'fragment definitions' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'slots (fragment uses)' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'patterns (virtual or rebound)' } - hook global WinSetOption filetype=clojure %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namespaces' } - hook global WinSetOption filetype=cmake %{ - map global fzf-ctags 't' ': fzf-tag t' -docstring "targets" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" - map global fzf-ctags '' ': fzf-tag D' -docstring "options specified with -D" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "projects" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "regex" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'macros' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'targets' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable definitions' + map global fzf-ctags '' ': fzf-tag D' -docstring 'options specified with -' + map global fzf-ctags 'p' ': fzf-tag P' -docstring 'projects' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'regex' } - hook global WinSetOption filetype=c %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" - map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "struct, and union members" - map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" - map global fzf-ctags 't' ': fzf-tag t' -docstring "typedefs" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "union names" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'macro definitions' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enumerators (values inside an enumeration)' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function definitions' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enumeration names' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'included header files' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'struct, and union members' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'structure names' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'typedefs' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'union names' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable definitions' } - hook global WinSetOption filetype=cpp %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" - map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "class, struct, and union members" - map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" - map global fzf-ctags 't' ': fzf-tag t' -docstring "typedefs" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "union names" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" - map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'macro definitions' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enumerators (values inside an enumeration)' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function definitions' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enumeration names' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'included header files' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'class, struct, and union members' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'structure names' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'typedefs' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'union names' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable definitions' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namespaces' } - hook global WinSetOption filetype=cpreprocessor %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 's' ': fzf-tag s' -docstring "selectors" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'macro definitions' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'included header files' } - hook global WinSetOption filetype=css %{ - map global fzf-ctags 'i' ': fzf-tag i' -docstring "identities" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'selectors' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'identities' } - hook global WinSetOption filetype=csharp %{ - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" - map global fzf-ctags '' ': fzf-tag E' -docstring "events" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "fields" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" - map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" - map global fzf-ctags 't' ': fzf-tag t' -docstring "typedefs" - map global fzf-ctags 'l' ': fzf-tag l' -docstring "language definitions" - map global fzf-ctags 'k' ': fzf-tag k' -docstring "kind definitions" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'macro definitions' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enumerators (values inside an enumeration)' + map global fzf-ctags '' ': fzf-tag E' -docstring 'events' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'fields' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enumeration names' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interfaces' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'methods' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namespaces' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'properties' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'structure names' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'typedefs' } - hook global WinSetOption filetype=ctags %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "paragraphs" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "data items" + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'language definitions' + map global fzf-ctags 'k' ': fzf-tag k' -docstring 'kind definitions' } - hook global WinSetOption filetype=cobol %{ - map global fzf-ctags '' ': fzf-tag S' -docstring "source code file" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "file descriptions (FD, SD, RD)" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "group items" - map global fzf-ctags '' ': fzf-tag P' -docstring "program ids" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" - map global fzf-ctags '' ': fzf-tag D' -docstring "divisions" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'paragraphs' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'data items' + map global fzf-ctags '' ': fzf-tag S' -docstring 'source code file' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'file descriptions (f, , )' + map global fzf-ctags 'g' ': fzf-tag G' -docstring 'group items' + map global fzf-ctags '' ': fzf-tag P' -docstring 'program ids' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' + map global fzf-ctags '' ': fzf-tag D' -docstring 'divisions' } - hook global WinSetOption filetype=cuda %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" - map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "struct, and union members" - map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" - map global fzf-ctags 't' ': fzf-tag t' -docstring "typedefs" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "union names" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "aliases" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'macro definitions' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enumerators (values inside an enumeration)' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function definitions' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enumeration names' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'included header files' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'struct, and union members' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'structure names' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'typedefs' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'union names' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable definitions' } - hook global WinSetOption filetype=d %{ - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "class, struct, and union members" - map global fzf-ctags '' ': fzf-tag X' -docstring "mixins" - map global fzf-ctags '' ': fzf-tag M' -docstring "modules" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" - map global fzf-ctags 's' ': fzf-tag s' -docstring "structure names" - map global fzf-ctags '' ': fzf-tag T' -docstring "templates" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "union names" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" - map global fzf-ctags '' ': fzf-tag V' -docstring "version statements" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "modified files" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "newly created files" + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'aliases' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enumeration names' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enumerators (values inside an enumeration)' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function definitions' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interfaces' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'class, struct, and union members' + map global fzf-ctags '' ': fzf-tag X' -docstring 'mixins' + map global fzf-ctags '' ': fzf-tag M' -docstring 'modules' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namespaces' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'structure names' + map global fzf-ctags '' ': fzf-tag T' -docstring 'templates' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'union names' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable definitions' + map global fzf-ctags '' ': fzf-tag V' -docstring 'version statements' } - hook global WinSetOption filetype=diff %{ - map global fzf-ctags 'd' ': fzf-tag d' -docstring "deleted files" - map global fzf-ctags 'h' ': fzf-tag h' -docstring "hunks" - map global fzf-ctags '' ': fzf-tag E' -docstring "entities" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "parameter entities" + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'modified files' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'newly created files' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'deleted files' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'hunks' } - hook global WinSetOption filetype=dtd %{ - map global fzf-ctags 'e' ': fzf-tag e' -docstring "elements" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "attributes" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "notations" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "phandlers" - map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" + map global fzf-ctags '' ': fzf-tag E' -docstring 'entities' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'parameter entities' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'elements' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'attributes' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'notations' } - hook global WinSetOption filetype=dts %{ - map global fzf-ctags 'r' ': fzf-tag r' -docstring "regex" - map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'phandlers' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'labels' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'regex' } - hook global WinSetOption filetype=dosbatch %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "features" + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'labels' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' } - hook global WinSetOption filetype=eiffel %{ - map global fzf-ctags 'm' ': fzf-tag m' -docstring "Module" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "Renamed Imported Module" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'features' } - hook global WinSetOption filetype=elm %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "Port" - map global fzf-ctags 't' ': fzf-tag t' -docstring "Type Definition" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "Type Constructor" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "Type Alias" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "Functions" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'module' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'renamed mported odule' + map global fzf-ctags 'p' ': fzf-tag P' -docstring 'port' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'type efinition' + map global fzf-ctags 'c' ': fzf-tag C' -docstring 'type onstructor' + map global fzf-ctags 'a' ': fzf-tag A' -docstring 'type lias' + map global fzf-ctags 'f' ': fzf-tag F' -docstring 'functions' } - hook global WinSetOption filetype=erlang %{ - map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "record definitions" - map global fzf-ctags 't' ': fzf-tag t' -docstring "type definitions" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'macro definitions' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'modules' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'record definitions' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'type definitions' } - hook global WinSetOption filetype=falcon %{ - map global fzf-ctags 'm' ': fzf-tag m' -docstring "class members" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "imports" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'class members' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'imports' } - hook global WinSetOption filetype=flex %{ - map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "global variables" - map global fzf-ctags 'x' ': fzf-tag x' -docstring "mxtags" - map global fzf-ctags 'b' ': fzf-tag b' -docstring "block data" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "common blocks" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'methods' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'properties' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'global variables' + map global fzf-ctags 'x' ': fzf-tag x' -docstring 'mxtags' } - hook global WinSetOption filetype=fortran %{ - map global fzf-ctags 'e' ': fzf-tag e' -docstring "entry points" - map global fzf-ctags '' ': fzf-tag E' -docstring "enumerations" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interface contents, generic names, and operators" - map global fzf-ctags 'k' ': fzf-tag k' -docstring "type and structure components" - map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" - map global fzf-ctags '' ': fzf-tag M' -docstring "type bound procedures" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namelists" - map global fzf-ctags '' ': fzf-tag N' -docstring "enumeration values" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "programs" - map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" - map global fzf-ctags 't' ': fzf-tag t' -docstring "derived types and structures" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "program (global) and module variables" - map global fzf-ctags '' ': fzf-tag S' -docstring "submodules" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "definitions" + map global fzf-ctags 'b' ': fzf-tag b' -docstring 'block data' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'common blocks' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'entry points' + map global fzf-ctags '' ': fzf-tag E' -docstring 'enumerations' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interface contents, generic names, and operators' + map global fzf-ctags 'k' ': fzf-tag k' -docstring 'type and structure components' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'labels' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'modules' + map global fzf-ctags '' ': fzf-tag M' -docstring 'type bound procedures' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namelists' + map global fzf-ctags '' ': fzf-tag N' -docstring 'enumeration values' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'programs' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'subroutines' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'derived types and structures' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'program (global) and module variables' + map global fzf-ctags '' ': fzf-tag S' -docstring 'submodules' } - hook global WinSetOption filetype=fypp %{ - map global fzf-ctags 't' ': fzf-tag t' -docstring "toplevel variables" + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'macros' } - hook global WinSetOption filetype=gdbinit %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'definitions' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'toplevel variables' } - hook global WinSetOption filetype=go %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants" - map global fzf-ctags 't' ': fzf-tag t' -docstring "types" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 's' ': fzf-tag s' -docstring "structs" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "struct members" - map global fzf-ctags '' ': fzf-tag M' -docstring "struct anonymous members" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "unknown" - map global fzf-ctags '' ': fzf-tag P' -docstring "name for specifying imported package" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "named anchors" - map global fzf-ctags 'h' ': fzf-tag h' -docstring "H1 headings" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'constants' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'types' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'structs' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interfaces' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'struct members' + map global fzf-ctags '' ': fzf-tag M' -docstring 'struct anonymous members' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'unknown' + map global fzf-ctags '' ': fzf-tag P' -docstring 'name for specifying imported package' } - hook global WinSetOption filetype=html %{ - map global fzf-ctags 'i' ': fzf-tag i' -docstring "H2 headings" - map global fzf-ctags 'j' ': fzf-tag j' -docstring "H3 headings" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" - map global fzf-ctags 'k' ': fzf-tag k' -docstring "keys" + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'named anchors' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'h1 headings' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'h2 headings' + map global fzf-ctags 'j' ': fzf-tag j' -docstring 'h3 headings' } - hook global WinSetOption filetype=iniconf %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' + map global fzf-ctags 'k' ': fzf-tag k' -docstring 'keys' } - hook global WinSetOption filetype=itcl %{ - map global fzf-ctags 'v' ': fzf-tag v' -docstring "object-specific variables" - map global fzf-ctags '' ': fzf-tag C' -docstring "common variables" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "procedures within the class namespace" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enum constants" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "fields" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'methods' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'object-specific variables' + map global fzf-ctags '' ': fzf-tag C' -docstring 'common variables' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'procedures within the class namespace' } - hook global WinSetOption filetype=java %{ - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enum types" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" - map global fzf-ctags 'k' ': fzf-tag k' -docstring "keys" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'annotation declarations' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enum constants' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'fields' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enum types' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interfaces' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'methods' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' } - hook global WinSetOption filetype=javaproperties %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" + map global fzf-ctags 'k' ': fzf-tag k' -docstring 'keys' } - hook global WinSetOption filetype=javascript %{ - map global fzf-ctags '' ': fzf-tag C' -docstring "constants" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "global variables" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "generators" - map global fzf-ctags 'o' ': fzf-tag o' -docstring "objects" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "arrays" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "numbers" - map global fzf-ctags 's' ': fzf-tag s' -docstring "strings" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'methods' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'properties' + map global fzf-ctags '' ': fzf-tag C' -docstring 'constants' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'global variables' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'generators' } - hook global WinSetOption filetype=json %{ - map global fzf-ctags 'b' ': fzf-tag b' -docstring "booleans" - map global fzf-ctags 'z' ': fzf-tag z' -docstring "nulls" - map global fzf-ctags '' ': fzf-tag S' -docstring "sections" - map global fzf-ctags 's' ': fzf-tag s' -docstring "symbols" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "versions" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "input sections" + map global fzf-ctags 'o' ': fzf-tag o' -docstring 'objects' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'arrays' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'numbers' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'strings' + map global fzf-ctags 'b' ': fzf-tag b' -docstring 'booleans' + map global fzf-ctags 'z' ': fzf-tag z' -docstring 'nulls' } - hook global WinSetOption filetype=ldscript %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "macros" - map global fzf-ctags '' ': fzf-tag I' -docstring "macro files" + map global fzf-ctags '' ': fzf-tag S' -docstring 'sections' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'symbols' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'versions' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'input sections' } - hook global WinSetOption filetype=lisp %{ - map global fzf-ctags 't' ': fzf-tag t' -docstring "titles" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' } - hook global WinSetOption filetype=lua %{ - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' } - hook global WinSetOption filetype=m4 %{ - map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" - map global fzf-ctags 't' ': fzf-tag t' -docstring "targets" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'macros' + map global fzf-ctags '' ': fzf-tag I' -docstring 'macro files' } - hook global WinSetOption filetype=man %{ - map global fzf-ctags '' ': fzf-tag I' -docstring "makefiles" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapsters" + map global fzf-ctags 't' ': fzf-tag t' -docstring 'titles' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' } - hook global WinSetOption filetype=make %{ - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" - map global fzf-ctags '' ': fzf-tag S' -docstring "subsections" - map global fzf-ctags 't' ': fzf-tag t' -docstring "subsubsections" + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'macros' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'targets' + map global fzf-ctags '' ': fzf-tag I' -docstring 'makefiles' } - hook global WinSetOption filetype=markdown %{ - map global fzf-ctags '' ': fzf-tag T' -docstring "level 4 subsections" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "level 5 subsections" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "regex" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "function" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "class" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'chapsters' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' + map global fzf-ctags '' ': fzf-tag S' -docstring 'subsections' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'subsubsections' + map global fzf-ctags '' ': fzf-tag T' -docstring 'level 4 subsections' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'level 5 subsections' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'regex' } - hook global WinSetOption filetype=matlab %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 't' ': fzf-tag t' -docstring "types" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'class' } - hook global WinSetOption filetype=myrddin %{ - map global fzf-ctags 'r' ': fzf-tag r' -docstring "traits" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "class interface" - map global fzf-ctags '' ': fzf-tag I' -docstring "class implementation" - map global fzf-ctags '' ': fzf-tag P' -docstring "Protocol" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "Object's method" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'constants' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'types' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'traits' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' } - hook global WinSetOption filetype=objectivec %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "Class' method" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "Global variable" - map global fzf-ctags '' ': fzf-tag E' -docstring "Object field" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "A function" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "A property" - map global fzf-ctags 't' ': fzf-tag t' -docstring "A type alias" - map global fzf-ctags 's' ': fzf-tag s' -docstring "A type structure" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "An enumeration" - map global fzf-ctags '' ': fzf-tag M' -docstring "A preprocessor macro" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "Object's method" - map global fzf-ctags '' ': fzf-tag M' -docstring "Module or functor" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "Global variable" + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'class interface' + map global fzf-ctags '' ': fzf-tag I' -docstring 'class implementation' + map global fzf-ctags '' ': fzf-tag P' -docstring 'rotocol' + map global fzf-ctags 'm' ': fzf-tag M' -docstring 'object's method' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'class' method' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'global variable' + map global fzf-ctags '' ': fzf-tag E' -docstring 'bject field' + map global fzf-ctags 'f' ': fzf-tag F' -docstring 'a function' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'a property' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'a type alias' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'a type structure' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'an enumeration' + map global fzf-ctags '' ': fzf-tag M' -docstring ' preprocessor macro' } - hook global WinSetOption filetype=ocaml %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "Signature item" - map global fzf-ctags 't' ': fzf-tag t' -docstring "Type name" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "A function" - map global fzf-ctags '' ': fzf-tag C' -docstring "A constructor" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "A 'structure' field" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "An exception" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "user names" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "procedures" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'object's method' + map global fzf-ctags '' ': fzf-tag M' -docstring 'odule or functor' + map global fzf-ctags 'v' ': fzf-tag V' -docstring 'global variable' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'signature item' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'type name' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'a function' + map global fzf-ctags '' ': fzf-tag C' -docstring ' constructor' + map global fzf-ctags 'r' ': fzf-tag R' -docstring 'a 'structure' field' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'an exception' } - hook global WinSetOption filetype=passwd %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "formats" + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'user names' } - hook global WinSetOption filetype=pascal %{ - map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'procedures' } - hook global WinSetOption filetype=perl %{ - map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "grammars" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" - map global fzf-ctags 'o' ': fzf-tag o' -docstring "modules" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'constants' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'formats' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'labels' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'subroutines' } - hook global WinSetOption filetype=perl6 %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "roles" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "rules" - map global fzf-ctags 'b' ': fzf-tag b' -docstring "submethods" - map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" - map global fzf-ctags 't' ': fzf-tag t' -docstring "tokens" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "constant definitions" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'grammars' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'methods' + map global fzf-ctags 'o' ': fzf-tag o' -docstring 'modules' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'roles' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'rules' + map global fzf-ctags 'b' ': fzf-tag b' -docstring 'submethods' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'subroutines' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'tokens' } - hook global WinSetOption filetype=php %{ - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" - map global fzf-ctags 't' ': fzf-tag t' -docstring "traits" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "aliases" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapters" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" - map global fzf-ctags '' ': fzf-tag S' -docstring "subsections" - map global fzf-ctags 't' ': fzf-tag t' -docstring "subsubsections" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'constant definitions' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interfaces' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namespaces' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'traits' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'aliases' } - hook global WinSetOption filetype=pod %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "messages" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "fields" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enum constants" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'chapters' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' + map global fzf-ctags '' ': fzf-tag S' -docstring 'subsections' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'subsubsections' } - hook global WinSetOption filetype=protobuf %{ - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enum types" - map global fzf-ctags 's' ': fzf-tag s' -docstring "services" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "definitions" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "nodes" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "resources" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'messages' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'fields' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enum constants' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enum types' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'services' } - hook global WinSetOption filetype=puppetmanifest %{ - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "class members" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'definitions' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'nodes' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'resources' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' } - hook global WinSetOption filetype=python %{ - map global fzf-ctags '' ': fzf-tag I' -docstring "name referring a module defined in other file" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "modules" - map global fzf-ctags 'x' ': fzf-tag x' -docstring "name referring a class/variable/function/module defined in other module" - map global fzf-ctags '' ': fzf-tag L' -docstring "logger sections" - map global fzf-ctags 'q' ': fzf-tag q' -docstring "logger qualnames" - map global fzf-ctags 'q' ': fzf-tag q' -docstring "QEMU Management Protocol dispatch table entries" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "item in texinfo doc" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'class members' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags '' ': fzf-tag I' -docstring 'name referring a module defined in other file' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'modules' + map global fzf-ctags 'x' ': fzf-tag x' -docstring 'name referring a class/variable/function/module defined in other module' } - hook global WinSetOption filetype=pythonloggingconfig %{ - map global fzf-ctags 's' ': fzf-tag s' -docstring "slots" - map global fzf-ctags '' ': fzf-tag S' -docstring "signals" + map global fzf-ctags '' ': fzf-tag L' -docstring 'logger sections' + map global fzf-ctags 'q' ': fzf-tag q' -docstring 'logger qualnames' } - hook global WinSetOption filetype=qemuhx %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'q' ': fzf-tag q' -docstring 'q anagement rotocol dispatch table entries' + map global fzf-ctags 'i' ': fzf-tag I' -docstring 'item in texinfo doc' } - hook global WinSetOption filetype=qtmoc %{ - map global fzf-ctags 'l' ': fzf-tag l' -docstring "libraries" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sources" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "global variables" + map global fzf-ctags 's' ': fzf-tag s' -docstring 'slots' + map global fzf-ctags '' ': fzf-tag S' -docstring 'signals' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'properties' } - hook global WinSetOption filetype=r %{ - map global fzf-ctags 'v' ': fzf-tag v' -docstring "function variables" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "describes" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "contexts" - map global fzf-ctags 's' ': fzf-tag s' -docstring "subroutines" - map global fzf-ctags 't' ': fzf-tag t' -docstring "testcases" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'libraries' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sources' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'global variables' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'function variables' } - hook global WinSetOption filetype=rspec %{ - map global fzf-ctags 'k' ': fzf-tag k' -docstring "keywords" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'describes' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'contexts' } - hook global WinSetOption filetype=rexx %{ - map global fzf-ctags 't' ': fzf-tag t' -docstring "tags" + map global fzf-ctags 's' ': fzf-tag s' -docstring 'subroutines' } - hook global WinSetOption filetype=robot %{ - map global fzf-ctags 'm' ': fzf-tag m' -docstring "macros" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "packages" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "global macros" + map global fzf-ctags 't' ': fzf-tag t' -docstring 'testcases' + map global fzf-ctags 'k' ': fzf-tag k' -docstring 'keywords' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' } - hook global WinSetOption filetype=rpmspec %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapters" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" - map global fzf-ctags '' ': fzf-tag S' -docstring "subsections" - map global fzf-ctags 't' ': fzf-tag t' -docstring "subsubsections" + map global fzf-ctags 't' ': fzf-tag t' -docstring 'tags' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'macros' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'packages' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'global macros' } - hook global WinSetOption filetype=restructuredtext %{ - map global fzf-ctags '' ': fzf-tag T' -docstring "targets" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "methods" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" - map global fzf-ctags '' ': fzf-tag S' -docstring "singleton methods" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'chapters' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' + map global fzf-ctags '' ': fzf-tag S' -docstring 'subsections' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'subsubsections' + map global fzf-ctags '' ': fzf-tag T' -docstring 'targets' } - hook global WinSetOption filetype=ruby %{ - map global fzf-ctags 'n' ': fzf-tag n' -docstring "module" - map global fzf-ctags 's' ': fzf-tag s' -docstring "structural type" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "trait interface" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "implementation" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'methods' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'modules' + map global fzf-ctags '' ': fzf-tag S' -docstring 'singleton methods' } - hook global WinSetOption filetype=rust %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "Function" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "Enum" - map global fzf-ctags 't' ': fzf-tag t' -docstring "Type Alias" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "Global variable" - map global fzf-ctags '' ': fzf-tag M' -docstring "Macro Definition" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "A struct field" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "An enum variant" - map global fzf-ctags '' ': fzf-tag P' -docstring "A method" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sets" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "aliases" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'module' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'structural type' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'trait interface' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'implementation' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enum' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'type lias' + map global fzf-ctags 'v' ': fzf-tag V' -docstring 'global variable' + map global fzf-ctags '' ': fzf-tag M' -docstring 'acro efinition' + map global fzf-ctags 'm' ': fzf-tag M' -docstring 'a struct field' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'an enum variant' + map global fzf-ctags '' ': fzf-tag P' -docstring ' method' } - hook global WinSetOption filetype=scheme %{ - map global fzf-ctags 's' ': fzf-tag s' -docstring "script files" - map global fzf-ctags 'h' ': fzf-tag h' -docstring "label for here document" + map global fzf-ctags 'f' ': fzf-tag F' -docstring 'functions' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sets' } - hook global WinSetOption filetype=sh %{ - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "functor definitions" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "value bindings" + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'aliases' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'script files' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'label for here document' } - hook global WinSetOption filetype=slang %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "cursors" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namespaces' } - hook global WinSetOption filetype=sml %{ - map global fzf-ctags '' ': fzf-tag E' -docstring "record fields" - map global fzf-ctags '' ': fzf-tag L' -docstring "block label" - map global fzf-ctags '' ': fzf-tag P' -docstring "packages" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "procedures" - map global fzf-ctags 's' ': fzf-tag s' -docstring "subtypes" - map global fzf-ctags 't' ': fzf-tag t' -docstring "tables" - map global fzf-ctags '' ': fzf-tag T' -docstring "triggers" + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'exception declarations' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function definitions' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'functor definitions' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'signature declarations' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'structure declarations' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'type definitions' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'value bindings' } - hook global WinSetOption filetype=sql %{ - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "indexes" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "events" - map global fzf-ctags '' ': fzf-tag U' -docstring "publications" - map global fzf-ctags '' ': fzf-tag R' -docstring "services" - map global fzf-ctags '' ': fzf-tag D' -docstring "domains" - map global fzf-ctags '' ': fzf-tag V' -docstring "views" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "synonyms" - map global fzf-ctags 'x' ': fzf-tag x' -docstring "MobiLink Table Scripts" - map global fzf-ctags 'y' ': fzf-tag y' -docstring "MobiLink Conn Scripts" - map global fzf-ctags 'z' ': fzf-tag z' -docstring "MobiLink Properties " - map global fzf-ctags 'u' ': fzf-tag u' -docstring "units" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "procedures" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "parts" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "chapters" - map global fzf-ctags 's' ': fzf-tag s' -docstring "sections" - map global fzf-ctags 'u' ': fzf-tag u' -docstring "subsections" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'cursors' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags '' ': fzf-tag E' -docstring 'record fields' + map global fzf-ctags '' ': fzf-tag L' -docstring 'block label' + map global fzf-ctags '' ': fzf-tag P' -docstring 'packages' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'procedures' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'subtypes' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'tables' + map global fzf-ctags '' ': fzf-tag T' -docstring 'triggers' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'indexes' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'events' + map global fzf-ctags '' ': fzf-tag U' -docstring 'publications' + map global fzf-ctags '' ': fzf-tag R' -docstring 'services' + map global fzf-ctags '' ': fzf-tag D' -docstring 'domains' + map global fzf-ctags '' ': fzf-tag V' -docstring 'views' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'synonyms' + map global fzf-ctags 'x' ': fzf-tag x' -docstring 'mobiink able cripts' + map global fzf-ctags 'y' ': fzf-tag Y' -docstring 'mobiink onn cripts' + map global fzf-ctags 'z' ': fzf-tag Z' -docstring 'mobiink roperties ' } - hook global WinSetOption filetype=systemdunit %{ - map global fzf-ctags 'b' ': fzf-tag b' -docstring "subsubsections" + map global fzf-ctags 'u' ': fzf-tag U' -docstring 'units' } - hook global WinSetOption filetype=tcl %{ - map global fzf-ctags '' ': fzf-tag P' -docstring "paragraphs" - map global fzf-ctags '' ': fzf-tag G' -docstring "subparagraphs" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'procedures' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namespaces' } - hook global WinSetOption filetype=tcloo %{ - map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "includes" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'methods' } - hook global WinSetOption filetype=tex %{ - map global fzf-ctags '' ': fzf-tag M' -docstring "module definition" - map global fzf-ctags 't' ': fzf-tag t' -docstring "type definition" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "constant definition" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "template definition" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definition" - map global fzf-ctags 's' ': fzf-tag s' -docstring "signature definition" - map global fzf-ctags '' ': fzf-tag C' -docstring "testcase definition" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "altstep definition" - map global fzf-ctags '' ': fzf-tag G' -docstring "group definition" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'parts' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'chapters' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'sections' + map global fzf-ctags 'u' ': fzf-tag u' -docstring 'subsections' + map global fzf-ctags 'b' ': fzf-tag b' -docstring 'subsubsections' + map global fzf-ctags '' ': fzf-tag P' -docstring 'paragraphs' + map global fzf-ctags '' ': fzf-tag G' -docstring 'subparagraphs' + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'labels' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'includes' } - hook global WinSetOption filetype=ttcn %{ - map global fzf-ctags '' ': fzf-tag P' -docstring "module parameter definition" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable instance" - map global fzf-ctags '' ': fzf-tag T' -docstring "timer instance" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "port instance" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "record/set/union member" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumeration value" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "macro definitions" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "enumerators (values inside an enumeration)" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" - map global fzf-ctags 'g' ': fzf-tag g' -docstring "enumeration names" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "class, struct, and union members" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "programs" - map global fzf-ctags 's' ': fzf-tag s' -docstring "signals" + map global fzf-ctags '' ': fzf-tag M' -docstring 'module definition' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'type definition' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'constant definition' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'template definition' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function definition' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'signature definition' + map global fzf-ctags '' ': fzf-tag C' -docstring 'testcase definition' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'altstep definition' + map global fzf-ctags '' ': fzf-tag G' -docstring 'group definition' + map global fzf-ctags '' ': fzf-tag P' -docstring 'module parameter definition' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable instance' + map global fzf-ctags '' ': fzf-tag T' -docstring 'timer instance' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'port instance' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'record/set/union member' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enumeration value' } - hook global WinSetOption filetype=vera %{ - map global fzf-ctags 't' ': fzf-tag t' -docstring "tasks" - map global fzf-ctags '' ': fzf-tag T' -docstring "typedefs" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" - map global fzf-ctags 'h' ': fzf-tag h' -docstring "included header files" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants (define, parameter, specparam)" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "events" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "net data types" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "ports" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "register data types" - map global fzf-ctags 't' ': fzf-tag t' -docstring "tasks" - map global fzf-ctags 'b' ': fzf-tag b' -docstring "blocks" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'macro definitions' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'enumerators (values inside an enumeration)' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function definitions' + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'enumeration names' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interfaces' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'class, struct, and union members' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'programs' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'signals' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'tasks' + map global fzf-ctags '' ': fzf-tag T' -docstring 'typedefs' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable definitions' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'included header files' } - hook global WinSetOption filetype=verilog %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "constants (define, parameter, specparam, enum values)" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "events" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "modules" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "net data types" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "ports" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "register data types" - map global fzf-ctags 't' ': fzf-tag t' -docstring "tasks" - map global fzf-ctags 'b' ': fzf-tag b' -docstring "blocks" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'constants (define, parameter, specparam)' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'events' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'modules' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'net data types' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'ports' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'register data types' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'tasks' + map global fzf-ctags 'b' ': fzf-tag b' -docstring 'blocks' } - hook global WinSetOption filetype=systemverilog %{ - map global fzf-ctags '' ': fzf-tag A' -docstring "assertions" - map global fzf-ctags '' ': fzf-tag C' -docstring "classes" - map global fzf-ctags '' ': fzf-tag V' -docstring "covergroups" - map global fzf-ctags '' ': fzf-tag E' -docstring "enumerators" - map global fzf-ctags '' ': fzf-tag I' -docstring "interfaces" - map global fzf-ctags '' ': fzf-tag M' -docstring "modports" - map global fzf-ctags '' ': fzf-tag K' -docstring "packages" - map global fzf-ctags '' ': fzf-tag P' -docstring "programs" - map global fzf-ctags '' ': fzf-tag R' -docstring "properties" - map global fzf-ctags '' ': fzf-tag S' -docstring "structs and unions" - map global fzf-ctags '' ': fzf-tag T' -docstring "subtype definitions" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "record names" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "autocommand groups" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "user-defined commands" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "function definitions" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "maps" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variable definitions" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "vimball filename" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "dialogs" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "menus" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'constants (define, parameter, specparam, enum values)' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'events' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'modules' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'net data types' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'ports' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'register data types' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'tasks' + map global fzf-ctags 'b' ': fzf-tag b' -docstring 'blocks' + map global fzf-ctags '' ': fzf-tag A' -docstring 'assertions' + map global fzf-ctags '' ': fzf-tag C' -docstring 'classes' + map global fzf-ctags '' ': fzf-tag V' -docstring 'covergroups' + map global fzf-ctags '' ': fzf-tag E' -docstring 'enumerators' + map global fzf-ctags '' ': fzf-tag I' -docstring 'interfaces' + map global fzf-ctags '' ': fzf-tag M' -docstring 'modports' + map global fzf-ctags '' ': fzf-tag K' -docstring 'packages' + map global fzf-ctags '' ': fzf-tag P' -docstring 'programs' + map global fzf-ctags '' ': fzf-tag R' -docstring 'properties' + map global fzf-ctags '' ': fzf-tag S' -docstring 'structs and unions' + map global fzf-ctags '' ': fzf-tag T' -docstring 'type declarations' } - hook global WinSetOption filetype=vhdl %{ - map global fzf-ctags 'i' ': fzf-tag i' -docstring "icons" - map global fzf-ctags 'b' ': fzf-tag b' -docstring "bitmaps" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "cursors" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "fonts" - map global fzf-ctags 'v' ': fzf-tag v' -docstring "versions" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "accelerators" - map global fzf-ctags 'l' ': fzf-tag l' -docstring "labels" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "repository id" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'constant declarations' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'type definitions' + map global fzf-ctags '' ': fzf-tag T' -docstring 'subtype definitions' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'record names' + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'entity declarations' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function prototypes and declarations' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'procedure prototypes and declarations' + map global fzf-ctags '' ': fzf-tag P' -docstring 'package definitions' } - hook global WinSetOption filetype=vim %{ - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" - map global fzf-ctags 'd' ': fzf-tag d' -docstring "constant definitions" - map global fzf-ctags 'f' ': fzf-tag f' -docstring "functions" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "namespaces" - map global fzf-ctags 't' ': fzf-tag t' -docstring "traits" + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'autocommand groups' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'user-defined commands' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'function definitions' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'maps' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variable definitions' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'vimball filename' } - hook global WinSetOption filetype=windres %{ - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "aliases" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "interfaces" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "methods" - map global fzf-ctags 's' ': fzf-tag s' -docstring "signals" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "identifiers" - map global fzf-ctags 'c' ': fzf-tag c' -docstring "classes" + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'dialogs' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'menus' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'icons' + map global fzf-ctags 'b' ': fzf-tag b' -docstring 'bitmaps' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'cursors' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'fonts' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'versions' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'accelerators' } - hook global WinSetOption filetype=yacc %{ - map global fzf-ctags 'h' ': fzf-tag h' -docstring "handlers" + map global fzf-ctags 'l' ': fzf-tag l' -docstring 'labels' } - hook global WinSetOption filetype=yumrepo %{ - map global fzf-ctags 'g' ': fzf-tag g' -docstring "group identifiers" + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'repository id' } - hook global WinSetOption filetype=zephir %{ - map global fzf-ctags 'a' ': fzf-tag a' -docstring "artifact identifiers" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "properties" - map global fzf-ctags 'r' ': fzf-tag r' -docstring "repository identifiers" - map global fzf-ctags 'k' ': fzf-tag k' -docstring "keys" - map global fzf-ctags 'e' ': fzf-tag e' -docstring "elements" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "attributes" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "named patterns" - map global fzf-ctags 'i' ': fzf-tag i' -docstring "id attributes" + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'd' ': fzf-tag d' -docstring 'constant definitions' + map global fzf-ctags 'f' ': fzf-tag f' -docstring 'functions' + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interfaces' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'namespaces' + map global fzf-ctags 't' ': fzf-tag t' -docstring 'traits' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'aliases' } - hook global WinSetOption filetype=dbusintrospect %{ - map global fzf-ctags 's' ': fzf-tag s' -docstring "stylesheets" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "parameters" - map global fzf-ctags 'm' ': fzf-tag m' -docstring "matched template" - map global fzf-ctags 'n' ': fzf-tag n' -docstring "matched template" + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'interfaces' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'methods' + map global fzf-ctags 's' ': fzf-tag s' -docstring 'signals' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'properties' } - hook global WinSetOption filetype=glade %{ - map global fzf-ctags 'v' ': fzf-tag v' -docstring "variables" - map global fzf-ctags 'a' ': fzf-tag a' -docstring "anchors" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'identifiers' + map global fzf-ctags 'c' ': fzf-tag c' -docstring 'classes' + map global fzf-ctags 'h' ': fzf-tag h' -docstring 'handlers' } - hook global WinSetOption filetype=maven2 %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'g' ': fzf-tag g' -docstring 'group identifiers' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'artifact identifiers' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'properties' + map global fzf-ctags 'r' ': fzf-tag r' -docstring 'repository identifiers' } - hook global WinSetOption filetype=plistxml %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'k' ': fzf-tag k' -docstring 'keys' } - hook global WinSetOption filetype=relaxng %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'e' ': fzf-tag e' -docstring 'elements' + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'attributes' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'named patterns' } - hook global WinSetOption filetype=svg %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'i' ': fzf-tag i' -docstring 'id attributes' } - hook global WinSetOption filetype=xslt %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 's' ': fzf-tag s' -docstring 'stylesheets' + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'parameters' + map global fzf-ctags 'm' ': fzf-tag m' -docstring 'matched template' + map global fzf-ctags 'n' ': fzf-tag n' -docstring 'matched template' + map global fzf-ctags 'v' ': fzf-tag v' -docstring 'variables' } - hook global WinSetOption filetype=yaml %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'a' ': fzf-tag a' -docstring 'anchors' } - hook global WinSetOption filetype=ansibleplaybook %{ - map global fzf-ctags 'p' ': fzf-tag p' -docstring "plays" + map global fzf-ctags 'p' ': fzf-tag p' -docstring 'plays' } } catch %{ echo -debug "Error while declaring 'fzf-ctags' mode" @@ -922,19 +822,17 @@ define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{ cmd="cd $path; readtags -l | cut -f1" fi - [ -n "${kak_client_env_TMUX}" ] && tmux_keybindings=" -: open tag in horizontal split -: open tag in vertical split" - message="Jump to a symbol''s definition : open tag in new buffer : open tag in new window" - message="$message$tmux_keybindings" + [ -n "${kak_client_env_TMUX}" ] && tmux_keybindings=" +: open tag in horizontal split +: open tag in vertical split" - printf "%s\n" "info -title 'fzf tag' '$message'" + 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 window ctagsfiles %{$path/$kak_opt_fzf_tag_file}" - printf "%s\n" "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags $additional_keybindings}" + printf "%s\n" "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags}" }} From 0dd2838dcfc5aca67b343938a506347e1c106659 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 15:35:10 +0300 Subject: [PATCH 25/37] Updated readme --- README.md | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 0b8b165..48f5892 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,11 @@ ![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`: @@ -39,16 +31,14 @@ map global normal ': fzf-mode' ``` Each fzf subcommand has mnemonic mapping, like `f` for opening files, `t` for tags and so on. Available mappings: -- b - Select buffer -- c - Switch servers working directory -- f - Search for file and open it -- v - Edit file in version control system tree -- - Explicitly select which vcs command to run -- s - Search over buffer contents and jump to result line -- t - Browse ctags tags - fzf.kak supports filtering tags on per language basis. For each filetype - press alt+filter key specified in the info box to - reload fzf buffer with the desired filter. +- b - Select buffer +- c - Switch servers working directory +- f - Search for file and open it +- v - Edit file in version control system tree +- Alt+v - Explicitly select which vcs command to run +- s - Search over buffer contents and jump to result line +- t - Browse ctags tags +- Alt+t - Select tag kind filter on per language basis So for example pressing Ctrl+pf will open fzf at the bottom of the Kakoune buffer, showing you all possible files. From 3a45addb27566653b2ba6a8ffcef7ab50549b80c Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 15:36:13 +0300 Subject: [PATCH 26/37] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48f5892..f265dba 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Available mappings: - Alt+v - Explicitly select which vcs command to run - s - Search over buffer contents and jump to result line - t - Browse ctags tags -- Alt+t - Select tag kind filter on per language basis +- Alt+t - Select tag kind filter on per language basis So for example pressing Ctrl+pf will open fzf at the bottom of the Kakoune buffer, showing you all possible files. From 23eee98462ab187d01337937d10282a0579fc4bd Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 15:44:18 +0300 Subject: [PATCH 27/37] update --- README.md | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index f265dba..95b04ab 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Recommended way to install is to use [plug.kak](https://github.com/andreyorst/pl 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`. @@ -23,16 +23,18 @@ 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 ': fzf-mode' # 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: - b - Select buffer -- c - Switch servers working directory +- c - Switch server's working directory - f - Search for file and open it - v - Edit file in version control system tree - Alt+v - Explicitly select which vcs command to run @@ -48,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: @@ -80,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: @@ -122,20 +124,3 @@ You can disable the preview window in fzf window by setting `fzf_preview` option ```kak 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) - -### Searching tags with universal-ctags -![ctags](https://user-images.githubusercontent.com/19470159/45917775-3988e200-be85-11e8-8959-d7ddf17961b7.gif) - -### Browsing Git tree files -![git](https://user-images.githubusercontent.com/19470159/45917779-3988e200-be85-11e8-9136-c0c830e838bc.gif) - -### Switching buffers -![buffers](https://user-images.githubusercontent.com/19470159/45917774-38f04b80-be85-11e8-963b-5721bd6364b3.gif) - -### Changing directories -![dirs](https://user-images.githubusercontent.com/19470159/45917776-3988e200-be85-11e8-89bf-7c1453806c83.gif) - From b552940207e81876e8aeb65907a1c193c2cb6eed Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 17:29:14 +0300 Subject: [PATCH 28/37] simpligy cd, use common fzf command instead of defining own --- rc/fzf-modules/fzf-cd.kak | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/rc/fzf-modules/fzf-cd.kak b/rc/fzf-modules/fzf-cd.kak index 9b040f8..3fea3ab 100644 --- a/rc/fzf-modules/fzf-cd.kak +++ b/rc/fzf-modules/fzf-cd.kak @@ -26,38 +26,6 @@ define-command -hidden fzf-cd %{ evaluate-commands %sh{ *) items_command=$kak_opt_fzf_cd_command ;; esac - - tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf-tmp.XXXXXX) - fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) - printf "%s\n" "cd $PWD && $items_command | SHELL=$(command -v sh) fzf > $tmp" > $fzfcmd - chmod 755 $fzfcmd - - if [ -n "$kak_client_env_TMUX" ]; then - [ -n "${tmux_height%%*%}" ] && measure="-p" || measure="-p" - cmd="command tmux split-window $measure ${tmux_height%%%*} 'sh -c $fzfcmd; rm $fzfcmd'" - elif [ -n "$kak_opt_termcmd" ]; then - cmd="$kak_opt_termcmd 'sh -c $fzfcmd; rm $fzfcmd'" - else - printf "%s\n" "fail %{termcmd option is not set}" - rm $fzfcmd - rm $tmp - exit - fi - - ( - eval "$cmd" - while [ -e $fzfcmd ]; do - sleep 0.1 - done - if [ -s $tmp ]; then - ( - while read item; do - printf "%s\n" "evaluate-commands -client $kak_client change-directory %{$item}" | kak -p $kak_session - printf "%s\n" "evaluate-commands -client $kak_client fzf-cd" | kak -p $kak_session - done - ) < $tmp - fi - rm $tmp - ) > /dev/null 2>&1 < /dev/null & + printf "%s\n" "fzf %{change-directory} %{$items_command} %{&& printf '%s\n' '; evaluate-commands fzf-cd'}" }} From 53f280dde80017fe982dfff9f1f909226363a590 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 17:29:44 +0300 Subject: [PATCH 29/37] simplify buffer, remove deleting buffers --- rc/fzf-modules/fzf-buffer.kak | 45 ++--------------------------------- 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/rc/fzf-modules/fzf-buffer.kak b/rc/fzf-modules/fzf-buffer.kak index 0d65016..c3064d4 100644 --- a/rc/fzf-modules/fzf-buffer.kak +++ b/rc/fzf-modules/fzf-buffer.kak @@ -11,48 +11,7 @@ map global fzf -docstring "open buffer" 'b' ': fzf-buffer' define-command -hidden fzf-buffer %{ evaluate-commands %sh{ - echo "info -title 'fzf buffer' 'Set buffer to edit in current client. -: delete selected buffer'" - - tmux_height=$kak_opt_fzf_tmux_height + 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") - - tmp=$(mktemp ${TMPDIR:-/tmp}/kak-fzf-tmp.XXXXXX) - fzfcmd=$(mktemp ${TMPDIR:-/tmp}/kak-fzfcmd.XXXXXX) - printf "%s\n" "printf '%s\n' '$buffers' | SHELL=$(command -v sh) fzf --expect ctrl-d > $tmp" > $fzfcmd - chmod 755 $fzfcmd - - if [ -n "$kak_client_env_TMUX" ]; then - [ -n "${tmux_height%%*%}" ] && measure="-p" || measure="-p" - cmd="command tmux split-window $measure ${tmux_height%%%*} 'sh -c $fzfcmd; rm $fzfcmd'" - elif [ -n "$kak_opt_termcmd" ]; then - cmd="$kak_opt_termcmd 'sh -c $fzfcmd; rm $fzfcmd'" - else - printf "%s\n" "fail %{termcmd option is not set}" - rm $fzfcmd - rm $tmp - exit - fi - - ( - eval "$cmd" - while [ -e $fzfcmd ]; do - sleep 0.1 - done - if [ -s $tmp ]; then - ( - read action - read buf - if [ "$action" = "ctrl-d" ]; then - printf "%s\n" "evaluate-commands -client $kak_client delete-buffer $buf" | kak -p $kak_session - printf "%s\n" "evaluate-commands -client $kak_client fzf-buffer" | kak -p $kak_session - else - printf "%s\n" "evaluate-commands -client $kak_client buffer $buf" | kak -p $kak_session - fi - ) < $tmp - else - printf "%s\n" "evaluate-commands -client $kak_client buffer $kak_bufname" | kak -p $kak_session - fi - rm $tmp - ) > /dev/null 2>&1 < /dev/null & + printf "%s\n" "fzf %{buffer} %{printf \"%s\n\" \"$buffers\"}" }} From 90f958819d1d68e77f0a701aa7a484af0be5a568 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 18:44:48 +0300 Subject: [PATCH 30/37] use extra command parameter to do extra commands after main command --- rc/fzf-modules/fzf-cd.kak | 2 +- rc/fzf-modules/fzf-search.kak | 2 +- rc/fzf.kak | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/rc/fzf-modules/fzf-cd.kak b/rc/fzf-modules/fzf-cd.kak index 3fea3ab..a8c9e80 100644 --- a/rc/fzf-modules/fzf-cd.kak +++ b/rc/fzf-modules/fzf-cd.kak @@ -26,6 +26,6 @@ define-command -hidden fzf-cd %{ evaluate-commands %sh{ *) items_command=$kak_opt_fzf_cd_command ;; esac - printf "%s\n" "fzf %{change-directory} %{$items_command} %{&& printf '%s\n' '; evaluate-commands fzf-cd'}" + printf "%s\n" "fzf %{change-directory} %{$items_command} %{} %{fzf-cd}" }} diff --git a/rc/fzf-modules/fzf-search.kak b/rc/fzf-modules/fzf-search.kak index c954a16..b961e60 100644 --- a/rc/fzf-modules/fzf-search.kak +++ b/rc/fzf-modules/fzf-search.kak @@ -16,6 +16,6 @@ define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ printf "%s\n" "info -title '$title' '$message'" buffer_content=$(mktemp ${TMPDIR:-/tmp}/fzf-buff-${kak_buffile##*/}.XXXXXX) printf "%s\n" "execute-keys -draft %{%cat>$buffer_content;}" - printf "%s\n" "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content; echo 'gx')}" + printf "%s\n" "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content)} %{execute-keys gx}" }} diff --git a/rc/fzf.kak b/rc/fzf.kak index 3083563..3692dbf 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -63,10 +63,11 @@ Best used with mapping like: " \ fzf-mode %{ try %{ evaluate-commands 'enter-user-mode fzf' } } -define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ +define-command -hidden fzf -params 2..4 %{ evaluate-commands %sh{ callback=$1 items_command=$2 additional_flags=$3 + extra_action=$4 tmux_height=$kak_opt_fzf_tmux_height items_executable=$(printf "%s\n" "$items_command" | grep -o -E "[[:alpha:]]+" | head -1) @@ -139,14 +140,16 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{ [ -n "$action" ] && printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$action'" | kak -p $kak_session ;; esac kakoune_command() { - printf "%s\n" "evaluate-commands -client $kak_client '$wincmd $callback' '$1'" + printf "%s\n" "evaluate-commands -client $kak_client $wincmd $callback %{$1}" } while read item; do kakoune_command "$item" | kak -p $kak_session done + [ -n "$extra_action" ] && printf "%s\n" "evaluate-commands -client $kak_client $extra_action" | kak -p $kak_session ) < $tmp fi rm $tmp - ) > /dev/null 2>&1 < /dev/null & + ) & + # > /dev/null 2>&1 < /dev/null & }} From 9c33890d1447c12088928d146a4b87f5e4618f15 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 18:45:03 +0300 Subject: [PATCH 31/37] added contributing section --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 95b04ab..afea88e 100644 --- a/README.md +++ b/README.md @@ -124,3 +124,23 @@ You can disable the preview window in fzf window by setting `fzf_preview` option ```kak set-option global fzf_preview false ``` + +## Contributing + +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. + +### Writing a module + +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. + +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. From db70070c9719ceeb701313591f9dd2e03dd9fb69 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 19:59:48 +0300 Subject: [PATCH 32/37] disable output --- rc/fzf.kak | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 3692dbf..340934b 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -149,7 +149,6 @@ define-command -hidden fzf -params 2..4 %{ evaluate-commands %sh{ ) < $tmp fi rm $tmp - ) & - # > /dev/null 2>&1 < /dev/null & + ) > /dev/null 2>&1 < /dev/null & }} From 7582dc48206aa5859cabd98f702a45778dc8cc8a Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 20:47:46 +0300 Subject: [PATCH 33/37] add doc --- rc/fzf.kak | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 340934b..0da8aab 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -8,7 +8,7 @@ # │ different fzf commands. │ # ╰─────────────────────────────────╯ -try %{ declare-user-mode fzf } catch %{echo -markup "{Error}Can't declare mode 'fzf' - already exists"} +try %{ declare-user-mode fzf } catch %{ echo -markup "{Error}Can't declare mode 'fzf' - already exists" } # Options declare-option -docstring 'allow showing preview window @@ -63,8 +63,36 @@ Best used with mapping like: " \ fzf-mode %{ try %{ evaluate-commands 'enter-user-mode fzf' } } -define-command -hidden fzf -params 2..4 %{ evaluate-commands %sh{ - callback=$1 +define-command -hidden -docstring \ +"fzf [ ]: generic fzf command. +This command can be used to create new fzf wrappers for various Kakoune or external +features. More about arguments: + +: +The is a Kakoune command that should be used after fzf returns some result. +For example to open file chooser we can call fzf with `edit` as a command: +'fzf %{edit} %{}' +After choosing one or more files in fzf, will be used with each of them. + + +This is the shell command that is used to provide list of values to fzf. It can be +any command that provides newline separated list of items, which is then piped to fzf. + + +These are additional flags for fzf program, that are passed to it. You can check them +in fzf manual. + + +This is extra commands that are preformed after fzf finishis and main command was +executed. This can be used to invoke fzf back, like in fzf-cd command, or to execute +any other Kakoune command that is meaningfull in current situation. This is more is +a workaround of problem with executing composite commands, where fzf result should +be in the middle of the command and may be changed or removed it further versions. + +If you want to develop a module with fzf command, feel free to check for existing +module implementations in 'rc/fzf-modules' directory." \ +fzf -params 2..4 %{ evaluate-commands %sh{ + command=$1 items_command=$2 additional_flags=$3 extra_action=$4 @@ -76,7 +104,7 @@ define-command -hidden fzf -params 2..4 %{ evaluate-commands %sh{ exit fi - if [ "$callback" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then + if [ "$command" = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then case $kak_opt_fzf_highlighter in bat) highlighter="bat --color=always --style=plain {}" ;; @@ -137,10 +165,10 @@ define-command -hidden fzf -params 2..4 %{ evaluate-commands %sh{ ctrl-v) wincmd="tmux-new-horizontal" ;; *) - [ -n "$action" ] && printf "%s\n" "evaluate-commands -client $kak_client '$callback' '$action'" | kak -p $kak_session ;; + [ -n "$action" ] && printf "%s\n" "evaluate-commands -client $kak_client '$command' '$action'" | kak -p $kak_session ;; esac kakoune_command() { - printf "%s\n" "evaluate-commands -client $kak_client $wincmd $callback %{$1}" + printf "%s\n" "evaluate-commands -client $kak_client $wincmd $command %{$1}" } while read item; do kakoune_command "$item" | kak -p $kak_session From f8fd934e431d48dcc37210fcdb16bf762a12d805 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 21:58:23 +0300 Subject: [PATCH 34/37] use whole tree --- rc/fzf-modules/VCS/fzf-git.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/fzf-modules/VCS/fzf-git.kak b/rc/fzf-modules/VCS/fzf-git.kak index 58215c3..102dd34 100644 --- a/rc/fzf-modules/VCS/fzf-git.kak +++ b/rc/fzf-modules/VCS/fzf-git.kak @@ -13,7 +13,7 @@ Supported tools: Git : ""git"" Default arguments: - ""git ls-tree --name-only -r HEAD"" + ""git ls-tree --full-tree --name-only -r HEAD"" " \ str fzf_git_command "git" @@ -22,7 +22,7 @@ map global fzf-vcs -docstring "edit file from Git tree" 'g' ': fzf-git define-command -hidden fzf-git %{ evaluate-commands %sh{ case $kak_opt_fzf_git_command in git) - cmd="git ls-tree --name-only -r HEAD" ;; + cmd="git ls-tree --full-tree --name-only -r HEAD" ;; git*) cmd=$kak_opt_fzf_git_command ;; esac From 02e00153e0d3b0021bfc9d05d3b6b8811ac18401 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 24 Nov 2018 21:58:45 +0300 Subject: [PATCH 35/37] call extra commands for every item --- rc/fzf.kak | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 0da8aab..6b44e93 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -165,15 +165,18 @@ fzf -params 2..4 %{ evaluate-commands %sh{ ctrl-v) wincmd="tmux-new-horizontal" ;; *) - [ -n "$action" ] && printf "%s\n" "evaluate-commands -client $kak_client '$command' '$action'" | kak -p $kak_session ;; + if [ -n "$action" ]; then + printf "%s\n" "evaluate-commands -client $kak_client '$command' '$action'" | kak -p $kak_session + [ -n "$extra_action" ] && printf "%s\n" "evaluate-commands -client $kak_client $extra_action" | kak -p $kak_session + fi ;; esac kakoune_command() { printf "%s\n" "evaluate-commands -client $kak_client $wincmd $command %{$1}" + [ -n "$extra_action" ] && printf "%s\n" "evaluate-commands -client $kak_client $extra_action" } while read item; do kakoune_command "$item" | kak -p $kak_session done - [ -n "$extra_action" ] && printf "%s\n" "evaluate-commands -client $kak_client $extra_action" | kak -p $kak_session ) < $tmp fi rm $tmp From 68f1105014ea16b4b96e0afea8e444d7a4f14d9d Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sun, 25 Nov 2018 12:36:32 +0300 Subject: [PATCH 36/37] don't override the ctagsfiles options --- rc/fzf-modules/fzf-ctags.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index ed0cbf5..0dfd211 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -833,6 +833,6 @@ define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{ 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 window ctagsfiles %{$path/$kak_opt_fzf_tag_file}" + 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}" }} From c44072b9bdad19976870fdf8c44d19a62ff90a60 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sun, 25 Nov 2018 16:02:05 +0300 Subject: [PATCH 37/37] move paren to command, add quotes --- rc/fzf-modules/fzf-search.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/fzf-modules/fzf-search.kak b/rc/fzf-modules/fzf-search.kak index b961e60..6041bd2 100644 --- a/rc/fzf-modules/fzf-search.kak +++ b/rc/fzf-modules/fzf-search.kak @@ -14,8 +14,8 @@ 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) + buffer_content="$(mktemp ${TMPDIR:-/tmp}/fzf-buff-${kak_buffile##*/}.XXXXXX)" printf "%s\n" "execute-keys -draft %{%cat>$buffer_content;}" - printf "%s\n" "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content} %{--reverse | cut -f 1; rm $buffer_content)} %{execute-keys gx}" + printf "%s\n" "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content; rm $buffer_content)} %{--reverse | cut -f 1} %{execute-keys gx}" }}