Autocommands in Neovim

  Рет қаралды 7,129

Andrew Courter

Andrew Courter

Күн бұрын

Пікірлер: 25
@ascourter
@ascourter Жыл бұрын
What autocommands do you use?
@IainSimmons
@IainSimmons Жыл бұрын
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
@ryank.4983 Жыл бұрын
thanks! wrote an LSP refresh command on save using this tutorial.
@ascourter
@ascourter Жыл бұрын
@@ryank.4983 that's awesome!
@sunsurfr
@sunsurfr 11 ай бұрын
Using your video I have an automated date/time entry in a daily journal file - thank you.
@anrras
@anrras 28 күн бұрын
I have autocmds for toggle the relativenumber in insert mode
@sunsurfr
@sunsurfr 11 ай бұрын
Great video! Clearly explained without any fluff. Subscribed. 👍🏻
@ascourter
@ascourter 11 ай бұрын
Thanks!
@ascourter
@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
@coffeedude Жыл бұрын
Great tutorial! It's great to know the option exists for when the need arises.
@JoshMedeski
@JoshMedeski Жыл бұрын
My favorite autocommand is auto-sourcing my tmux file when I save it!
@ChrisCox-wv7oo
@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
@ascourter Жыл бұрын
That's a great list! Thanks for sharing.
@RolandHaller
@RolandHaller Жыл бұрын
I was looking for a highlight on yank autocommand! Thanks
@ascourter
@ascourter Жыл бұрын
You're welcome! Thanks for watching
@mohammedabdulbary1577
@mohammedabdulbary1577 Жыл бұрын
A very cool video, thanks a lot
@ascourter
@ascourter Жыл бұрын
Thanks for watching!
@disel920
@disel920 Жыл бұрын
Cool. Good job.
@ascourter
@ascourter Жыл бұрын
Thank you!
@SumanthLingappa
@SumanthLingappa Жыл бұрын
Do autocommands relevant in neovim? We can use lua functions instead, isn’t it?
@ascourter
@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
@SumanthLingappa Жыл бұрын
@@ascourter Thank you for replying. I saw your full video and understood. Thanks again for the video
@pascalallau
@pascalallau Жыл бұрын
Good job as usual ! keep it up
@ascourter
@ascourter Жыл бұрын
Thank you!
LSP Basics in Neovim
4:13
Andrew Courter
Рет қаралды 18 М.
Wrapping your favorite CLI in neovim
26:15
senkwich
Рет қаралды 10 М.
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
Which is Better Flash.nvim OR Leap.nvim?
11:35
Andrew Courter
Рет қаралды 14 М.
Render Images in Neovim & tmux
14:51
Andrew Courter
Рет қаралды 5 М.
Floating toggle-able terminal in Neovim in 50 lines of Lua
11:09
Introducing Octohub.nvim + VimConf24 Updates
17:03
Abhishek Keshri
Рет қаралды 1,2 М.
Code Formatting made easy
9:47
TJ DeVries
Рет қаралды 22 М.
Is Hop.nvim better than Flash.nvim?
16:04
Andrew Courter
Рет қаралды 9 М.
DONT use Neovim!! (in these scenarios)
8:56
typecraft
Рет қаралды 53 М.
Getting Started with Tmux
19:26
Andrew Courter
Рет қаралды 3 М.
C++ Super Optimization: 1000X Faster
15:33
Dave's Garage
Рет қаралды 332 М.
The Holy Grail of Neovim Git Integrations
13:28
DevOps Toolbox
Рет қаралды 46 М.
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН