

Ask HN: Textmate and RoR? - hella

Yesterday I bought textmate. Today I'm starting to learn Rails. How should I set up (and what should I know about) textmate to make things as easy and fast as possible?
======
matthodan
Apologies in advance for not answering your question directly. Frankly, I wish
I could have caught you before you paid for Textmate, as I would have
encouraged you to try VIM.

VIM has become one of the most popular editors among Rails developers and many
Textmate users are making/have made the switch (myself included). It takes a
week or two to get familiar with VIM, but once you are comfortable you'll
never go back to Textmate. Having just gone through the VIM learning process,
I think you should do the following:

1) Download MacVIM (I assume you're on a Mac) and understand that your VIM
configuration is stored in your ~/.vim folder and ~/.vimrc file

2) Search for example .vimrc files-- Tim Pope has a nice example at
<https://github.com/tpope/tpope/blob/master/.vimrc>

3) Build your own .vimrc file from scratch-- research everything you add to
your .vimrc using :help (:help is huge, don't discount this) and Google. Think
of this step as building your own text editor. VIM is extremely customizable,
but unfortunately it doesn't ship with all of the functionality that users
expect enabled

4) Install pathogen, then install each of these plugins in the bundle folder
in your .vim directory:

    
    
      - rails.vim (syntax highlighting, navigation, and much more)
    
      - snipmate (easily create custom code snippets)
    
      - nerdtree (browse project files)
    
      - command-t (find/open files within project easily)
    
      - vividchalk (color scheme)
    
      - ack (text search within project)
    

There are probably 100 other plugins people will recommend, but I think these
are a good start

5) Write a blog article about your experience. I'll be posting mine soon!

~~~
wriq
_If a programmer tells you to use vim or emacs, tell them no. These editors
are for when you are a better programmer. All you need right now is an editor
that lets you put text into a ﬁle._

From Zed's LPTHW. While Vim/MacVIM is my editor of choice, if someone is just
getting started and using RoR - TextMate or any easy to start with non-modal
editor seems like the right choice. Trying to learn vim while learning a new
language/framework at the same time could get frustrating. TextMate is still
very popular, easy to start with, and last I checked (admittedly a very long
time ago) the editor used in Railscasts.

~~~
matthodan
Agree 100% that Textmate is easier for people who are just getting started
programming-- heck, I started with it.

------
ctide
Install the following:

<https://github.com/protocool/AckMate> \- Searching within your project sucks
by default. This makes it not suck.

Testing -

<https://github.com/aslakhellesoy/cucumber-tmbundle> \- Bundle for cucumber
highlighting. <https://github.com/rspec/rspec-tmbundle> \- Lets you run specs
individually from within textmate.

Frontend -

<https://github.com/kuroir/SCSS.tmbundle> &
<https://github.com/peterlih/handcrafted-haml-textmate-bundle> &
<https://github.com/seaofclouds/sass-textmate-bundle> \- Sass/Haml/Scss
bundles. HAML and Sass will make you life significantly easier, embrace them.

Next up, download and install :
<http://www.levien.com/type/myfonts/inconsolata.html>

For themes, I prefer 'Blackboard' with the font changed to Inconsolata, but
play around with the various color schemes and choose whichever you prefer.
You'll probably spend a lot of time looking at it.

Now, bookmark: <http://api.rubyonrails.org/> and pretty much keep it open
somewhere all the time. It's invaluable for rooting through why things aren't
working.

Lastly, rails is full of magic. Magic that sometimes is quite far removed from
the actual errors you run into. Your first few months will probably have more
than a few very frustrating moments where things just don't work and you can't
figure out why. Stackoverflow is your friend, and no question is stupid. If
you can't google an answer, just ask.

------
bdclimber14
I don't use VIM, so I'll answer about TextMate (although I'm going to try VIM
and you should too).

Install bundles for HAML, SASS and jQuery (assuming you're using those tools).
It gives you syntax coloring for each.

Switch the theme to a light on dark to save your eyes from strain. You can
download the theme from Railscasts.

------
amalag
I find Rubymine very useful. Some of it is just wrappers to shell commands,
but other parts have syntax highlighting and suggestions and catching syntax
errors. I like the git VCS integration and the debugging. I program Rails with
it and really find it useful.

~~~
mark_l_watson
I agree and use both RubyMine and TextMate, usually separately, but when I am
coding in Ruby (usually Rails work) I sometimes like to keep RubyMine and
TextMate open on the same project because it is so fast to zip around to look
at different files in TextMate. (I do the same sometimes for Java, keeping
both IntelliJ and TextMate open.)

It may seem perverse keeping two editing systems open at once, but it works
for me. I also even more perversely often keep TextMate open when I am working
in Common Lisp or Clojure with Emacs.

------
flamingbuffalo
Dan Benjamin has some good stuff

ex: [http://hivelogic.com/articles/compiling-ruby-rubygems-and-
ra...](http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-
snow-leopard/)

