I am trying to install RSense for vim in fedora. I read this manual. I downloaded the tar ball of rsense and extracted it. Then I copied it to the root/opt directory as given on that page. Then I made a directory vim/plugin in the opt directory and copied the rsense.vim in the plugin directory. But when I write :RSenseVersion in the vim editor,I get a message that the command is not recognized.What have I missed ?
Till now I have not installed vim-ruby plugin as staged on the documentation page. What is this plugin meant for ? Can't RSense alone solve my purpose of writing a neat ruby code with auto-completion,code hinting ?
No, you didn't read the manual.
Once all the dependancies are dealt with you must put the plugin in ~/.vim/plugin.
As for the differences between vim-ruby and RSense, I don't do Ruby so I don't know for sure. Looking quickly at their doc, it looks like they are very different in scope and have slightly overlapping features. I'd install both: vim-ruby for all the low-level Vim tuning and RSense for its supposed code intelligence.
But I have a feeling none of them will help you write "neat" ruby code. Only your programing/ruby skills will.
Related
Ultimate Goal:
I'm trying to convert a binary plist file to an xml format so that I can put it in an array and grab values from it. What I'm finding via web search on this is that the command for Linux comes from libplist.
Problem: I ran "yum install libplist" and it told me libplist is already installed and latest version. I've read that if I enter the following command:
plutil -i /mypath/file.plist > /mypath/file.xml.plist
That this will help accomplish my ultimate goal. However, when I do this only a blank file called file.xml.plist is created. Further, with this command and any other command involving plutil, I get a "bash: plutil: command not found. . ." error. Is libplist seemingly not installed (even though it says it is) or why would I repeatedly get this error? Thanks for your help.
You can use yum to look for a package knowing the binary you want. For instance, if I want to install the package that provides plutil, I simply run this command:
$> yum provides plutil
Unfortunately, the result is No matches found... But you say you read that the libplist package provides this tool. Maybe it was renamed ? Let's use repoquery for this (if you don't have it, yum provides repoquery tells you that you need to install yum-utils).
$> repoquery --list libplist
/usr/bin/plistutil
/usr/lib/libplist++.so.3
/usr/lib/libplist++.so.3.0.0
/usr/lib/libplist.so.3
/usr/lib/libplist.so.3.0.0
/usr/share/doc/libplist
/usr/share/doc/libplist/AUTHORS
/usr/share/doc/libplist/COPYING.LESSER
/usr/share/doc/libplist/README
And what I see is that a program called plistutil was installed with this package !
I've never used plutil, so I can't tell you for sure plistutil is the program you want (but it probably is). What I wanted to do instead with this post is to show how you can use yum to install the packages you need !
I ran across this thread while Googling for the same thing myself. After looking at a few solutions for my own company (Screenplay) I decided to fork and iterate on a open-source, cross-platform, drop-in replacement for plutil:
https://github.com/screenplaydev/plutil
It's forked from Facebook's xcbuild (a tool developed by them to build xcode projects on Linux), but stripped down to just provide plist-editting functionality. That way you won't need to maintain separate code-paths for Mac and Linux environments.
Hope that's helpful!
I have just read the Ruby User's Guide at http://www.rubyist.net/~slagell/ruby/getstarted.html, I didn't find what I was looking for... which is, How do I use ruby source which I downloaded? There's a Makefile in it, do I just run GNU make -f like for any other source?
All I am trying to do is build and use whatweb (https://github.com/urbanadventurer/WhatWeb/wiki/Installation) from its source package.
Please do read READMEs developers provide. The README will point to https://github.com/urbanadventurer/WhatWeb/wiki/Installation which describe the installation process.
There you find that you need to install dependencies. As already stated Ruby is interpreted and does not need to be compiled.
....If I understad it well, you shouldn't build it(Ruby is an interpreted language). You just run the script like:
$ ./whatweb slashdot.org reddit.com
at "2. Example Usage" from whatweb documentation..
Is that what you need?
If I want to work with Ruby in Vim, how can I add Ruby support to it?
First of all, you would need a Vim version that is compiled with Ruby support enabled. You achieve this with:
./configure <the rest of your options> --enable-rubyinterp
on a Linux system, for example.
The next steps would be installing the plugins of your choice, you probably want NERDTree, snipMate, vim-ruby-debugger....
There are a lot of plugins to make your life easier, but there is always the option to run arbitrary shell commands from within Vim, no extra plugin needed:
!ruby /path/to/script.rb
This will execute script.rb and print the shell output directly in Vim itself.
I would visit https://github.com/ and put "ruby vim" into search box. You should find plenty interesting add-ons for vim this way.
I recently switched over to using Janus from a custom set of vim plugins and .vimrc. I'm really enjoying the setup, but one thing I'm missing is the automatic completion of blocks in Ruby.
For example, when I type:
def method <enter>
It would complete the block:
def method
# cursor here
end
I was using some of Tim Pope's plugins and can't recall which one provided the functionality (Rails maybe?) Is there a way to get this functionality using Janus? Is there a reason why someone wouldn't want this? It seems really convenient to have.
According to janus documentation documentation:
If you want to add additional Vim plugins you can do so by adding a ~/.janus.rake like so:
vim_plugin_task "zencoding", "git://github.com/mattn/zencoding-vim.git"
vim_plugin_task "minibufexpl", "git://github.com/fholgado/minibufexpl.vim.git"
ant then just run rake or run rake for the pluging you setup, on ~/.vim, for example:
rake zenconding
You're talking about endwise.
Presumably you could just add this repo to the Janus rakefile, however I've not tested. This is likely not included in Janus because this can pretty much be emulated with snipMate which is included in Janus.
The janus customization documentation currently reccommends using the ~/.janus directory for vim plugins.
You can use git clone to install vim plugins into the ~/.janus directory. E.g.
cd ~/.janus
git clone https://github.com/vim-scripts/Rename2.git rename2
The old method for customization, using rakefile is in a separate branch that is not maintained.
I know Emacs has some sort of integration with gdb (though I never used it) to jump through files as you debug a program. I'd like to do the same with Ruby programs.
As erenon said, use ruby debug, which provides a library for emacs that lets you use it just as gdb.
Install rdebug by issuing this command on your terminal(the sudo is optional, depending on your system):
<sudo> gem install ruby-debug
You then need to download the ruby-debug-extra file from rubyforge, and install it in the standard way.
sh ./configure
make
make test # optional, but a good idea
sudo make install
This gives you the elisp files for the interaction with rdebug, plus documentation for ruby-debug that can be viewed from within emacs.
AJ
There is another emacs to ruby-debug interface. See https://github.com/rocky/emacs-dbgr/wiki .
More generally, it works with other ruby debuggers and other debuggers in general.
You may want use rdebug.
I am getting "Cannot open load file: gdb-ui" in GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.0.0, NS apple-appkit-1038.11) of 2009-10-31
I was stuck with same problem with gdb-ui, but I found the solution: I downloaded gdb-ui.el from here and put it into ruby-debug-extra/emacs dir... then I've adjusted Makefiles to point to this file before any other rdebug*.el files. After this step you'll get make working. Since I'm using emacs-snapshot and gdb mode is available already in my emacs environment, this issue is only about to build rdebug mode. After this I've installed it with "sudo make install" and it works perfectly :) Don't forget to add (require 'rdebug) to your ~/.emacs or whatever else you use to bootstrap your config.
The chosen strategy can be made to work, although texi2html and texinfo were not enough on my system, but I stopped pursuing this strategy without installing the extra packages.
Here's what I did: download ruby-debug-extra-0.10.4.tar.gz from http://rubyforge.org/frs/?group_id=1900&release_id=28306, untar it, but DON'T do the whole configure/make/blah/blah thing. Instead, I simply copied the 'emacs' directory to ~/.emacs.d/rdebug, and then added to my ~/.emacs.d/init.el file (you can also use your ~/.emacs file):
(add-to-list 'load-path "~/.emacs.d/rdebug")
(autoload 'rdebug "rdebug" "ruby-debug interface" t)
This won't byte-compile it, I didn't care. I prefer this solution because I got really annoyed that the packages forces you to install the docs.