Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix commentstring and includeexpr aren't set in objc files #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

idbrii
Copy link

@idbrii idbrii commented Feb 19, 2021

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?

Fix commentstring and includeexpr aren't set in objc files.

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.

Test
Check `:verb set commentstring?` after loading a .m file in macvim
8.2.1719.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant