Change into the plugin directory: cd ~/.vim/bundle/command-t #VIM RUBY RUNNER INSTALL#I opted to install it as a Git submodule and load it with Pathogen. The documentation describes how you can install it as a vimball, or straight from the source – for example using Tim Pope’s excellent Pathogen plugin. Try it by starting Vim and perform the command: :ruby puts 'Hello, world' The output of vim -version will tell you a lot, but somewhere in there is +ruby to indicate you can now run Ruby straight from Vim. If you source your shell configuration, or just start a new terminal session, you will notice the new version of Vim: $ which vim zshrc to prepend it if necessary: export PATH=/usr/local/bin:$PATH Check it with echo $PATH to see your current $PATH, and edit. Then compile and install: makeįinally, make sure /bin is in your $PATH. Note the -enable-rubyinterp – and toss in -enable-pythoninterp while you’re at it. Change into it to start the whole configure, make, make install routine. This gives you a vim directory in your current working directory. #VIM RUBY RUNNER SKIN#There’s more than one way to skin this cat, but I chose to clone the repository with Mercurial: $ hg clone vim The first actual step is to get the Vim source code. In a new shell session, I first switched to the stock Ruby version: $ rbenv shell system I decided to compile both against my system Ruby ( 1.8.7) as that is the least likely to be messed around with. This becomes problematic if you try to compile Vim against one version, and then try to install a plugin like command-t with a C-extension compiled against another version. #VIM RUBY RUNNER MAC OS X#Mac OS X comes with Ruby by default, by I use rbenv to switch between different versions. Mind the Ruby version you link toīy installing Vim with Ruby support, you link it to a particular installation of Ruby. “No biggie”, I thought to myself, “how hard can compiling Vim be?” As it turned out, I ran into some issues with Vim immediately crashing after installation, or as soon as I tried to use the command-t. Of course, MacVim comes with Ruby support built-in, but I prefer running Vim in the terminal, so I was out of luck. It is a nice fuzzy-search plugin writing in Ruby (with a C extension), and it requires Vim with Ruby support. The other day I wanted to give the command-t plugin another go. However, Vim needs to be compiled with support for those external languages. This shell call: rdebug-vim -file /Users/aleksandrkunin/.vim/tmp/ruby_debugger -output /Users/aleksandrkunin/.vim/tmp/ruby_debugger_output -socket /var/folders/p9/dq06c2dn72nbbk45qdc5yx1h0000gp/T/vLSSici/17 -logger_file /Users/aleksandrkunin/.vim/tmp/ruby_debugger_log -debug_mode 0 -vim_executable mvim -vim_servername VIM -separator ++vim-ruby-debugger-separator++ - '/Users/aleksandrkunin/Documents/rails_projects/tracks_dev/script/rails' serverĬause this error: Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-xml-0.4.1/lib/byebug/commands/frame.rb:12:in `alias_method': undefined method `get_pr_arguments' for module `Byebug::FrameFunctions' (NameError)įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-xml-0.4.1/lib/byebug/commands/frame.rb:12:in `'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-xml-0.4.1/lib/byebug/commands/frame.rb:2:in `'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-xml-0.4.1/lib/byebug/commands/frame.rb:1:in `'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-xml-0.4.1/lib/debugger_xml.rb:5:in `block in 'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-xml-0.4.1/lib/debugger_xml.rb:5:in `each'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-xml-0.4.1/lib/debugger_xml.rb:5:in `'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/debugger-xml-0.4.1/bin/rdebug-vim:15:in `'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.2/bin/rdebug-vim:23:in `load'įrom /Users/aleksandrkunin/.rbenv/versions/2.1.Vim can easily be extended, not only with Vimscript but also with Ruby, Python, or whatever else.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |