]> git.rmz.io Git - dotfiles.git/commitdiff
vim: don't reset all autocommands on sourcing vimrc
authorSamir Benmendil <me@rmz.io>
Mon, 10 Apr 2023 22:15:18 +0000 (23:15 +0100)
committerSamir Benmendil <me@rmz.io>
Sun, 17 Dec 2023 17:36:18 +0000 (17:36 +0000)
I'm pretty sure this was added to make sure to not set autocommands that
weren't reset in groups every time. By now, I hope that all autocommands
are reset within their own groups, or at least will be when I'm through
reviewing the vimrc to use with nvim.

Furthermore, this particular reset was unsetting the autocommands set by
nvim's init.lua and specifically lazy.nvim's plugin loading
autocommands. It lead to much confusion when trying to have both
init.lua and vimrc.

vim/vimrc

index 436ab89e6f34ea4c3f97bfe66b46cdbe2b803afb..2f0a7ca67a91004a32f72207d6ede9133fa07df8 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -6,9 +6,6 @@ set runtimepath ^=$XDG_CONFIG_HOME/vim
 set runtimepath +=$XDG_CONFIG_HOME/vim/after
 
 " plugins {{{1
-" remove all autocommands
-autocmd!
-
 call plug#begin('$XDG_DATA_HOME/vim')
 " This does not update vim-plug, use PlugUpgrade instead
 Plug 'junegunn/vim-plug'