1
0
Fork 0

move all variables to respective modules

This commit is contained in:
Andrey Orst 2019-05-20 13:35:10 +03:00
parent 8382d908d0
commit f75e48a40e
6 changed files with 25 additions and 19 deletions

View file

@ -4,7 +4,7 @@
![Github commits (since latest release)][5] ![license][6]
**fzf.kak** is a plugin for [Kakoune][7] editor, that brings integration with
[fzf][8] tool. This plugin is being tested against Kakoune 2018.09.04.
[fzf][8] tool. This plugin is being tested against Kakoune master branch.
**fzf.kak** also supports [skim][9], which can be used via `fzf_implementation`
option.
@ -107,7 +107,13 @@ is being used to create new windows.
## Configuration
**fzf.kak** features a lot of settings via options that can be altered to change
how **fzf.kak** behaves.
how **fzf.kak** behaves. All settings belong to `fzf` module, so in order to
change variable values use `defer "fzf %{ ... }"` if you're using **plug.kak**,
and if not, use `hook global ModuleLoad fzf %{ ... }`, or simply `requier-module
fzf` before configuring options. Same goes for `fzf_vcs` module.
From now on I assume that you're using one of the methods listed above for all
configurations below.
### Mappings
You can define what keys to use in `fzf` window via these options:

View file

@ -8,6 +8,15 @@
# │ different fzf commands. │
# ╰─────────────────────────────────╯
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 '<some key>' ': fzf-mode<ret>'
" \
fzf-mode %{ require-module fzf; evaluate-commands 'enter-user-mode fzf' }
provide-module fzf %§
# Options
declare-option -docstring 'implementation of fzf that you want to use.
@ -75,16 +84,6 @@ str fzf_vertical_map 'ctrl-v'
declare-option -docstring "mapping to execute action in new horizontal split" \
str fzf_horizontal_map 'ctrl-s'
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 '<some key>' ': fzf-mode<ret>'
" \
fzf-mode %{ require-module fzf; evaluate-commands 'enter-user-mode fzf' }
provide-module fzf %§
try %{ declare-user-mode fzf }
define-command -hidden -docstring "wrapper command to create new vertical split" \

View file

@ -7,6 +7,8 @@
# │ GitHub.com/andreyorst/fzf.kak │
# ╰───────────────────────────────────────╯
hook global ModuleLoad fzf_vcs %§
declare-option -docstring "command to provide list of files in GNU Bazaar repository to fzf. Arguments are supported
Supported tools:
<package>: <value>:
@ -17,8 +19,6 @@ Default arguments:
" \
str fzf_bzr_command "bzr"
hook global ModuleLoad fzf_vcs %§
map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' '<esc>: fzf-bzr<ret>'
define-command -hidden fzf-bzr %{ evaluate-commands %sh{

View file

@ -7,6 +7,8 @@
# │ GitHub.com/andreyorst/fzf.kak │
# ╰───────────────────────────────────────╯
hook global ModuleLoad fzf_vcs %§
declare-option -docstring "command to provide list of files in git tree to fzf. Arguments are supported
Supported tools:
<package>: <value>:
@ -17,8 +19,6 @@ Default arguments:
" \
str fzf_git_command "git"
hook global ModuleLoad fzf_vcs %§
map global fzf-vcs -docstring "edit file from Git tree" 'g' '<esc>: fzf-git<ret>'
define-command -override -hidden fzf-git %{ evaluate-commands %sh{

View file

@ -7,6 +7,8 @@
# │ GitHub.com/andreyorst/fzf.kak │
# ╰──────────────────────────────────────╯
hook global ModuleLoad fzf_vcs %§
declare-option -docstring "command to provide list of files in mercurial repository to fzf. Arguments are supported
Supported tools:
<package>: <value>:
@ -17,8 +19,6 @@ Default arguments:
" \
str fzf_hg_command "hg"
hook global ModuleLoad fzf_vcs %§
map global fzf-vcs -docstring "edit file from mercurial tree" 'h' '<esc>: fzf-hg<ret>'
define-command -hidden fzf-hg %{ evaluate-commands %sh{

View file

@ -7,6 +7,8 @@
# │ GitHub.com/andreyorst/fzf.kak │
# ╰───────────────────────────────────────╯
hook global ModuleLoad fzf_vcs %§
declare-option -docstring "command to provide list of files in svn repository to fzf. Arguments are supported
Supported tools:
<package>: <value>:
@ -17,7 +19,6 @@ Default arguments:
" \
str fzf_svn_command "svn"
hook global ModuleLoad fzf_vcs %§
map global fzf-vcs -docstring "edit file from Subversion tree" 's' '<esc>: fzf-svn<ret>'
define-command -hidden fzf-svn %{ evaluate-commands %sh{