All Projects → junegunn → Vim Ruby X

junegunn / Vim Ruby X

if_ruby helper

Labels

Projects that are alternatives of or similar to Vim Ruby X

Rvm.vim
This functionality has been rolled into tpope's vim-rvm
Stars: ✭ 23 (+228.57%)
Mutual labels:  viml
Dotfiles
Config's and scripts
Stars: ✭ 24 (+242.86%)
Mutual labels:  viml
Emoji Vim
Stars: ✭ 26 (+271.43%)
Mutual labels:  viml
Vim Expand Region
Vim plugin that allows you to visually select increasingly larger regions of text using the same key combination.
Stars: ✭ 924 (+13100%)
Mutual labels:  viml
Unite Grep Vcs
An unite source package for git grep and hg grep
Stars: ✭ 24 (+242.86%)
Mutual labels:  viml
Vim Ruby Complexity
Ruby cyclomatic complexity VIM plugin
Stars: ✭ 24 (+242.86%)
Mutual labels:  viml
Cheatsheets
personal cheatsheets on various technologies
Stars: ✭ 23 (+228.57%)
Mutual labels:  viml
Shades Of Teal
A colorscheme for vim
Stars: ✭ 7 (+0%)
Mutual labels:  viml
Vim Portal
Hello and, again, this is the Portal Gun for Vim.
Stars: ✭ 24 (+242.86%)
Mutual labels:  viml
Vim Soundcloud
Stars: ✭ 26 (+271.43%)
Mutual labels:  viml
Init.vim
My settings for neovim
Stars: ✭ 24 (+242.86%)
Mutual labels:  viml
Vim Macroeditor
Edit Vim macros with ease!
Stars: ✭ 24 (+242.86%)
Mutual labels:  viml
Vim Dirvish
Directory viewer for Vim ⚡️
Stars: ✭ 929 (+13171.43%)
Mutual labels:  viml
Vim Htmlbars Inline Syntax
Highlight hbs tagged template literals
Stars: ✭ 24 (+242.86%)
Mutual labels:  viml
Lustyexplorer
Dynamic filesystem and buffer explorer
Stars: ✭ 26 (+271.43%)
Mutual labels:  viml
Ag.vim
Use ag, the_silver_searcher (better than ack, which is better than grep)
Stars: ✭ 23 (+228.57%)
Mutual labels:  viml
Vim Behat
Behat plugin for vim (adaptation of vim-cucumber)
Stars: ✭ 24 (+242.86%)
Mutual labels:  viml
Vimrc
My vim profile
Stars: ✭ 7 (+0%)
Mutual labels:  viml
Vimfiler Prompt
navigate vimfiler by typing
Stars: ✭ 7 (+0%)
Mutual labels:  viml
Dustjs.vim
dustjs template syntax highlighting and more for vim
Stars: ✭ 25 (+257.14%)
Mutual labels:  viml

vim-ruby-x

:RubyX command extends Ruby interface of Vim, making it (marginally) easier to use.

Installation

Use your favorite plugin manager.

  • vim-plug
    1. Add Plug 'junegunn/vim-ruby-x' to .vimrc
    2. Run :PlugInstall

Features

Easier variable access

  • VIM[]
  • VIM[]=
  • VIM.exists?(varname)
  • VIM.fetch(varname, default)
  • VIM.unlet(*varnames)
var1 = VIM['g:var1']
var2 = VIM['g:var2'] || 0

VIM['g:vars'] = { :vars => [var1, var2], :sum => var1 + var2 }

VIM.unlet 'g:var1', 'g:var2'

Shortcuts to VIM::command and VIM::evaluate

  • String#vim!
  • String#vim?
'redraw!'.vim!
count = 'len(g:array)'.vim?

Executing normal mode commands

VIM.normal  'gqip'
VIM.normal! 'gg=G'

Vimscript representation of Ruby values

  • Object#to_v
'hello world'.to_v
  # "hello world"

[1, 2, 3, %w[hello world], { 'hello' => { 'world' => '!' } }].to_v
  # [1, 2, 3, ["hello", "world"], {"hello": {"world": "!"}}]

Calling Vim functions

  • VIM.call(name, *args)
VIM.call(:feedkeys, "\C-c")

Making Ruby code interruptible with CTRL-C

VIM.interruptible do
  begin
    sleep
  rescue Interrupt
    puts 'Interrupted!'
  end
end

Messages

VIM.echo    'Welcome'
VIM.echo    'Apples', :Identifier, ' are ', :Structure, 'red', :Error
VIM.error   'Oops, try again'
VIM.message 'This one is builtin'
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].