Understanding VimClojure startup errors on new installation

117 views
Skip to first unread message

Noah Zucker

unread,
Jul 2, 2012, 9:23:24 AM7/2/12
to vimcl...@googlegroups.com
(Cross posted from Stack Overflow at the suggestion of Meikel Brandmeyer)

Vim version: 7.0.237
OS: CenOS 5.5

I am attempting to get vimclojure working for the first time. I am fairly new to vim plugins.  I'm having some problems (error messages below) and am looking for some hints at the least. Not much idea where to start.

I am trying to following the steps from How I tamed VimClojure as well as inspecting VimClojure-Easy

When I start vim, I am presented with the following error (occurs in both VimClojure 2.3.1 and 2.3.3, the later below):

    Error detected while processing /home/nzucker/.vim/bundle/vimclojure/autoload/vimclojure.vim:
    line  249:
    E475: Invalid argument: 1
    line  273:
    E475: Invalid argument: 2
    line  343:
    E475: Invalid argument: 1
    line  367:
    E475: Invalid argument: 2
    line  407:
    E475: Invalid argument: 2
    line  413:
    E475: Invalid argument: 7
    line  730:
    E475: Invalid argument: 1
    line  747:
    E475: Invalid argument: 2
    line  823:
    E475: Invalid argument: 8
    Press ENTER or type command to continue

(First error location: vimclojure.vim:249)

The plugin seems to partially work however. I have syntax highlighting. When I attempt to open a REPL with the <Leader>sr command, I get the following:

    Error detected while processing function vimclojure#ProtectedPlug..vimclojure#ReportError..6..3:
    line    1:
    E716: Key not present in Dictionary: _buffer
    E15: Invalid expression: "buffer! " . self._buffer
    Press ENTER or type command to continue

For what it's worth my (ugly) `.vimrc` is here:
https://github.com/noahlz/dotfiles/commit/d0df9d0c5500e1803981b959c7fdbf88114000c6


NOTE:
I am going to do the standard troubleshooting steps, i.e. try upgrading to latest vim, remove everything from my .vimrc and add back features one-by-one until I get the error, but I'm also looking for some guidance/resources on interpreting and correcting these sorts of error messages, should I encounter them again.

Meikel Brandmeyer

unread,
Jul 3, 2012, 1:58:52 AM7/3/12
to vimcl...@googlegroups.com
Hi,

I checked the line numbers from your error message and it seems like Vim has trouble to redefine a dictionary function, when the dictionary already contains a function of that name. Could you please try a newer version of Vim? Unfortunately I don't have such an old version of Vim around for testing. If you could try a newer version of Vim and report the results that would be great.

The repl problem looks like a follow-up issue: Since the dictionary function is not properly defined, the repl setup is not done correctly.

Regarding error message: I can't really give a hint. Sometimes it is relatively clear what's going on. Sometimes it's not. I try to give reasonable hints for anything which stems from the inner workings of VimClojure. In your case, I only have a suspicion based on what happens around the line numbers in your version. But that is just a guess. Vim is not always very helpful with its messages. The description of E475 is especially enlightening. :-P

Kind regards
Meikel

Wolodja Wentland

unread,
Jul 3, 2012, 9:24:55 AM7/3/12
to vimcl...@googlegroups.com
On Mon, Jul 02, 2012 at 06:23 -0700, Noah Zucker wrote:
> (Cross posted [1]from Stack Overflow at the suggestion of Meikel
> Brandmeyer)
>
> Vim version: 7.0.237
> OS: CenOS 5.5

Both CentOS and vim are quite old and I would strongly recommend to upgrade
both. It might be that your problems are due to this.

> I am attempting to get vimclojure working for the first time. I am fairly
> new to vim plugins.  I'm having some problems (error messages below) and
> am looking for some hints at the least. Not much idea where to start.

I see that you decided to use pathogen and I don't want to confuse you even
more, but I strongly recommend to use either vim-addon-manager [0] or vundle
[1] for plugin management. This is, naturally, not absolutely necessary, but I
just prefer them as they provide a more high-level approach to plugin
management than pathogen.

> I am trying to following the steps from [2]How I tamed VimClojure as well
> as inspecting [3]VimClojure-Easy

I see that both posts differ slightly in the way in which the nailgun server
is started. I personally use lein-tarsier and never had the need for anything
like:

--- snip ---
" Start vimclojure nailgun server (uses screen.vim to manage lifetime)
nmap <silent> <Leader>sc :execute "ScreenShell java -cp \"" . classpath . sep . vimclojureRoot . "/lib/*" . "\" vimclojure.nailgun.NGServer 127.0.0.1" <cr>
" Start a generic Clojure repl (uses screen.vim)
nmap <silent> <Leader>sC :execute "ScreenShell java -cp \"" . classpath . "\" clojure.main" <cr>
--- snip ---

I am not entirely sure how the approach above plays with dependencies that are
handled by leiningen and are found in the project's lib/ directory. I don't
have the impression that those are added to the CLASSPATH, which would
constitute a major difference between this approach and lein-tarsier. In
short: Use lein-tarsier (it works).
--
Wolodja <bab...@gmail.com>

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc

Dave Ray

unread,
Jul 3, 2012, 9:38:57 AM7/3/12
to vimcl...@googlegroups.com
vimclojure-easy explicitly recommends lein-tarsier. The other method is older, more involved and explicitly redirects the reader to vimclojure-easy in the first sentence.  

Dave

noahlz

unread,
Jul 13, 2012, 12:08:32 PM7/13/12
to vimcl...@googlegroups.com
Thank you for the replies.

Meikel Brandmeyer

unread,
Jul 14, 2012, 9:08:35 AM7/14/12
to vimcl...@googlegroups.com
Hi,

Am 13.07.2012 um 18:08 schrieb noahlz:

> Thank you for the replies.

Did you find a solution?

Meikel

signature.asc

noahlz

unread,
Jul 22, 2012, 11:10:01 PM7/22/12
to vimcl...@googlegroups.com
Hello! My solution for now is "just use IntelliJ on my CentOS machine (with vim keybindings)" which is good enough. It seems that upgrading vim, etc. would require upgrading the OS -> full re-install which I can't be bothered with. :)

However, I'm setting up on an Ubuntu laptop and it seems to be going ok so far (interestingly a google search for a small issue I'm having actually took me back to this thread!). I'll let you know final results if when I get there.

noahlz

unread,
Jul 23, 2012, 12:23:15 AM7/23/12
to vimcl...@googlegroups.com
Clojure
user=> (println "hello world!")
hello world!
nil

All is working! Thanks for the help.

Jeb Beich

unread,
Jul 23, 2012, 11:24:02 AM7/23/12
to vimcl...@googlegroups.com
I've setup vim 7.3 on a few centos 5.5 boxes, by compiling from source. So I can verify that it is possible w/o upgrading everything. It was a bit of a pain, but it didn't take too long.
Reply all
Reply to author
Forward
0 new messages