https://github.com/tpope/vim-rvm
rvm.vim: Switch Ruby versions from inside Vim
https://github.com/tpope/vim-rvm
Last synced: about 2 months ago
JSON representation
rvm.vim: Switch Ruby versions from inside Vim
- Host: GitHub
- URL: https://github.com/tpope/vim-rvm
- Owner: tpope
- Created: 2011-08-31T19:09:42.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-01-19T14:02:07.000Z (about 1 year ago)
- Last Synced: 2025-01-08T16:27:53.355Z (3 months ago)
- Language: Vim Script
- Homepage: http://www.vim.org/scripts/script.php?script_id=4269
- Size: 13.7 KB
- Stars: 117
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.markdown
- Contributing: CONTRIBUTING.markdown
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-env - vim-rvm
README
# rvm.vim
Want to use [RVM](http://rvm.io) with Vim? You don't
need a plugin to do that: Just start Vim from your RVM enabled shell
and it will work. But say you started MacVim from Launchpad, or you
started Vim with one version of Ruby and now you want another. That's
where rvm.vim comes in.:Rvm 1.9.2
If you want to see the version that was chosen, use `use`:
:Rvm use default
If you leave off the version, it goes `.rvmrc` hunting relative to the
current buffer.:Rvm
:Rvm useIf you really want to get crazy, you can make this happen automatically
as you switch from buffer to buffer.:autocmd BufEnter * Rvm
You can also invoke any old `rvm` command.
:Rvm install 1.9.3
Add `%{rvm#statusline()}` to `'statusline'` (or `'titlestring'`) to see
the current Ruby version at all times.Last but not least, rvm.vim tells recent versions of [vim-ruby][] where your
Ruby installs are located, so that it can set `'path'` in your Ruby buffers to
reflect the nearest `.ruby-version` file.[vim-ruby]: https://github.com/vim-ruby/vim-ruby
## FAQ
> RVM doesn't work in my Vim.
You're using zsh on OS X Yosemite or earlier, aren't you? Move that stupid
`/etc/zshenv` to `/etc/zprofile`, which is where it correctly lives on El
Capitan.## Self-Promotion
Like rvm.vim? Follow the repository on
[GitHub](https://github.com/tpope/vim-rvm) and vote for it on
[vim.org](http://www.vim.org/scripts/script.php?script_id=4269). And if
you're feeling especially charitable, follow [tpope](http://tpo.pe/) on
[Twitter](http://twitter.com/tpope) and
[GitHub](https://github.com/tpope).## License
Copyright (c) Tim Pope. Distributed under the same terms as Vim itself.
See `:help license`.