Skip to content

Commit

Permalink
Merge pull request #7 from zackhsi/document-fzftselect
Browse files Browse the repository at this point in the history
Document FZFTselect abbreviation
  • Loading branch information
zackhsi authored Dec 2, 2020
2 parents 43683b5 + e9b8068 commit ca47831
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ fzf-tags

It combines `:tag` and `:tselect` into a single improved command.

`fzf-tags` looks up the identifier under the cursor.
`:FZFTags` looks up the identifier under the cursor.
- If there are 0 or 1 definitions, the behavior is same as `:tag`.
- When there are multiple definitions, the results are piped to fzf for
interactive filtering (https://github.com/junegunn/fzf#search-syntax).

`fzf-tags` uses the built-in `:tag` command under the hood, which yields a
couple benefits.
- Tag stack management works as expected (CTRL-T or `:pop` return you to your
previous location).
`:FZFTselect` behaves just like `:tselect`.
- Loads the tags matching the argument into an FZF window.
- If no argument is provided, the last tag on the tag-stack is used.

This plugin uses the built-in `:tag` command under the hood, which
yields a couple benefits.

- Tag stack management works as expected (CTRL-T or `:pop` return you
to your previous location).
- Tag priority works as expected (`:help tag-priority`).

Installation
Expand All @@ -33,3 +38,9 @@ To override the default jump-to-tag binding:
```vim
nmap <C-]> <Plug>(fzf_tags)
```

Additionally, `fzf-tags` exposes a fuzzy `:tselect`. To replace the default `:ts`:

```vim
noreabbrev <expr> ts getcmdtype() == ":" && getcmdline() == 'ts' ? 'FZFTselect' : 'ts'
```

0 comments on commit ca47831

Please sign in to comment.