vim-objc icon indicating copy to clipboard operation
vim-objc copied to clipboard

Fix commentstring and includeexpr aren't set in objc files

Open idbrii opened this issue 4 years ago • 0 comments

Move ftplugin to after directory.

Since we don't set did_ftplugin, the built-in objc.vim (invoked after user files) will overwrite our settings. We either need to set did_ftplugin (and do all the setup ourself) or do our modifications from after/.

I suspect this used to work but vim's runtime files changed to explicitly set these variables. but I haven't checked.

Test Check :verb set commentstring? after loading a .m file in macvim 8.2.1719.

reprovimrc.vim

" Invoke with:
" vim -Nu ~/.vim/reprovimrc.vim -U NONE ~/test.m

" all plugins should work with sensible as a baseline.
let s:plugins = ['sensible']
let s:plugins += ['vim-objc']

set runtimepath-=~/.vim
set runtimepath-=~/.vim/after
set runtimepath-=~/vimfiles
set runtimepath-=~/vimfiles/after
for plugin in s:plugins
    exec "set runtimepath^=~/.vim/bundle/". plugin
    exec "set runtimepath+=~/.vim/bundle/". plugin ."/after"
endfor
set viminfofile=NONE

" When test.m opens, check:
:verb set commentstring?

idbrii avatar Feb 19 '21 22:02 idbrii