Compare commits
149 commits
Author | SHA1 | Date | |
---|---|---|---|
Cat /dev/Nulo | 62a3de575c | ||
010e395041 | |||
16e001c3a2 | |||
e91b76c517 | |||
d98b16680c | |||
66bc692ab3 | |||
68f21eb786 | |||
444a3449d4 | |||
124c3a2751 | |||
1b3a3beebb | |||
bfe1bc0a3d | |||
3f2773c919 | |||
a8765bb03d | |||
435cc240f3 | |||
aed44987a3 | |||
3d70299722 | |||
39ec448e5a | |||
d912a6ecf1 | |||
9ee5e4fea8 | |||
1a405fcc43 | |||
a8436627c3 | |||
4e6c9a8575 | |||
94b259cbd8 | |||
2ff1246599 | |||
ce97b7efa9 | |||
cce440353e | |||
e10de405e2 | |||
c6ee9b3c11 | |||
f23daa698a | |||
b2aeb26473 | |||
766fd11dad | |||
cfbcfbb796 | |||
355f05d832 | |||
302045491c | |||
c71e5aaab2 | |||
5cf11c44fe | |||
dc6d0a504e | |||
e862cb5b78 | |||
f697b7d11e | |||
8a8414fb57 | |||
2d3340ec55 | |||
ec506b5b9b | |||
b536296251 | |||
16a083cb69 | |||
820e700389 | |||
c54e0d7030 | |||
68d7717295 | |||
b48b4e34a4 | |||
c6e894a033 | |||
f1b9f9c301 | |||
5d7267d0db | |||
6d1fd2c645 | |||
9a10a6b64a | |||
59f28b903a | |||
b257db0bf8 | |||
2494c9c8b5 | |||
0319d8769c | |||
ed81b70619 | |||
ef7902395e | |||
ede90d3e02 | |||
c5d8ca65a1 | |||
7fef4973e6 | |||
1de1082a45 | |||
9eb8dc2509 | |||
d9e702250e | |||
9180b69217 | |||
e14a0c3e84 | |||
4243c4b9e9 | |||
2d2d4b47ad | |||
1143b5b164 | |||
f9b476ed62 | |||
f75e48a40e | |||
8382d908d0 | |||
fcb86e9bed | |||
b924eaaade | |||
ba9dc4298a | |||
bd3de3a3ad | |||
5b2e9751ac | |||
efdf1231ca | |||
5b2b21b8d3 | |||
c604547c09 | |||
78b1314fa9 | |||
bae554f28e | |||
58e065669f | |||
8dab12526d | |||
1812d7b9de | |||
ecde71af36 | |||
384571cf3a | |||
1bf4f86a43 | |||
cd14282e5e | |||
a702041479 | |||
be72a973ce | |||
1e6c8eb9c7 | |||
c58323ddb3 | |||
4b1f1fcdf9 | |||
d2a9bdabfc | |||
841c9ec67f | |||
ca637c4bc4 | |||
0fdafb4e60 | |||
7f54f8dcf1 | |||
edcb9cf771 | |||
ad73e62553 | |||
91dc034c7b | |||
02b02b266e | |||
e847c9effa | |||
19032114d5 | |||
77f3eddac6 | |||
733b65a353 | |||
53e0470058 | |||
b3ca672683 | |||
a63522d235 | |||
a64699d214 | |||
c5ce4d90da | |||
5de1a31f58 | |||
45399fa417 | |||
7fee8cf5a8 | |||
9b07bddfdc | |||
012b65e569 | |||
9968488ba8 | |||
088ff3805f | |||
a707856f93 | |||
43f60b2473 | |||
0801f52673 | |||
a81ad3935a | |||
d58d6e2cf3 | |||
9aefbe4e58 | |||
d1d9d63385 | |||
11f1d99cd2 | |||
f42cbcb86f | |||
900a16e344 | |||
676d321fb7 | |||
ca1ccfd7a4 | |||
b8bcbc33c7 | |||
29782b25b8 | |||
b2ac9faf9b | |||
06eee481fb | |||
ab8a2808bb | |||
a43d7080c8 | |||
3a77e9db32 | |||
21e1361c18 | |||
266f9a8e71 | |||
a2dd6cfd10 | |||
2a97c358f6 | |||
7e936ad3aa | |||
32836a42f0 | |||
d8b7803825 | |||
2aa0b0ac15 | |||
f6a52fdef6 | |||
28e29c3422 |
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -1,6 +1 @@
|
|||
**Breaking change**: yes/no
|
||||
<!-- Please provide meaningful description about your contribution -->
|
||||
**Description**:
|
||||
|
||||
|
||||
<!-- note that code will be reviewed and changes much likely will be requested -->
|
||||
**NOTE**: This repository is not actively maintened. If you want to become a maintainer please contact github.com/andreyorst
|
||||
|
|
365
README.md
365
README.md
|
@ -1,190 +1,307 @@
|
|||
# fzf.kak
|
||||
|
||||
[![GitHub release](https://img.shields.io/github/release/andreyorst/fzf.kak.svg)](https://github.com/andreyorst/fzf.kak/releases)
|
||||
[![GitHub Release Date](https://img.shields.io/github/release-date/andreyorst/fzf.kak.svg)](https://github.com/andreyorst/fzf.kak/releases)
|
||||
![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)
|
||||
[![GitHub release][1]][2] [![GitHub Release Date][3]][4]
|
||||
![Github commits (since latest release)][5] ![license][6]
|
||||
|
||||
**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** also supports [skim](https://github.com/lotabout/skim), which can be used via `fzf_implementation` option.
|
||||
fzf.kak is a plugin for [Kakoune][7] editor, that provides integration with the [fzf][8] tool.
|
||||
There's also limited support for [skim][9], which can be enabled by changing the `fzf_implementation` option.
|
||||
|
||||
![showcase][10]
|
||||
|
||||
![showcase](https://user-images.githubusercontent.com/19470159/46813471-6ee76800-cd7f-11e8-89aa-123b3a5f9f1b.gif)
|
||||
|
||||
## Installation
|
||||
### With [plug.kak](https://github.com/andreyorst/plug.kak) (recommended)
|
||||
Recommended way to install is to use plug.kak plugin manager.
|
||||
You can install **fzf.kak** by adding this to your `kakrc`:
|
||||
|
||||
```kak
|
||||
|
||||
### With [plug.kak][11]
|
||||
|
||||
The recommended way to install fzf.kak is to use a plug.kak plugin manager.
|
||||
To install fzf.kak add this to the `kakrc`:
|
||||
|
||||
``` kak
|
||||
plug "andreyorst/fzf.kak"
|
||||
```
|
||||
|
||||
Then reload Kakoune config or restart Kakoune and run `:plug-install`.
|
||||
Then reload the configuration file or restart Kakoune and run `:plug-install`.
|
||||
|
||||
|
||||
### Without plugin manager
|
||||
This plugin consists of several parts which are "modules", that provide different functions to plugin.
|
||||
There's central module that must be loaded before any other module, named `fzf.kak`, so in order to properly
|
||||
load **fzf.kak** plugin, you need to source it in your kakrc.
|
||||
|
||||
Assuming that you've cloned **fzf.kak** repository to your Kakoune configuration folder:
|
||||
This plugin consists of several parts which are referred to as "modules".
|
||||
So, for the plugin to work the base module must be loaded:
|
||||
|
||||
```sh
|
||||
source "~/.config/kak/fzf.kak/rc/fzf.kak" # loading base fzf module
|
||||
``` sh
|
||||
source "/path/to/fzf.kak/rc/fzf.kak" # loading base fzf module
|
||||
```
|
||||
|
||||
This will load base fzf module, but It can't do anything on it's own. You can load only needed modules, to
|
||||
keep your configuration rather simple, or load every module if you need all plugin abilities:
|
||||
This module doesn't do anything on its own.
|
||||
Each module in the `modules` directory provides features that extend the base `fzf` module with new commands and mappings.
|
||||
Those can be loaded manually one by one the same way as the base module, or with the use of the `find` command:
|
||||
|
||||
```sh
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/fzf-file.kak" # fzf file chooser
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/fzf-buffer.kak" # switching buffers with fzf
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/fzf-search.kak" # search within file contents
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/fzf-cd.kak" # change server's working directory
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/fzf-ctags.kak" # search for tag in your project ctags file
|
||||
``` sh
|
||||
evaluate-commands %sh{
|
||||
find -L "path/to/fzf.kak/modules/" -type f -name '*.kak' -exec printf 'source "%s"\n' {} \;
|
||||
}
|
||||
```
|
||||
|
||||
The same principle is applied to handling different version control systems. You need a base module for fzf,
|
||||
called `fzf-vcs.kak` and its submodules for each VCS. There are plenty of VC systems, so modules come in handy.
|
||||
|
||||
```sh
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/fzf-vcs.kak" # VCS base module
|
||||
```
|
||||
|
||||
So if you never work with, say, GNU Bazaar, or Mercurial you can remove them from your configuration.
|
||||
|
||||
```sh
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/VCS/fzf-bzr.kak" # GNU Bazaar support
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/VCS/fzf-git.kak" # Git support module
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/VCS/fzf-hg.kak" # Mercurial VCS
|
||||
source "~/.config/kak/plugins/fzf.kak/rc/fzf-modules/VCS/fzf-svn.kak" # Subversion module
|
||||
```
|
||||
|
||||
You can see that we load less nested modules first, and then go deeper and deeper. Besides that order of
|
||||
files within single depth level doesn't matter. This may look complex, but it makes plugin more versatile.
|
||||
And plugin managers, like [plug.kak](https://github.com/andreyorst/plug.kak) for example, just does all
|
||||
those steps for you.
|
||||
|
||||
By the way, this structure makes it easy to extend plugin with new modules,
|
||||
and you [can add modules on your own](#writing-a-module)!
|
||||
|
||||
## Usage
|
||||
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`:
|
||||
|
||||
fzf.kak provides a `fzf-mode` command that can be mapped to preferred key:
|
||||
|
||||
```kak
|
||||
map global normal <c-p> ': fzf-mode<ret>'
|
||||
# note that the space after colon is intentional to suppess fzf-mode to show in command history
|
||||
```
|
||||
|
||||
Each fzf sub-command has mnemonic mapping, like `f` for opening files, `t` for tags and so on.
|
||||
Available mappings:
|
||||
- <kbd>b</kbd> - Select buffer
|
||||
- <kbd>c</kbd> - Switch server's working directory
|
||||
- <kbd>f</kbd> - Search for file and open it
|
||||
- <kbd>v</kbd> - Edit file in version control system tree
|
||||
- <kbd>Alt+v</kbd> - Explicitly select which vcs command to run
|
||||
- <kbd>s</kbd> - Search over buffer contents and jump to result line
|
||||
- <kbd>t</kbd> - Browse ctags tags
|
||||
- <kbd>Alt+t</kbd> - Select tag kind filter on per language basis
|
||||
This will invoke the user mode, which contains mnemonic keybindings for each sub-module.
|
||||
If all modules were loaded, the following mappings are available:
|
||||
|
||||
So for example pressing <kbd>Ctrl+p</kbd><kbd>f</kbd> will open fzf at the
|
||||
bottom of the Kakoune buffer, showing you all possible files.
|
||||
- <kbd>b</kbd> - Select buffer.
|
||||
- <kbd>c</kbd> - Switch server's working directory.
|
||||
- <kbd>f</kbd> - Search for file and open it.
|
||||
- <kbd>v</kbd> - Edit file in version control system tree.
|
||||
- <kbd>Alt</kbd>+<kbd>v</kbd> - Explicitly select which VCS command to run.
|
||||
- <kbd>s</kbd> - Search over buffer contents and jump to result line.
|
||||
- <kbd>t</kbd> - Browse ctags tags.
|
||||
- <kbd>Alt</kbd>+<kbd>t</kbd> - Select tag kind filter on per language basis.
|
||||
- <kbd>g</kbd> - Interactive grep.
|
||||
- <kbd>p</kbd> - Project selector.
|
||||
- <kbd>Alt</kbd>+<kbd>p</kbd> - Project related commands.
|
||||
|
||||
### Settings
|
||||
**fzf.kak** features a lot of settings via options that can be altered to change how **fzf.kak** behaves.
|
||||
When Kakoune runs inside Tmux, fzf.kak will use the bottom split to display the `fzf` window.
|
||||
Additional keybindings are also made available to open files in a vertical or horizontal split.
|
||||
Otherwise, the `terminal` command is being used to create new windows.
|
||||
|
||||
#### 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 with file-preview turned on.
|
||||
|
||||
#### 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:
|
||||
## Configuration
|
||||
|
||||
fzf.kak features a lot of settings via options that can be altered to change how fzf.kak behaves.
|
||||
Each `.kak` file provides a Kakoune module, so any settings which alter variable values should be wrapped in the `ModuleLoaded` hook.
|
||||
See [plug.kak manual section for `defer`](https://github.com/andreyorst/plug.kak/tree/master#deferring-plugin-configuration) that explains how to do this when using the plug.kak.
|
||||
|
||||
|
||||
### Default query
|
||||
|
||||
| module |
|
||||
|--------|
|
||||
| `fzf` |
|
||||
|
||||
By default main selection is used as the default query for `fzf`, but only if the selection is more than 1 character long.
|
||||
This can be disabled by setting `fzf_use_main_selection` to `false`.
|
||||
|
||||
|
||||
### Windowing
|
||||
|
||||
| module |
|
||||
|--------|
|
||||
| `fzf` |
|
||||
|
||||
When using Tmux fzf.kak automatically creates all needed Tmux splits and panes for you.
|
||||
In other cases fzf.kak uses the `fzf_terminal_command` option to call the windowing command to create new windows.
|
||||
By default it is set to use `terminal` alias: `terminal kak -c %val{session} -e "%arg{@}"`, but some terminals can provide other aliases or commands, like `terminal-tab` in Kitty.
|
||||
|
||||
|
||||
### Mappings
|
||||
|
||||
| module |
|
||||
|--------|
|
||||
| `fzf` |
|
||||
|
||||
Keys that are used in the `fzf` window can be configured with these options:
|
||||
|
||||
- `fzf_window_map` - mapping to perform an action in a new window,
|
||||
- `fzf_vertical_map` - mapping to perform an action in new vertical split (Tmux),
|
||||
- `fzf_horizontal_map` - mapping to perform an action in new horizontal split.
|
||||
|
||||
These options should be set to work with fzf `--expect` parameter, so check out fzf documentation on this.
|
||||
|
||||
|
||||
### File command
|
||||
|
||||
| module |
|
||||
|------------|
|
||||
| `fzf-file` |
|
||||
|
||||
A command that is used to search for files and their arguments can be configured by changing the value of the `fzf_file_command` variable, which is available in the `fzf-file` module.
|
||||
|
||||
Supported tools are [GNU Find][12], [The Silver Searcher][13], [ripgrep][14], [fd][15].
|
||||
A default set of arguments is provided for each of these searchers, only the name of the tool can be assigned to the `fzf_file_command` variable:
|
||||
|
||||
```kak
|
||||
set-option global fzf_file_command 'rg' # 'ag', 'fd' or 'find'
|
||||
set-option global fzf_file_command 'rg' # 'ag', 'fd', or 'find'
|
||||
```
|
||||
|
||||
Or if you don't like default file arguments, which are `find -type f`, and would like to disable searching in, say `.git` directories you can set it like so:
|
||||
Default arguments can be changed by setting the complete command to execute:
|
||||
|
||||
```kak
|
||||
set-option global fzf_file_command "find . \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type f -print"
|
||||
```
|
||||
|
||||
The same pattern applies for other commands, except `buffer`, and `cd`.
|
||||
|
||||
#### VCS
|
||||
This script supports these version control systems: Git, Subversion, GNU Bazaar, Mercurial.
|
||||
By default <kbd>v</kbd> mapping from `fzf mode` will detect your version control system and open fzf for you.
|
||||
If you wish to explicitly use some particular vcs command, you can use `V` mapping, which includes
|
||||
all supported vcs shortcuts.
|
||||
### Preview
|
||||
|
||||
You also able to set parameters to vcs command to use to provide project files. Supported options:
|
||||
| module |
|
||||
|------------|
|
||||
| `fzf-file` |
|
||||
|
||||
fzf.kak tries to automatically detect where to show preview window, depending on the aspect ratio of the new terminal window.
|
||||
By default, if the doubled height is bigger than the width, preview occupies the upper 60% of space.
|
||||
If the height is smaller than the width, a preview is shown on the right side.
|
||||
These amounts can be configured with `fzf_preview_height` and `fzf_preview_width` options.
|
||||
|
||||
When using fzf.kak inside `tmux`, the bottom pane is used for all `fzf` commands, and the preview window is displayed on the right side.
|
||||
When the preview is turned on, the height of the `tmux` split is increased to provide more space.
|
||||
Split height can be configured with the `fzf_preview_tmux_height` variable.
|
||||
|
||||
Amount of lines in the preview window can be changed with the `fzf_preview_lines` option.
|
||||
|
||||
The preview feature can be disabled entirely by setting the `fzf_preview` option to `false`.
|
||||
|
||||
|
||||
#### Highlighting preview window
|
||||
|
||||
| module |
|
||||
|------------|
|
||||
| `fzf-file` |
|
||||
|
||||
Contents of the file displayed within the preview window can be syntax highlighted.
|
||||
This can be enabled by specifying a highlighter to use with the `fzf_highlight_command` option.
|
||||
These highlighters are are supported out of the box:
|
||||
|
||||
* [Bat][16]
|
||||
* [Coderay][17]
|
||||
* [Highlight][18]
|
||||
* [Rouge][19]
|
||||
|
||||
Although other tools are not supported by the script, they should work fine as long as they work with `fzf`.
|
||||
|
||||
|
||||
### VCS
|
||||
|
||||
| module |
|
||||
|-----------|
|
||||
| `fzf-vcs` |
|
||||
|
||||
This script supports these version control systems: Git, Subversion, GNU Bazaar, and Mercurial.
|
||||
By default <kbd>v</kbd> mapping from `fzf` mode will detect your version control system automatically.
|
||||
To explicitly use some particular VCS command, the <kbd>Alt</kbd>+<kbd>v</kbd> mapping can be used, which includes all supported VCS shortcuts.
|
||||
|
||||
To set parameters to VCS command used to provide project files the following options can be used:
|
||||
|
||||
* `fzf_git_command`
|
||||
* `fzf_svn_command`
|
||||
* `fzf_bzr_command`
|
||||
* `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 sub-mode.
|
||||
Other VCS are not supported officially.
|
||||
Feature requests and merge requests are welcome.
|
||||
|
||||
#### ctags
|
||||
It is also possible to add parameters to ctags search executable. like `sort -u` and others:
|
||||
|
||||
```kak
|
||||
set-option global fzf_tag_command 'readtags -l | cut -f1 | sort -u | ... '
|
||||
```
|
||||
### Tmux
|
||||
|
||||
Though it is not recommended, since `sort` may slowdown `fzf-tag` on huge projects.
|
||||
| module |
|
||||
|--------|
|
||||
| `fzf` |
|
||||
|
||||
##### Filtering tags
|
||||
Since ctags supports showing particular kind of tag for many languages,
|
||||
`fzf-tag` dinamicly defines mappings for those languages with <kbd>Alt</kbd> key based on current filetype.
|
||||
For example to show only functions while `fzf-tag` is active press <kbd>Alt</kbd>+<kbd>f</kbd>.
|
||||
It will reload fzf window and only function tags will be listed.
|
||||
When running inside Tmux, `fzf` will use bottom split.
|
||||
The height of this split can be changed with the `fzf_tmux_height` option.
|
||||
`fzf_tmux_height_file_preview` option is used to control the height of the split when file-preview is turned on.
|
||||
|
||||
#### Preview
|
||||
When using X11 **fzf.kak** automatically tries to detect where to show preview window, depending
|
||||
on aspect ratio of new termial window. By default if the height is bigger than the width, preview occupies
|
||||
upper 60% of space. If height is smaller than the width, preview is shown at the right side.
|
||||
|
||||
You can configure the amount of space for preview window with these options: `fzf_preview_height` and `fzf_preview_width`.
|
||||
### Projects
|
||||
|
||||
When **fzf.kak** is used in tmux, it will show preview on the right side. Heigth of preview split can be adjusted with
|
||||
`fzf_tmux_height_file_preview`
|
||||
| module |
|
||||
|---------------|
|
||||
| `fzf-project` |
|
||||
|
||||
Amount of lines in preview window can be changed with `fzf_preview_lines` option.
|
||||
fzf.kak has basic project manipulation capabilities.
|
||||
|
||||
You also can specify which highlighter to use within the preview window with `fzf_highlighter` option.
|
||||
Supported tools are:
|
||||
To store projects a hidden file is created in `%val{config}` and called `.fzf-projects`.
|
||||
The location of this file and its name can be changed by modifying the `fzf_project_file` option.
|
||||
By default project paths that start from the home directory will use `~` instead of the real path.
|
||||
To change this, set `fzf_project_use_tilda` option to `false`.
|
||||
|
||||
* [Bat](https://github.com/sharkdp/bat)
|
||||
* [Coderay](https://github.com/rubychan/coderay)
|
||||
* [Highlight](https://gitlab.com/saalen/highlight)
|
||||
* [Rouge](https://github.com/jneen/rouge)
|
||||
|
||||
You can disable the preview window in fzf window by setting `fzf_preview` option to `false`:
|
||||
## `fzf` command
|
||||
|
||||
`fzf` command can be used from prompt mode and for [scripting][20].
|
||||
The following arguments are supported:
|
||||
|
||||
- `-kak-cmd`: A Kakoune command that is applied to `fzf` resulting value, e.g. `edit -existing`, `change-directory`, e.t.c.
|
||||
- `-multiple-cmd`: A Kakoune command that is applied when multiple items are selected to every item but the first one.
|
||||
- `-items-cmd`: A command that is used as a pipe to provide a list of values to `fzf`.
|
||||
For example, if we want to pass a list of all files recursively in the current directory, we would use `-items-cmd %{find .}` which will be piped to the `fzf` tool.
|
||||
- `-fzf-impl`: Override `fzf` implementation variable.
|
||||
Can be used if the command needs to provide different arguments to `fzf`.
|
||||
See [sk-grep.kak][21] as example.
|
||||
- `-fzf-args`: Additional flags for `fzf` program.
|
||||
- `-preview-cmd`: A preview command.
|
||||
Can be used to override default preview handling.
|
||||
- `-preview`: If specified, the command will ask for a preview.
|
||||
- `-filter`: A pipe which will be applied to the result provided by `fzf`.
|
||||
For example, if we are returning such line `3 hello, world!` from `fzf`, and we are interested only in the first field which is `3`, we can use `-filter %{cut -f 1}`.
|
||||
Basically, everything that `fzf` returns is piped to this filter command.
|
||||
See [fzf-search.kak][22] as example.
|
||||
- `-post-action`: Extra commands that are performed after the `-kak-cmd` command.
|
||||
|
||||
```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.
|
||||
Please do.
|
||||
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
|
||||
The basic idea behind the module structure can be described as:
|
||||
|
||||
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.
|
||||
1. Provide a user module;
|
||||
2. Define a command that calls the `fzf` function with appropriate arguments;
|
||||
3. Create a mapping in a `ModuleLoaded` hook, that requires a new module, and calls the command.
|
||||
|
||||
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.
|
||||
See how existing modules are implemented to understand the idea of how modules are constructed.
|
||||
|
||||
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.
|
||||
|
||||
### External modules
|
||||
|
||||
Support for [yank-ring.kak][25] was externalized to separate plugin [fzf-yank-ring.kak][24]
|
||||
|
||||
|
||||
# Alternatives
|
||||
|
||||
There are another (often more simple and robust) plugins, which add support for integration with `fzf` or other fuzzy finders that you might be interested in:
|
||||
|
||||
1. [peneira][26] - a fuzzy finder implemented specifically for Kakoune.
|
||||
2. [connect.kak][27] - a tool that allows you to connect Kakoune with various applications like `fzf` and more.
|
||||
3. [kakoune.cr][28] - a similar tool to `connect.kak`, but written in the Crystal language.
|
||||
Also allows you to connect Kakoune to other applications, including `fzf`.
|
||||
|
||||
|
||||
[1]: https://img.shields.io/github/release/andreyorst/fzf.kak.svg
|
||||
[2]: https://github.com/andreyorst/fzf.kak/releases
|
||||
[3]: https://img.shields.io/github/release-date/andreyorst/fzf.kak.svg
|
||||
[4]: https://github.com/andreyorst/fzf.kak/releases
|
||||
[5]: https://img.shields.io/github/commits-since/andreyorst/fzf.kak/latest.svg
|
||||
[6]: https://img.shields.io/github/license/andreyorst/fzf.kak.svg
|
||||
[7]: https://github.com/mawww/kakoune
|
||||
[8]: https://github.com/junegunn/fzf
|
||||
[9]: https://github.com/lotabout/skim
|
||||
[10]: https://user-images.githubusercontent.com/19470159/46813471-6ee76800-cd7f-11e8-89aa-123b3a5f9f1b.gif
|
||||
[11]: https://github.com/andreyorst/plug.kak
|
||||
[12]: https://www.gnu.org/software/findutils/
|
||||
[13]: https://github.com/ggreer/the_silver_searcher
|
||||
[14]: https://github.com/BurntSushi/ripgrep
|
||||
[15]: https://github.com/sharkdp/fd
|
||||
[16]: https://github.com/sharkdp/bat
|
||||
[17]: https://github.com/rubychan/coderay
|
||||
[18]: https://gitlab.com/saalen/highlight
|
||||
[19]: https://github.com/jneen/rouge
|
||||
[20]: #writing-a-module
|
||||
[21]: rc/modules/sk-grep.kak
|
||||
[22]: rc/modules/fzf-search.kak
|
||||
[23]: #configuration
|
||||
[24]: https://gitlab.com/losnappas/fzf-yank-ring.kak
|
||||
[25]: https://github.com/alexherbo2/yank-ring.kak
|
||||
[26]: https://github.com/gustavo-hms/peneira
|
||||
[27]: https://github.com/kakounedotcom/connect.kak
|
||||
[28]: https://github.com/alexherbo2/kakoune.cr
|
||||
|
||||
<!-- LocalWords: Github Kakoune fzf kak config VCS ctags Tmux fd sk
|
||||
LocalWords: ripgrep readme Coderay rc
|
||||
-->
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
# ╭─────────────╥─────────────────────────╮
|
||||
# │ 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:
|
||||
<package>: <value>:
|
||||
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' '<esc>: fzf-bzr<ret>'
|
||||
|
||||
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"
|
||||
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
|
||||
}}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
# ╭─────────────╥─────────────────────────╮
|
||||
# │ 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:
|
||||
<package>: <value>:
|
||||
Git : ""git""
|
||||
|
||||
Default arguments:
|
||||
""git ls-tree --full-tree --name-only -r HEAD""
|
||||
" \
|
||||
str fzf_git_command "git"
|
||||
|
||||
map global fzf-vcs -docstring "edit file from Git tree" 'g' '<esc>: fzf-git<ret>'
|
||||
|
||||
define-command -hidden fzf-git %{ evaluate-commands %sh{
|
||||
case $kak_opt_fzf_git_command in
|
||||
git)
|
||||
cmd="git ls-tree --full-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"
|
||||
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
|
||||
}}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
# ╭─────────────╥────────────────────────╮
|
||||
# │ 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:
|
||||
<package>: <value>:
|
||||
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' '<esc>: fzf-hg<ret>'
|
||||
|
||||
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"
|
||||
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
|
||||
}}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
# ╭─────────────╥─────────────────────────╮
|
||||
# │ 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:
|
||||
<package>: <value>:
|
||||
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' '<esc>: fzf-svn<ret>'
|
||||
|
||||
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"
|
||||
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
|
||||
}}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
# ╭─────────────╥────────────────────────╮
|
||||
# │ 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' '<esc>: fzf-buffer<ret>'
|
||||
|
||||
define-command -hidden fzf-buffer %{ evaluate-commands %sh{
|
||||
buffers=$(mktemp ${TMPDIR:-/tmp}/kak-fzf-buffers.XXXXXX)
|
||||
eval "set -- $kak_buflist"
|
||||
while [ $# -gt 0 ]; do
|
||||
printf "%s\n" "$1" >> $buffers
|
||||
shift
|
||||
done
|
||||
|
||||
message="Set buffer to edit in current client.
|
||||
<ret>: switch to selected buffer.
|
||||
<c-w>: open buffer in new window"
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings="
|
||||
<c-s>: open buffer in horizontal split
|
||||
<c-v>: open buffer in vertical split"
|
||||
printf "%s\n" "info -title 'fzf buffer' '$message$tmux_keybindings'"
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
|
||||
|
||||
printf "%s\n" "fzf %{buffer} %{(cat $buffers; rm $buffers)} %{--expect ctrl-w $additional_flags}"
|
||||
}}
|
|
@ -1,49 +0,0 @@
|
|||
# ╭─────────────╥────────────────────────╮
|
||||
# │ 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"
|
||||
|
||||
declare-option -docstring 'allow showing preview window while changing directories
|
||||
Default value:
|
||||
false
|
||||
' \
|
||||
bool fzf_cd_preview false
|
||||
|
||||
declare-option -docstring 'command to show list of directories in preview window
|
||||
Default value:
|
||||
tree -d
|
||||
' \
|
||||
str cd_preview_cmd "tree -d {}"
|
||||
|
||||
declare-option -docstring 'maximum amount of previewed directories' \
|
||||
int fzf_preview_dirs '300'
|
||||
|
||||
map global fzf -docstring "change directory" 'c' '<esc>: fzf-cd<ret>'
|
||||
|
||||
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
|
||||
find)
|
||||
items_command="(echo .. && find . \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type d -print)" ;;
|
||||
*)
|
||||
items_command=$kak_opt_fzf_cd_command ;;
|
||||
esac
|
||||
if [ $kak_opt_fzf_cd_preview = "true" ]; then
|
||||
preview="--preview '($kak_opt_cd_preview_cmd) 2>/dev/null | head -n $kak_opt_fzf_preview_dirs'"
|
||||
fi
|
||||
printf "%s\n" "fzf %{change-directory} %{$items_command} %{$preview} %{fzf-cd}"
|
||||
}}
|
||||
|
|
@ -1,827 +0,0 @@
|
|||
# ╭─────────────╥──────────────────────────╮
|
||||
# │ 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 "file that should be used by fzf-tag to provide tags.
|
||||
Default value: tags" \
|
||||
str fzf_tag_file_name "tags"
|
||||
|
||||
map global fzf -docstring "find tag" 't' '<esc>: fzf-tag<ret>'
|
||||
|
||||
# this huge try block defines filetype aware filter mappings for separate fzf-ctags mode
|
||||
try %{
|
||||
declare-user-mode fzf-ctags
|
||||
|
||||
map global fzf -docstring "select tag type" '<a-t>' '<esc>: enter-user-mode fzf-ctags<ret>'
|
||||
|
||||
hook global WinSetOption filetype=ada %{
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'package specifications'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'subtypes'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'record type components'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'enum type literals'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'generic formal parameters'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'user defined exceptions'
|
||||
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'subprogram specifications'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'subprograms'
|
||||
map global fzf-ctags '<a-k>' ': fzf-tag K<ret>' -docstring 'task specifications'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'tasks'
|
||||
map global fzf-ctags '<a-o>' ': fzf-tag O<ret>' -docstring 'protected data specifications'
|
||||
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'protected data'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'task/protected data entries'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'loop/declare identifiers'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring '(ctags internal use)'
|
||||
}
|
||||
hook global WinSetOption filetype=ant %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'projects'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'properties(global)'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'antfiles'
|
||||
}
|
||||
hook global WinSetOption filetype=asciidoc %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'level 2 sections'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'level 3 sections'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'level 4 sections'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'level 5 sections'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'anchors'
|
||||
}
|
||||
hook global WinSetOption filetype=asm %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'defines'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types (structs and records)'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
}
|
||||
hook global WinSetOption filetype=asp %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
}
|
||||
hook global WinSetOption filetype=autoconf %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'templates'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'autoconf macros'
|
||||
map global fzf-ctags 'w' ': fzf-tag w<ret>' -docstring 'options specified with --with-...'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'options specified with --enable-...'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'substitution keys'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'automake conditions'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
|
||||
}
|
||||
hook global WinSetOption filetype=autoit %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global variables'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'local variables'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'included scripts'
|
||||
}
|
||||
hook global WinSetOption filetype=automake %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'directories'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'programs'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'manuals'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'ltlibraries'
|
||||
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'libraries'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'scripts'
|
||||
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'datum'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'conditions'
|
||||
}
|
||||
hook global WinSetOption filetype=awk %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
}
|
||||
hook global WinSetOption filetype=basic %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumerations'
|
||||
}
|
||||
hook global WinSetOption filetype=beta %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fragment definitions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'slots (fragment uses)'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'patterns (virtual or rebound)'
|
||||
}
|
||||
hook global WinSetOption filetype=clojure %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
}
|
||||
hook global WinSetOption filetype=cmake %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'options specified with -<a-d>'
|
||||
map global fzf-ctags 'p' ': fzf-tag P<ret>' -docstring 'projects'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
|
||||
}
|
||||
hook global WinSetOption filetype=c %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct, and union members'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
}
|
||||
hook global WinSetOption filetype=cpp %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
}
|
||||
hook global WinSetOption filetype=cpreprocessor %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
}
|
||||
hook global WinSetOption filetype=css %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'selectors'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'identities'
|
||||
}
|
||||
hook global WinSetOption filetype=csharp %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'events'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
|
||||
}
|
||||
hook global WinSetOption filetype=ctags %{
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'language definitions'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'kind definitions'
|
||||
}
|
||||
hook global WinSetOption filetype=cobol %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'paragraphs'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'data items'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'source code file'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'file descriptions (f<a-d>, <a-s><a-d>, <a-r><a-d>)'
|
||||
map global fzf-ctags 'g' ': fzf-tag G<ret>' -docstring 'group items'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'program ids'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'divisions'
|
||||
}
|
||||
hook global WinSetOption filetype=cuda %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct, and union members'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
}
|
||||
hook global WinSetOption filetype=d %{
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
|
||||
map global fzf-ctags '<a-x>' ': fzf-tag X<ret>' -docstring 'mixins'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'templates'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'version statements'
|
||||
}
|
||||
hook global WinSetOption filetype=diff %{
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modified files'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'newly created files'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'deleted files'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'hunks'
|
||||
}
|
||||
hook global WinSetOption filetype=dtd %{
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'entities'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parameter entities'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'elements'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'attributes'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'notations'
|
||||
}
|
||||
hook global WinSetOption filetype=dts %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'phandlers'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
|
||||
}
|
||||
hook global WinSetOption filetype=dosbatch %{
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
}
|
||||
hook global WinSetOption filetype=eiffel %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'features'
|
||||
}
|
||||
hook global WinSetOption filetype=elm %{
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'module'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'renamed <a-i>mported <a-m>odule'
|
||||
map global fzf-ctags 'p' ': fzf-tag P<ret>' -docstring 'port'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type <a-d>efinition'
|
||||
map global fzf-ctags 'c' ': fzf-tag C<ret>' -docstring 'type <a-c>onstructor'
|
||||
map global fzf-ctags 'a' ': fzf-tag A<ret>' -docstring 'type <a-a>lias'
|
||||
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'functions'
|
||||
}
|
||||
hook global WinSetOption filetype=erlang %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'record definitions'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
|
||||
}
|
||||
hook global WinSetOption filetype=falcon %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class members'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'imports'
|
||||
}
|
||||
hook global WinSetOption filetype=flex %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variables'
|
||||
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'mxtags'
|
||||
}
|
||||
hook global WinSetOption filetype=fortran %{
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'block data'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'common blocks'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'entry points'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'enumerations'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interface contents, generic names, and operators'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'type and structure components'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'type bound procedures'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namelists'
|
||||
map global fzf-ctags '<a-n>' ': fzf-tag N<ret>' -docstring 'enumeration values'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'programs'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'derived types and structures'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'program (global) and module variables'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'submodules'
|
||||
}
|
||||
hook global WinSetOption filetype=fypp %{
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
}
|
||||
hook global WinSetOption filetype=gdbinit %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'toplevel variables'
|
||||
}
|
||||
hook global WinSetOption filetype=go %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structs'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct members'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'struct anonymous members'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'unknown'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'name for specifying imported package'
|
||||
}
|
||||
hook global WinSetOption filetype=html %{
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'named anchors'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'h1 headings'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'h2 headings'
|
||||
map global fzf-ctags 'j' ': fzf-tag j<ret>' -docstring 'h3 headings'
|
||||
}
|
||||
hook global WinSetOption filetype=iniconf %{
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
|
||||
}
|
||||
hook global WinSetOption filetype=itcl %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'object-specific variables'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'common variables'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures within the class namespace'
|
||||
}
|
||||
hook global WinSetOption filetype=java %{
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'annotation declarations'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enum constants'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum types'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
}
|
||||
hook global WinSetOption filetype=javaproperties %{
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
|
||||
}
|
||||
hook global WinSetOption filetype=javascript %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variables'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'generators'
|
||||
}
|
||||
hook global WinSetOption filetype=json %{
|
||||
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'objects'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'arrays'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'numbers'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'strings'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'booleans'
|
||||
map global fzf-ctags 'z' ': fzf-tag z<ret>' -docstring 'nulls'
|
||||
}
|
||||
hook global WinSetOption filetype=ldscript %{
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'sections'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'symbols'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'versions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'input sections'
|
||||
}
|
||||
hook global WinSetOption filetype=lisp %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
}
|
||||
hook global WinSetOption filetype=lua %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
}
|
||||
hook global WinSetOption filetype=m4 %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macros'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'macro files'
|
||||
}
|
||||
hook global WinSetOption filetype=man %{
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'titles'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
}
|
||||
hook global WinSetOption filetype=make %{
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'makefiles'
|
||||
}
|
||||
hook global WinSetOption filetype=markdown %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapsters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'level 4 subsections'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'level 5 subsections'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
|
||||
}
|
||||
hook global WinSetOption filetype=matlab %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'class'
|
||||
}
|
||||
hook global WinSetOption filetype=myrddin %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'traits'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
}
|
||||
hook global WinSetOption filetype=objectivec %{
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'class interface'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'class implementation'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring '<a-p>rotocol'
|
||||
map global fzf-ctags 'm' ': fzf-tag M<ret>' -docstring 'object's method'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'class' method'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variable'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring '<a-o>bject field'
|
||||
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'a function'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'a property'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'a type alias'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'a type structure'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an enumeration'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-a> preprocessor macro'
|
||||
}
|
||||
hook global WinSetOption filetype=ocaml %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'object's method'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-m>odule or functor'
|
||||
map global fzf-ctags 'v' ': fzf-tag V<ret>' -docstring 'global variable'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'signature item'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type name'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'a function'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring '<a-a> constructor'
|
||||
map global fzf-ctags 'r' ': fzf-tag R<ret>' -docstring 'a 'structure' field'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an exception'
|
||||
}
|
||||
hook global WinSetOption filetype=passwd %{
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'user names'
|
||||
}
|
||||
hook global WinSetOption filetype=pascal %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
|
||||
}
|
||||
hook global WinSetOption filetype=perl %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'formats'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
}
|
||||
hook global WinSetOption filetype=perl6 %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'grammars'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'roles'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'rules'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'submethods'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tokens'
|
||||
}
|
||||
hook global WinSetOption filetype=php %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constant definitions'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'traits'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
|
||||
}
|
||||
hook global WinSetOption filetype=pod %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
|
||||
}
|
||||
hook global WinSetOption filetype=protobuf %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'messages'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enum constants'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum types'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'services'
|
||||
}
|
||||
hook global WinSetOption filetype=puppetmanifest %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'nodes'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'resources'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
}
|
||||
hook global WinSetOption filetype=python %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class members'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'name referring a module defined in other file'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'name referring a class/variable/function/module defined in other module'
|
||||
}
|
||||
hook global WinSetOption filetype=pythonloggingconfig %{
|
||||
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'logger sections'
|
||||
map global fzf-ctags 'q' ': fzf-tag q<ret>' -docstring 'logger qualnames'
|
||||
}
|
||||
hook global WinSetOption filetype=qemuhx %{
|
||||
map global fzf-ctags 'q' ': fzf-tag q<ret>' -docstring 'q<a-e><a-m><a-u> <a-m>anagement <a-p>rotocol dispatch table entries'
|
||||
map global fzf-ctags 'i' ': fzf-tag I<ret>' -docstring 'item in texinfo doc'
|
||||
}
|
||||
hook global WinSetOption filetype=qtmoc %{
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'slots'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'signals'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
}
|
||||
hook global WinSetOption filetype=r %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'libraries'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sources'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global variables'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'function variables'
|
||||
}
|
||||
hook global WinSetOption filetype=rspec %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'describes'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'contexts'
|
||||
}
|
||||
hook global WinSetOption filetype=rexx %{
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
}
|
||||
hook global WinSetOption filetype=robot %{
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'testcases'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keywords'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
}
|
||||
hook global WinSetOption filetype=rpmspec %{
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tags'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global macros'
|
||||
}
|
||||
hook global WinSetOption filetype=restructuredtext %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'targets'
|
||||
}
|
||||
hook global WinSetOption filetype=ruby %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'singleton methods'
|
||||
}
|
||||
hook global WinSetOption filetype=rust %{
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'module'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structural type'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'trait interface'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'implementation'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type <a-a>lias'
|
||||
map global fzf-ctags 'v' ': fzf-tag V<ret>' -docstring 'global variable'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-m>acro <a-d>efinition'
|
||||
map global fzf-ctags 'm' ': fzf-tag M<ret>' -docstring 'a struct field'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an enum variant'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring '<a-a> method'
|
||||
}
|
||||
hook global WinSetOption filetype=scheme %{
|
||||
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sets'
|
||||
}
|
||||
hook global WinSetOption filetype=sh %{
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'script files'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'label for here document'
|
||||
}
|
||||
hook global WinSetOption filetype=slang %{
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
}
|
||||
hook global WinSetOption filetype=sml %{
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'exception declarations'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'functor definitions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signature declarations'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'structure declarations'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'value bindings'
|
||||
}
|
||||
hook global WinSetOption filetype=sql %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'cursors'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'record fields'
|
||||
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'block label'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subtypes'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tables'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'triggers'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'indexes'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
|
||||
map global fzf-ctags '<a-u>' ': fzf-tag U<ret>' -docstring 'publications'
|
||||
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'services'
|
||||
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'domains'
|
||||
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'views'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'synonyms'
|
||||
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'mobi<a-l>ink <a-t>able <a-s>cripts'
|
||||
map global fzf-ctags 'y' ': fzf-tag Y<ret>' -docstring 'mobi<a-l>ink <a-c>onn <a-s>cripts'
|
||||
map global fzf-ctags 'z' ': fzf-tag Z<ret>' -docstring 'mobi<a-l>ink <a-p>roperties '
|
||||
}
|
||||
hook global WinSetOption filetype=systemdunit %{
|
||||
map global fzf-ctags 'u' ': fzf-tag U<ret>' -docstring 'units'
|
||||
}
|
||||
hook global WinSetOption filetype=tcl %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
}
|
||||
hook global WinSetOption filetype=tcloo %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
}
|
||||
hook global WinSetOption filetype=tex %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parts'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'subsections'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'subsubsections'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'paragraphs'
|
||||
map global fzf-ctags '<a-g>' ': fzf-tag G<ret>' -docstring 'subparagraphs'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'includes'
|
||||
}
|
||||
hook global WinSetOption filetype=ttcn %{
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'module definition'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definition'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constant definition'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'template definition'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definition'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signature definition'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'testcase definition'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'altstep definition'
|
||||
map global fzf-ctags '<a-g>' ': fzf-tag G<ret>' -docstring 'group definition'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'module parameter definition'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable instance'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'timer instance'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'port instance'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'record/set/union member'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumeration value'
|
||||
}
|
||||
hook global WinSetOption filetype=vera %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'programs'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signals'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'typedefs'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
}
|
||||
hook global WinSetOption filetype=verilog %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants (define, parameter, specparam)'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'net data types'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'ports'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'register data types'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'blocks'
|
||||
}
|
||||
hook global WinSetOption filetype=systemverilog %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants (define, parameter, specparam, enum values)'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'net data types'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'ports'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'register data types'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'blocks'
|
||||
map global fzf-ctags '<a-a>' ': fzf-tag A<ret>' -docstring 'assertions'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'classes'
|
||||
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'covergroups'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'enumerators'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'modports'
|
||||
map global fzf-ctags '<a-k>' ': fzf-tag K<ret>' -docstring 'packages'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'programs'
|
||||
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'properties'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'structs and unions'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'type declarations'
|
||||
}
|
||||
hook global WinSetOption filetype=vhdl %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constant declarations'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'subtype definitions'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'record names'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'entity declarations'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function prototypes and declarations'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedure prototypes and declarations'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'package definitions'
|
||||
}
|
||||
hook global WinSetOption filetype=vim %{
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'autocommand groups'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'user-defined commands'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'maps'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'vimball filename'
|
||||
}
|
||||
hook global WinSetOption filetype=windres %{
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'dialogs'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'menus'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'icons'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'bitmaps'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'cursors'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fonts'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'versions'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'accelerators'
|
||||
}
|
||||
hook global WinSetOption filetype=yacc %{
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
}
|
||||
hook global WinSetOption filetype=yumrepo %{
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'repository id'
|
||||
}
|
||||
hook global WinSetOption filetype=zephir %{
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constant definitions'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'traits'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
|
||||
}
|
||||
hook global WinSetOption filetype=dbusintrospect %{
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signals'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
}
|
||||
hook global WinSetOption filetype=glade %{
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'identifiers'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'handlers'
|
||||
}
|
||||
hook global WinSetOption filetype=maven2 %{
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'group identifiers'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'artifact identifiers'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'repository identifiers'
|
||||
}
|
||||
hook global WinSetOption filetype=plistxml %{
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
|
||||
}
|
||||
hook global WinSetOption filetype=relaxng %{
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'elements'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'attributes'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'named patterns'
|
||||
}
|
||||
hook global WinSetOption filetype=svg %{
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'id attributes'
|
||||
}
|
||||
hook global WinSetOption filetype=xslt %{
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'stylesheets'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parameters'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'matched template'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'matched template'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
}
|
||||
hook global WinSetOption filetype=yaml %{
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'anchors'
|
||||
}
|
||||
hook global WinSetOption filetype=ansibleplaybook %{
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'plays'
|
||||
}
|
||||
} catch %{
|
||||
echo -debug "Error while declaring 'fzf-ctags' mode"
|
||||
}
|
||||
|
||||
define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{
|
||||
path=$PWD
|
||||
while [ "$path" != "$HOME" ]; do
|
||||
if [ -e "./$kak_opt_fzf_tag_file_name" ]; then
|
||||
break
|
||||
else
|
||||
cd ..
|
||||
path=$PWD
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$path" = "$HOME" ] && [ ! -e "./$kak_opt_fzf_tag_file_name" ]; then
|
||||
printf "%s\n" "echo -markup %{{Information}No '$kak_opt_fzf_tag_file_name' file found}"
|
||||
exit
|
||||
elif [ "$path" = "$HOME" ] && [ -e "./$kak_opt_fzf_tag_file_name" ]; then
|
||||
printf "%s\n" "echo -markup %{{Information}'$kak_opt_fzf_tag_file_name' file found at $HOME. Check if it is right tag file}"
|
||||
fi
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
cmd="cd $path; readtags -Q '(eq? \$kind \"$1\")' -l | cut -f1"
|
||||
else
|
||||
cmd="cd $path; readtags -l | cut -f1"
|
||||
fi
|
||||
|
||||
message="Jump to a symbol''s definition
|
||||
<ret>: open tag in new buffer
|
||||
<c-w>: open tag in new window"
|
||||
|
||||
[ -n "${kak_client_env_TMUX}" ] && tmux_keybindings="
|
||||
<c-s>: open tag in horizontal split
|
||||
<c-v>: open tag in vertical split"
|
||||
|
||||
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 -add window ctagsfiles %{$path/$kak_opt_fzf_tag_file_name}"
|
||||
printf "%s\n" "fzf %{ctags-search} %{$cmd | awk '!a[\$0]++'} %{--expect ctrl-w $additional_flags}"
|
||||
}}
|
|
@ -1,62 +0,0 @@
|
|||
# ╭─────────────╥────────────────────────╮
|
||||
# │ 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:
|
||||
<package>: <value>:
|
||||
GNU Find: ""find""
|
||||
The Silver Searcher: ""ag""
|
||||
ripgrep: ""rg""
|
||||
fd: ""fd""
|
||||
|
||||
Default arguments:
|
||||
find: ""find -L . -type f""
|
||||
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' '<esc>: fzf-file<ret>'
|
||||
|
||||
define-command -hidden fzf-file %{ evaluate-commands %sh{
|
||||
if [ -z "$(command -v $kak_opt_fzf_file_command)" ]; then
|
||||
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
|
||||
find)
|
||||
cmd="find -L . -type f" ;;
|
||||
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 ;;
|
||||
*)
|
||||
items_executable=$(printf "%s\n" "$kak_opt_fzf_file_command" | grep -o -E "[[:alpha:]]+" | head -1)
|
||||
printf "%s\n" "echo -markup '{Information}'Warning: '$executable'' is not supported by fzf.kak.'"
|
||||
cmd=$kak_opt_fzf_file_command ;;
|
||||
esac
|
||||
|
||||
message="Open single or multiple files.
|
||||
<ret>: open file in new buffer.
|
||||
<c-w>: open file in new window"
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings="
|
||||
<c-s>: open file in horizontal split
|
||||
<c-v>: 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}"
|
||||
}}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# ╭─────────────╥────────────────────────╮
|
||||
# │ 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' '<esc>: fzf-buffer-search<ret>'
|
||||
|
||||
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)"
|
||||
printf "%s\n" "execute-keys -draft %{%<a-|>cat<space>><space>$buffer_content<ret>;}"
|
||||
printf "%s\n" "fzf %{execute-keys} %{(nl -b a -n ln $buffer_content; rm $buffer_content)} %{--reverse | cut -f 1} %{execute-keys gx}"
|
||||
}}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
# ╭─────────────╥────────────────────────╮
|
||||
# │ 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' '<esc>: fzf-vcs<ret>'
|
||||
map global fzf -docstring "svitch to vcs selection mode" '<a-v>' '<esc>: fzf-vcs-mode<ret>'
|
||||
|
||||
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=$(printf "%s\n" "$cmd" | awk '{print $1}')
|
||||
title="fzf $vcs"
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && additional_keybindings="
|
||||
<c-s>: open file in horizontal split
|
||||
<c-v>: open file in vertical split"
|
||||
message="Open single or multiple files from git tree.
|
||||
<ret>: open file in new buffer.
|
||||
<c-w>: open file in new window $additional_keybindings"
|
||||
printf "%s\n" "info -title %{$title} %{$message}"
|
||||
printf "%s\n" "fzf-$vcs"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
printf "%s\n" "echo -markup '{Information}No VCS found in current folder'"
|
||||
}}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
# ╭─────────────╥────────────────────────╮
|
||||
# │ Author: ║ File: │
|
||||
# │ Andrey Orst ║ sk-grep.kak │
|
||||
# ╞═════════════╩════════════════════════╡
|
||||
# │ Module running interactive grep with │
|
||||
# │ ski for fzf.kak │
|
||||
# ╞══════════════════════════════════════╡
|
||||
# │ GitHub.com/andreyorst/fzf.kak │
|
||||
# ╰──────────────────────────────────────╯
|
||||
|
||||
declare-option -docstring "what command to use to provide list of grep search matches.
|
||||
Grep output must follow the format of 'filename:line-number:text'
|
||||
|
||||
Default value:
|
||||
grep -RHn" \
|
||||
str fzf_sk_grep_command 'grep -RHn'
|
||||
|
||||
evaluate-commands %sh{
|
||||
if [ -n "$(command -v sk)" ]; then
|
||||
printf "%s\n" "map global fzf -docstring %{Interactive grep with skim} 'g' '<esc>: fzf-sk-interactive-grep<ret>'"
|
||||
fi
|
||||
}
|
||||
|
||||
define-command -hidden fzf-sk-interactive-grep %{ evaluate-commands %sh{
|
||||
if [ -z "$(command -v sk)" ]; then
|
||||
printf "%s\n" "echo -markup %{{Information}skim required to run this command}"
|
||||
exit
|
||||
fi
|
||||
title="skim interactive grep"
|
||||
message="Interactively grep pattern from current directory
|
||||
<ret>: open search result in new buffer.
|
||||
<c-w>: open search result in new window"
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings="
|
||||
<c-s>: open search result in horizontal split
|
||||
<c-v>: open search result in vertical split"
|
||||
|
||||
printf "%s\n" "info -title '${title}' '${message}${tmux_keybindings}'"
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
|
||||
impl=$kak_opt_fzf_implementation
|
||||
printf "%s\n" "set-option global fzf_implementation \"sk -i -c '$kak_opt_fzf_sk_grep_command {}'\"
|
||||
fzf %{fzf-sk-grep-handler} %{echo >/dev/null 2>&1} %{--expect ctrl-w $additional_flags}
|
||||
set-option global fzf_implementation $impl"
|
||||
}}
|
||||
|
||||
define-command fzf-sk-grep-handler -params 1 %{ evaluate-commands %sh{
|
||||
printf "%s\n" "$1" | awk '{
|
||||
file = $0; sub(/:.*/, "", file); gsub("&", "&&", file);
|
||||
line = $0; sub(/[^:]+:/, "", line); sub(/:.*/, "", line)
|
||||
print "edit -existing %&" file "&; execute-keys %&" line "gxvc&";
|
||||
}'
|
||||
}}
|
||||
|
335
rc/fzf.kak
335
rc/fzf.kak
|
@ -1,14 +1,17 @@
|
|||
# ╭─────────────╥───────────────────╮
|
||||
# │ Author: ║ Plugin: │
|
||||
# │ Andrey Orst ║ fzf.kak │
|
||||
# ╞═════════════╩═══════════════════╡
|
||||
# │ This plugin implements fzf │
|
||||
# │ mode for Kakoune. This mode │
|
||||
# │ adds several mappings to invoke │
|
||||
# │ different fzf commands. │
|
||||
# ╰─────────────────────────────────╯
|
||||
# Author: Andrey Listopadov
|
||||
# This plugin implements fzf mode for Kakoune.
|
||||
# This mode adds several mappings to invoke different fzf commands.
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
try %{ declare-user-mode fzf } catch %{ echo -markup "{Error}Can't declare mode 'fzf' - already exists" }
|
||||
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.
|
||||
|
@ -27,6 +30,12 @@ declare-option -docstring 'amount of lines to pass to preview window
|
|||
Default value: 100' \
|
||||
int fzf_preview_lines 100
|
||||
|
||||
declare-option -docstring 'preview window position.
|
||||
Supported values: up (top), down (bottom), left, right, auto
|
||||
|
||||
Default value: auto' \
|
||||
str fzf_preview_pos "auto"
|
||||
|
||||
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:
|
||||
|
@ -43,7 +52,7 @@ These are default arguments for the tools above:
|
|||
highlight: "highlight --failsafe -O ansi {}"
|
||||
rouge: "rougify {}"
|
||||
' \
|
||||
str fzf_highlighter "highlight"
|
||||
str fzf_highlight_command "highlight"
|
||||
|
||||
declare-option -docstring "height of fzf tmux split in screen lines or percents.
|
||||
Default value: 25%%" \
|
||||
|
@ -51,7 +60,7 @@ str fzf_tmux_height '25%'
|
|||
|
||||
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%'
|
||||
str fzf_preview_tmux_height '70%'
|
||||
|
||||
declare-option -docstring "width of preview window.
|
||||
Default value: 50%%" \
|
||||
|
@ -61,163 +70,191 @@ declare-option -docstring "height of preview window.
|
|||
Default value: 60%%" \
|
||||
str fzf_preview_height '60%'
|
||||
|
||||
define-command -docstring "Enter fzf-mode.
|
||||
fzf-mode contains mnemonic key bindings for every fzf.kak command
|
||||
declare-option -docstring "mapping to execute action in new window" \
|
||||
str fzf_window_map 'ctrl-w'
|
||||
|
||||
Best used with mapping like:
|
||||
map global normal '<some key>' ': fzf-mode<ret>'
|
||||
" \
|
||||
fzf-mode %{ try %{ evaluate-commands 'enter-user-mode fzf' } }
|
||||
declare-option -docstring "mapping to execute action in new vertical split" \
|
||||
str fzf_vertical_map 'ctrl-v'
|
||||
|
||||
define-command -hidden fzf-vertical -params .. %{
|
||||
try %{
|
||||
tmux-terminal-vertical kak -c %val{session} -e "%arg{@}"
|
||||
} catch %{
|
||||
tmux-new-vertical "%arg{@}"
|
||||
}
|
||||
}
|
||||
declare-option -docstring "mapping to execute action in new horizontal split" \
|
||||
str fzf_horizontal_map 'ctrl-s'
|
||||
|
||||
define-command -hidden fzf-horizontal -params .. %{
|
||||
try %{
|
||||
tmux-terminal-horizontal kak -c %val{session} -e "%arg{@}"
|
||||
} catch %{
|
||||
tmux-new-horizontal "%arg{@}"
|
||||
}
|
||||
}
|
||||
declare-option -docstring 'command to use to create the FZF window when not using tmux.
|
||||
|
||||
define-command -hidden fzf-window -params .. %{
|
||||
try %sh{
|
||||
if [ -n "$kak_client_env_TMUX" ]; then
|
||||
printf "%s\n" 'tmux-terminal-window kak -c %val{session} -e "%arg{@}"'
|
||||
else
|
||||
printf "%s\n" 'x11-terminal kak -c %val{session} -e "%arg{@}"'
|
||||
fi
|
||||
} catch %sh{
|
||||
if [ -n "$kak_client_env_TMUX" ]; then
|
||||
printf "%s\n" 'tmux-new-window "%arg{@}"'
|
||||
else
|
||||
printf "%s\n" 'x11-new "%arg{@}"'
|
||||
fi
|
||||
}
|
||||
}
|
||||
Default value: terminal kak -c %val{session} -e "%arg{@}"' \
|
||||
str fzf_terminal_command 'terminal kak -c %val{session} -e "%arg{@}"'
|
||||
|
||||
define-command -hidden -docstring \
|
||||
"fzf <command> <items command> [<fzf args> <extra commands>]: generic fzf command.
|
||||
This command can be used to create new fzf wrappers for various Kakoune or external
|
||||
features. More about arguments:
|
||||
declare-option -docstring 'command to use to create a new window (ctrl-w) when not using tmux.
|
||||
|
||||
<command>:
|
||||
The <command> 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} %{<items command>}'
|
||||
After choosing one or more files in fzf, <command> will be used with each of them.
|
||||
Default value: terminal kak -c %val{session} -e "%arg{@}"' \
|
||||
str fzf_new_terminal_command 'terminal kak -c %val{session} -e "%arg{@}"'
|
||||
|
||||
<items command>
|
||||
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.
|
||||
declare-option -docstring "use main selection as default query for fzf if the selection is longer than 1 char." \
|
||||
bool fzf_use_main_selection true
|
||||
|
||||
<fzf args>
|
||||
These are additional flags for fzf program, that are passed to it. You can check them
|
||||
in fzf manual.
|
||||
declare-option -docstring "Default options for fzf." \
|
||||
str fzf_default_opts ''
|
||||
|
||||
<extra commands>
|
||||
This is extra commands that are preformed after fzf finishes 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.
|
||||
try %{ declare-user-mode fzf }
|
||||
|
||||
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
|
||||
tmux_height=$kak_opt_fzf_tmux_height
|
||||
define-command -hidden -docstring "wrapper command to create new vertical split" \
|
||||
fzf-vertical -params .. %{ evaluate-commands %{
|
||||
tmux-terminal-vertical kak -c %val{session} -e "%arg{@}"
|
||||
}}
|
||||
|
||||
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
|
||||
define-command -hidden -docstring "wrapper command to create new horizontal split" \
|
||||
fzf-horizontal -params .. %{ evaluate-commands %{
|
||||
tmux-terminal-horizontal kak -c %val{session} -e "%arg{@}"
|
||||
}}
|
||||
|
||||
define-command -hidden -docstring "wrapper command to create new terminal" \
|
||||
fzf-window -params .. %{ evaluate-commands %sh{
|
||||
if [ -n "${kak_client_env_TMUX:-}" ]; then
|
||||
printf "%s\n" 'tmux-terminal-window kak -c %val{session} -e "%arg{@}"'
|
||||
else
|
||||
printf "%s\n" "${kak_opt_fzf_new_terminal_command:?}"
|
||||
fi
|
||||
}}
|
||||
|
||||
if [ $command = "edit" ] && [ $kak_opt_fzf_preview = "true" ]; then
|
||||
case $kak_opt_fzf_highlighter in
|
||||
bat)
|
||||
highlighter="bat --color=always --style=plain {}" ;;
|
||||
coderay)
|
||||
highlighter="coderay {}" ;;
|
||||
highlight)
|
||||
highlighter="highlight --failsafe -O ansi {}" ;;
|
||||
rouge)
|
||||
highlighter="rougify {}" ;;
|
||||
bat*|coderay*|highlight*|rougify*)
|
||||
highlighter=$kak_opt_fzf_highlighter ;;
|
||||
*)
|
||||
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 ;;
|
||||
define-command -docstring \
|
||||
"fzf <switches>: generic fzf command. This command can be used to create new fzf wrappers for various Kakoune or external features.
|
||||
|
||||
Switches:
|
||||
-kak-cmd <command>: A Kakoune cmd that is applied to fzf resulting value
|
||||
-multiple-cmd <command>: A Kakoune cmd that is applied all multiple selected files but the first one
|
||||
-items-cmd <items command>: A command that is used as a pipe to provide list of values to fzf
|
||||
-fzf-impl <implementation>: Owerride fzf implementation variable
|
||||
-fzf-args <args>: Additional flags for fzf program
|
||||
-preview-cmd <command>: A preview command
|
||||
-preview: Should fzf window include preview
|
||||
-filter <commands>: A pipe which will be applied to result provided by fzf
|
||||
-post-action <commands>: Extra commands that are preformed after `-kak-cmd' command" \
|
||||
-shell-script-completion %{
|
||||
printf "%s\n" "-kak-cmd
|
||||
-multiple-cmd
|
||||
-items-cmd
|
||||
-fzf-impl
|
||||
-fzf-args
|
||||
-preview-cmd
|
||||
-preview
|
||||
-filter
|
||||
-post-action"
|
||||
} \
|
||||
fzf -params .. %{ evaluate-commands %sh{
|
||||
fzf_impl="${kak_opt_fzf_implementation:?}"
|
||||
|
||||
# trims selection and escapes single quotes
|
||||
selection=$(printf "%s" "${kak_selection:-}" | sed -e "s/^[[:blank:]]*//g;s/[[:blank:]]*$//g;s/'/'\\\\''/g")
|
||||
|
||||
[ "${kak_opt_fzf_use_main_selection:-}" = "true" ] && \
|
||||
[ "$(printf "%s" "$kak_selection" | wc -m)" -gt 1 ] && \
|
||||
[ "$(printf "%s\n" "$selection" | wc -l)" -eq 1 ] && \
|
||||
default_query="-i -q '$selection'"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
(-kak-cmd) shift; kakoune_cmd="$1" ;;
|
||||
(-multiple-cmd) shift; multiple_cmd="$1" ;;
|
||||
(-items-cmd) shift; items_cmd="$1 |" ;;
|
||||
(-fzf-impl) shift; fzf_impl="$1" ;;
|
||||
(-fzf-args) shift; fzf_args="$1" ;;
|
||||
(-preview-cmd) shift; preview_cmd="$1" ;;
|
||||
(-preview) preview="true" ;;
|
||||
(-filter) shift; filter="| $1" ;;
|
||||
(-post-action) shift; post_action="$1" ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
[ -z "$multiple_cmd" ] && multiple_cmd="$kakoune_cmd"
|
||||
|
||||
if [ "${preview}" = "true" ]; then
|
||||
# bake position option to define them at runtime
|
||||
[ -n "${kak_client_env_TMUX:-}" ] && tmux_height="${kak_opt_fzf_preview_tmux_height:-}"
|
||||
case ${kak_opt_fzf_preview_pos:-} in
|
||||
(top|up) preview_position="pos=top:${kak_opt_fzf_preview_height:-};" ;;
|
||||
(bottom|down) preview_position="pos=down:${kak_opt_fzf_preview_height:-};" ;;
|
||||
(right) preview_position="pos=right:${kak_opt_fzf_preview_width:-};" ;;
|
||||
(left) preview_position="pos=left:${kak_opt_fzf_preview_width:-};" ;;
|
||||
(auto|*) preview_position="sleep 0.1; [ \$(tput cols) -gt \$(expr \$(tput lines) \* 2) ] && pos=right:${kak_opt_fzf_preview_width:-} || pos=top:${kak_opt_fzf_preview_height:-};"
|
||||
esac
|
||||
|
||||
tmux_height=$kak_opt_fzf_tmux_height_file_preview
|
||||
additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\$pos $additional_flags"
|
||||
# handle preview if not defined explicitly with `-preview-cmd'
|
||||
if [ "${kak_opt_fzf_preview:-}" = "true" ] && [ -z "${preview_cmd}" ]; then
|
||||
case ${kak_opt_fzf_highlight_command:-} in
|
||||
(bat) highlight_cmd="bat --color=always --style=plain {}" ;;
|
||||
(coderay) highlight_cmd="coderay {}" ;;
|
||||
(highlight) highlight_cmd="highlight --failsafe -O ansi {}" ;;
|
||||
(rouge) highlight_cmd="rougify {}" ;;
|
||||
(*) highlight_cmd="${kak_opt_fzf_highlight_command}" ;;
|
||||
esac
|
||||
preview_cmd="--preview '(${highlight_cmd} || cat {}) 2>/dev/null | head -n ${kak_opt_fzf_preview_lines:-}' --preview-window=\${pos}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$kak_client_env_TMUX" ]; then
|
||||
preview_pos="pos=right:$kak_opt_fzf_preview_width;"
|
||||
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
|
||||
|
||||
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) $kak_opt_fzf_implementation $additional_flags > $tmp; rm $fzfcmd" > $fzfcmd
|
||||
chmod 755 $fzfcmd
|
||||
|
||||
if [ -n "$kak_client_env_TMUX" ]; then
|
||||
[ -n "${tmux_height%%*%}" ] && measure="-l" || measure="-p"
|
||||
cmd="command tmux split-window $measure ${tmux_height%%%*} 'sh -c $fzfcmd'"
|
||||
elif [ -n "$kak_opt_termcmd" ]; then
|
||||
cmd="$kak_opt_termcmd 'sh -c $fzfcmd'"
|
||||
else
|
||||
printf "%s\n" "fail %{termcmd option is not set}"
|
||||
rm $fzfcmd
|
||||
rm $tmp
|
||||
exit
|
||||
fi
|
||||
fzf_tmp=$(mktemp -d "${TMPDIR:-/tmp}"/fzf.kak.XXXXXX)
|
||||
fzfcmd="${fzf_tmp}/fzfcmd"
|
||||
result="${fzf_tmp}/result"
|
||||
|
||||
(
|
||||
eval "$cmd"
|
||||
while [ -e $fzfcmd ]; do
|
||||
sleep 0.1
|
||||
done
|
||||
if [ -s $tmp ]; then
|
||||
(
|
||||
read action
|
||||
case $action in
|
||||
ctrl-w)
|
||||
wincmd="fzf-window" ;;
|
||||
ctrl-s)
|
||||
wincmd="fzf-vertical" ;;
|
||||
ctrl-v)
|
||||
wincmd="fzf-horizontal" ;;
|
||||
*)
|
||||
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
|
||||
) < $tmp
|
||||
shell_path="$(command -v sh)"
|
||||
if [ -n "${shell_path}" ]; then
|
||||
# portable shebang
|
||||
printf "%s\n" "#!${shell_path}"
|
||||
# set SHELL because fzf preview uses it
|
||||
printf "%s\n" "SHELL=${shell_path}"
|
||||
fi
|
||||
rm $tmp
|
||||
# compose entire fzf command with all args into single file which will be executed later
|
||||
printf "%s\n" "export FZF_DEFAULT_OPTS=\"${kak_opt_fzf_default_opts:-}\""
|
||||
printf "%s\n" "cd \"${PWD}\" && ${preview_position} ${items_cmd} ${fzf_impl} ${default_query} ${fzf_args} ${preview_cmd} ${filter} > ${result}"
|
||||
printf "%s\n" "rm ${fzfcmd}"
|
||||
) >> "${fzfcmd}"
|
||||
chmod 755 "${fzfcmd}"
|
||||
|
||||
if [ -n "${kak_client_env_TMUX}" ]; then
|
||||
# set default height if not set already
|
||||
[ -z "${tmux_height}" ] && tmux_height=${kak_opt_fzf_tmux_height:-}
|
||||
# if height contains `%' then `-p' will be used
|
||||
[ -n "${tmux_height%%*%}" ] && measure="-l" || measure="-p"
|
||||
# `terminal' doesn't support any kind of width and height parameters, so tmux panes are created by tmux itself
|
||||
cmd="nop %sh{ command tmux split-window -t '${kak_client_env_TMUX_PANE:-}' ${measure} ${tmux_height%%%*} env ${fzfcmd} < /dev/null > /dev/null 2>&1 }"
|
||||
else
|
||||
cmd="${kak_opt_fzf_terminal_command%% *} %{${fzfcmd}}"
|
||||
fi
|
||||
|
||||
printf "%s\n" "${cmd}"
|
||||
|
||||
# main loop
|
||||
( while [ -e "${fzfcmd}" ]; do sleep 0.1; done
|
||||
if [ -s "${result}" ]; then
|
||||
(
|
||||
while read -r line; do
|
||||
case ${line} in
|
||||
("${kak_opt_fzf_window_map:-ctrl-w}") wincmd="fzf-window" ;;
|
||||
("${kak_opt_fzf_vertical_map:-ctrl-v}") wincmd="fzf-vertical" ;;
|
||||
("${kak_opt_fzf_horizontal_map:-ctrl-s}") wincmd="fzf-horizontal" ;;
|
||||
(*) item=${line} ;;
|
||||
esac
|
||||
if [ -n "${item}" ]; then
|
||||
item=$(printf "%s\n" "${item}" | sed "s/@/@@/g;s/&/&&/g")
|
||||
kakoune_cmd=$(printf "%s\n" "${kakoune_cmd}" | sed "s/&/&&/g")
|
||||
printf "%s\n" "evaluate-commands -client ${kak_client:?} ${wincmd} %&${kakoune_cmd} %@${item}@&"
|
||||
break
|
||||
fi
|
||||
done
|
||||
[ -n "${multiple_cmd}" ] && multiple_cmd=$(printf "%s\n" "${multiple_cmd}" | sed "s/&/&&/g")
|
||||
while read -r line; do
|
||||
line=$(printf "%s\n" "${line}" | sed "s/@/@@/g;s/&/&&/g")
|
||||
printf "%s\n" "evaluate-commands -client ${kak_client} ${wincmd} %&${multiple_cmd} %@${line}@&"
|
||||
done
|
||||
if [ -n "${post_action}" ]; then
|
||||
post_action=$(printf "%s\n" "${post_action}" | sed "s/&/&&/g")
|
||||
printf "%s\n" "evaluate-commands -client ${kak_client} %&${post_action}&"
|
||||
fi
|
||||
) < "${result}" | kak -p "${kak_session:?}"
|
||||
fi
|
||||
rm -rf "${fzf_tmp}"
|
||||
) > /dev/null 2>&1 < /dev/null &
|
||||
}}
|
||||
|
||||
§
|
||||
|
|
31
rc/modules/VCS/fzf-bzr.kak
Normal file
31
rc/modules/VCS/fzf-bzr.kak
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Submodule for Bzr support for fzf.kak
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf-vcs %{
|
||||
map global fzf-vcs -docstring "edit file from GNU Bazaar tree" 'b' '<esc>: require-module fzf-bzr; fzf-bzr<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-bzr %§
|
||||
|
||||
declare-option -docstring "command to provide list of files in GNU Bazaar repository to fzf. Arguments are supported
|
||||
Supported tools:
|
||||
<package>: <value>:
|
||||
GNU Bazaar: ""bzr""
|
||||
|
||||
Default arguments:
|
||||
'(cd $repo_root && bzr ls -R --versioned)'
|
||||
" \
|
||||
str fzf_bzr_command "bzr"
|
||||
|
||||
define-command -hidden fzf-bzr %{ evaluate-commands %sh{
|
||||
repo_root=$(bzr root)
|
||||
case $kak_opt_fzf_bzr_command in
|
||||
(bzr) cmd="(cd $repo_root && bzr ls -R --versioned)" ;;
|
||||
(*) cmd=$kak_opt_fzf_bzr_command ;;
|
||||
esac
|
||||
[ -n "${kak_client_env_TMUX}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
printf "%s\n" "fzf -kak-cmd %{edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags} -filter %{perl -pe \"if (/${kak_opt_fzf_window_map:-ctrl-w}|${kak_opt_fzf_vertical_map:-ctrl-v}|${kak_opt_fzf_horizontal_map:-ctrl-s}|^$/) {} else {print \\\"$repo_root/\\\"}\"}"
|
||||
}}
|
||||
|
||||
§
|
31
rc/modules/VCS/fzf-git.kak
Normal file
31
rc/modules/VCS/fzf-git.kak
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Submodule for Git support for fzf.kak
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf-vcs %§
|
||||
map global fzf-vcs -docstring "edit file from Git tree" 'g' '<esc>: require-module fzf-git; fzf-git<ret>'
|
||||
§
|
||||
|
||||
provide-module fzf-git %§
|
||||
|
||||
declare-option -docstring "command to provide list of files in git tree to fzf. Arguments are supported
|
||||
Supported tools:
|
||||
<package>: <value>:
|
||||
Git: ""git""
|
||||
|
||||
Default arguments:
|
||||
'git ls-tree --full-tree --name-only -r HEAD'
|
||||
" \
|
||||
str fzf_git_command "git"
|
||||
|
||||
define-command -hidden fzf-git %{ evaluate-commands %sh{
|
||||
|
||||
case $kak_opt_fzf_git_command in
|
||||
(git) cmd='git ls-tree --full-tree --name-only -r HEAD' ;;
|
||||
(*) cmd=$kak_opt_fzf_git_command ;;
|
||||
esac
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
printf "%s\n" "fzf -kak-cmd %{edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags} -filter %{perl -pe \"if (/${kak_opt_fzf_window_map:-ctrl-w}|${kak_opt_fzf_vertical_map:-ctrl-v}|${kak_opt_fzf_horizontal_map:-ctrl-s}|^$/) {} else {print \\\"$(git rev-parse --show-toplevel)/\\\"}\"}"
|
||||
}}
|
||||
|
||||
§
|
31
rc/modules/VCS/fzf-hg.kak
Normal file
31
rc/modules/VCS/fzf-hg.kak
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Submodule for Hg support for fzf.kak
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf-vcs %{
|
||||
map global fzf-vcs -docstring "edit file from mercurial tree" 'h' '<esc>: require-module fzf-hg; fzf-hg<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-hg %§
|
||||
|
||||
declare-option -docstring "command to provide list of files in mercurial repository to fzf. Arguments are supported
|
||||
Supported tools:
|
||||
<package>: <value>:
|
||||
Mercurial SCM: ""hg""
|
||||
|
||||
Default arguments:
|
||||
""hg locate -f""
|
||||
" \
|
||||
str fzf_hg_command "hg"
|
||||
|
||||
|
||||
define-command -hidden fzf-hg %{ evaluate-commands %sh{
|
||||
case $kak_opt_fzf_hg_command in
|
||||
(hg) cmd="hg locate -f" ;;
|
||||
(hg*) cmd=$kak_opt_fzf_hg_command ;;
|
||||
esac
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
printf "%s\n" "fzf -kak-cmd %{edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags}"
|
||||
}}
|
||||
|
||||
§
|
32
rc/modules/VCS/fzf-svn.kak
Normal file
32
rc/modules/VCS/fzf-svn.kak
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Submodule for Svn support for fzf.kak
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf-vcs %§
|
||||
map global fzf-vcs -docstring "edit file from Subversion tree" 's' '<esc>: require-module fzf-svn; fzf-svn<ret>'
|
||||
§
|
||||
|
||||
provide-module fzf-svn %§
|
||||
|
||||
declare-option -docstring "command to provide list of files in svn repository to fzf. Arguments are supported
|
||||
Supported tools:
|
||||
<package>: <value>:
|
||||
Subversion: ""svn""
|
||||
|
||||
Default arguments:
|
||||
""svn list -R $(svn info | awk -F': ' '/Working Copy Root Path: .*/ {print $2}') | grep -v '$/'""
|
||||
" \
|
||||
str fzf_svn_command "svn"
|
||||
|
||||
define-command -hidden fzf-svn %{ evaluate-commands %sh{
|
||||
current_path=$(pwd)
|
||||
repo_root=$(svn info | awk -F': ' '/Working Copy Root Path: .*/ {print $2}')
|
||||
case $kak_opt_fzf_svn_command in
|
||||
(svn) cmd="svn list -R $repo_root | grep -v '$/'" ;;
|
||||
(svn*) cmd=$kak_opt_fzf_svn_command ;;
|
||||
esac
|
||||
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
printf "%s\n" "fzf -kak-cmd %{cd $repo_root; edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags} -post-action %{cd $current_path}"
|
||||
}}
|
||||
|
||||
§
|
48
rc/modules/fzf-buffer.kak
Normal file
48
rc/modules/fzf-buffer.kak
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module for changing buffers with fzf for fzf.kak plugin
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %{
|
||||
map global fzf -docstring "open buffer" 'b' '<esc>: require-module fzf-buffer; fzf-buffer<ret>'
|
||||
map global fzf -docstring "delete buffer" '<a-b>' '<esc>: require-module fzf-buffer; fzf-delete-buffer<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-buffer %§
|
||||
|
||||
define-command -hidden fzf-buffer %{ evaluate-commands %sh{
|
||||
buffers=""
|
||||
eval "set -- ${kak_quoted_buflist:?}"
|
||||
while [ $# -gt 0 ]; do
|
||||
buffers="$1
|
||||
$buffers"
|
||||
shift
|
||||
done
|
||||
|
||||
message="Set buffer to edit in current client.
|
||||
<ret>: switch to selected buffer.
|
||||
${kak_opt_fzf_window_map:-ctrl-w}: open buffer in new window"
|
||||
[ -n "${kak_client_env_TMUX:-}" ] && tmux_keybindings="
|
||||
${kak_opt_fzf_horizontal_map:-ctrl-s}: open buffer in horizontal split
|
||||
${kak_opt_fzf_vertical_map:-ctrl-v}: open buffer in vertical split"
|
||||
printf "%s\n" "info -title 'fzf buffer' '$message$tmux_keybindings'"
|
||||
[ -n "${kak_client_env_TMUX:-}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
|
||||
printf "%s\n" "fzf -kak-cmd %{buffer} -items-cmd %{printf \"%s\n\" \"$buffers\"} -fzf-args %{--expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags}"
|
||||
}}
|
||||
|
||||
define-command -hidden fzf-delete-buffer %{ evaluate-commands %sh{
|
||||
buffers=""
|
||||
eval "set -- ${kak_quoted_buflist:?}"
|
||||
while [ $# -gt 0 ]; do
|
||||
buffers="$1
|
||||
$buffers"
|
||||
shift
|
||||
done
|
||||
|
||||
message="Delete buffer.
|
||||
<ret>: delete selected buffer."
|
||||
printf "%s\n" "info -title 'fzf delete-buffer' '$message'"
|
||||
printf "%s\n" "fzf -kak-cmd %{delete-buffer} -multiple-cmd %{delete-buffer} -items-cmd %{printf \"%s\n\" \"$buffers\"} -fzf-args %{-m --expect ${kak_opt_fzf_window_map:-ctrl-w} ${additional_flags:-}}"
|
||||
}}
|
||||
|
||||
§
|
46
rc/modules/fzf-cd.kak
Normal file
46
rc/modules/fzf-cd.kak
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module for changing directories with fzf for fzf.kak plugin
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %{
|
||||
map global fzf -docstring "change directory" 'c' '<esc>: require-module fzf-cd; fzf-cd<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-cd %§
|
||||
|
||||
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"
|
||||
|
||||
declare-option -docstring 'allow showing preview window while changing directories
|
||||
Default value:
|
||||
false
|
||||
' \
|
||||
bool fzf_cd_preview false
|
||||
|
||||
declare-option -docstring 'command to show list of directories in preview window
|
||||
Default value:
|
||||
tree -d
|
||||
' \
|
||||
str cd_preview_command "tree -d {}"
|
||||
|
||||
declare-option -docstring 'maximum amount of previewed directories' \
|
||||
int fzf_preview_dirs '300'
|
||||
|
||||
define-command -hidden fzf-cd %{ evaluate-commands %sh{
|
||||
printf '%s\n' "info -title %{fzf change directory} %{Change the server's working directory
|
||||
current path: $(pwd)}"
|
||||
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
|
||||
if [ "${kak_opt_fzf_cd_preview:-}" = "true" ]; then
|
||||
preview_flag="-preview"
|
||||
preview="--preview '(${kak_opt_cd_preview_command:-}) 2>/dev/null | head -n ${kak_opt_fzf_preview_dirs:-0}'"
|
||||
fi
|
||||
printf "%s\n" "fzf $preview_flag -kak-cmd %{change-directory} -items-cmd %{$items_command} -preview-cmd %{$preview} -post-action %{fzf-cd}"
|
||||
}}
|
||||
|
||||
§
|
944
rc/modules/fzf-ctags.kak
Normal file
944
rc/modules/fzf-ctags.kak
Normal file
|
@ -0,0 +1,944 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module for searching tags with fzf and universal-ctags for fzf.kak plugin
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %{
|
||||
map global fzf -docstring "find tag" 't' '<esc>: require-module fzf-ctags; fzf-tag<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-ctags %§
|
||||
|
||||
declare-option -docstring "file that should be used by fzf-tag to provide tags.
|
||||
Default value: tags" \
|
||||
str fzf_tag_file_name "tags"
|
||||
|
||||
|
||||
declare-option -hidden bool fzf_tag_filters_defined false
|
||||
|
||||
try %{
|
||||
declare-user-mode fzf-ctags
|
||||
map global fzf -docstring "select tag type" '<a-t>' '<esc>: fzf-setup-filter-tags; enter-user-mode fzf-ctags<ret>'
|
||||
}
|
||||
|
||||
# this huge try block defines filetype aware filter mappings for separate fzf-ctags mode
|
||||
define-command -hidden fzf-setup-filter-tags %{
|
||||
evaluate-commands %sh{
|
||||
[ "${kak_opt_fzf_tag_filters_defined:-}" = "true" ] && exit
|
||||
|
||||
case ${kak_opt_filetype:-} in
|
||||
(ada) printf "%s\n" "
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'package specifications'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'subtypes'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'record type components'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'enum type literals'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'generic formal parameters'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'user defined exceptions'
|
||||
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'subprogram specifications'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'subprograms'
|
||||
map global fzf-ctags '<a-k>' ': fzf-tag K<ret>' -docstring 'task specifications'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'tasks'
|
||||
map global fzf-ctags '<a-o>' ': fzf-tag O<ret>' -docstring 'protected data specifications'
|
||||
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'protected data'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'task/protected data entries'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'loop/set identifers'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring '(ctags internal use)'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(ant) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'projects'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'properties(global)'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'antfiles'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(asciidoc) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'level 2 sections'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'level 3 sections'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'level 4 sections'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'level 5 sections'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'anchors'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(asm) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'defines'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types (structs and records)'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(asp) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(autoconf) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'templates'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'autoconf macros'
|
||||
map global fzf-ctags 'w' ': fzf-tag w<ret>' -docstring 'options specified with --with-...'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'options specified with --enable-...'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'substitution keys'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'automake conditions'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(autoit) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global variables'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'local variables'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'included scripts'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(automake) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'directories'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'programs'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'manuals'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'ltlibraries'
|
||||
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'libraries'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'scripts'
|
||||
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'datum'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'conditions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(awk) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(basic) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumerations'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(beta) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fragment definitions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'slots (fragment uses)'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'patterns (virtual or rebound)'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(clojure) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(cmake) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'options specified with -<a-d>'
|
||||
map global fzf-ctags 'p' ': fzf-tag P<ret>' -docstring 'projects'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(c) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct, and union members'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(cpp) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(cpreprocessor) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(css) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'selectors'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'identities'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(csharp) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'events'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(ctags) printf "%s\n" "
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'language definitions'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'kind definitions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(cobol) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'paragraphs'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'data items'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'source code file'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'file descriptions (f<a-d>, <a-s><a-d>, <a-r><a-d>)'
|
||||
map global fzf-ctags 'g' ': fzf-tag G<ret>' -docstring 'group items'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'program ids'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'divisions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(cuda) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct, and union members'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'typedefs'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(d) printf "%s\n" "
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
|
||||
map global fzf-ctags '<a-x>' ': fzf-tag X<ret>' -docstring 'mixins'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structure names'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'templates'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'union names'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'version statements'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(diff) printf "%s\n" "
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modified files'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'newly created files'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'deleted files'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'hunks'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(dtd) printf "%s\n" "
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'entities'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parameter entities'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'elements'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'attributes'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'notations'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(dts) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'phandlers'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(dosbatch) printf "%s\n" "
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(eiffel) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'features'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(elm) printf "%s\n" "
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'module'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'renamed <a-i>mported <a-m>odule'
|
||||
map global fzf-ctags 'p' ': fzf-tag P<ret>' -docstring 'port'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type <a-d>efinition'
|
||||
map global fzf-ctags 'c' ': fzf-tag C<ret>' -docstring 'type <a-c>onstructor'
|
||||
map global fzf-ctags 'a' ': fzf-tag A<ret>' -docstring 'type <a-a>lias'
|
||||
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'functions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(erlang) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'record definitions'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(falcon) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class members'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'imports'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(flex) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variables'
|
||||
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'mxtags'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(fortran) printf "%s\n" "
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'block data'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'common blocks'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'entry points'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'enumerations'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interface contents, generic names, and operators'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'type and structure components'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'type bound procedures'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namelists'
|
||||
map global fzf-ctags '<a-n>' ': fzf-tag N<ret>' -docstring 'enumeration values'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'programs'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'derived types and structures'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'program (global) and module variables'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'submodules'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(fypp) printf "%s\n" "
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(gdbinit) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'toplevel variables'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(go) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structs'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'struct members'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'struct anonymous members'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'unknown'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'name for specifying imported package'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(html) printf "%s\n" "
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'named anchors'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'h1 headings'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'h2 headings'
|
||||
map global fzf-ctags 'j' ': fzf-tag j<ret>' -docstring 'h3 headings'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(iniconf) printf "%s\n" "
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(itcl) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'object-specific variables'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'common variables'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures within the class namespace'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(java) printf "%s\n" "
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'annotation declarations'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enum constants'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum types'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(javaproperties) printf "%s\n" "
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(javascript) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variables'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'generators'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(json) printf "%s\n" "
|
||||
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'objects'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'arrays'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'numbers'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'strings'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'booleans'
|
||||
map global fzf-ctags 'z' ': fzf-tag z<ret>' -docstring 'nulls'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(ldscript) printf "%s\n" "
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'sections'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'symbols'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'versions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'input sections'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(lisp) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(lua) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(m4) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macros'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'macro files'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(man) printf "%s\n" "
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'titles'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(make) printf "%s\n" "
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'targets'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'makefiles'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(markdown) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapsters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'level 4 subsections'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'level 5 subsections'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'regex'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(matlab) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'class'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(myrddin) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'types'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'traits'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(objectivec) printf "%s\n" "
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'class interface'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'class implementation'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring '<a-p>rotocol'
|
||||
map global fzf-ctags 'm' ': fzf-tag M<ret>' -docstring 'object's method'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'class' method'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'global variable'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring '<a-o>bject field'
|
||||
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'a function'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'a property'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'a type alias'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'a type structure'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an enumeration'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-a> preprocessor macro'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(ocaml) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'object's method'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-m>odule or functor'
|
||||
map global fzf-ctags 'v' ': fzf-tag V<ret>' -docstring 'global variable'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'signature item'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type name'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'a function'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring '<a-a> constructor'
|
||||
map global fzf-ctags 'r' ': fzf-tag R<ret>' -docstring 'a 'structure' field'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an exception'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(passwd) printf "%s\n" "
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'user names'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(pascal) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(perl) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'formats'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(perl6) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'grammars'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'o' ': fzf-tag o<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'roles'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'rules'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'submethods'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tokens'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(php) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constant definitions'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'traits'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(pod) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(protobuf) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'messages'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fields'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enum constants'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum types'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'services'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(puppetmanifest) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'definitions'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'nodes'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'resources'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(python) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class members'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'name referring a module defined in other file'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'name referring a class/variable/function/module defined in other module'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(pythonloggingconfig) printf "%s\n" "
|
||||
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'logger sections'
|
||||
map global fzf-ctags 'q' ': fzf-tag q<ret>' -docstring 'logger qualnames'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(qemuhx) printf "%s\n" "
|
||||
map global fzf-ctags 'q' ': fzf-tag q<ret>' -docstring 'q<a-e><a-m><a-u> <a-m>anagement <a-p>rotocol dispatch table entries'
|
||||
map global fzf-ctags 'i' ': fzf-tag I<ret>' -docstring 'item in texinfo doc'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(qtmoc) printf "%s\n" "
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'slots'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'signals'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(r) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'libraries'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sources'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global variables'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'function variables'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(rspec) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'describes'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'contexts'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(rexx) printf "%s\n" "
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subroutines'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(robot) printf "%s\n" "
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'testcases'
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keywords'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(rpmspec) printf "%s\n" "
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tags'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'macros'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'global macros'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(restructuredtext) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'subsections'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'subsubsections'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'targets'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(ruby) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'singleton methods'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(rust) printf "%s\n" "
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'module'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'structural type'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'trait interface'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'implementation'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enum'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type <a-a>lias'
|
||||
map global fzf-ctags 'v' ': fzf-tag V<ret>' -docstring 'global variable'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring '<a-m>acro <a-d>efinition'
|
||||
map global fzf-ctags 'm' ': fzf-tag M<ret>' -docstring 'a struct field'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'an enum variant'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring '<a-a> method'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(scheme) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag F<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sets'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(sh) printf "%s\n" "
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'script files'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'label for here document'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(slang) printf "%s\n" "
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(sml) printf "%s\n" "
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'exception declarations'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'functor definitions'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signature declarations'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'structure declarations'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'value bindings'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(sql) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'cursors'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'record fields'
|
||||
map global fzf-ctags '<a-l>' ': fzf-tag L<ret>' -docstring 'block label'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'packages'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'subtypes'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tables'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'triggers'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'indexes'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
|
||||
map global fzf-ctags '<a-u>' ': fzf-tag U<ret>' -docstring 'publications'
|
||||
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'services'
|
||||
map global fzf-ctags '<a-d>' ': fzf-tag D<ret>' -docstring 'domains'
|
||||
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'views'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'synonyms'
|
||||
map global fzf-ctags 'x' ': fzf-tag x<ret>' -docstring 'mobi<a-l>ink <a-t>able <a-s>cripts'
|
||||
map global fzf-ctags 'y' ': fzf-tag Y<ret>' -docstring 'mobi<a-l>ink <a-c>onn <a-s>cripts'
|
||||
map global fzf-ctags 'z' ': fzf-tag Z<ret>' -docstring 'mobi<a-l>ink <a-p>roperties '
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(systemdunit) printf "%s\n" "
|
||||
map global fzf-ctags 'u' ': fzf-tag U<ret>' -docstring 'units'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(tcl) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedures'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(tcloo) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(tex) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parts'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'chapters'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'sections'
|
||||
map global fzf-ctags 'u' ': fzf-tag u<ret>' -docstring 'subsections'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'subsubsections'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'paragraphs'
|
||||
map global fzf-ctags '<a-g>' ': fzf-tag G<ret>' -docstring 'subparagraphs'
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'includes'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(ttcn) printf "%s\n" "
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'module definition'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definition'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constant definition'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'template definition'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definition'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signature definition'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'testcase definition'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'altstep definition'
|
||||
map global fzf-ctags '<a-g>' ': fzf-tag G<ret>' -docstring 'group definition'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'module parameter definition'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable instance'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'timer instance'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'port instance'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'record/set/union member'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumeration value'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(vera) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'macro definitions'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'enumerators (values inside an enumeration)'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'enumeration names'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'class, struct, and union members'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'programs'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signals'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'typedefs'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'included header files'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(verilog) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants (define, parameter, specparam)'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'net data types'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'ports'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'register data types'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'blocks'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(systemverilog) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constants (define, parameter, specparam, enum values)'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'events'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'modules'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'net data types'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'ports'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'register data types'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'tasks'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'blocks'
|
||||
map global fzf-ctags '<a-a>' ': fzf-tag A<ret>' -docstring 'assertions'
|
||||
map global fzf-ctags '<a-c>' ': fzf-tag C<ret>' -docstring 'classes'
|
||||
map global fzf-ctags '<a-v>' ': fzf-tag V<ret>' -docstring 'covergroups'
|
||||
map global fzf-ctags '<a-e>' ': fzf-tag E<ret>' -docstring 'enumerators'
|
||||
map global fzf-ctags '<a-i>' ': fzf-tag I<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags '<a-m>' ': fzf-tag M<ret>' -docstring 'modports'
|
||||
map global fzf-ctags '<a-k>' ': fzf-tag K<ret>' -docstring 'packages'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'programs'
|
||||
map global fzf-ctags '<a-r>' ': fzf-tag R<ret>' -docstring 'properties'
|
||||
map global fzf-ctags '<a-s>' ': fzf-tag S<ret>' -docstring 'structs and unions'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'type declarations'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(vhdl) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'constant declarations'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'type definitions'
|
||||
map global fzf-ctags '<a-t>' ': fzf-tag T<ret>' -docstring 'subtype definitions'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'record names'
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'entity declarations'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function prototypes and declarations'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'procedure prototypes and declarations'
|
||||
map global fzf-ctags '<a-p>' ': fzf-tag P<ret>' -docstring 'package definitions'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(vim) printf "%s\n" "
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'autocommand groups'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'user-defined commands'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'function definitions'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'maps'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variable definitions'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'vimball filename'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(windres) printf "%s\n" "
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'dialogs'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'menus'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'icons'
|
||||
map global fzf-ctags 'b' ': fzf-tag b<ret>' -docstring 'bitmaps'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'cursors'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'fonts'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'versions'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'accelerators'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(yacc) printf "%s\n" "
|
||||
map global fzf-ctags 'l' ': fzf-tag l<ret>' -docstring 'labels'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(yumrepo) printf "%s\n" "
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'repository id'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(zephir) printf "%s\n" "
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'd' ': fzf-tag d<ret>' -docstring 'constant definitions'
|
||||
map global fzf-ctags 'f' ': fzf-tag f<ret>' -docstring 'functions'
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'namespaces'
|
||||
map global fzf-ctags 't' ': fzf-tag t<ret>' -docstring 'traits'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'aliases'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(dbusintrospect) printf "%s\n" "
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'interfaces'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'methods'
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'signals'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(glade) printf "%s\n" "
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'identifiers'
|
||||
map global fzf-ctags 'c' ': fzf-tag c<ret>' -docstring 'classes'
|
||||
map global fzf-ctags 'h' ': fzf-tag h<ret>' -docstring 'handlers'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(maven2) printf "%s\n" "
|
||||
map global fzf-ctags 'g' ': fzf-tag g<ret>' -docstring 'group identifiers'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'artifact identifiers'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'properties'
|
||||
map global fzf-ctags 'r' ': fzf-tag r<ret>' -docstring 'repository identifiers'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(plistxml) printf "%s\n" "
|
||||
map global fzf-ctags 'k' ': fzf-tag k<ret>' -docstring 'keys'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(relaxng) printf "%s\n" "
|
||||
map global fzf-ctags 'e' ': fzf-tag e<ret>' -docstring 'elements'
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'attributes'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'named patterns'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(svg) printf "%s\n" "
|
||||
map global fzf-ctags 'i' ': fzf-tag i<ret>' -docstring 'id attributes'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(xslt) printf "%s\n" "
|
||||
map global fzf-ctags 's' ': fzf-tag s<ret>' -docstring 'stylesheets'
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'parameters'
|
||||
map global fzf-ctags 'm' ': fzf-tag m<ret>' -docstring 'matched template'
|
||||
map global fzf-ctags 'n' ': fzf-tag n<ret>' -docstring 'matched template'
|
||||
map global fzf-ctags 'v' ': fzf-tag v<ret>' -docstring 'variables'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(yaml) printf "%s\n" "
|
||||
map global fzf-ctags 'a' ': fzf-tag a<ret>' -docstring 'anchors'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
(ansibleplaybook) printf "%s\n" "
|
||||
map global fzf-ctags 'p' ': fzf-tag p<ret>' -docstring 'plays'
|
||||
set-option buffer fzf_tag_filters_defined true
|
||||
" ;;
|
||||
esac
|
||||
}
|
||||
}
|
||||
|
||||
define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{
|
||||
path=$PWD
|
||||
while [ "$path" != "$HOME" ]; do
|
||||
if [ -e "./${kak_opt_fzf_tag_file_name:-}" ]; then
|
||||
break
|
||||
else
|
||||
cd ..
|
||||
path=$PWD
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$path" = "$HOME" ] && [ ! -e "./$kak_opt_fzf_tag_file_name" ]; then
|
||||
printf "%s\n" "echo -markup %{{Information}No '$kak_opt_fzf_tag_file_name' file found}"
|
||||
exit
|
||||
elif [ "$path" = "$HOME" ] && [ -e "./$kak_opt_fzf_tag_file_name" ]; then
|
||||
printf "%s\n" "echo -markup %{{Information}'$kak_opt_fzf_tag_file_name' file found at $HOME. Check if it is right tag file}"
|
||||
fi
|
||||
|
||||
cmd="cd $path;"
|
||||
if [ -n "$(command -v "${kak_opt_readtagscmd%% *}")" ]; then
|
||||
if [ -n "$1" ]; then
|
||||
cmd="${cmd} ${kak_opt_readtagscmd} -t $kak_opt_fzf_tag_file_name -Q '(eq? \$kind \"$1\")' -l"
|
||||
else
|
||||
cmd="${cmd} ${kak_opt_readtagscmd} -t $kak_opt_fzf_tag_file_name -l"
|
||||
fi
|
||||
else
|
||||
printf "%s\n" "echo -markup %{{Error}'${kak_opt_readtagscmd}' executable not found. Check if '${kak_opt_readtagscmd}' is installed}"
|
||||
exit
|
||||
fi
|
||||
cmd="${cmd} | cut -f1"
|
||||
|
||||
message="Jump to a symbol''s definition
|
||||
<ret>: open tag in new buffer
|
||||
${kak_opt_fzf_window_map:-ctrl-w}: open tag in new terminal"
|
||||
|
||||
[ -n "${kak_client_env_TMUX:-}" ] && tmux_keybindings="
|
||||
${kak_opt_fzf_horizontal_map:-ctrl-s}: open tag in horizontal split
|
||||
${kak_opt_fzf_vertical_map:-ctrl-v}: open tag in vertical split"
|
||||
|
||||
printf "%s\n" "info -title 'fzf tag' '$message$tmux_keybindings'"
|
||||
|
||||
[ -n "${kak_client_env_TMUX}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
printf "%s\n" "set-option -add window ctagsfiles %{$path/$kak_opt_fzf_tag_file_name}"
|
||||
printf "%s\n" "fzf -kak-cmd %{ctags-search} -items-cmd %{$cmd | awk '!a[\$0]++'} -fzf-args %{--expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags}"
|
||||
}}
|
||||
|
||||
§
|
82
rc/modules/fzf-file.kak
Normal file
82
rc/modules/fzf-file.kak
Normal file
|
@ -0,0 +1,82 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module for opening files with fzf for fzf.kak plugin
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %{
|
||||
map global fzf -docstring "open file" 'f' '<esc>: require-module fzf-file; fzf-file<ret>'
|
||||
map global fzf -docstring "open file in dir of currently displayed file" 'F' '<esc>: require-module fzf-file; fzf-file buffile-dir<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-file %§
|
||||
|
||||
declare-option -docstring "command to provide list of files to fzf. Arguments are supported
|
||||
Supported tools:
|
||||
<package>: <value>:
|
||||
GNU Find: ""find""
|
||||
The Silver Searcher: ""ag""
|
||||
ripgrep: ""rg""
|
||||
fd: ""fd""
|
||||
|
||||
Default arguments:
|
||||
find: ""find -L . -type f""
|
||||
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 'allow showing preview window while searching for file
|
||||
Default value:
|
||||
true
|
||||
' \
|
||||
bool fzf_file_preview true
|
||||
|
||||
|
||||
define-command -hidden fzf-file -params 0..1 %{ evaluate-commands %sh{
|
||||
# Default fzf-file behavior
|
||||
search_dir="."
|
||||
if [ "$1" = "buffile-dir" ]; then
|
||||
# If the buffile-dir functionality (which is currently mapped to <fzf-mode> F) is
|
||||
# invoked by mistake on a buffile like `*scratch*` or `*grep*` and similar, there will be
|
||||
# no slashes in the buffile name and `dirname` will return `.` which means the functionality
|
||||
# will revert to the normal fzf-file behavior -- which is what we want in this scenario.
|
||||
search_dir=$(dirname "$kak_buffile")
|
||||
fi
|
||||
|
||||
if [ -z "$(command -v "${kak_opt_fzf_file_command%% *}")" ]; then
|
||||
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
|
||||
(find) cmd="find -L . -type f" ;;
|
||||
(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 ;;
|
||||
(*) items_executable=$(printf "%s\n" "$kak_opt_fzf_file_command" | grep -o -E "[[:alpha:]]+" | head -1)
|
||||
printf "%s\n" "echo -markup %{{Information}Warning: '$items_executable' is not supported by fzf.kak.}"
|
||||
cmd=$kak_opt_fzf_file_command ;;
|
||||
esac
|
||||
|
||||
cmd="cd $search_dir; $cmd 2>/dev/null"
|
||||
maybe_filter_param=""
|
||||
if [ "$search_dir" != "." ]; then
|
||||
# Since we cd-ed into search dir in $cmd, prefix the $search_dir path after fzf returns the results by using -filter switch of fzf.
|
||||
# Kakoune either needs an absolute path or path relative to its pwd to edit a file. Since the pwd of $cmd and kakoune now differ,
|
||||
# we cannot use a relative path, so we construct the absolute path by prefixing the $search_dir to the file outputted by fzf.
|
||||
maybe_filter_param=$(printf "%s %s" "-filter" "%{perl -pe \"if (/${kak_opt_fzf_window_map:-ctrl-w}|${kak_opt_fzf_vertical_map:-ctrl-v}|${kak_opt_fzf_horizontal_map:-ctrl-s}|^$/) {} else {print \\\"$search_dir/\\\"\"}}")
|
||||
fi
|
||||
message="Open single or multiple files.
|
||||
<ret>: open file in new buffer.
|
||||
${kak_opt_fzf_window_map:-ctrl-w}: open file in new terminal"
|
||||
[ -n "${kak_client_env_TMUX:-}" ] && tmux_keybindings="
|
||||
${kak_opt_fzf_horizontal_map:-ctrl-s}: open file in horizontal split
|
||||
${kak_opt_fzf_vertical_map:-ctrl-v}: open file in vertical split"
|
||||
|
||||
printf "%s\n" "info -title 'fzf file' '$message$tmux_keybindings'"
|
||||
[ -n "${kak_client_env_TMUX}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
[ "${kak_opt_fzf_file_preview:-}" = "true" ] && preview_flag="-preview"
|
||||
printf "%s\n" "fzf $preview_flag $maybe_filter_param -kak-cmd %{edit -existing} -items-cmd %{$cmd} -fzf-args %{-m --expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags}"
|
||||
}}
|
||||
|
||||
§
|
50
rc/modules/fzf-grep.kak
Normal file
50
rc/modules/fzf-grep.kak
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module for grepping file contents
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %{
|
||||
map -docstring 'grep file contents recursively' global fzf g ': require-module fzf-grep; fzf-grep<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-grep %§
|
||||
|
||||
declare-option -docstring "hat command to use to provide a list of grep search matches.
|
||||
Grep output must follow the format of 'filename:line-number:text', and specify a pattern to match across all file contents.
|
||||
By default, an empty pattern is searched, effectively matching every line in every file.
|
||||
GNU grep and ripgrep are supported by default.
|
||||
|
||||
Default value:
|
||||
grep -RHn '' ." \
|
||||
str fzf_grep_command 'grep'
|
||||
|
||||
|
||||
define-command -hidden fzf-grep %{ evaluate-commands %sh{
|
||||
if [ -z "$(command -v "${kak_opt_fzf_grep_command%% *}")" ]; then
|
||||
printf "%s\n" "echo -markup '{Information}''$kak_opt_fzf_grep_command'' is not installed. Falling back to ''grep'''"
|
||||
kak_opt_fzf_grep_command="grep"
|
||||
fi
|
||||
case $kak_opt_fzf_grep_command in
|
||||
(grep) cmd="grep -RHn '' ." ;;
|
||||
(rg) cmd="rg --line-number --no-column --no-heading --color=never ''" ;;
|
||||
(grep*|rg*) cmd=$kak_opt_fzf_grep_command ;;
|
||||
(*) items_executable=$(printf "%s\n" "$kak_opt_fzf_grep_command" | grep -o -E "[[:alpha:]]+" | head -1)
|
||||
printf "%s\n" "echo -markup %{{Information}Warning: '$items_executable' is not supported by fzf.kak.}"
|
||||
cmd=$kak_opt_fzf_grep_command ;;
|
||||
esac
|
||||
|
||||
cmd="$cmd 2>/dev/null"
|
||||
|
||||
title="fzf grep"
|
||||
message="grep through contents of all files recursively.
|
||||
<ret>: open search result in new buffer.
|
||||
${kak_opt_fzf_window_map:-ctrl-w}: open search result in new terminal"
|
||||
[ -n "${kak_client_env_TMUX:-}" ] && tmux_keybindings="
|
||||
${kak_opt_fzf_horizontal_map:-ctrl-s}: open search result in horizontal split
|
||||
${kak_opt_fzf_vertical_map:-ctrl-v}: open search result in vertical split"
|
||||
|
||||
printf "%s\n" "info -title '${title}' '${message}${tmux_keybindings}'"
|
||||
[ -n "${kak_client_env_TMUX}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
printf "%s\n" "fzf -kak-cmd %{evaluate-commands} -fzf-args %{--expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags --delimiter=':' -n'3..'} -items-cmd %{$cmd} -filter %{sed -E 's/([^:]+):([^:]+):.*/edit -existing \1; execute-keys \2gvc/'}"
|
||||
}}
|
||||
|
||||
§
|
167
rc/modules/fzf-project.kak
Normal file
167
rc/modules/fzf-project.kak
Normal file
|
@ -0,0 +1,167 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module for storing and loading projects with fzf for fzf.kak plugin
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %{
|
||||
map global fzf -docstring "open project" 'p' '<esc>: require-module fzf-project; fzf-project<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-project %§
|
||||
|
||||
require-module fzf-file
|
||||
|
||||
declare-option -docstring "file where saved projects are stored" str fzf_project_file "%val{config}/.fzf-projects"
|
||||
declare-option -docstring %sh{ printf "%s\n" "use '~/' instead of '${HOME}'" } bool fzf_project_use_tilda false
|
||||
|
||||
|
||||
try %{ declare-user-mode fzf-project }
|
||||
|
||||
map global fzf -docstring "project menu" '<a-p>' '<esc>: enter-user-mode fzf-project<ret>'
|
||||
map global fzf-project -docstring "save current path as project" 's' '<esc>: fzf-save-path-as-project<ret>'
|
||||
map global fzf-project -docstring "save current path as project (use basename)" '<a-s>' '<esc>: fzf-save-path-as-project-no-prompt<ret>'
|
||||
map global fzf-project -docstring "update project" 'u' '<esc>: fzf-update-project-path<ret>'
|
||||
map global fzf-project -docstring "delete project from project list" 'd' '<esc>: fzf-delete-project<ret>'
|
||||
map global fzf-project -docstring "rename project" 'r' '<esc>: fzf-rename-project<ret>'
|
||||
|
||||
define-command -hidden fzf-project %{ evaluate-commands %sh{
|
||||
if [ -s "${kak_opt_fzf_project_file:-}" ]; then
|
||||
printf '%s\n' "info -title %{fzf open project} %{Change the server's working directory to selected project}"
|
||||
printf "%s\n" "fzf -kak-cmd change-directory -items-cmd %{cat ${kak_opt_fzf_project_file}} -fzf-args %{--reverse --delimiter=':' -n'1'} -post-action fzf-file -filter %{sed 's/.*: //'}"
|
||||
else
|
||||
printf "%s\n" "echo -markup %{{Information}No project defined in '${kak_opt_fzf_project_file}'}"
|
||||
fi
|
||||
}}
|
||||
|
||||
define-command -hidden fzf-save-path-as-project %{ prompt -shell-script-candidates %{printf "%s\n" "${PWD##*/}"} "Project's name: " %{ evaluate-commands %sh{
|
||||
if [ -n "${kak_text:-}" ]; then
|
||||
mkdir -p "${kak_opt_fzf_project_file%/*}"
|
||||
exists=$(grep "${kak_text}: " "${kak_opt_fzf_project_file:-}")
|
||||
if [ -z "${exists}" ]; then
|
||||
[ "${kak_opt_fzf_project_use_tilda:-true}" = "false" ] && project_path=$(pwd) || project_path=$(pwd | perl -pe "s(${HOME})(~)")
|
||||
printf "%s: %s\n" "${kak_text}" "${project_path}" >> "${kak_opt_fzf_project_file}"
|
||||
printf "%s\n" "echo -markup %{{Information}saved '$(pwd)' project as '${kak_text}'}"
|
||||
else
|
||||
printf "%s\n" "fzf-project-confirm-impl %{Project '${kak_text}' exists. Update? (y/N): } %{fzf-update-project-path-impl %{${kak_text}} %{${PWD}}} %{Project '${kak_text}' updated} %{Project '${kak_text}' kept}"
|
||||
fi
|
||||
else
|
||||
printf "%s\n" "echo -markup %{{Error} Project name can't be empty}"
|
||||
fi
|
||||
}}}
|
||||
|
||||
define-command -hidden fzf-save-path-as-project-no-prompt %{ evaluate-commands %sh{
|
||||
mkdir -p "${kak_opt_fzf_project_file%/*}"
|
||||
# portable version of `basename'
|
||||
base() {
|
||||
filename="$1"
|
||||
case "$filename" in
|
||||
(*/*[!/]*)
|
||||
trail=${filename##*[!/]}
|
||||
filename=${filename%%"$trail"}
|
||||
base=${filename##*/} ;;
|
||||
(*[!/]*)
|
||||
trail=${filename##*[!/]}
|
||||
base=${filename%%"$trail"} ;;
|
||||
(*) base="/" ;;
|
||||
esac
|
||||
printf "%s\n" "${base}"
|
||||
}
|
||||
project_name=$(base "${PWD}")
|
||||
exists=$(grep "${project_name}: " "${kak_opt_fzf_project_file}")
|
||||
if [ -z "${exists}" ]; then
|
||||
[ "${kak_opt_fzf_project_use_tilda:-true}" = "false" ] && project_path=$(pwd) || project_path=$(pwd | perl -pe "s(${HOME})(~)")
|
||||
printf "%s: %s\n" "${project_name}" "${project_path}" >> "${kak_opt_fzf_project_file}"
|
||||
printf "%s\n" "echo -markup %{{Information}saved '$(pwd)' project as '${project_name}'}"
|
||||
else
|
||||
printf "%s\n" "fzf-project-confirm-impl %{Project '${project_name}' exists. Update? (y/N): } %{fzf-update-project-path-impl %{${project_name}} %{${PWD}}} %{${project_name}} %{Project '${project_name}' updated} %{Project '${project_name}' kept}"
|
||||
fi
|
||||
}}
|
||||
|
||||
define-command -docstring \
|
||||
"fzf-add-project [<switches>] <path> [<name>]: add given <path> to project list with given <name>. If name omitted basename of the project is used for the name
|
||||
Switches:
|
||||
-force: overwrite project if exists without asking" \
|
||||
fzf-add-project -file-completion -params 1..2 %{ evaluate-commands %sh{
|
||||
if [ "$1" = "-force" ]; then
|
||||
force="true"
|
||||
shift
|
||||
fi
|
||||
# portable version of `basename'
|
||||
base() {
|
||||
filename="$1"
|
||||
case "$filename" in
|
||||
(*/*[!/]*)
|
||||
trail=${filename##*[!/]}
|
||||
filename=${filename%%"$trail"}
|
||||
base=${filename##*/} ;;
|
||||
(*[!/]*)
|
||||
trail=${filename##*[!/]}
|
||||
base=${filename%%"$trail"} ;;
|
||||
(*) base="/" ;;
|
||||
esac
|
||||
printf "%s\n" "${base}"
|
||||
}
|
||||
mkdir -p "${kak_opt_fzf_project_file%/*}"
|
||||
project_path="$1"
|
||||
project_name="$2"
|
||||
[ -z "${project_name}" ] && project_name=$(base "${project_path}")
|
||||
exists=$(grep "${project_name}: " "${kak_opt_fzf_project_file}")
|
||||
if [ -z "${exists}" ] || [ "${force}" = "true" ]; then
|
||||
[ "${kak_opt_fzf_project_use_tilda:-true}" = "false" ] || project_path=$(printf "%s\n" "${project_path}" | perl -pe "s(${HOME})(~)")
|
||||
printf "%s: %s\n" "${project_name}" "${project_path}" >> "${kak_opt_fzf_project_file}"
|
||||
printf "%s\n" "echo -markup %{{Information}saved '${project_path}' project as '${project_name}'}"
|
||||
else
|
||||
printf "%s\n" "fzf-project-confirm-impl %{Project '${project_name}' exists. Update? (y/N): } %{fzf-update-project-path-impl %{${project_name}} %{${project_path}}} %{Project '${project_name}' updated} %{Project '${project_name}' kept}"
|
||||
fi
|
||||
}}
|
||||
|
||||
define-command -docstring \
|
||||
"fzf-project-confirm-impl <message> <command> [<success_message>] [<fail_message>]: promt user to confirm action" \
|
||||
-hidden fzf-project-confirm-impl -params 2..4 %{
|
||||
prompt -shell-script-candidates %{printf "%s\n%s\n" "y" "n"} "%arg{1}" %{ evaluate-commands %sh{
|
||||
shift; function_to_call=$1; success_message=$2; fail_message=$3
|
||||
choice=$(printf "%s" "${kak_text:-}" | perl -pe "s/y(es)?.*//i") # case isensetive lookup for yes answer
|
||||
if [ -z "${choice}" ]; then
|
||||
printf "%s\n" "${function_to_call}"
|
||||
[ -n "${success_message}" ] && printf "%s\n" "echo -markup %{{Information}${success_message}}"
|
||||
else
|
||||
[ -n "${fail_message}" ] && printf "%s\n" "echo -markup %{{Information}${fail_message}}"
|
||||
fi
|
||||
}}
|
||||
}
|
||||
|
||||
define-command -hidden fzf-update-project-path %{
|
||||
prompt -shell-script-candidates %{ perl -ne '/^([^:]+)/ && print "$1\n"' ${kak_opt_fzf_project_file} } "Project to update: " %{
|
||||
fzf-update-project-path-impl %val{text}
|
||||
echo -markup "{Information}'%val{text}' project updated"
|
||||
}
|
||||
}
|
||||
|
||||
define-command -hidden fzf-update-project-path-impl -params 1..2 %{ nop %sh{
|
||||
tmp=$(mktemp "${TMPDIR:-/tmp}/fzf-project.XXXXXXX")
|
||||
[ $# -eq 1 ] && project_path=$(pwd)
|
||||
[ "${kak_opt_fzf_project_use_tilda}" = "false" ] && project_path=$2 || project_path=$(printf "%s\n" $2 | perl -pe "s(${HOME})(~)")
|
||||
perl -pe "s(\Q$1: \E.*)($1: ${project_path})" "${kak_opt_fzf_project_file}" > ${tmp} && cat ${tmp} > "${kak_opt_fzf_project_file}"
|
||||
rm -rf ${tmp}
|
||||
}}
|
||||
|
||||
define-command -hidden fzf-delete-project %{
|
||||
prompt -shell-script-candidates %{ perl -ne '/^([^:]+)/ && print "$1\n"' ${kak_opt_fzf_project_file} } "Project to delete: " %{ nop %sh{
|
||||
tmp=$(mktemp "${TMPDIR:-/tmp}/fzf-project.XXXXXXX")
|
||||
perl -pe "s(\Q${kak_text}: \E.*\n)()" "${kak_opt_fzf_project_file}" > ${tmp} && cat ${tmp} > "${kak_opt_fzf_project_file}"
|
||||
rm -rf ${tmp}
|
||||
}}
|
||||
}
|
||||
|
||||
define-command -hidden fzf-rename-project %{
|
||||
prompt -shell-script-candidates %{ perl -ne '/^([^:]+)/ && print "$1\n"' ${kak_opt_fzf_project_file} } "Project to rename: " %{ evaluate-commands %sh{
|
||||
tmp=$(mktemp "${TMPDIR:-/tmp}/fzf-project.XXXXXXX")
|
||||
project_name=${kak_text}
|
||||
printf "%s\n" "prompt %{New name: } %{ evaluate-commands %sh{
|
||||
perl -pe \"s(${project_name}:)(\${kak_text}:)\" \"${kak_opt_fzf_project_file}\" > ${tmp} && cat ${tmp} > "${kak_opt_fzf_project_file}"
|
||||
printf \"%s\n\" \"echo -markup %{{Information}'${project_name}' renamed to '\${kak_text}'}\"
|
||||
}}"
|
||||
rm -rf ${tmp}
|
||||
}}
|
||||
}
|
||||
|
||||
§
|
20
rc/modules/fzf-search.kak
Normal file
20
rc/modules/fzf-search.kak
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module for searching inside current buffer with fzf for fzf.kak
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %{
|
||||
map global fzf -docstring "search in buffer" 's' '<esc>: require-module fzf-search; fzf-buffer-search<ret>'
|
||||
}
|
||||
|
||||
provide-module fzf-search %§
|
||||
|
||||
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)"
|
||||
printf "%s\n" "execute-keys -draft %{%<a-|>cat<space>><space>$buffer_content<ret>;}"
|
||||
printf "%s\n" "fzf -kak-cmd %{execute-keys} -items-cmd %{(nl -b a -n ln $buffer_content; rm $buffer_content)} -fzf-args %{--reverse} -filter %{cut -f 1} -post-action %{execute-keys gx}"
|
||||
}}
|
||||
|
||||
§
|
55
rc/modules/fzf-vcs.kak
Normal file
55
rc/modules/fzf-vcs.kak
Normal file
|
@ -0,0 +1,55 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module that declares VCS submodule for various version control systems to open files with fzf
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %§
|
||||
map global fzf -docstring "edit file from vcs repo" 'v' '<esc>: require-module fzf-vcs; fzf-vcs<ret>'
|
||||
map global fzf -docstring "switch to vcs selection mode" '<a-v>' '<esc>: require-module fzf-vcs; enter-user-mode fzf-vcs<ret>'
|
||||
§
|
||||
|
||||
provide-module fzf-vcs %§
|
||||
|
||||
require-module fzf-git
|
||||
require-module fzf-svn
|
||||
require-module fzf-hg
|
||||
require-module fzf-bzr
|
||||
|
||||
declare-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=$(printf "%s\n" "$cmd" | awk '{print $1}')
|
||||
title="fzf $vcs"
|
||||
[ -n "${kak_client_env_TMUX:-}" ] && additional_keybindings="
|
||||
${kak_opt_fzf_horizontal_map:-ctrl-s}: open file in horizontal split
|
||||
${kak_opt_fzf_vertical_map:-ctrl-v}: open file in vertical split"
|
||||
message="Open single or multiple files from git tree.
|
||||
<ret>: open file in new buffer.
|
||||
${kak_opt_fzf_window_map:-ctrl-w}: open file in new terminal $additional_keybindings"
|
||||
printf "%s\n" "info -title %{$title} %{$message}"
|
||||
printf "%s\n" "fzf-$vcs"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
printf "%s\n" "echo -markup '{Information}No VCS found in current folder'"
|
||||
}}
|
||||
|
||||
§
|
67
rc/modules/sk-grep.kak
Normal file
67
rc/modules/sk-grep.kak
Normal file
|
@ -0,0 +1,67 @@
|
|||
# Author: Andrey Listopadov
|
||||
# Module running interactive grep with skim for fzf.kak
|
||||
# https://github.com/andreyorst/fzf.kak
|
||||
|
||||
hook global ModuleLoaded fzf %§
|
||||
evaluate-commands %sh{
|
||||
if [ -n "$(command -v sk)" ]; then
|
||||
printf "%s\n" "map global fzf -docstring %{Interactive grep with skim} '<a-g>' '<esc>: require-module fzf-sk-grep; fzf-sk-grep<ret>'"
|
||||
fi
|
||||
}
|
||||
§
|
||||
|
||||
provide-module fzf-sk-grep %§
|
||||
|
||||
declare-option -docstring "what command to use to provide list of grep search matches.
|
||||
Grep output must follow the format of 'filename:line-number:text'
|
||||
|
||||
Default value:
|
||||
grep -RHn" \
|
||||
str fzf_sk_grep_command 'grep -RHn'
|
||||
|
||||
declare-option -hidden str fzf_sk_first_file ''
|
||||
|
||||
define-command -hidden fzf-sk-grep %{ evaluate-commands %sh{
|
||||
if [ -z "$(command -v sk)" ]; then
|
||||
printf "%s\n" "echo -markup %{{Information}skim required to run this command}"
|
||||
exit
|
||||
fi
|
||||
title="skim interactive grep"
|
||||
message="Interactively grep pattern from current directory
|
||||
<ret>: open search result in new buffer.
|
||||
${kak_opt_fzf_window_map:-ctrl-w}: open search result in new terminal"
|
||||
[ -n "${kak_client_env_TMUX:-}" ] && tmux_keybindings="
|
||||
${kak_opt_fzf_horizontal_map:-ctrl-s}: open search result in horizontal split
|
||||
${kak_opt_fzf_vertical_map:-ctrl-v}: open search result in vertical split"
|
||||
|
||||
printf "%s\n" "info -title '${title}' '${message}${tmux_keybindings}'"
|
||||
[ -n "${kak_client_env_TMUX}" ] && additional_flags="--expect ${kak_opt_fzf_vertical_map:-ctrl-v} --expect ${kak_opt_fzf_horizontal_map:-ctrl-s}"
|
||||
printf "%s\n" "fzf -kak-cmd %{fzf-sk-grep-handler} -fzf-impl %{sk --ansi -m -i -c '${kak_opt_fzf_sk_grep_command:-} {}'} -fzf-args %{--expect ${kak_opt_fzf_window_map:-ctrl-w} $additional_flags} -multiple-cmd %{fzf-sk-populate-grep} -post-action %{buffer %opt{fzf_sk_first_file}}"
|
||||
}}
|
||||
|
||||
define-command -hidden fzf-sk-grep-handler -params 1 %{
|
||||
evaluate-commands %sh{
|
||||
printf "%s\n" "$1" | awk '{
|
||||
file = $0; sub(/:.*/, "", file); gsub("&", "&&", file);
|
||||
line = $0; sub(/[^:]+:/, "", line); sub(/:.*/, "", line)
|
||||
print "edit -existing %&" file "&; execute-keys %&" line "gxvc&"
|
||||
print "set-option global fzf_sk_first_file %&" file "&"
|
||||
}'
|
||||
}
|
||||
fzf-sk-populate-grep %arg{1}
|
||||
}
|
||||
|
||||
define-command -hidden fzf-sk-populate-grep -params 1 %{
|
||||
try %{
|
||||
buffer *grep*
|
||||
} catch %{
|
||||
edit -scratch *grep*
|
||||
set-option buffer filetype grep
|
||||
}
|
||||
evaluate-commands -save-regs '"' -buffer *grep* %{
|
||||
set-register dquote %arg{1}
|
||||
execute-keys gjPo
|
||||
}
|
||||
}
|
||||
|
||||
§
|
Loading…
Reference in a new issue