diff --git a/rc/fzf-modules/VCS/fzf-bzr.kak b/rc/fzf-modules/VCS/fzf-bzr.kak index 7d0711a..b594269 100644 --- a/rc/fzf-modules/VCS/fzf-bzr.kak +++ b/rc/fzf-modules/VCS/fzf-bzr.kak @@ -17,6 +17,7 @@ Default arguments: " \ str fzf_bzr_command "bzr" +try %{ declare-user-mode fzf } map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' ': fzf-bzr' define-command -hidden fzf-bzr %{ evaluate-commands %sh{ diff --git a/rc/fzf-modules/VCS/fzf-git.kak b/rc/fzf-modules/VCS/fzf-git.kak index b755263..3480ffb 100644 --- a/rc/fzf-modules/VCS/fzf-git.kak +++ b/rc/fzf-modules/VCS/fzf-git.kak @@ -17,6 +17,7 @@ Default arguments: " \ str fzf_git_command "git" +try %{ declare-user-mode fzf } map global fzf-vcs -docstring "edit file from Git tree" 'g' ': fzf-git' define-command -override -hidden fzf-git %{ evaluate-commands %sh{ diff --git a/rc/fzf-modules/VCS/fzf-hg.kak b/rc/fzf-modules/VCS/fzf-hg.kak index 3efe92f..a5241be 100644 --- a/rc/fzf-modules/VCS/fzf-hg.kak +++ b/rc/fzf-modules/VCS/fzf-hg.kak @@ -17,6 +17,7 @@ Default arguments: " \ str fzf_hg_command "hg" +try %{ declare-user-mode fzf } map global fzf-vcs -docstring "edit file from mercurial tree" 'h' ': fzf-hg' define-command -hidden fzf-hg %{ evaluate-commands %sh{ diff --git a/rc/fzf-modules/VCS/fzf-svn.kak b/rc/fzf-modules/VCS/fzf-svn.kak index 853b4a4..4cbf2a9 100644 --- a/rc/fzf-modules/VCS/fzf-svn.kak +++ b/rc/fzf-modules/VCS/fzf-svn.kak @@ -17,6 +17,7 @@ Default arguments: " \ str fzf_svn_command "svn" +try %{ declare-user-mode fzf } map global fzf-vcs -docstring "edit file from Subversion tree" 's' ': fzf-svn' define-command -hidden fzf-svn %{ evaluate-commands %sh{ diff --git a/rc/fzf-modules/fzf-buffer.kak b/rc/fzf-modules/fzf-buffer.kak index ff16d12..3652376 100644 --- a/rc/fzf-modules/fzf-buffer.kak +++ b/rc/fzf-modules/fzf-buffer.kak @@ -8,6 +8,7 @@ # │ GitHub.com/andreyorst/fzf.kak │ # ╰──────────────────────────────────────╯ +try %{ declare-user-mode fzf } map global fzf -docstring "open buffer" 'b' ': fzf-buffer' define-command -hidden fzf-buffer %{ evaluate-commands %sh{ diff --git a/rc/fzf-modules/fzf-cd.kak b/rc/fzf-modules/fzf-cd.kak index f217df7..4595d02 100644 --- a/rc/fzf-modules/fzf-cd.kak +++ b/rc/fzf-modules/fzf-cd.kak @@ -29,6 +29,7 @@ str cd_preview_cmd "tree -d {}" declare-option -docstring 'maximum amount of previewed directories' \ int fzf_preview_dirs '300' +try %{ declare-user-mode fzf } map global fzf -docstring "change directory" 'c' ': fzf-cd' define-command -hidden fzf-cd %{ evaluate-commands %sh{ diff --git a/rc/fzf-modules/fzf-ctags.kak b/rc/fzf-modules/fzf-ctags.kak index d37a5b4..40bc8cf 100644 --- a/rc/fzf-modules/fzf-ctags.kak +++ b/rc/fzf-modules/fzf-ctags.kak @@ -11,6 +11,7 @@ declare-option -docstring "file that should be used by fzf-tag to provide tags. Default value: tags" \ str fzf_tag_file_name "tags" +try %{ declare-user-mode fzf } map global fzf -docstring "find tag" 't' ': fzf-tag' # this huge try block defines filetype aware filter mappings for separate fzf-ctags mode diff --git a/rc/fzf-modules/fzf-file.kak b/rc/fzf-modules/fzf-file.kak index 6cbd79f..500b1d0 100644 --- a/rc/fzf-modules/fzf-file.kak +++ b/rc/fzf-modules/fzf-file.kak @@ -24,6 +24,7 @@ Default arguments: " \ str fzf_file_command "find" +try %{ declare-user-mode fzf } map global fzf -docstring "open file" 'f' ': fzf-file' define-command -hidden fzf-file %{ evaluate-commands %sh{ diff --git a/rc/fzf-modules/fzf-search.kak b/rc/fzf-modules/fzf-search.kak index 0fdde08..0329318 100644 --- a/rc/fzf-modules/fzf-search.kak +++ b/rc/fzf-modules/fzf-search.kak @@ -8,6 +8,7 @@ # │ GitHub.com/andreyorst/fzf.kak │ # ╰──────────────────────────────────────╯ +try %{ declare-user-mode fzf } map global fzf -docstring "search in buffer" 's' ': fzf-buffer-search' define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ diff --git a/rc/fzf-modules/fzf-vcs.kak b/rc/fzf-modules/fzf-vcs.kak index bcc5eee..1d70f49 100644 --- a/rc/fzf-modules/fzf-vcs.kak +++ b/rc/fzf-modules/fzf-vcs.kak @@ -11,6 +11,7 @@ try %{ declare-user-mode fzf-vcs } catch %{echo -markup "{Error}Can't declare mode 'fzf-vcs' - already exists"} +try %{ declare-user-mode fzf } map global fzf -docstring "edit file from vcs repo" 'v' ': fzf-vcs' map global fzf -docstring "svitch to vcs selection mode" '' ': fzf-vcs-mode' diff --git a/rc/fzf-modules/sk-grep.kak b/rc/fzf-modules/sk-grep.kak index 78731e5..4e2cffb 100644 --- a/rc/fzf-modules/sk-grep.kak +++ b/rc/fzf-modules/sk-grep.kak @@ -15,6 +15,8 @@ Default value: grep -RHn" \ str fzf_sk_grep_command 'grep -RHn' +try %{ declare-user-mode fzf } + evaluate-commands %sh{ if [ -n "$(command -v sk)" ]; then printf "%s\n" "map global fzf -docstring %{Interactive grep with skim} 'g' ': fzf-sk-interactive-grep'" diff --git a/rc/fzf.kak b/rc/fzf.kak index 52c2801..49aa7cd 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 } # Options declare-option -docstring 'implementation of fzf that you want to use.