The Best Oil.nvim Configuration

  Рет қаралды 14,961

Andrew Courter

Andrew Courter

Күн бұрын

Пікірлер
@ascourter
@ascourter 7 ай бұрын
What other config do you use with Oil.nvim?
@aquepaique
@aquepaique 7 ай бұрын
I like using floating window oil, because you can see the file path in the float window title, so helpful.
@ascourter
@ascourter 7 ай бұрын
Oh nice! I'll have to give this a try.
@ascourter
@ascourter 7 ай бұрын
Do you have any config got the float window too or do you use the defaults?
@vladanisov1689
@vladanisov1689 7 ай бұрын
@@ascourter I have this: float = { padding = 5 } and then when you call the Oil command you just pass in the float flag like so :Oil --float
@raenastra
@raenastra 7 ай бұрын
the natural_order option affects files with numbers. rather than sorting numbers alphabetically, it sorts them numerically. for example, file9.txt and file10.txt will be sorted treating 9 less than 10 (rather than the string "9" being greater than "1")
@ascourter
@ascourter 7 ай бұрын
Ah that makes a lot more sense. Thanks for digging into that and sharing!
@lingtoone3719
@lingtoone3719 7 ай бұрын
Thanks for doing this video. Recently struggling with neovim
@ascourter
@ascourter 7 ай бұрын
You're welcome! Glad I helped. Let me know if there's something I can cover to help ya!
@Majiy00
@Majiy00 7 ай бұрын
Great video, love oil.nvim!!!
@ascourter
@ascourter 7 ай бұрын
Thanks! I definitely love it as well
@naranyala_dev
@naranyala_dev 7 ай бұрын
definitely worth to try, thank you
@ascourter
@ascourter 7 ай бұрын
Yup! Thanks for watching
@KevinNitro
@KevinNitro 7 ай бұрын
I think natural sort like you have files ["1.txt", "5.txt", "10.txt", "11.txt", "40.txt"] Without it (false), it will sort to 1, 10, 11, 40, 5. Because it will compare the each first character With the natural sorting, it will sort like what we expect it to be.
@ascourter
@ascourter 7 ай бұрын
I definitely like that better. Thanks for sharing!
@prashlovessamosa
@prashlovessamosa 7 ай бұрын
Thanks for sharing.
@ascourter
@ascourter 7 ай бұрын
Thanks for watching!
@Salloom99
@Salloom99 7 ай бұрын
If you're annoyed by the extra space at the top of the dashboard page you can reduce some spaces in the line 122 logo = string.rep(" ", 8) .. logo .. " " this one --^ I figured out this earlier and thought of sharing it. thx for the vid btw, cant wait for the next one ❤
@ascourter
@ascourter 7 ай бұрын
Nice! Thanks for sharing this. Do you put this in the config function or somewhere else?
@vulbyte
@vulbyte 7 ай бұрын
solid clean video, i just wanna add you should totally do a vim tips video because that ^v into g, ^A felt like a fighting game combo and i will 100% be doing that just because how it feels
@ascourter
@ascourter 7 ай бұрын
Haha I will definitely put that into another tips video
@cody_codes_youtube
@cody_codes_youtube 7 ай бұрын
FAST CODY NOTIFICATION SQUAD
@ascourter
@ascourter 7 ай бұрын
Lightning Fast!
@ItsMorze
@ItsMorze 3 ай бұрын
Cool config! I actually changed the is_hidden_file fuction instead to make all the . Files visable except for .., .git and .DS_Store, and then if i do need to see the .git folder or something like that i can just toggle hidden files with g.
@rodelias9378
@rodelias9378 7 ай бұрын
Thank you!!
@ascourter
@ascourter 7 ай бұрын
Thanks for watching!
@MohammadLsk
@MohammadLsk 7 ай бұрын
Awesome. Thanks
@ascourter
@ascourter 7 ай бұрын
Thanks for watching!
@MohammadLsk
@MohammadLsk 7 ай бұрын
Also, pressing 'g' followed by a backslash to toggle trash is handy
@ascourter
@ascourter 7 ай бұрын
Yeah that is quite handy! Thanks for mentioning that.
@linkarzu
@linkarzu 7 ай бұрын
Wonderful video, thank you very much, now I don’t have to figure all of this out from scratch. I have a question, do you use neo-tree.nvim, or completely rely on oil.nvim? I’m used to neo-tree (I know, the vim overlords will come after me) but I don’t like how it renames and moves files around. So wondering if completely replace it or use both.
@ascourter
@ascourter 7 ай бұрын
Thanks! Glad I could help. Haha the vim overlords are definitely going to come knocking... :D I personally rely solely on oil.nvim but when I am working with others I will have neo-tree.nvim open so they can see more easily where we are in the file system. Here's a link to the config I use: github.com/exosyphon/nvim/blob/525694635d0b16f7d461f516b5c8b1a95381c861/lua/plugins.lua#L11
@linkarzu
@linkarzu 7 ай бұрын
@@ascourter appreciate the response. Will try to use oil exclusively, at least for a month, and see how it feels.
@艾曦-e4g
@艾曦-e4g 7 ай бұрын
Coooool config. IMO, lots of navigator user map ctrl+h/j/l/m to move to pane in neovim and tmux. It conflicts with oil buffer keymaps. Do you know how to remap these keys in oil buffer? Thanks a lot!
@ascourter
@ascourter 7 ай бұрын
I think there might be a bug in Oil.nvim to be able to remap them. But here's an example to at least disable them. keymaps = { [""] = false, [""] = false, [""] = false, ["q"] = "actions.close", },
@艾曦-e4g
@艾曦-e4g 7 ай бұрын
@@ascourter coool thank you! and oil.nvim cannot change in lazyvim using `keys = `.
@MohammadLsk
@MohammadLsk 6 ай бұрын
Hi, is there any way to use telescope to open the file explorer (oil) in a directory? I mean navigating using both telescope and oil. Also, do you have a discord channel or some social group where I can ask questions?
@MohammadLsk
@MohammadLsk 6 ай бұрын
i set up this vim.keymap.set('n', '-', "Telescope fd find_command=fd,-t=d ")
@ascourter
@ascourter 6 ай бұрын
@@MohammadLsk good question. I don't know of a way to combine telescope and oil. I'd guess you could create a telescope extension that uses oil. I don't have a discord yet. It's something I should create soon. You might join Josh Medeski's discord for now: discord.com/invite/qQEARWhZ
@MohammadLsk
@MohammadLsk 6 ай бұрын
@@ascourter I appreciate your response. Your content and guidance have been super helpful. I've set up this key mapping for now: vim.keymap.set('n', '-', "Telescope fd find_command=fd,-t=d ")
7 ай бұрын
Open with “:Oil -float” in a cool floating window
@ascourter
@ascourter 7 ай бұрын
Love it. Did you customize the window at all?
7 ай бұрын
@@ascourter yes, there is a float-option (same level as view-options): float = { -- Padding around the floating window padding = 2, max_width = 90, max_height = 0, -- border = "rounded", win_options = { winblend = 0, },
@kalanzi1000
@kalanzi1000 7 ай бұрын
Can you please show us how one can get to see images like jpegs, pngs in neovim using maybe something like telescope
@ascourter
@ascourter 7 ай бұрын
I'll bring this to the top of my list and see what's possible
@kalanzi1000
@kalanzi1000 7 ай бұрын
@@ascourter thank you so much,can't wait
@monoastro
@monoastro 5 ай бұрын
what was that floating command line?
@ascourter
@ascourter 5 ай бұрын
@@monoastro check out my video on the most requested plugin. I'm short, that's noice.nvim
@damilolaowolabi9148
@damilolaowolabi9148 7 ай бұрын
Can you show us your tmux settings and theme?
@ascourter
@ascourter 7 ай бұрын
I sure can! I have a video from awhile ago on setting up tmux but I really need to create an updated one with my latest theme and such. Thanks for requesting this!
@ascourter
@ascourter 7 ай бұрын
Here also is a link to my tmux config github.com/exosyphon/dotfiles/blob/5d6e87a583ff1ac9d244daed26d379627cd04592/.tmux.conf#L1
@rossvold
@rossvold 7 ай бұрын
I still use netrw for browsing, and i use the oil modal when i need to edit files. It's 10000x better than netrw for that.
@ascourter
@ascourter 7 ай бұрын
Nice!
@ertwro
@ertwro 6 ай бұрын
I’ve been using mini.files (more and more of the mini plugins, really), which I find less visually annoying.
@ascourter
@ascourter 6 ай бұрын
It is on my list to check out all the mini nvim plugins. Seems like they are growing in popularity and have a lot of great features. Let me know if you think I should focus on a specific one first.
@insanity0312
@insanity0312 6 ай бұрын
you don't need gx plugins with neovim@^0.10.0
@ascourter
@ascourter 6 ай бұрын
@@insanity0312 thanks, I'll try removing it and verify nothing breaks
@ascourter
@ascourter 6 ай бұрын
Confirmed! I was able to remove gx.nvim and nothing broke with opening links. Thanks for probing me on this!
@insanity0312
@insanity0312 6 ай бұрын
@@ascourter Thank you for the video! Cheers.
@hanamichi-sakuragi
@hanamichi-sakuragi 6 ай бұрын
Any plans to add a flake.nix?
@ascourter
@ascourter 6 ай бұрын
Haha I'll need to get up to speed on Nix first. Definitely on my list!
@RogasTV
@RogasTV 7 ай бұрын
mini.files
@ascourter
@ascourter 7 ай бұрын
This is on my list to try soon!
How to Level Up Your Vim
6:46
Andrew Courter
Рет қаралды 3,2 М.
Why oil.nvim is the best directory plugin
9:12
Andrew Courter
Рет қаралды 34 М.
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Which is Better Flash.nvim OR Leap.nvim?
11:35
Andrew Courter
Рет қаралды 14 М.
My Neovim configuration in 2024
20:48
Andrew Courter
Рет қаралды 19 М.
Neovim: Replacing Telescope with FZF-LUA
6:56
Ben Frain
Рет қаралды 14 М.
Neovim Is a Waste Of Time, And I LOVE It | Prime Reacts
17:00
ThePrimeTime
Рет қаралды 98 М.
LSP in Neovim (with like 3 lines of code)
10:40
TJ DeVries
Рет қаралды 29 М.
Quickfix can do so much!
6:58
TJ DeVries
Рет қаралды 27 М.
The Ultimate Database Control. Right WITHIN NEOVIM
9:35
DevOps Toolbox
Рет қаралды 64 М.
This Zsh config is perhaps my favorite one yet.
17:24
Dreams of Autonomy
Рет қаралды 304 М.
Is Hop.nvim better than Flash.nvim?
16:04
Andrew Courter
Рет қаралды 9 М.
Ultimate Quickfix List Guide
10:15
Andrew Courter
Рет қаралды 28 М.