Skip to content

Commit

Permalink
reference: add yode plugin to narrowing page
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Dec 27, 2024
1 parent 9ca2ddc commit a574f14
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions docs/reference/modal-editing/narrowing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,44 @@ and means to focus on a selected region while making the rest inaccessible.

![NrrwRgn plugin](https://github.com/chrisbra/NrrwRgn/raw/master/screencast.gif){loading=lazy}


## Yode plugin

[yode-nvim](https://github.com/hoschi/yode-nvim){target=_blank} will focus on selected text within a file.

Narrow by replacing the current buffer

- `YodeCreateSeditorReplace` focus on a code part and replace it with the current buffer
- `YodeBufferDelete` delete the current buffer and jump back to file, if it is a seditor

Or narrow using a floating window

- YodeCreateSeditorFloating focus on a code part and make it floating, stay at the current (main) view


[hoschi/yode-nvim](https://github.com/hoschi/yode-nvim){target=_blank .md-button}

<!--
Previously configured mappings for NrrwRgn plug
`SPC n r` opens a select region in a new split window. The original buffer is protected from changes.
`:w` to write changes in the narrowed window to the original buffer
## Commands
`:NR` - Open the selected region in a new narrowed window
`:NW` - Open the current visual window in a new narrowed window
`:WR` - (In the narrowed window) write the changes back to the original buffer.
`:NRV` - Open the narrowed window for the region that was last visually selected.
`:NUD` - (In a unified diff) open the selected diff in 2 Narrowed windows
`:NRP` - Mark a region for a Multi narrowed window
`:NRM` - Create a new Multi narrowed window (after :NRP) - experimental!
`:NRS` - Enable Syncing the buffer content back (default on)
`:NRN` - Disable Syncing the buffer content back
`:NRL` - Reselect the last selected region and open it again in a narrowed window
- `:NR` Open the selected region in a new narrowed window
- `:NW` Open the current visual window in a new narrowed window
- `:WR` (In the narrowed window) write the changes back to the original buffer.
- `:NRV` Open the narrowed window for the region that was last visually selected.
- `:NUD` (In a unified diff) open the selected diff in 2 Narrowed windows
- `:NRP` Mark a region for a Multi narrowed window
- `:NRM` Create a new Multi narrowed window (after :NRP) - experimental!
- `:NRS` Enable Syncing the buffer content back (default on)
- `:NRN` Disable Syncing the buffer content back
- `:NRL` Reselect the last selected region and open it again in a narrowed window
Appending `!` to most commands opens the narrowed part in the current window instead of a new window.
Expand Down

0 comments on commit a574f14

Please sign in to comment.