Just looked at that .bashrc, and I'd like to object to your "pacs" function. It runs "sudo pacman -Syy packages" - this not only needlessly stresses mirrors with double -y by forcibly downloading all repo listings every time, not only introduces a potential partial upgrade state by having the installed packages come from latest repos while currently installed packages are not updated, but then also straight up performs a partial upgrade. Both needless mirror stressing and partial upgrades are usually recommended against, and the latter is not supported and may lead to issues if you are on Arch. Please, change this to "-Syu" or "-S"!
The preview option for open_with_fzf (9 minutes in) is wrong). I think you intend to have "xdg-mime query default {}" tell you the name of the application that you will be using to open the file with xdg-open. However all you will get is the error message from xdg-mime, because xdg-mime query default wants argument like "image/jpeg" not a filename like "foo.jpg" . You can get closer with "xdg-mime query filetype {}".
I understand you wanted to present the quickness of fuzzy finding with fzf, but sometimes I could not manage to see what you were typing. Could you maybe type more slowly next time? Good video though
Fzf doesn't open mimetypes, you could use it to open a directory as an adjunct to a terminal application. Thus you would open with the terminal and provide fzf as a command the terminal should run on the specified directory, but it doesn't make good sense to do so
Excellent! I do a radio show so I need to search my LAN for audio files. Let's say I want to search for songs that contain the word hope. How do I do this?
Any chance you can share your configuration… maybe just the zstyles if that’s where you defined all these hooks? I have a lot of noise going on from trial and error and if I can blow everything away I’d be very satisfied just having what you have as a baseline.
Check 9:41 - he's using the 'tree' command to display the content of the directory that fzf delivered. Read more about it here: linux.die.net/man/1/tree
Great content as always! I've been wondering, do you have any plan to continue casting on academic writing or research workflow? I'm a medical doctor myself and aspired to be a researcher, so I'd like to know what other people from similar background would do.
Great! Thanks for watching. Hopefully you caught my video a couple weeks ago on academic citation and notetaking. I will make more if I think of something useful to share
@@connermcd those were my inspiration to use markdown :D currently I'm using RMarkdown, as it allows a flexible table construct to integrate results saved in RData format. I always love watching your vim workflow as it motivates me to use my system more efficiently, I suppose many of your subscribers wouldn't disagree. So if you're planning some sort of research / data analysis, and don't mind making some contents about it, I believe that'd be something of interest to us.
How exactly does your fzf find 58k dirs/files almost instantaneously? I run fzf in / and it finds around 10k and needs to keep searching... I am using defaults, I haven't changed the FZF_DEFAULT_COMMAND to use ag, ripgrep or fd. Is that the reason? if so, can you share your DEFAULT_COMMAND, DEFAULT_OPTS and CTRL_T_COMMAND, please? thank you very much!
I think DEFAULT_COMMAND may be the case. There're charts on the internet with comparisons of file finding utilities and ripgrep and some other are dominating by a large margin.
this channel name confuses me, it has nothing to do with nix right ? I mean nix package manager or nixOS ...is it just because its 3/4 of letters word "unix" has ?
While I'm on the fence about FZF i Don't like the idea of adding it to vim whatsoever, It's perfectly capable of searching for files right out the box. see help on find and path That said, FZF is more interactive and less resource intensives. Just wanted to point out it's not the go-to tool for the job.
Used wildmode and wildmenu for years, and it's just not as good. I use very few plugins, but I don't understand the unyielding total devotion to vim purism.
@@connermcd Not really a vim purist, I'm using about 10 plugins all from github(microsoft™) What bothers me is the time i've spent years ago learning plugins over base vim, likewise learning vim without any idea of what ed is capable of & etc It's pointless to expand the functionality of a tool for a user who can't use its base features properly mind you I've only been using vim for ~4 years, surely you're more than capable of enlightening me Connor. As for plugins, They're a common theme on youtube as it is.
@@90hijacked I agree completely. As stated I try to use as few plugins as possible and learn as much base vim as possible. You can do a lot with `set wildmenu` and `set wildmode=full` and indeed I used this for a long time, but you still have to use tab a lot. I can't jump around as easily as I can with fzf. And what I like about fzf is that unlike ctrl-p and its analogues it has broader uses than just a vim plugin. Learning it well can pay dividends in multiple areas. Thanks for highlighting the point and for watching!
@@connermcd You're very much welcome, keep up the vids! As for tabbing allot, It doesn't seem like an issue when the path and pwd are set to something sane often times i found myself opening a terminal emulator and editing a file using it's full path, This was exceptionally troublesome when i had set vim's path to contain '**', tl;dr, that was a bad idea, see :h file-searching. The following are snippets: Modifying dotfiles from shell conf() { vim -c "set path=$HOME/.config | find $@"; } Working on a single project (:cd %:p:h | set path=** ) To add arbitrary files from within the root ( :argadd **/*name* ) or ( :find name ) For regular usage i overload the path with everything i could be editing but omit ** ( :set path+=$HOME/Documents/**2,$HOME/.config,$HOME/bin,/srv (,etc) ) cheers again and sorry for rambling. hope someone finds this useful
fzf is the dmenu for the terminal
It just opens your mind for the potential use cases, love the program
Just wait till you're able to write a proper read loop in bash
Big fan of FZF, and glad to see you're back on youtube!
This new series of video (this one and the one on pass) are absolutely awesome. Keep up!
Just looked at that .bashrc, and I'd like to object to your "pacs" function. It runs "sudo pacman -Syy packages" - this not only needlessly stresses mirrors with double -y by forcibly downloading all repo listings every time, not only introduces a potential partial upgrade state by having the installed packages come from latest repos while currently installed packages are not updated, but then also straight up performs a partial upgrade.
Both needless mirror stressing and partial upgrades are usually recommended against, and the latter is not supported and may lead to issues if you are on Arch. Please, change this to "-Syu" or "-S"!
The preview option for open_with_fzf (9 minutes in) is wrong). I think you intend to have "xdg-mime query default {}" tell you the name of the application that you will be using to open the file with xdg-open. However all you will get is the error message from xdg-mime, because xdg-mime query default wants argument like "image/jpeg" not a filename like "foo.jpg" . You can get closer with
"xdg-mime query filetype {}".
I understand you wanted to present the quickness of fuzzy finding with fzf, but sometimes I could not manage to see what you were typing. Could you maybe type more slowly next time? Good video though
Hello, awesome video. Question: open_with_fzf() for Mac? xdg-open (used open instead) but xdg-mime, couldn't find an alternative.
Fzf doesn't open mimetypes, you could use it to open a directory as an adjunct to a terminal application. Thus you would open with the terminal and provide fzf as a command the terminal should run on the specified directory, but it doesn't make good sense to do so
@@connermcd ok thank you.
Excellent! I do a radio show so I need to search my LAN for audio files. Let's say I want to search for songs that contain the word hope. How do I do this?
Any chance to see your vimrc file in total ?
Love fzf! Inspired me to introduce some preview windows, thanks!
11:09 noticed a thing..
:earlier 2m
Not using vims undofile?
You talk about fzf like I talk about Albert Launcher or dmenu. That's good news, and I have a package to learn.
Any chance you can share your configuration… maybe just the zstyles if that’s where you defined all these hooks? I have a lot of noise going on from trial and error and if I can blow everything away I’d be very satisfied just having what you have as a baseline.
Thanks, great tutorial into new ways of working
How do you get the file tree after every command ? what plugin you are using for that
Check 9:41 - he's using the 'tree' command to display the content of the directory that fzf delivered. Read more about it here: linux.die.net/man/1/tree
I tried making the same pacs function for yay instead of pacman. But it still shows only arch official packages and not from aur, any idea why?
This video is a gem
The preview feature is awesome. What image viewer are you using?
Default KDE, gwenview, for nice minimalistic viewers check out sxiv and feh
Great content as always! I've been wondering, do you have any plan to continue casting on academic writing or research workflow? I'm a medical doctor myself and aspired to be a researcher, so I'd like to know what other people from similar background would do.
Great! Thanks for watching. Hopefully you caught my video a couple weeks ago on academic citation and notetaking. I will make more if I think of something useful to share
@@connermcd those were my inspiration to use markdown :D currently I'm using RMarkdown, as it allows a flexible table construct to integrate results saved in RData format. I always love watching your vim workflow as it motivates me to use my system more efficiently, I suppose many of your subscribers wouldn't disagree.
So if you're planning some sort of research / data analysis, and don't mind making some contents about it, I believe that'd be something of interest to us.
Great tool! Thanks for sharing!
How exactly does your fzf find 58k dirs/files almost instantaneously? I run fzf in / and it finds around 10k and needs to keep searching...
I am using defaults, I haven't changed the FZF_DEFAULT_COMMAND to use ag, ripgrep or fd. Is that the reason? if so, can you share your DEFAULT_COMMAND, DEFAULT_OPTS and CTRL_T_COMMAND, please? thank you very much!
I think DEFAULT_COMMAND may be the case. There're charts on the internet with comparisons of file finding utilities and ripgrep and some other are dominating by a large margin.
@@deadlysquad13 thank you for answering. I have since switched to fd and excluded the c drive in WSL and now runs smoothly!
@@elatedbento Nice to hear)
Thanks for this great video. Can we select multiple things or capture in to other file while we are passing info to fzf.
Like: cat myTest.txt | fzf
Yes. Try this ' newfile'
newfile - redirects the output to a file
@@AbhishekBM Thanks Abhishek I'll try :-)
how do i navigate with hjkl while searching with it????????
If you are still wondering, it's ctrl+j and ctrl+k
this channel name confuses me, it has nothing to do with nix right ? I mean nix package manager or nixOS ...is it just because its 3/4 of letters word "unix" has ?
great vibe for coding on this channel
Hey man, I hope you still in the land of the living!
nice vid, one quibble is with the pacs function should be -Syu flags and not -Syy.
Also, how's medical school going? I wish you all the best.
Awesome info. Thanks.
Why did you go to med school when this is your passion?
Nice
Thx a lot
While I'm on the fence about FZF
i Don't like the idea of adding it to vim whatsoever, It's perfectly capable of searching for files right out the box. see help on find and path
That said, FZF is more interactive and less resource intensives. Just wanted to point out it's not the go-to tool for the job.
Used wildmode and wildmenu for years, and it's just not as good. I use very few plugins, but I don't understand the unyielding total devotion to vim purism.
@@connermcd Not really a vim purist, I'm using about 10 plugins all from github(microsoft™)
What bothers me is the time i've spent years ago learning plugins over base vim, likewise learning vim without any idea of what ed is capable of & etc
It's pointless to expand the functionality of a tool for a user who can't use its base features properly
mind you I've only been using vim for ~4 years, surely you're more than capable of enlightening me Connor.
As for plugins, They're a common theme on youtube as it is.
@@90hijacked I agree completely. As stated I try to use as few plugins as possible and learn as much base vim as possible. You can do a lot with `set wildmenu` and `set wildmode=full` and indeed I used this for a long time, but you still have to use tab a lot. I can't jump around as easily as I can with fzf. And what I like about fzf is that unlike ctrl-p and its analogues it has broader uses than just a vim plugin. Learning it well can pay dividends in multiple areas. Thanks for highlighting the point and for watching!
@@connermcd You're very much welcome, keep up the vids!
As for tabbing allot, It doesn't seem like an issue when the path and pwd are set to something sane
often times i found myself opening a terminal emulator and editing a file using it's full path, This was exceptionally troublesome when i had set vim's path to contain '**', tl;dr, that was a bad idea, see :h file-searching. The following are snippets:
Modifying dotfiles from shell
conf() { vim -c "set path=$HOME/.config | find $@"; }
Working on a single project (:cd %:p:h | set path=** ) To add arbitrary files from within the root ( :argadd **/*name* ) or ( :find name )
For regular usage i overload the path with everything i could be editing but omit ** ( :set path+=$HOME/Documents/**2,$HOME/.config,$HOME/bin,/srv (,etc) )
cheers again and sorry for rambling. hope someone finds this useful
Good presentation but very annoying music that makes headache!
you go too fast to see what you typed and aren't explaining what you are using and if that other fucntion must be installed.
this is a review not a tutorial. perhaps you need to write review in the video title. i learned what it can do (i guess), but not how to do it.