Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed vim plug-in - t9md/vim-ruby-xmpfilter.

My .vimrc contains

1 set nocompatible      " We're running Vim, not Vi!
  2 syntax on             " Enable syntax highlighting
  3 filetype on           " Enable filetype detection
  4 filetype indent on    " Enable filetype-specific indenting
  5 filetype plugin on    " Enable filetype-specific plugins
  7 set number
  8 set expandtab
  9 set tabstop=2 shiftwidth=2 softtabstop=2
 10 set autoindent
 13 "let g:xmpfilter_cmd = '/home/kirti/.rvm/rubies/ruby-2.0.0-p0/bin/ruby'
 15 set rtp+=~/.vim/bundle/vundle/
 16 call vundle#rc()
 18 " let Vundle manage Vundle
 19 " required!
 21 set shell=/bin/bash\ -i
 23 Bundle 't9md/vim-ruby-xmpfilter'
 24 Bundle 'Townk/vim-autoclose'
 25 Bundle 'vim-ruby/vim-ruby'
 26 Bundle 'gmarik/vundle'
 27 Bundle 'scrooloose/nerdtree'
 29 autocmd FileType ruby nmap <buffer> <M-c> <Plug>(xmpfilter-mark)
 30 autocmd FileType ruby xmap <buffer> <M-c> <Plug>(xmpfilter-mark)
 31 autocmd FileType ruby imap <buffer> <M-c> <Plug>(xmpfilter-mark)
 33 autocmd FileType ruby nmap <buffer> <M-z> <Plug>(xmpfilter-run)
 34 autocmd FileType ruby xmap <buffer> <M-z> <Plug>(xmpfilter-run)
 35 autocmd FileType ruby imap <buffer> <M-z> <Plug>(xmpfilter-run)

When I write in my .rb file as 1 + 1, then Ctrl+c, so I get 1 + 1 # =>. Now when I am trying to execute it I am getting error as "xmpfilter: command not found".

enter image description here

enter image description here

xmpfilter and RVM both is installed in my ubuntu13.10.

kirti@kirti-Aspire-5733Z:~$ which xmpfilter
kirti@kirti-Aspire-5733Z:~$ which rvm
share|improve this question

I have installed tpope/vim-rvm plug-in and it solved my problem.

I just put Bundle 'tpope/vim-rvm' in my .vimrc file. Then ran :BundleInstall to install that plugin.

Then I ran :Rvm use default.

enter image description here

enter image description here

Now I write the below code :

class Foo
  def bar

I pressed Alt+c to insert # =>. Then I pressed Alt+z and got the output as I was looking for.

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.