What are some useful TextMate shortcuts? [closed]

2019-03-07 10:38发布

Macs are renowned (or bemoaned) for having an extensive number of shortcuts. However, OS X itself pales in comparison to the shortcut lists in TextMate and its bundles.

What are some useful keyboard shortcuts you use?

30条回答
Summer. ? 凉城
2楼-- · 2019-03-07 11:21

Generate Lorem ipsum: lorem + TAB

Will generate:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

查看更多
SAY GOODBYE
3楼-- · 2019-03-07 11:21

Switch between tabs:

  • Left: SHIFT + COMMAND + [
  • Right: SHIFT + COMMAND + ]
查看更多
一纸荒年 Trace。
4楼-- · 2019-03-07 11:21

Eliminate all whitespace / carriage returns between the location of your caret and the start of the next piece of content: SHIFT + CONTROL + J

For example, if you have:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.

Place your caret at the end of the first paragraph and press SHIFT + CONTROL + J to remove the space in between the paragraphs:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.

查看更多
看我几分像从前
5楼-- · 2019-03-07 11:23

Edit the end of multiple selected lines simultaneously : COMMAND + OPTION + A

查看更多
看我几分像从前
6楼-- · 2019-03-07 11:24

Toggle between {} and do end blocks. Place your cursor on the block arugument (i.e. the word after the keyword do between the two pipes) and press Shift + Control + {

For example, converts:

@post.each do |post|
  puts post.name
end

to:

@post.each { |post| puts post.name }
查看更多
Animai°情兽
7楼-- · 2019-03-07 11:25

My favourites are:

  • option+command+[ to clean up your indentation
  • "lorem", TAB to insert placeholder text
查看更多
登录 后发表回答