Created
February 28, 2026 21:46
-
-
Save pierodev0/61f660acaaf58b7020bc5e8c55222146 to your computer and use it in GitHub Desktop.
Open nvim files with television (text channel)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [metadata] | |
| name = "text" | |
| description = "A channel to find and select text from files" | |
| requirements = ["rg", "bat"] | |
| [source] | |
| command = "rg . --no-heading --line-number --colors 'match:fg:white' --colors 'path:fg:blue' --color=always" | |
| ansi = true | |
| output = "{strip_ansi|split:\\::..2}" | |
| # output = "+{strip_ansi|split:\\::1} {strip_ansi|split:\\::0}" | |
| [preview] | |
| command = "bat -n --color=always '{strip_ansi|split:\\::0}'" | |
| env = { BAT_THEME = "ansi" } | |
| offset = '{strip_ansi|split:\::1}' | |
| [keybindings] | |
| shortcut = "f4" | |
| f12 = "actions:edit" | |
| [actions.edit] | |
| command = "nvim '+{strip_ansi|split:\\::1}' '{strip_ansi|split:\\::0}'" | |
| mode = "execute" | |
| [ui] | |
| preview_panel = { header = '{strip_ansi|split:\::..2}' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment