mirror of
https://github.com/denisidoro/navi.git
synced 2026-01-23 02:14:19 +00:00
Update docs on widgets
Signed-off-by: alexis-opolka <53085471+alexis-opolka@users.noreply.github.com>
This commit is contained in:
parent
1c2abfd8e8
commit
df8c0ff7b3
2 changed files with 30 additions and 8 deletions
|
|
@ -1,15 +1,27 @@
|
|||
## Tmux
|
||||
# Tmux widget
|
||||
|
||||
You can use **navi** as a [Tmux](https://github.com/tmux/tmux/wiki) widget to reach your Vim commands, often used SQL queries, etc. in any command-line app even in SSH sessions.
|
||||
You can use **navi** as a [Tmux](https://github.com/tmux/tmux/wiki) widget to reach your Vim commands,
|
||||
often used SQL queries, etc. in any command-line app even in SSH sessions.
|
||||
|
||||
Add these lines to your Tmux config file to access **navi** by pressing `prefix + C-g`.
|
||||
<!-- TOC -->
|
||||
* [Tmux widget](#tmux-widget)
|
||||
* [Keybinding navi](#keybinding-navi)
|
||||
* [Example cheatsheet](#example-cheatsheet)
|
||||
<!-- TOC -->
|
||||
|
||||
## Keybinding navi
|
||||
|
||||
To be able to open navi via <kbd> prefix + C-g </kbd>, you need to add the following lines
|
||||
to your Tmux configuration file.
|
||||
|
||||
```sh
|
||||
bind-key -N "Open Navi (cheat sheets)" -T prefix C-g split-window \
|
||||
"$SHELL --login -i -c 'navi --print | head -n 1 | tmux load-buffer -b tmp - ; tmux paste-buffer -p -t {last} -b tmp -d'"
|
||||
```
|
||||
|
||||
Example cheatsheet:
|
||||
## Example cheatsheet
|
||||
|
||||
Here is an example cheatsheet to use inside Tmux:
|
||||
|
||||
```sh
|
||||
% vim
|
||||
|
|
|
|||
|
|
@ -1,8 +1,18 @@
|
|||
## vim
|
||||
# Vim widget
|
||||
|
||||
If you want syntax highlighting support for Navi in Vim, add those syntax rules
|
||||
to your syntax files such as at `$VIMRUNTIME/syntax/navi.vim`.
|
||||
The rules are defined based on the [Cheatsheet syntax](cheatsheet_syntax.md).
|
||||
<!-- TOC -->
|
||||
* [Vim widget](#vim-widget)
|
||||
* [Syntax Highlighting](#syntax-highlighting)
|
||||
<!-- TOC -->
|
||||
|
||||
## Syntax Highlighting
|
||||
|
||||
If you want syntax highlighting support for Navi in Vim, you need to
|
||||
add those syntax rules to your syntax files such as at `$VIMRUNTIME/syntax/navi.vim`.
|
||||
|
||||
The rules are defined based on the [Cheatsheet syntax](/docs/cheatsheet/syntax/README.md).
|
||||
|
||||
Here is an example:
|
||||
|
||||
```vim
|
||||
syntax match Comment "\v^;.*$"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue