1
0
Fork 0
This commit is contained in:
Andrey Orst 2019-03-26 20:34:01 +03:00
parent 3a77e9db32
commit a43d7080c8
12 changed files with 13 additions and 1 deletions

View file

@ -17,6 +17,7 @@ Default arguments:
" \ " \
str fzf_bzr_command "bzr" str fzf_bzr_command "bzr"
try %{ declare-user-mode fzf }
map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' '<esc>: fzf-bzr<ret>' map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' '<esc>: fzf-bzr<ret>'
define-command -hidden fzf-bzr %{ evaluate-commands %sh{ define-command -hidden fzf-bzr %{ evaluate-commands %sh{

View file

@ -17,6 +17,7 @@ Default arguments:
" \ " \
str fzf_git_command "git" str fzf_git_command "git"
try %{ declare-user-mode fzf }
map global fzf-vcs -docstring "edit file from Git tree" 'g' '<esc>: fzf-git<ret>' map global fzf-vcs -docstring "edit file from Git tree" 'g' '<esc>: fzf-git<ret>'
define-command -override -hidden fzf-git %{ evaluate-commands %sh{ define-command -override -hidden fzf-git %{ evaluate-commands %sh{

View file

@ -17,6 +17,7 @@ Default arguments:
" \ " \
str fzf_hg_command "hg" str fzf_hg_command "hg"
try %{ declare-user-mode fzf }
map global fzf-vcs -docstring "edit file from mercurial tree" 'h' '<esc>: fzf-hg<ret>' map global fzf-vcs -docstring "edit file from mercurial tree" 'h' '<esc>: fzf-hg<ret>'
define-command -hidden fzf-hg %{ evaluate-commands %sh{ define-command -hidden fzf-hg %{ evaluate-commands %sh{

View file

@ -17,6 +17,7 @@ Default arguments:
" \ " \
str fzf_svn_command "svn" str fzf_svn_command "svn"
try %{ declare-user-mode fzf }
map global fzf-vcs -docstring "edit file from Subversion tree" 's' '<esc>: fzf-svn<ret>' map global fzf-vcs -docstring "edit file from Subversion tree" 's' '<esc>: fzf-svn<ret>'
define-command -hidden fzf-svn %{ evaluate-commands %sh{ define-command -hidden fzf-svn %{ evaluate-commands %sh{

View file

@ -8,6 +8,7 @@
# │ GitHub.com/andreyorst/fzf.kak │ # │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯ # ╰──────────────────────────────────────╯
try %{ declare-user-mode fzf }
map global fzf -docstring "open buffer" 'b' '<esc>: fzf-buffer<ret>' map global fzf -docstring "open buffer" 'b' '<esc>: fzf-buffer<ret>'
define-command -hidden fzf-buffer %{ evaluate-commands %sh{ define-command -hidden fzf-buffer %{ evaluate-commands %sh{

View file

@ -29,6 +29,7 @@ str cd_preview_cmd "tree -d {}"
declare-option -docstring 'maximum amount of previewed directories' \ declare-option -docstring 'maximum amount of previewed directories' \
int fzf_preview_dirs '300' int fzf_preview_dirs '300'
try %{ declare-user-mode fzf }
map global fzf -docstring "change directory" 'c' '<esc>: fzf-cd<ret>' map global fzf -docstring "change directory" 'c' '<esc>: fzf-cd<ret>'
define-command -hidden fzf-cd %{ evaluate-commands %sh{ define-command -hidden fzf-cd %{ evaluate-commands %sh{

View file

@ -11,6 +11,7 @@ declare-option -docstring "file that should be used by fzf-tag to provide tags.
Default value: tags" \ Default value: tags" \
str fzf_tag_file_name "tags" str fzf_tag_file_name "tags"
try %{ declare-user-mode fzf }
map global fzf -docstring "find tag" 't' '<esc>: fzf-tag<ret>' map global fzf -docstring "find tag" 't' '<esc>: fzf-tag<ret>'
# this huge try block defines filetype aware filter mappings for separate fzf-ctags mode # this huge try block defines filetype aware filter mappings for separate fzf-ctags mode

View file

@ -24,6 +24,7 @@ Default arguments:
" \ " \
str fzf_file_command "find" str fzf_file_command "find"
try %{ declare-user-mode fzf }
map global fzf -docstring "open file" 'f' '<esc>: fzf-file<ret>' map global fzf -docstring "open file" 'f' '<esc>: fzf-file<ret>'
define-command -hidden fzf-file %{ evaluate-commands %sh{ define-command -hidden fzf-file %{ evaluate-commands %sh{

View file

@ -8,6 +8,7 @@
# │ GitHub.com/andreyorst/fzf.kak │ # │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯ # ╰──────────────────────────────────────╯
try %{ declare-user-mode fzf }
map global fzf -docstring "search in buffer" 's' '<esc>: fzf-buffer-search<ret>' map global fzf -docstring "search in buffer" 's' '<esc>: fzf-buffer-search<ret>'
define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{ define-command -hidden fzf-buffer-search %{ evaluate-commands %sh{

View file

@ -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-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' '<esc>: fzf-vcs<ret>' map global fzf -docstring "edit file from vcs repo" 'v' '<esc>: fzf-vcs<ret>'
map global fzf -docstring "svitch to vcs selection mode" '<a-v>' '<esc>: fzf-vcs-mode<ret>' map global fzf -docstring "svitch to vcs selection mode" '<a-v>' '<esc>: fzf-vcs-mode<ret>'

View file

@ -15,6 +15,8 @@ Default value:
grep -RHn" \ grep -RHn" \
str fzf_sk_grep_command 'grep -RHn' str fzf_sk_grep_command 'grep -RHn'
try %{ declare-user-mode fzf }
evaluate-commands %sh{ evaluate-commands %sh{
if [ -n "$(command -v sk)" ]; then if [ -n "$(command -v sk)" ]; then
printf "%s\n" "map global fzf -docstring %{Interactive grep with skim} 'g' '<esc>: fzf-sk-interactive-grep<ret>'" printf "%s\n" "map global fzf -docstring %{Interactive grep with skim} 'g' '<esc>: fzf-sk-interactive-grep<ret>'"

View file

@ -8,7 +8,7 @@
# │ different fzf commands. │ # │ 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 # Options
declare-option -docstring 'implementation of fzf that you want to use. declare-option -docstring 'implementation of fzf that you want to use.