Skip to content

Commit

Permalink
autocmd: replace BufRead -> BufEnter
Browse files Browse the repository at this point in the history
This PR replaces the `BufRead` autocmd with `BufEnter.
Closes aymericbeaumet#14.
See me comments on that issue.

In addition to `BufEnter`, I also tried several other autocmd events:
- `BufWinEnter`
- `BufEnter`
- `BufNew`
- `BufAdd`
- `BufWinEnter`
All of these other attempts failed with various incorrect behavior or errors (some of which originated from other neovim plugins that I have installed).
  • Loading branch information
Jasha10 authored May 20, 2023
1 parent fec2d1a commit 52e64d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/symlink.vim
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ endfunction

augroup symlink_plugin
autocmd!
autocmd BufRead * nested call s:on_buf_read(expand('<afile>'))
autocmd BufEnter * nested call s:on_buf_read(expand('<afile>'))
augroup END

0 comments on commit 52e64d1

Please sign in to comment.