hdb3
hdb3

Reputation: 259

problems installing ghc-modvim

Installed as directed and I get error message on starting vi:

Error detected while processing function ghcmod#util#check_version:
line    2:
E117: Unknown function: vimproc#system
line    3:
E117: Unknown function: vimproc#get_last_errmsg
E116: Invalid arguments for function matchlist(vimproc#get_last_errmsg(), 'version \(\d\+\)\.\(\d\+\)\.\(\d\+\)')
E15: Invalid expression: matchlist(vimproc#get_last_errmsg(), 'version \(\d\+\)\.\(\d\+\)\.\(\d\+\)')
line    4:
E121: Undefined variable: l:m
E15: Invalid expression: l:m[1 : 3]
line    5:
E121: Undefined variable: s:ghc_mod_version
E116: Invalid arguments for function map
line    9:
E121: Undefined variable: s:ghc_mod_version
E15: Invalid expression: a:version[l:i] > s:ghc_mod_version[l:i]
E121: Undefined variable: s:ghc_mod_version
E15: Invalid expression: a:version[l:i] > s:ghc_mod_version[l:i]
E121: Undefined variable: s:ghc_mod_version
E15: Invalid expression: a:version[l:i] > s:ghc_mod_version[l:i]
Press ENTER or type command to continue

And in response to :GhcModCheck I get:

function ghcmod#command#make..ghcmod#make..<SNR>25_plineopen2, line 2 Vim(let):E117:     Unknown function: vimproc#plineopen2
Error detected while processing function ghcmod#command#make:
line    7:
E714: List required

My environment is Ubuntu 13.4 and I have ghc-mod working already, in Sublime text.
ftplugin is present and enabled (filetype detection:ON plugin:ON indent:ON).

I built vimplugin from git and copied the files as descrbed to .vim (it looks like the only actual compile was to build vimproc_unix.so). And then I download ghcmod-vim-1.0.0.zip and unzip its contents into .vim (i.e. creating autoload and plugin directories under .vim.

Upvotes: 2

Views: 1636

Answers (2)

Duy Nguyen
Duy Nguyen

Reputation: 1

I have installed vimproc and install https://github.com/Shougo/vimproc.vim.git cd vimproc make

then try to install new ghc-mod up to 1.10 or higher

Done.

Upvotes: 0

hdb3
hdb3

Reputation: 259

This answer courtesy of the project author eagletmt, though any corruption in transport is of course my responsibility:

BTW the issue is not in ghc-modvim - it is in the install instructions for vimproc.

As eagletmt says:

"Maybe you failed to install vimproc. If you aren't using plugin ('runtimepath') management tools such as pathogen and neobundle, the directory structure should be like follows."

/home/eagletmt/.vim
|-- after
|   `-- ftplugin
|       `-- haskell
|           `-- ghcmod.vim
|-- autoload
|   |-- ghcmod
|   |   |-- async.vim
|   |   |-- command.vim
|   |   |-- type.vim
|   |   `-- util.vim
|   |-- ghcmod.vim
|   |-- vimproc
|   |   |-- filepath.vim
|   |   |-- lexer.vim
|   |   |-- parser.vim
|   |   `-- util.vim
|   |-- vimproc.vim
|   `-- vimproc_unix.so
|-- doc
|   |-- ghcmod.txt
|   `-- vimproc.txt
`-- plugin
`-- vimproc.vim

8 directories, 15 files

Which worked fine - the problem is the vimproc install instructions - they say copy autoload/* and plugin/* files to your 'runtimepath' directory. When it should say 'copy autoload/ and plugin/ directories... And possibly doc/, too...)

Upvotes: 1

Related Questions