This document demonstrates how to use the zsh-smart-insert plugin in practical scenarios for boosting file interaction productivity in the terminal.
- Press
Alt+fto launch the file picker usingfd. - Browse and select a file (e.g.,
main.go). - Choose a prefix command when prompted (e.g.,
vim).
vim ./internal/main.goThe full command is inserted into your terminal buffer, ready for execution.
- Press
Alt+gto search filenames usingripgrep. - Type a partial name (e.g.,
readme). - Select the desired file.
- Choose a command like
batorless.
bat ./README.md- Press
Alt+sto search inside file contents. - Type a keyword (e.g.,
choose_prefix). - Select a matching file from the preview.
- Choose a prefix like
codeorvim.
code ./functions/choose_prefix.zsh- Launch any widget (
Alt+f,Alt+g, orAlt+s). - Select the desired file.
- When prompted, choose the empty prefix option.
./project-docs/shortcuts.mdThis is useful when scripting or composing custom shell commands.
- Use
Ctrl+/to toggle the file preview inside FZF. - Use
ESCorCtrl+Cto cancel the widget interface without inserting anything. - Prefix options include:
cat,vim,less,bat,code, or no prefix.
Last updated: 2025-04-19