which jshint returns
which vim and
which gvim return
/usr/bin/vim and /usr/bin/gvim` respectively.
If I open a JS file from
myUser‘s terminal, Syntastic works fine – :SyntasticInfo returns
However, if I open the same file with GVim, JSHint is not loaded.
This makes sense given that if I run
:!which jshint from vim in the terminal, I get a path and if I run it from GVim I get
shell returned 1.
I poked around and noticed that JsHint is not loaded in command line Vim if I
sudo su root and then run
vim. Conversely, JSHint is loaded if I open GVim as my current user
gksudo -u uname -l "gvim".
I’m assuming this means that I somehow need to get
/home/myUser/local/bin/jshint on my root
$PATH, but I don’t know if this is possible or recommended.
PATH is not a global shell variable that you should expect to be the same for all users. You could make it so but that would be pointless: if you want some program to be usable by every user, install it as root.
And… root is used for administrative tasks, not actual work (unless you are a sysadmin but you are not), so don’t work as root.