greyblake / vim-preview

Vim plugin for previewing markup files(markdown,rdoc,textile,html)
GNU General Public License v2.0
209 stars 29 forks source link

Use specific rvm ruby and gemset #30

Closed barraponto closed 11 years ago

barraponto commented 11 years ago

I'd like to let vim-preview use a specific ruby and gemset for previews, regardless of the loaded rvm in the shell session before opening vim. Is it possible?

greyblake commented 11 years ago

It's not a scope of vim-preview but I you can do the next(it works for me):

# Create gemset for vim and install necessary staff
rvm gemset use 1.9.3@vim --create
gem install bluecloth github-markup RedCloth 

# Create aliases to use specific gemset with vim
# You probably want to move this in you ~/.bashrc file(or similar):
alias vim='rvm gemset use 1.9.3@vim && vim'
alias gvim='rvm gemset use 1.9.3@vim && gvim'

It should help. Thanks.

greyblake commented 11 years ago

Probably it's better to create wrapper scripts for vim and gvim, since aliases change current gemset...

barraponto commented 11 years ago

I guess I'll try autocmd and https://github.com/tpope/vim-rvm

greyblake commented 11 years ago

Vim-rvm looks good. Thanks, I'll try it to. Closing the ussue.