I use macvim with YouCompleteMe (YCM), which I recently updated and recompiled. I followed the YCM instructions for OSX. I'm also using iterm2, tmux and zsh, all of which are installed with brew and updated.
YCM autocompletion of variable names and shell functions that are defined in the shell script itself work as intended.
However, with my current setup, YCM will not autocomplete variable names and shell functions from files sourced with
source in this shell script.
I have verified that files were sourced correctly, because the script functions properly.
All files sourced are in the same directory as the sourcing script, and are sourced with relative pathnames with slashes. One file,
init.sh, has no
#! and contains only variables. The second,
functions.sh has a
#! (which isn't really necessary for my use case) and function definitions. No variables are used in specifying the sourced files. So:
source "./init.sh" source "./functions.sh"
I've made sure to
source ~/.vimrc and restart the YCM server after any changes, and verify that YCM logs in my vim session contain no errors, after any change to my files.
How can I get YCM to autocomplete these items?