I am using vim-plug
to load many plugins into MacVim
running through Rosetta on MacBook Air M1. One of the plugins is UltiSnips
by SirVer.
The problem is that UltiSnips does load (checked via :PlugStatus
) but doesn't work by default whenever I run vim/MacVim through terminal or .app
application whereas all other plugins do.
For example : Let's say I open a document named test.tex
in MacVim through terminal or the application. I have predefined snippet called notes
in UltiSnips which doesn't work if I immediately use it. Now, if I run in command mode :UltiSnipsEdit
then it is not recognized which leads me to believe that UltiSnips is not loaded/working (so I use :PlugStatus
which tells me it is loaded but not working whereas others are loaded and working e.g. vimtex
plugin runs perfectly) but strangely enough if I run :PlugInstall
(whereupon UltiSnips and other snippets are shown to be Already installed
) and then come back to my document then the snippets from UltiSnips do work and I can also use :UltiSnipsEdit
.
I have already tried restarting my system and running Terminal
under Rosetta to no avail.
Can someone please help me figure out how to make UltiSnips work by default without doing the :PlugInstall
thing?
My ~/.gvimrc
:- (also tried putting full path to plugins in the call but didn't make any difference)
call plug#begin()
Plug 'SirVer/ultisnips'
let g:UltiSnipsExpandTrigger='<tab>'
let g:UltiSnipsJumpForwardTrigger='<tab>'
let g:UltiSnipsJumpBackwardTrigger='<s-tab>'
let g:UltiSnipsEditSplit='tabdo'
let g:UltiSnipsSnippetDirectories=['/home-path-directory/.vim/plugged/mysnippets/']
Plug 'honza/vim-snippets'
Plug 'arcticicestudio/nord-vim'
Plug 'KeitaNakamura/tex-conceal.vim', {'for': 'tex'}
Plug 'lervag/vimtex'
let g:tex_flavor='latex'
let g:vimtex_view_method='skim'
let g:vimtex_quickfix_mode=0
set conceallevel=1
let g:tex_conceal='abdmg'
let g:vimtex_compiler_latexmk = {
\ 'build_dir' : 'build',
\ 'executable' : 'latexmk',
\ 'options' : [
\ '-xelatex',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],
\}
call plug#end()
colorscheme nord
setlocal spell
set spelllang=en_us
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
:set ft?
to confirm.) Also note that you should use~/.vimrc
and not~/.gvimrc
for all these settings! The gvimrc file is mainly for settings that only affect the GUI, such as which font to use, etc. They're loaded at different times, so this might matter.g:UltiSnipsSnippetDirectories
setting is correct... Why do you feel you need to override that? Try dropping it to see if it helps.~/.gvimrc
instead of~/.vimrc
. I didn't know that gvimrc is mainly for GUI and thought that it will affectMacVim
in a similar manner as vimrc does. Rest everything is fine, no problem with file type or the directories. Can you please put this as an answer so that I can accept it? Thanks.