有哪些有用的 TextMate 快捷键?

发布于 2024-07-05 19:52:54 字数 157 浏览 15 评论 0原文

Mac 因拥有大量快捷方式而闻名(或令人遗憾)。 然而,与 TextMate 及其捆绑包中的快捷方式列表相比,OS X 本身就相形见绌了。

您使用哪些有用的键盘快捷键?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(30

っ〆星空下的拥抱 2024-07-12 19:52:55

大写所选文本: CONTROL + SHIFT + U

将变为:

Lorem ipsum dolor sat amet,
consectetur adipisicing elit。

进入:

洛雷姆·伊普苏姆·多洛尔·西特·阿梅特,
CONECTETUR ADIPISICING ELIT。

Upcase selected text: CONTROL + SHIFT + U

Will turn:

Lorem ipsum dolor sit amet,
consectetur adipisicing elit.

Into:

LOREM IPSUM DOLOR SIT AMET,
CONSECTETUR ADIPISICING ELIT.

泅人 2024-07-12 19:52:55

您可以在此处获得非常棒的桌面背景。 它有大量非常有用的键盘快捷键。 我用了几天才记住最有用的。

You can get a really great desktop background here. It has a ton of really useful keyboard shortcuts. I used it for a couple of days before memorizing the most useful ones.

倒带 2024-07-12 19:52:55

将所选文本包含在标记标签中: SHIFT + CONTROL + W

例如,如果您:

Lorem ipsum dolor sit amet, consectetur

突出显示文本并按 SHIFT< /kbd> + CONTROL + W 创建:

<p>Lorem ipsum dolor sit amet, consectetur</p>

Wrap selected text in markup tags: SHIFT + CONTROL + W

For example, if you have:

Lorem ipsum dolor sit amet, consectetur

Highlight the text and press SHIFT + CONTROL + W to create:

<p>Lorem ipsum dolor sit amet, consectetur</p>
∞梦里开花 2024-07-12 19:52:55

转到文件: + T

在项目中查找: + SHIFT + F

Go to File: + T

Find in Project: + SHIFT + F

药祭#氼 2024-07-12 19:52:55

消除插入符号位置和下一段内容开头之间的所有空格/回车符: SHIFT + CONTROL + J

例如, 如果你有:

Lorem ipsum dolor sat amet,consectetur adipisicing elit,sed do
时间的流逝和劳动等
多洛·麦格纳·阿利夸。

Ut enim ad minim veniam,quis nostrud 练习 ullamco labouris
nisi ut aliquip。

将插入符号放在第一段的末尾,然后按 SHIFT + CONTROL + J 删除段落之间的空格:

Lorem ipsum dolor sat amet,consectetur adipisicing elit,sed do eiusmod tempor incididunt ut Labore et dolore magna aliqua。 Ut enim ad minim veniam, quis nostrud exeritation ullamco Laboris nisi ut aliquip.

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.

思慕 2024-07-12 19:52:55

(这些大多与html相关)

  • cmd + option + 关闭当前打开的html标签
  • shift + cmd + w 将选择内容包裹在标签中
  • ctrl + return 插入转义行尾,即 \n
    ,具体取决于场合。

(these are mostly html-related)

  • cmd + option + closes current open html tag
  • shift + cmd + w wrap selection in tags
  • ctrl + return insert escaped line end, i.e. \n or <br> depending on the occasion.
原来是傀儡 2024-07-12 19:52:55

复制并粘贴剪贴板: + SHIFT + V

Copy and Paste Clipboard: + SHIFT + V

伏妖词 2024-07-12 19:52:55

为所选文本添加标题: CONTROL + OPTION + U

将变为:

Lorem ipsum dolor sat amet,
consectetur adipisicing elit。

进入:

Lorem Ipsum Dolor Sit Amet,
Consectetur Adipisicing Elit。

Titleize selected text: CONTROL + OPTION + U

Will turn:

Lorem ipsum dolor sit amet,
consectetur adipisicing elit.

Into:

Lorem Ipsum Dolor Sit Amet,
Consectetur Adipisicing Elit.

清晨说晚安 2024-07-12 19:52:55

小写所选文本:CONTROL + SHIFT + U

将变为:

Lorem ipsum dolor sat amet,
consectetur adipisicing elit。

进入:

lorem ipsum dolor sat amet,
consectetur adipisicing elit。

Downcase selected text: CONTROL + SHIFT + U

Will turn:

Lorem ipsum dolor sit amet,
consectetur adipisicing elit.

Into:

lorem ipsum dolor sit amet,
consectetur adipisicing elit.

稀香 2024-07-12 19:52:55

关闭最近的打开 html/xml 标记: OPTION + COMMAND + PERIOD

例如,如果您有:

<div>Lorem ipsum dolor sit amet, consectetur

CONTROL + COMMAND + D 将自动添加结束 标签来创建:

<div>Lorem ipsum dolor sit amet, consectetur</div>

Close the nearest open html/xml tag: OPTION + COMMAND + PERIOD

For example, if you have:

<div>Lorem ipsum dolor sit amet, consectetur

CONTROL + COMMAND + D will automatically add the closing </div> tag to create:

<div>Lorem ipsum dolor sit amet, consectetur</div>
我的影子我的梦 2024-07-12 19:52:55

在选项卡之间切换:

  • 左:SHIFT + COMMAND + [
  • 右:SHIFT + COMMAND + ]

Switch between tabs:

  • Left: SHIFT + COMMAND + [
  • Right: SHIFT + COMMAND + ]
沧桑㈠ 2024-07-12 19:52:55

cftextmate 包中,您可以键入任何 cfml 标签,而无需打开“<” 或关闭“>” 并按 Tab 键即可完成整个标签,然后您可以按 Tab 键切换到每个标签属性。 我不确定这种类型的快捷方式是否适用于其他语言。

in the cftextmate bundle you can type any cfml tag without the opening "<" or closing ">" and press tab and it completes the entire tag and you can then tab to each of the tag attributes. i'm not sure if this type of shortcut works for other languages.

久随 2024-07-12 19:52:55

我刚刚在 Bundles > 下找到了带有定义的快捷键符号列表。 HTML > 实体 - 有助于我弄清楚 TextMate 的整个捷径财富。

I just found a list of shortcut key symbols w/ definitions under Bundles > HTML > Entities - helpful for me in figuring out the whole short-cut bonanza going on with TextMate.

想你只要分分秒秒 2024-07-12 19:52:55

查找 W3C 中的属性规范: CONTROL + H

这适用于 HTML 和 CSS。 将胡萝卜放在您想要查找的任何属性上,然后按 CONTROL + h。 这将打开一个新窗口,列出 W3C 信息。

例如,将胡萝卜放在背景上:

body {
  background: red;
}

点击 command + h,您将看到类似以下内容的内容:

替代文字

Look up property specifications in W3C: CONTROL + H

This works for both HTML and CSS. Place your carrot over whatever property you'd like to look up and press CONTROL + h. This will open a new window listing the W3C info.

For example, place your carrot over background:

body {
  background: red;
}

Hit command + h and you'll see something like:

alt text

未蓝澄海的烟 2024-07-12 19:52:55

CMD + / 注释掉一行,它足够智能,可以根据语言进行格式化。 我用它所有的时间。

CMD + / comments out a line and it's smart enough to format based on language. I use it all the time.

最单纯的乌龟 2024-07-12 19:52:55

{}do end 块之间切换。 将光标放在块参数上(即两个管道之间关键字 do 后面的单词),然后按 Shift + Control + {

例如,将:转换

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

为:

@post.each { |post| puts post.name }

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 }
中二柚 2024-07-12 19:52:55

同时编辑多个选定行的末尾:COMMAND + OPTION + A

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

冷了相思 2024-07-12 19:52:55

使用 alt 选择文本(通过单击并拖动),

然后使用 + ] 缩进(或 [ 缩进) )

