2020-07-27 07:19:36 +00:00
|
|
|
# [fzf](https://github.com/junegunn/fzf)
|
2020-05-06 18:38:17 +00:00
|
|
|
|
2020-10-22 08:38:51 +00:00
|
|
|
Should install using git.
|
|
|
|
|
2020-10-22 09:10:10 +00:00
|
|
|
## Shell
|
|
|
|
|
2020-07-27 07:07:25 +00:00
|
|
|
Add to `~/.bashrc`, `~/.zshrc`:
|
2020-05-06 18:38:17 +00:00
|
|
|
|
2020-10-22 09:10:10 +00:00
|
|
|
```sh
|
2020-05-22 06:33:45 +00:00
|
|
|
# Use fd instead of find
|
2020-05-22 07:12:01 +00:00
|
|
|
export FZF_DEFAULT_COMMAND='fd --hidden --exclude .git'
|
2020-05-06 18:38:17 +00:00
|
|
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
2020-07-07 19:07:34 +00:00
|
|
|
|
|
|
|
# Colorscheme
|
|
|
|
export FZF_DEFAULT_OPTS='--color dark'
|
|
|
|
export FZF_DEFAULT_OPTS='--color light'
|
2020-05-06 18:38:17 +00:00
|
|
|
```
|
2020-05-19 18:51:55 +00:00
|
|
|
|
|
|
|
| Shorcut | Explain |
|
|
|
|
| -------- | ------------------------------------ |
|
2020-05-22 06:33:45 +00:00
|
|
|
| `CTRL-T` | search through files and directories |
|
|
|
|
| `CTRL-R` | search though command-line history |
|
2020-10-22 08:38:51 +00:00
|
|
|
|
2020-10-22 09:10:10 +00:00
|
|
|
## Editor
|
|
|
|
|
2020-10-22 08:38:51 +00:00
|
|
|
Add to `~/.vimrc`, `~/.config/nvim/init.vim`:
|
|
|
|
|
|
|
|
```vim
|
|
|
|
set rtp+=~/.fzf
|
|
|
|
```
|
2020-10-22 09:10:10 +00:00
|
|
|
|
|
|
|
| Command | Explain |
|
|
|
|
| ------- | ------------------------------------------------------------ |
|
|
|
|
| `:FZF` | search through files and directories under current directory |
|