English 中文(简体)
2. 如何在类似于“Emacs”的案文中自动识别
原标题:how to auto-ident in Textmate similar to Emacs
  • 时间:2011-02-18 00:04:27
  •  标签:
  • textmate

• 如何在符合本法典效果的文稿中自动加入:

(defun set-newline-and-indent ()
  (local-set-key (kbd "RET")  newline-and-indent))
(add-hook  c-mode  set-newline-and-indent)

i.e. 我不想打上回来,然后向来。 我想要打上回来,并且根据语言自动地读到正确的地点。

感谢任何方面。

问题回答

案文应当自动做到。 如果有的话,你就可以在主编中制造一种习惯性宏观、指挥或刀子,而主编对你们来说都是如此。

  1. First find out the scope of the caret position (Bundles -> Bundle Development -> Show Scope). It should look something like source.ruby string.quoted.double.ruby.
  2. Then create a snippet that contains a newline and a tab.
  3. Then assign the snippet to the previously mentioned scope and assign it a shortcut.

If done correctly, your shortcut should trigger the bundle item in the assigned scope instead of inserting a new line.

查阅<代码>的主编 CSS -> nature{}(}) bundle items for a example.





相关问题
Explain this Regular Expression please

Regular Expressions are a complete void for me. I m dealing with one right now in TextMate that does what I want it to do...but I don t know WHY it does what I want it to do. /[[:alpha:]]+|( )/(?1::$...

TextMate: Adding to a bundle

There are a couple of bundles that I would like to add some functionality to. If I update the bundles via SVN will my additions/updates be replaced?

Textmate and vim modes

It is possible to emulate vim modes, macros and bindings in textmate?

Textmate, open file at Caret

I bet this is really obvious but I can t find how to open the linked file that the Caret is currently on in Textmate. For example in the likes of Dreamweaver you can click in the index.html portion of ...

Code folding on consecutive collect/select/reject/each

I play around with arrays and hashes quite a lot in ruby and end up with some code that looks like this: sum = two_dimensional_array.select{|i| i.collect{|j| j.to_i }.sum > 5 }.collect{|i| ...

git commit -a on Mac hangs when TextMate is quitted

I have core.editor set to "mate -w". On Leopard, git commit -a starts TextMate. After entering a commit log message, saving (Cmd-S), and quitting (Cmd-Q) TextMate, git would successfully complete the ...

热门标签