I have the one from Josh to source my .tmux.conf when it changes, but also one to disable wrapping in my hosts file. I also have one for a couple of file extensions or types I want to associate with something else, like *.psv which I use as pipe-separated values to use with a plugin called RainbowCSV
@ryank.4983 Жыл бұрын
thanks! wrote an LSP refresh command on save using this tutorial.
@ascourter Жыл бұрын
@@ryank.4983 that's awesome!
@sunsurfr11 ай бұрын
Using your video I have an automated date/time entry in a daily journal file - thank you.
@anrras28 күн бұрын
I have autocmds for toggle the relativenumber in insert mode
@sunsurfr11 ай бұрын
Great video! Clearly explained without any fluff. Subscribed. 👍🏻
@ascourter11 ай бұрын
Thanks!
@ascourter Жыл бұрын
Remember when I said autocommands are powerful? The TermOpen example I covered will put you into insert mode on a failing Neotest, which is probably not what you want. Check out this thread in the neotest repo: github.com/nvim-neotest/neotest/issues/2
@coffeedude Жыл бұрын
Great tutorial! It's great to know the option exists for when the need arises.
@JoshMedeski Жыл бұрын
My favorite autocommand is auto-sourcing my tmux file when I save it!
@ChrisCox-wv7oo Жыл бұрын
I have an autocmd to delete a set of keybinds when I enter the cmdwin, and remap them when I exit it. The keybinds and the cmdwin do not get along so this keeps me from accidentally trying to use them. Another autocmd to refresh the current buffer when I focus it. Useful for when I modify the file from outside nvim. Another autocmd to source my init.lua whenever saved. Another autocmd to highlight on yank. Autocmd is pretty dope.
@ascourter Жыл бұрын
That's a great list! Thanks for sharing.
@RolandHaller Жыл бұрын
I was looking for a highlight on yank autocommand! Thanks
@ascourter Жыл бұрын
You're welcome! Thanks for watching
@mohammedabdulbary1577 Жыл бұрын
A very cool video, thanks a lot
@ascourter Жыл бұрын
Thanks for watching!
@disel920 Жыл бұрын
Cool. Good job.
@ascourter Жыл бұрын
Thank you!
@SumanthLingappa Жыл бұрын
Do autocommands relevant in neovim? We can use lua functions instead, isn’t it?
@ascourter Жыл бұрын
If you want to do something in Neovim automatically then you should be using autocommands. TJ Devries actually wrote the interface for Neovim to use autocommands via the nvim_* API.
@SumanthLingappa Жыл бұрын
@@ascourter Thank you for replying. I saw your full video and understood. Thanks again for the video