m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 09:03:43 -05:00

Introduce 'raw' mode

This commit is contained in:
Junegunn Choi
2025-09-28 20:59:20 +09:00
parent 760d1b7c58
commit f8521fa90e
11 changed files with 554 additions and 187 deletions

View File

@@ -3,30 +3,98 @@ CHANGELOG
0.66.0
------
- Style changes
- Updated `--color base16` (alias: `16`) theme so that it works better with both dark and light themes.
- Narrowed the gutter column by using the left-half block character (`▌`).
- Removed background colors from markers.
- Added `--gutter CHAR` option for customizing the gutter column. Some examples using [box-drawing characters](https://en.wikipedia.org/wiki/Box-drawing_characters):
```sh
# Right-aligned gutter
fzf --gutter '▐'
# Even thinner gutter
fzf --gutter '▎'
### Introducing "raw" mode
# Checker
fzf --gutter '▚'
In "raw" mode, non-matching items are also displayed in their original position,
but dimmed. This is useful when you want to see the surrounding items of a match
to understand the context. Raw mode can be enabled by using `--raw` option, but
I find it more useful when toggled dynamically using `toggle-raw` action.
# Dotted
fzf --gutter '▖'
```sh
export FZF_CTRL_R_OPTS='--bind ctrl-x:toggle-raw'
```
# Full-width
fzf --gutter '█'
```sh
tree | fzf --raw --reverse --bind ctrl-x:toggle-raw
```
# No gutter
fzf --gutter ' '
```
While non-matching items are displayed in dimmed color, they are treated just
like matching items in the list, so you place the cursor on them and do any
action against them. But if you want to navigate through matching items only,
you can use `down-match` and `up-match` actions, which are from now on bound to
`CTRL-N` and `CTRL-P` respectively. Historically, `CTRL-N` and `CTRL-P` are
bound to `next-history` and `prev-history` when `--history` option is used, so
in that case, you'll have to manually bind the actions to the keys of your
choice, or you can use `ALT-DOWN` and `ALT-UP` instead.
#### Customizing the look
##### Gutter
To distinguish the raw mode, the gutter column is rendered in dashed line using
`▖` character. But you can customize it using `--gutter-raw CHAR` option.
```sh
# If you don't liked the dashed line and you just want a thinner gutter
fzf --bind ctrl-x:toggle-raw --gutter-raw ▎
```
##### Color and style of non-matching items
Non-matching items are displayed in dimmed color by default, but you can change
it using `--color hidden:...` option.
```sh
fzf --raw --color hidden:red:strikethrough
# To unset the default 'dim' attribute, prefix the color spec with 'regular'
fzf --raw --color hidden:regular:red:strikethrough
```
### Style changes
This version introduces some minor changes to the traditional visual style of fzf.
- Narrowed the gutter column by using the left-half block character (`▌`).
- Removed background colors from markers.
- Updated `--color base16` (alias: `16`) theme so that it works better with both dark and light themes.
### Added options
#### `--gutter CHAR`
Added `--gutter CHAR` option for customizing the gutter column. Some examples using [box-drawing characters](https://en.wikipedia.org/wiki/Box-drawing_characters):
```sh
# Right-aligned gutter
fzf --gutter '▐'
# Even thinner gutter
fzf --gutter '▎'
# Checker
fzf --gutter '▚'
# Dotted
fzf --gutter '▖'
# Full-width
fzf --gutter '█'
# No gutter
fzf --gutter ' '
```
#### `--gutter-raw CHAR`
As mentioned above, also added `--gutter-raw CHAR` option for customizing the gutter column in raw mode.
### Compatibility changes
Starting from this version, fzf is built with Go 1.23. Support for some old OS versions has been dropped.
See https://go.dev/wiki/MinimumRequirements.
0.65.2
------