Command T not working on fairly fresh MacVim installation

  1. anonymous

    Hi all

    I recently installed the command t plugin but I must have done something wrong because the plugin doesn't seem to activate at all.

    When I try to activate it with :t I get the error message "E14: Invalid address"

    I use pathogen and I believe installed the plugin and built the C extension exactly as detailed in the doc.

    I'd be so grateful if someone could help me out with this.

    Some details...

    My vimrc:

      pathogen#helptags()
      pathogen#runtime_append_all_bundles()
    
      syntax on
      filetype plugin indent on
      set tabstop=2
      set smarttab
      set shiftwidth=2
      set autoindent
      set expandtab
    

    Output of 'vim --version' :

    VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Aug 10 2010 22:09:22)
    Included patches: 1-108
    Compiled by stripes@il0204d-dhcp43.apple.com
    Normal version without GUI.  Features included (+) or not (-):
    -arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent 
    -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
    +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic 
    -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path 
    +float +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand 
    +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap 
    +menu +mksession +modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm 
    -mouse_jsbterm -mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte 
    +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript 
    +printer -profile -python +quickfix +reltime -rightleft -ruby +scrollbind 
    -signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary 
    +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
     -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
    +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
     -xterm_clipboard -xterm_save 
       system vimrc file: "$VIM/vimrc"
         user vimrc file: "$HOME/.vimrc"
          user exrc file: "$HOME/.exrc"
      fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H     -arch armv7 -arch i386 -arch x86_64 -g -Os -pipe -mdynamic-no-pic        
    Linking: gcc   -arch armv7 -arch i386 -arch x86_64             -o vim       -lm  -lncurses      

    Output from 'rake make' :

    rake make
    (in /Users/mon/.vim/bundle/command-t)
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
    checking for ruby.h... yes
    creating Makefile
    gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -DHAVE_RUBY_H  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common   -std=c99 -Wall -Wextra -Wno-unused-parameter -c ext.c
    gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -DHAVE_RUBY_H  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common   -std=c99 -Wall -Wextra -Wno-unused-parameter -c match.c
    gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -DHAVE_RUBY_H  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common   -std=c99 -Wall -Wextra -Wno-unused-parameter -c matcher.c
    cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o ext.bundle ext.o match.o matcher.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64     -lruby  -lpthread -ldl
  2. Greg Hurrell

    Rather odd, as your vim --version output clearly indicates that your Vim wasn't compiled with Ruby support (ie. the -ruby).

    Every build of MacVim I've ever tried has had Ruby support, which you can see as +ruby in the :version output and also see -framework Ruby in the linking flags, something which your output omits.

    I'm afraid Command-T can't work unless your Vim was compiled with Ruby support.

  3. anonymous

    Thanks for the reply- I guess I must have just scanned and seen the word ruby and thought it was ok.

    I am fairly sure that I tried to compile with Ruby support, but something didn't go according to plan. I'll try it again.

    Thanks again :)

  4. anonymous

    OK I grabbed the version of MacVim from here http://code.google.com/p/macvim/

    I just dropped it into my /Applications directory.

    I get the same thing...

    Incidentally I discovered with the old MacVim and this most recent one that :CommandT works but :t doesn't

    So the plugin seems usable but :t doesn't work. I worry that I've messed up some configuration, though I have installed very little and my vimrc remains as above.

    The the other plugins I have installed are nerdtree, vim.rails and snipmate.

    Can you think of anything that would allow :CommandT to work but prevent :t from working?

    Thank you again for the help and the excellent plugin :o)

    New output from :version

    MacOS X (unix) version
    Compiled by Bjorn Winckler <bjorn.winckler@gmail.com>
    Huge version with MacVim GUI.  Features included (+) or not (-):
    +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard
    +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape
    +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
    +find_in_path +float +folding -footer +fork() +fullscreen -gettext -hangul_input +iconv +insert_expand +jumplist
    +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse
    +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
    +multi_lang -mzscheme +netbeans_intg +odbeditor -osfiletype +path_extra +perl +persistent_undo +postscript
    +printer +profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff
    +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo
    +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual
    +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp
    -xterm_clipboard -xterm_save
       system vimrc file: "$VIM/vimrc"
         user vimrc file: "$HOME/.vimrc"
          user exrc file: "$HOME/.exrc"
      system gvimrc file: "$VIM/gvimrc"
        user gvimrc file: "$HOME/.gvimrc"
        system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX
    -no-cpp-precomp  -g -O2 -arch i386 -arch x86_64 -D_FORTIFY_SOURCE=1
    Linking: gcc   -L.    -L.         -arch i386 -arch x86_64 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbo
    n      -lncurses  -liconv -framework Cocoa    -L/usr/local/lib  -L/System/Library/Perl/5.10.0/darwin-thread-multi-2
    level/CORE -lperl -lm -lutil -lc -framework Python   -framework Ruby      
    
  5. Greg Hurrell

    It's not :t but <Leader>t.

    So it depends on what you've set your leader key as. I use , so for me I bring up Command-T with ,t. I think the default leader is \ unless you override it, so in that case you'd bring it up with \t.

    You can also set up any arbitrary mapping for :CommandT; see the docs for an example.

    So it seems that it should work for you now, seeing as you say :CommandT works and your Vim now reports +ruby.

  6. anonymous

    Ah ok- I was being dumb and hammering :t instead of \t

    So much to learn! Sorry to have wasted your time, and thank you so much for your help!

Reply

This topic is now closed.