Skip to content

Commit

Permalink
Also check on BufEnter
Browse files Browse the repository at this point in the history
And move the autocommand into the autoload file.
  • Loading branch information
mg979 committed Mar 7, 2024
1 parent a44d35d commit 27d2e1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions autoload/UltiSnips.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ if exists("b:did_autoload_ultisnips")
endif
let b:did_autoload_ultisnips = 1

" Ensure snippets are loaded for current buffer
au UltiSnips_AutoTrigger FileType,BufEnter * call UltiSnips#CheckFiletype()

" Also import vim as we expect it to be imported in many places.
py3 import vim
py3 from UltiSnips import UltiSnips_Manager
Expand Down
1 change: 0 additions & 1 deletion plugin/UltiSnips.vim
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ augroup UltiSnips_AutoTrigger
if exists('##TextChangedP')
au TextChangedP * call UltiSnips#TrackChange()
endif
au FileType * call UltiSnips#CheckFiletype()
augroup END

call UltiSnips#map_keys#MapKeys()
Expand Down

0 comments on commit 27d2e1b

Please sign in to comment.