Selecting text using alt (via click and drag)

then use + ] to indent (or [ to dedent)

偏爱自由 2024-07-12 19:52:55

删除当前行:CONTROL + SHIFT + K

Delete the current line: CONTROL + SHIFT + K

奢华的一滴泪 2024-07-12 19:52:55

设置 CSS 格式: CONTROL + Q

选择一些 CSS,然后按 CONTROL + Q 将其变为

body { background: red; font-size: 10px; color: black; }

body {
  background: red;
  font-size: 10px;
  color: black;
}

Format CSS: CONTROL + Q

Select some CSS and press CONTROL + Q to turn this:

body { background: red; font-size: 10px; color: black; }

Into this:

body {
  background: red;
  font-size: 10px;
  color: black;
}
清风不识月 2024-07-12 19:52:54

就我个人而言,我最喜欢的两个快捷键是:

  • ⌃⇧L (即 ctrl+shift+L):用链接包装当前选定的文本到剪贴板中的任何内容,并且适用于我尝试过的每种文本语言。⌃⇧⌘L
  • (即 ctrl+shift+cmd+L):通过 google 搜索所选文本并链接到顶部结果。

它们对于编写文本和博客(以及 stackoverflow)都非常有用。

从代码角度来看,我认为我更喜欢片段而不是快捷键。 能够用几乎任何语言输入 if⇥ 等都非常有用,并且一致的界面是我继续使用 TextMate 的原因。

我还发现非常有趣。 但我更喜欢小步学习快捷键,并且经常发现只需查看齿轮菜单 (⌃⎋) 就可以了。

Personally two of my favourite shortcuts are:

  • ⌃⇧L (that's ctrl+shift+L): Which wraps the currently selected text with a link to whatever's in the clipboard, and works for every text language I've tried it in.
  • ⌃⇧⌘L (that's ctrl+shift+cmd+L): Which googles for the selected text and links to the top result.

The are both super useful for writing text and blogging, (and stackoverflow).

Codewise, I think that I prefer snippets to key shortcuts. Being able to type if⇥ etc., in almost any language is ridiculously useful, and the consistent interface is what keeps me using TextMate.

I also found this quite amusing. But I prefer to learn my shortcuts in small steps, and often find that just looking in the gear menu (⌃⎋) works.

白日梦 2024-07-12 19:52:54

我最喜欢的是:

  • 选项+命令+[清理缩进
  • “lorem”,TAB插入占位符文本

My favourites are:

  • option+command+[ to clean up your indentation
  • "lorem", TAB to insert placeholder text
吃兔兔 2024-07-12 19:52:54

Control-T(ControlT):转置(适用于大多数 Cocoa 原生文本字段和区域,但TextMate 增强了行为)。

  • 将插入符号放在两个字符之间,按 ControlT,字符会交换位置(这是标准的 Mac 行为)。 非常适合拼写错误。

  • 在一行上选择一个单词或一系列字符,点击ControlT,选择的字符现在将被反转(不太有用,但这是 TextMate 增强功能)

  • 选择一系列跨越多行的字符,点击 ControlT,行将反转。 行内的字符仍将按顺序排列。 在选择整行时最有用,但仍然适用于选定的部分行,只要至少选择一个换行符(TextMate 增强功能)即可。

Control-T(ControlT): Transpose (works in most Cocoa-native text fields and areas, but TextMate enhances the behavior).

  • Place your caret between two characters, hit ControlT, and the characters switch places (this is standard Mac behavior). Awesome for typos.

  • Select a word or series of characters on a single line, hit ControlT, and the characters in the selection will now be reversed (not too useful, but this is a TextMate enhancement)

  • Select a series of characters that spans more than one line, hit ControlT, and the lines will reverse. Characters within the line will still be in order. Most useful when selecting whole lines, but still works with partial lines selected, just so long as there is at least one newline character selected (TextMate enhancement).

猫弦 2024-07-12 19:52:54

这些是我最喜欢的快捷键:

  • cmd+t 开始输入文件名以将其打开
  • ctrl+w 选择word
  • cmd+r 运行打开的 ruby​​ 或 php 脚本
  • cmd+opt+m 定义一个新宏
  • cmd+shift+m 运行宏
  • opt 切换到垂直选择模式
  • cmd+opt+a 编辑所选行的末尾

These are my favorite shortcuts:

  • cmd+t Start typing name of a file to open it
  • ctrl+w Select word
  • cmd+r Run the ruby or php-script that is open
  • cmd+opt+m Define a new macro
  • cmd+shift+m Run the macro
  • opt Switch to vertical selection mode
  • cmd+opt+a Edit ends of selected lines
剩一世无双 2024-07-12 19:52:54
  • ctrl+shift+K 删除当前行
  • ctrl+shift+ J 将当前行与下一行合并
  • ctrl+shift+K deletes current line
  • ctrl+shift+J merges current line with the next line
星星的轨迹 2024-07-12 19:52:54

Esc 自动完成您正在处理的文档中的常用单词。

例如,如果您正在使用一个名为 LongFuntionNameThatChecksStuff 的函数,您可以键入 Lon然后按Esc,它应该会自动完成。

Esc auto completes common words in the document you are working in.

For example if you are using a function alot called LongFuntionNameThatChecksStuff, you can type Lon and pressEsc and it should auto complete.

暮年慕年 2024-07-12 19:52:54

shift+ctrl+alt+v 也将选定的文本发送到 Pastie.org

,使用 PHP Bundle,尝试开始编写函数名称并执行以下操作:

str + alt + F3 = 可用函数列表

str + alt + F1 = Short您刚刚完成的功能的描述。

shift+ctrl+alt+v sends selected text to pastie.org

also, using the PHP Bundle, try to start writing a function name and do the following:

str + alt + F3 = list of available functions

str + alt + F1 = short description of the function you've just completed.

春庭雪 2024-07-12 19:52:54

在任何 Cocoa 应用程序(不仅仅是 Textmate)中的字典中查找单词: ctrl + cmd + D

alt text

Look word up in dictionary, in any Cocoa app (not just Textmate): ctrl + cmd + D

alt text

卸妝后依然美 2024-07-12 19:52:54

将每个选定的行包含在标记标签中: SHIFT + CONTROL + COMMAND + W

例如,如果您有:

  This is a 
  few sample
  list items 

突出显示所有三行并按 SHIFT + CONTROL + COMMAND + W 创建:

  <li>This is a </li>
  <li>few sample</li>
  <li>list items</li>

Wrap each selected line in markup tags: SHIFT + CONTROL + COMMAND + W

For example, if you have:

  This is a 
  few sample
  list items 

Highlight all three lines and presss SHIFT + CONTROL + COMMAND + W to create:

  <li>This is a </li>
  <li>few sample</li>
  <li>list items</li>
躲猫猫 2024-07-12 19:52:54

生成 Lorem ipsum: lorem + TAB

将生成:

Lorem ipsum dolor sat amet,
脂肪精英协会
时间的流逝和劳动等
多洛·麦格纳·阿利夸。 最小广告
veniam,quis nostrud 练习
乌兰科·拉博里斯·尼西·乌特·阿利奎普·前埃伊
康莫多后果。 危险的事
悲伤中的reprehenderit中的voluptate
velit esse cillum dolore eu fugiat
无效。 例外圣
Occaecat cupidatat 非突出,sunt
莫利特的过失
动物就是劳动。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文