How to improve the way I use Textmate for Ruby on Rails, HTML, CSS and Javascript?

前端 未结 9 2178
轻奢々
轻奢々 2021-01-30 00:08

I use the latest version of textmate for all my Rails development needs and I feel that I\'m under-using the possibilities or this software. I only installed the Ruby on Rails b

相关标签:
9条回答
  • 2021-01-30 00:49

    I was on the same boat some time ago. My biggest advice would be to reserve some time to learning your tool. It will do wonders to your productivy.

    I started installing the GetBundles bundle:

      cd ~/Library/Application\ Support/TextMate/Bundles
      svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/
    

    With it, you can check and find new bundles. Be sure to go through most of the options of each one you install.

    Next, try learning some Textmate skills. I'd recommend the Peepcode screencast. It covers Rails related productivy tips and information, and will give you some new ways to develop.

    Then, you try reading most Textmate tips you can find on the Internet. There are a few I read from time to time: Textmate Tips, Cool Textmate Tips, Textmate Tips from Macromates, Mactips, Textmate Productivity Tips.

    There is a Textmate book, but haven't been able to get into it yet. Should be useful, though.

    Lastly, the best way to improve your skills is to practice. I try to come up with small week-length projects to use new tips or to remember features I had forgotten.

    Good luck :)

    0 讨论(0)
  • 2021-01-30 00:50

    Ctrl-Cmd-T allows you to search for commands, so every time I want to do something new (like a validation macro) I hit Ctrl-Cmd-T, type vpo and it finds the correct macro for validate_presence_of, and even tells me to just type v-p-TAB next time. It's quite the education.

    Also, I managed to use text mate for a year without realising that Esc auto completed. Don't miss that one.

    Ctrl+Opt+Cmd+V to see your clipboard history is also a life saver.

    0 讨论(0)
  • 2021-01-30 00:50

    Not Rails-related, but I can't say enough good things about the Zen Coding plugins for HTML & CSS coding. A huge bunch of keyboard shortcuts that will completely change the way you use Textmate (if you do a lot of XHTML/CSS like I do). Watch the Screencasts to see just how quickly you can do common tasks with them.

    Another plugin that's been super awesome for me along the same lines is the jQuery Bundle that adds keyboard shortcuts for a bunch of jQuery methods.

    Essentially, what I'm getting at here, is that with some diligent searching you can uncover a ton of community-built addons for Textmate that increase the functionality of this already awesome program.

    Most of the coders in my office use some variant of Eclipse, but I say they can pry my copy of Textmate from my cold, dead hands. :D

    0 讨论(0)
  • 2021-01-30 00:52

    Probably the most useful TextMate trick I've found out about is Cmd-T, which shows a quick open dialog for the files in a project.

    Another good trick I've learned is opening a TextMate project from Terminal (assuming you installed the TextMate Terminal Usage [via the Help menu]). mate . from the Terminal will open a TextMate project from the current directory.

    If you watch Railscasts, you'll see how useful the various text completion and other Bundle options are. I'd second Yaraher in checking out all the stuff in the Rails bundle (Cmd+Opt+Ctrl+B).

    0 讨论(0)
  • 2021-01-30 00:56

    For a list of most useful keyboard shortcuts for Rails development see my blog post: http://szeryf.wordpress.com/2010/02/15/textmate-shortcuts-you-should-be-using/

    You might also want to check out this bundle: http://github.com/szeryf/rails-routes.tmbundle

    0 讨论(0)
  • 2021-01-30 01:00

    Cmd-T ENTER lets you go back to the file you were previously editing. This is specially useful as TextMate doesn't support window split.

    Also, check out the rails-footnotes plugin. It adds links to the bottom of your rail-app layout that automatically open the view or controller files in TextMate. Those links only appear in development mode.

    Some of the other features that I use frequently are:

    • Duplicate line: CTRL-SHIFT-D
    • Select line: Triple Click (works outside TM too)
    • Move selection: CTRL-CMD-Arrow
    • Comment/Uncomment: CMD-/

    Also, for maximum productivity, don't forget to set your keyword repeat rate to its maximum or beyond.

    0 讨论(0)
提交回复
热议问题