spf13 / spf13-vim

The ultimate vim distribution
http://vim.spf13.com
Apache License 2.0
15.55k stars 3.65k forks source link

vimproc#get_command_name: File "ghc-mod" is not found. #557

Open mrt181 opened 10 years ago

mrt181 commented 10 years ago

I have installed spf13 vim, installed ghc-mod with cabal and compiled vimproc for cygwin.

I am running on Windows 7 64 with cygwin64 1.7.28.

When I open a haskell source file I get this error message: Error executing "function ghcmod#util#check_version..vimproc#system..139_system..vimproc#pgroup_open..139_pgroup_open..vimproc#plineopen3..139_plineopen..139_convert_args..vimproc#get_command_name": Line 15: E605: Not caught exception: vimproc#get_command_name: File "ghc-mod" is not found. Error executing "function ghcmod#util#check_version..vimproc#system..139_system..vimproc#pgroup_open..139_pgroup_open..vimproc#plineopen3..139_plineopen": Line 52: E170: Missing :endfor Error executing "function ghcmod#util#check_version": Line 2: E171: Missing :endif Error executing "/home/r892107/.spf13-vim-3/.vim/bundle/ghcmod-vim/after/ftplugin/haskell/ghcmod.vim": Line 15: E171: Missing :endif Error executing "function 26_LoadFTPlugin": Line 17: E170: Missing :endfor

johntyree commented 10 years ago

Where did you install ghc-mod to? what is the output of where ghc-mod on the command line? What is the output of :!echo %PATH% in vim?

mrt181 commented 10 years ago

this is the output

$ where ghc-mod
C:\Users\martin\AppData\Roaming\cabal\bin\ghc-mod.exe

In vim

:!echo %PATH%
E499: Empty directory name for % or #, only works with ":p:h"
:!echo $PATH
/usr/local/bin:/usr/bin:/c/Users/martin/AppData/Roaming/cabal/bin:/c/Program Files (x86)/Haskell/bin:/c/Program Files (x86)/Haskell Platform/2013.2.0.0/lib/extralibs/bin:/c/Program Files (x86)/Haskell Platform/2013.2.0.0/bin:/c/Oracle/Client/11.2.0.3/bin:/c/Program Files/Common Files/Microsoft Shared/Microsoft Online Services:/c/Program Files (x86)/Common Files/Microsoft Shared/Microsoft Online Services:/c/Program Files (x86)/Java/jdk1.6.0/bin:/c/Oracle/Client/11.2.0.3_64/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Program Files (x86)/Microsoft Application Virtualization Client:/c/Program Files (x86)/Enterprise Vault/EVClient:/c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0:/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/VSShell/Common7/IDE:/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/c/Program Files (x86)/Microsoft SQL Server/100/DTS/Binn:/c/TIBCO/TIBRV/BIN:/e/apache-ant-1.8.4/bin:/c/Program Files (x86)/Java/jdk1.6.0/bin:/e/apache-maven-3.1.1/bin:/c/Program Files (x86)/GNU/GnuPG/pub:/c/Program Files (x86)/TIBCO/TIBRV/bin:/c/Program Files (x86)/Calibre2:/e/sbt/bin:/c/ZeroMQ/bin:/c/Program Files (x86)/Haskell Platform/2013.2.0.0/mingw/bin:/e/0MQ/jzmq/lib:/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files/TortoiseGit/bin:/usr/bin:/
mrt181 commented 10 years ago

Solved. This was the problem. Setting fstab to

none / cygdrive binary,posix=0,user 0 0

removes the need to enter a prefix when trying to access the mounted virtual drives. You can than navigate around your drives like that

$ cd /c/Users
$ pwd
/c/Users

he default setting in cygwin is

none /cygdrive cygdrive binary,posix=0,user 0 0

Reverting back to the default setting you now need to do this to navigate around

$ cd /cygdrive/c/Users
$ pwd
/cygdrive/c/Users

With the prefix vimproc works again. Thank you see also: https://github.com/eagletmt/ghcmod-vim/issues/42#issuecomment-34744131