Ruby Tool Survey

On Nov 27, 2007 3:21 PM, Christian von Kleist [email protected]
wrote:

to ack, getting roasted alive for daring to criticize debuggers, etc.,
power it looks like the king. so a screencast on features of vi I

method/member summary of the file you’re editing in a vertical window

Sorry, just realized that it was Ara’s video, so the above response
was for him…

On Nov 27, 2007, at 8:27 AM, Cameron McBride wrote:

Cameron

[1] to be fair, I can not see a label – so it could just be root beer
or the like.

no. you caught me :wink: it was after 5 !

a @ http://codeforpeople.com/

On Nov 27, 2007, at 1:25 PM, Christian von Kleist wrote:

Giles, have you ever tried tabs in Vim? IMHO it’s a
lot easier to
manage multiple tabs than multiple windows in Vim.

you mean gvim? does vim do tabs somehow then?

And for screen, try screen -S session-name to name the screen
sessions you create so when you do screen -ls it’s easier to
remember which session is which. Then you can resume a session with
screen -r session-name too.

yeah. this is what i use:

cfp:~ > alias|grep screen
alias s='screen -D -R ’
alias sdr='screen -d -r ’
alias sl='screen -list ’

Also great for Vim is the taglist.vim plugin, which lets you see a
method/member summary of the file you’re editing in a vertical window
to the left (or anywhere else through config options). It works with
most languages, including Ruby.

i’ve tried tags a bit but not lately - should give it another go.
thanks for the tip.

was for him…

yup, i swear by it. best thing is that moving to linux, using putty
on windows, switching to osx, logging into to a solaris box, working
on fortran, whatever - all use the same ‘ide’. this alone buys a ton
of time in the medium to long haul.

cheers.

a @ http://codeforpeople.com/

http://drawohara.tumblr.com/post/20284516

oh, hey. I had that in my RSS reader until last week. I was reading
too many blogs so I deleted everything. I’ll add that one back in.

the quality sux but the conversion to flv was blowing up on my box -
i’ll try again tomorrow. until the low-quality version and link to
full res is here.

just a quick overview - but maybe it gives the flavour.

it does. muchas gracias. essentially it’s a text-only window manager?
Unix is a wonderful thing. and the sl thing is basically saved state,
so you can get the same “windows” back whether you log in from the
same box or remotely.


Giles B.

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

you mean gvim? does vim do tabs somehow then?

I don’t use GVim because it doesn’t work inside screen, but yes, Vim
and GVim both do tabs. Try :help tab-page-intro to get an overview.

The basic commands are:

:tabnew -> open a new tab
:tabedit index.rhtml (or :tabe index.rhtml) -> open file index.rhtml
in a new tab
:tabclose (or :tabc) -> close current tab
:tabmove 4 (or :tabm 4) -> move current tab after tab 4

gt (or :tabnext) -> next tab
gT (or :tabprevious) -> previous tab
4gt -> go to tab 4

The excellent and indispensable rails.vim plugin has some nice tab
support features.

I’m not sure if OS X Vim has tab support by default…

On Nov 27, 2007, at 7:56 PM, Giles B. wrote:

it does. muchas gracias. essentially it’s a text-only window manager?
Unix is a wonderful thing. and the sl thing is basically saved state,
so you can get the same “windows” back whether you log in from the
same box or remotely.

yep and yep.

a @ http://codeforpeople.com/

On Nov 28, 2007, at 8:29 AM, Christian von Kleist wrote:

gt (or :tabnext) → next tab
gT (or :tabprevious) → previous tab
4gt → go to tab 4

The excellent and indispensable rails.vim plugin has some nice tab
support features.

I’m not sure if OS X Vim has tab support by default…

well i’ll be…

very cool!

that’s the other great thing about vim - it takes a lifetime to learn
it all.

‘gT’ is pretty dang awkward for flipping though - i think i might map
‘tn’ (tabnext) and ‘tp’ (tabprevious)

otherwise this might be my new favorite vim feature.

cheers.

a @ http://codeforpeople.com/

On Nov 28, 2007 10:56 AM, ara.t.howard [email protected] wrote:

:tabedit index.rhtml (or :tabe index.rhtml) → open file index.rhtml

‘tn’ (tabnext) and ‘tp’ (tabprevious)
h.h. the 14th dalai lama

Yep, I’ve been using Vim/vi since 1998 in my first college C class,
and I’m still learning new stuff about it! There are so many great
plugins out there, like Nerd_commenter.vim, rails.vim, taglist.vim,
etc…

I could hardly get by in day-to-day Rails coding without rails.vim,
which has ‘gf’. You can put the cursor over almost anything and do
‘gf’ to go to that thing. Here are some examples from the rails.vim
doc:

(* indicates cursor position)

   Pos*t.find(:first)

app/models/post.rb

   has_many :c*omments

app/models/comment.rb

   link_to "Home", :controller => :bl*og

app/controllers/blog_controller.rb

   <%= render :partial => 'sh*ared/sidebar' %>

app/views/shared/_sidebar.rhtml

   <%= stylesheet_link_tag :scaf*fold %>

public/stylesheets/scaffold.css

   class BlogController < Applica*tionController

app/controllers/application.rb

   class ApplicationController < ActionCont*roller::Base

…/action_controller/base.rb

   fixtures :pos*ts

test/fixtures/posts.yml

   layout :pri*nt

app/views/layouts/print.rhtml

   # In the Blog controller
   def li*st

app/views/blog/list.rhtml

   <%= link_to "New", new_comme*nt_path %>

app/controllers/comments_controller.rb (jumps to def new)

You also get the :A and :R commands which jump from the current file
to the (A)lternate or (R)elated file:

Current file Alternate file Related file
model unit test related migration
controller (in method) functional test template (view)
template (view) helper controller (jump to method)
migration previous migration next migration
config/routes.rb config/database.yml config/environment.rb

As I said, Ruby/RoR + Vim is heaven.