开发者

How do I indent properly with TextMate?

开发者 https://www.devze.com 2023-03-10 22:30 出处:网络
I\'m reading Michael Hartl\'s Ruby on Rails 3 Tutorials. I just came across my first example of code (HTML really) being long enough to wrap to a second line. Here\'s what it looks like in my TextMate

I'm reading Michael Hartl's Ruby on Rails 3 Tutorials. I just came across my first example of code (HTML really) being long enough to wrap to a second line. Here's what it looks like in my TextMate...

How do I indent properly with TextMate?

The lines between the开发者_如何学C paragraph tags aren't lined up below the "a href" (as I'm thinking they should be).

Now here is the same code taken from Michael's tutorial...

How do I indent properly with TextMate?

In Michael's example the same lines are perfectly lined up under the "a href".

How can I properly indent my code in TextMate to look as neat as Michael's does here?

Thanks!

Eddie


Go to View and turn softwrap off, then put linebreaks and tabs in manually.


Use the Text>Reformat Paragraph menu command (Ctrl-Q).


For what it's worth, there's a six year old request to add this sort of smart indenting to TextMate.

0

精彩评论

暂无评论...
验证码 换一张
取 消