Last active
August 17, 2019 10:19
-
-
Save qstrahl/08a399c4ffb5cef130799414b145d217 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" This is a very simple implementation of automatic :augroup - | |
" that is, whenever a vim script is sourced, that file will | |
" automatically default to a group name based on the path. | |
" It turns out this doesn't really break anything; scripts are | |
" still able to define their own augroups, it's just that they | |
" can't clobber other scripts' autocmds with a careless :au! | |
augroup init | |
autocmd! init SourceCmd * exe 'augroup' expand('<afile>:~:r') | source <afile> | exe 'augroup end' | |
augroup end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment