You are one of the few devs who actually understands his tooling and is willing to take the time and effort required to properly learn them to make your workflow faster. More devs need to follow this mentality.
If you use the `--bind "enter:become(nvim {})"` flag then it will open the selected file(s) in nvim for you (without needing to prepend your command with `nivm ...`), which means that you can cancel out of the fzf finder without neovim from being entered. With the command listed, escaping fzf will still open nvim, which might not be what you want if you're trying to escape the search. For completeness, this is my alias. alias nf='fzf -m --preview="bat --color=always {}" --bind "enter:become(nvim {+})"'
I was having issues with your listed alias, it showed me STDIN where the bat preview should have been, probably a "me problem"... Anyways, I found a small fix for anyone encountering the same issue: alias nf='fzf -m --preview="bat --color=always {}" --bind "enter:become(nvim {})"' Difference is that fzf passes the file path to bat with the little '{}' after "bat --color=always ..."
@@scottfollmer Good spot - I've edited the comment to add a `+` to the `enter...{+}` command that allows multiple files to be opened as separate bufferes
unalias does not remove the alias from your .zshrc, it only removes it from the environment of the current session. When you open a new terminal or source your zshrc, the alias will be added again.
I was about to ask if I had to resource the zshrc file and I now see that would actually re-alias it rather than completely unalias it. Thanks, friend!
Great video. It made me realize I've only scratched the surface of fzf's power. Would you consider doing a showcase video of your mechanical keyboards? Whatever you are typing on in this video sounds really good.
For those of us stuck with bash (eg from git for windows) and don't have the zsh history autocomplete, fzf integrates with bash history. So hit CTRL+R and you'll be able to fuzzily find past commands you run. Very handy for me.
Fzf is one of my favorite tools, I have a few videos covering it on my channel. I made videos showing how I use it to make my menus, my app launcher, I even made a terminal file manager out of it. Great tool.
fzf is very nice as is your video and guide. Thanks. I picked up some very useful things I hadn't used. I also use cntrl r in bash and search history that way which is kind of similar but where fsf is not present
Quick tip for those who use fish shell ** will not work instead, just CTRL+T to get the same functionality you can find more information here github.com/junegunn/fzf?tab=readme-ov-file#fish-shell
I think people should only use fzf when you need multi selections or “fuzzy” search. When you know what you’re searching, it doesn’t make sense to use fzf, since it’s much faster to use fd, grep, glob, etc. It slow down your process and just add an interface that make u feel fast 😂
Hey I have this issue for example when I want to choose through yt-dlp options with only one "-" and press TAB fzf automatically puts second "--" and only shows result to "--" options. Is it possible to resolve this issue? Thanks!
I was very appriciated for your neovim video. I want to use ftp-sync in neovim like vscode(sftp or ftp-simple), but I couldn't find out how to set for it. Please help us!
I'm still learning so feel free to flame but isn't yay used for the arch user repo? what is meant by calling it a front end for pacman then which is used for the Arch package repo? aren't they kind different tools to get packages from different places? (I do now yay is installed from pacman)
Hey man i hope you see this but i mistakenly deleted my zshconfig that had fzf setup and pipes output of other commands into fzf when i use the tab button without using the **.Could you make a video on that or your dotfiles would be better. Thank you
How do you feel about oh-my-zsh? Adding fzf means I just add it to my plugins list, instead of a list of actions cluttering my .zshrc for fzf, nvm, whatever.
@@typecraft_dev Yeh that makes sense. Great video, need to look more into integrating fzf into my workflow. Have you looked at the tmux-sessionizer script by primeagen? Its a great script that uses fzf to open a folder in tmux. Had to change part of it to work for me but dont remember exactly what was wrong.
@@m0r4ag gracias voy a probar, quiero emular de manera "nativa" lo que hace fzf-tab-git qué se puede instalar desde aur, donde igual solo basta poner por ejemplo "cd " en vez de cd **
fzf is awesome, but the latest stable version for Ubuntu is missing some of those cool features. I hope that changes soon. Or I guess I could always swap to Arch :D
after a bit of a headache for 2 hours, I needed to set: export FZF_DEFAULT_COMMAND='find . -type f -o -type d 2>/dev/null' So that it could find hidden files. This is useful to me since I play games on Steam, and the install folder is ~/.steam/ So anyone else having this issue, slap that into your rc file.
Someone tell me how to ignore specific files and folder while searching through fzf and how to add some specific files and folder to show in fzf , thanks
It's not just to find lost stuff. It's to find stuff faster. When you multiple files in different locations or deeply nested directories, fzf makes it way easy to find them
@6:55, why would you go straight to a `kill -9` - don't teach people bad habits! Use a normal kill (SIGTERM) first and give the process a chance to exit gracefully before reaching for the nuclear option.
For safety, you can limit the number of lines used for the preview. For cat you can limit the output with -n , and with bat you can limit it to a range of lines with -r, like bat -r :500 to get up to the first 500 lines
@@ispyu1514 technically I can stream from arch pretty much out of box with OBS. But not all things are supported (like nvidia). So now I stream through a capture card on a PC
Thanks, nerd
well... in this side of internet its actually a compliment lol 😂
this is getting funnier and funnier lol
You’re welcome (help)
You are one of the few devs who actually understands his tooling and is willing to take the time and effort required to properly learn them to make your workflow faster. More devs need to follow this mentality.
If you use the `--bind "enter:become(nvim {})"` flag then it will open the selected file(s) in nvim for you (without needing to prepend your command with `nivm ...`), which means that you can cancel out of the fzf finder without neovim from being entered. With the command listed, escaping fzf will still open nvim, which might not be what you want if you're trying to escape the search.
For completeness, this is my alias.
alias nf='fzf -m --preview="bat --color=always {}" --bind "enter:become(nvim {+})"'
I was having issues with your listed alias, it showed me STDIN where the bat preview should have been, probably a "me problem"...
Anyways, I found a small fix for anyone encountering the same issue:
alias nf='fzf -m --preview="bat --color=always {}" --bind "enter:become(nvim {})"'
Difference is that fzf passes the file path to bat with the little '{}' after "bat --color=always ..."
@@domjan3859 Thanks for pointing that out - that was an issue on my end. I've edited my comment to make it clear it needs `{}` in both parts!
Nice!! Thanks for this
For some reason with this alias, selecting multiple files didn’t work for me and only the last file selected was actually passed to nvim
@@scottfollmer Good spot - I've edited the comment to add a `+` to the `enter...{+}` command that allows multiple files to be opened as separate bufferes
unalias does not remove the alias from your .zshrc, it only removes it from the environment of the current session. When you open a new terminal or source your zshrc, the alias will be added again.
yes that is correct. was just showing off the feature for FZF
I was about to ask if I had to resource the zshrc file and I now see that would actually re-alias it rather than completely unalias it. Thanks, friend!
I have been looking for this video FOR MONTHS.... good thing there is a way to check back the history of my views. Thanks!!!
Great video. It made me realize I've only scratched the surface of fzf's power.
Would you consider doing a showcase video of your mechanical keyboards? Whatever you are typing on in this video sounds really good.
Also nice:
1. nvim Ctrl + t ( opens fzf. Of course works for any command ).
2. Ctrl + r opens shell command history
"Ctrl + r opens shell command history"
Honestly I have no idea how anyone can use reverse-i-search after discovering this. 100x better on every level.
Exactly always works like a charm
Never knew this w comment
ctrl-r with fzf is the main reason I install fzf on every pc I touch (if I'm allowed to of course)
For those of us stuck with bash (eg from git for windows) and don't have the zsh history autocomplete, fzf integrates with bash history. So hit CTRL+R and you'll be able to fuzzily find past commands you run. Very handy for me.
with fzf on my shell i can press ctrl+r then it will fuzzy find any commands on my bash history, i use it quite often
yup! thats one of the best. I've used it so often I actually forgot about it for this video. lol
how you setup keyboard shortcuts for the terminal?
@@imrafiel401 I don't know, ctrl +r is a default shortcut in all terminals I have ever used
Sweet, now i got my day planned. Don't know how I missed this program
Some of the stuff fzf gives (like kill -9 **) was unknown to me as well, even though I've been using fzf for a WHILE
@@typecraft_dev Kind of feels like that when using Linux tbh, learning new things constantly :)
Why do you keep giving us great weekend projects?? Thanks for showing us this. Now I can't wait to get home and install it.
I use fzf every day for work. It’s probably the best CLI tool out there!
Fzf is one of my favorite tools, I have a few videos covering it on my channel. I made videos showing how I use it to make my menus, my app launcher, I even made a terminal file manager out of it. Great tool.
awesome!
i used it before but learned new things today i hadn't figured out earlier
That kill command looks insanely useful. Giving fzf a try!
Regarding kill, just make sure you take a look at this article so you use kill safely! learn.typecraft.dev/tutorial/kill-choices/
"I use arch, btw" - 0:28
thanks nerd, your video + coffee = great day
hell yeah, just made coffee myself!
Amazing tool! I should start using it
Thank you, Chris.
My pleasure!
I stopped by for the mustache, I subscribed for the information!
love the arch btw
haha
@@typecraft_dev cant live without btw thx so much for this video i had no idea how fzf works
fzf is very nice as is your video and guide. Thanks. I picked up some very useful things I hadn't used. I also use cntrl r in bash and search history that way which is kind of similar but where fsf is not present
Yes FZF with history search is amazing I forgot to add it in this video!
Now, this is a really good trick!
Awesome! Please a video for vim to properly share the vim clipboard with the system one. 😄
0:42 The pacman frontend name almos killed me
🤣
Damn, didn't know about the ** which seems to send tab input into fzf. So convenient!
I didn’t know about the ** stuff. Cheers for that!
Nice! Ty for that tip!
fzf is a god tier cli tool, hands down
Quick tip for those who use fish shell
** will not work
instead, just CTRL+T to get the same functionality
you can find more information here github.com/junegunn/fzf?tab=readme-ov-file#fish-shell
** didn't work for me in zsh either
I think people should only use fzf when you need multi selections or “fuzzy” search. When you know what you’re searching, it doesn’t make sense to use fzf, since it’s much faster to use fd, grep, glob, etc. It slow down your process and just add an interface that make u feel fast 😂
can you make a video on best cli development lang or framworks
Wait, how did you know i was searching for this...
Thanks, Nerd
Amazing content. Subscribed!! By the way can you tell me where you got your desktop wallpaper from?
github.com/typecraft-dev/dotfiles/tree/master/backgrounds
Hey I have this issue for example when I want to choose through yt-dlp options with only one "-" and press TAB fzf automatically puts second "--" and only shows result to "--" options. Is it possible to resolve this issue? Thanks!
When I try to run kill -9 **, I get the old logs pasted on the screen instead of the interactive fzf prompt. What's with that? Am I missing something?
fasd is also awesome. Use it every day.
I actually have to change my terminal to Alacritty at some point, since Warp does not support fzf at the moment
ah yes. warp kinda implements its own fuzzy find stuff.
Your videos are awesome! 👌
You are awesome
I was very appriciated for your neovim video. I want to use ftp-sync in neovim like vscode(sftp or ftp-simple), but I couldn't find out how to set for it. Please help us!
I'm still learning so feel free to flame but isn't yay used for the arch user repo? what is meant by calling it a front end for pacman then which is used for the Arch package repo? aren't they kind different tools to get packages from different places? (I do now yay is installed from pacman)
Hey man i hope you see this but i mistakenly deleted my zshconfig that had fzf setup and pipes output of other commands into fzf when i use the tab button without using the **.Could you make a video on that or your dotfiles would be better. Thank you
the kill -9 ** command is sick! Anyone have an idea how i can get the ** stuff to work on fish shell?
i did not know i need it. thanks O_O
Can you upload setting up nix package manager, home manager and nix profile with flakes guide🙌🙌🙌🙌
that is on the list. the looooonnng list :)
How do you feel about oh-my-zsh? Adding fzf means I just add it to my plugins list, instead of a list of actions cluttering my .zshrc for fzf, nvm, whatever.
That’s a great approach as well
Really enjoy every video of yours, thanks nerd!!
Thank you, nerd!
Hello again 👋🏻 Where can I get that background wallpaper it's so calming 😸
Are you using i3 in this video? If so, how did you get the bar at the top of the terminal?
Nah used gnome just for presentation
@@typecraft_dev Yeh that makes sense. Great video, need to look more into integrating fzf into my workflow. Have you looked at the tmux-sessionizer script by primeagen? Its a great script that uses fzf to open a folder in tmux. Had to change part of it to work for me but dont remember exactly what was wrong.
Thanks nerd!! One question: What if i dont wanna write the ** to completion, i just wanna press tab as always? how i can do this?
Solo exporta esta variable de entorno:
export FZF_COMPLETION_TRIGGER=''
Lo probé antes de responder, no me pareció muy cómodo de usar
@@m0r4ag gracias voy a probar, quiero emular de manera "nativa" lo que hace fzf-tab-git qué se puede instalar desde aur, donde igual solo basta poner por ejemplo "cd " en vez de cd **
How u return back from nvim back to fzf though?
thanks for the inspiration
4:39 - that means you didn't checkout broot yet :)
Which keyboard are you using?
Happy hacking keyboard Type S amzn.to/3C8iLwP
So is it like Raycast or Alfred but for CLI? This is pretty cool!
Take a shot every time he says, “Fuzzily findable.”
which theme you are using??
catpuccin
Awesome, thank you!
Great vid!
Thanks!
Hi,My laptop is a bit old by it works, Does it make my laptop slower,?
This tool is almost as awesome as you
awwwwwww
fzf is awesome, but the latest stable version for Ubuntu is missing some of those cool features. I hope that changes soon. Or I guess I could always swap to Arch :D
another reason for arch!!! lol
alao make sure to use fd instead of find (it's like 6 times faster). fzf will automatically prefer fd if you have it installed
after a bit of a headache for 2 hours, I needed to set:
export FZF_DEFAULT_COMMAND='find . -type f -o -type d 2>/dev/null'
So that it could find hidden files. This is useful to me since I play games on Steam, and the install folder is ~/.steam/
So anyone else having this issue, slap that into your rc file.
0:34 it's not D-bien, it's Deb-Ian. It was created by Ian Murdock and named after his gf Debra (Deb for short, later ex-wife) and himself.
I always mess it up! Great explanation I didn’t know that
I've seen people use this but never knew what it was called. Thanks so much for the great video!
Glad you liked the video!
Why did u left arch ?
This video is recorded on arch
@@typecraft_dev in next video don't forgot to mention I use Arch , btw
Next one on yazi?? 👀
what terminal emulator do you use
What keyboard are you using? Sounds like a topre
Topre for sure - HHKB Type S - check it out amzn.to/3C8iLwP
You're the most efficient dev and UA-cam content creator I know! Keep it up man, you're awesome. 💪
awesome, will do!
Someone tell me how to ignore specific files and folder while searching through fzf and how to add some specific files and folder to show in fzf , thanks
Follow-up tutorial inbound!
lmao i went to ask for this yesterday but i got distracted. now its here.
OPRAH WAS RIGHT IM MANIFESTING
I always thank oprah
I don't lose stuff often enough for fuzzy find to be useful.
fair enough
chad dev
I use it to find old ffmpeg and one liner commands that might need some time and overhead.
Even if you don't lose the files, isn't it a very fast way of navigating the file tree regardless?
It's not just to find lost stuff. It's to find stuff faster. When you multiple files in different locations or deeply nested directories, fzf makes it way easy to find them
kill -9 ** is an incredible tip
right? I love it!
Instantly in love with how it works with shell history.
Thanks Man
Come on nerd. You missed the fzf history search. Ctrl+r in bash, probably something similar in Zsh
ah yeah, I've used that for so long I forgot to include it in the video!
Using it with a preview is new to me. Thanks for the awesome tip!
yeah, big part of the reason I made the video. that was new to me as well!
linux for newbs 4 when
what would you like to see in linux for newbs 4? I want to know!
Your vim and tmux configs for productivity
@@typecraft_dev I'd love to see a full arch + i3 + neovim setup from scratch, maybe live
kill multiple program?
who needs all of that when you have `find`.
Only if I had a penny for every time typecraft talked about fzf...
I swear I've seen a fzf video from this channel before?
nope! this is the first one
it's could be part of a video i think it was one in the neovim series but awesome new comands to find things i've lost trough my pc yhanks nerd 😄
someone can just use locate?
Pretty cool
Is it just me or did this video feel like it was going n 1.25x speed?
Other than that, great vid :)
@6:55, why would you go straight to a `kill -9` - don't teach people bad habits! Use a normal kill (SIGTERM) first and give the process a chance to exit gracefully before reaching for the nuclear option.
Haha I guess I have that bad habit too. Oops!
For anyone reading this thread and want to know more, we cover this here learn.typecraft.dev/tutorial/kill-choices/
@@typecraft_dev thanks, nerd!
0:41 🏳🌈The gay package manager
For me I probably prefer ranger.
Yazi is better
@@adriansrfr I don’t know that tool, wil look at it tonight.
bomb diggity ❤
boomshakalaka
Be careful using "cat" with huge files, it's not a pager!
Good call
For safety, you can limit the number of lines used for the preview. For cat you can limit the output with -n , and with bat you can limit it to a range of lines with -r, like bat -r :500 to get up to the first 500 lines
Day 4 of asking to make a video on how do you record and stream stuff on arch linux!
the answer: I don't!
@@typecraft_dev then how?
@@ispyu1514 technically I can stream from arch pretty much out of box with OBS. But not all things are supported (like nvidia). So now I stream through a capture card on a PC
@@typecraft_dev ohh but does ur obs on arch works with window capture or just screen capture?
here's like #172 for pronouncing "Zee/Zed Shell correctly". It's not "zeesh". 👌
I think I say it both ways, lol. I'm sure I mis-pronounced "debian" in this video too haha. can't help it!
tac is cat backwards.
Preety cool
you are
Super usefull video
making the shell more like emacs, just use emacs.
Cool, but the vid could be a lot shorter