我使用emacs 22.2.1和Ubuntu 9.04的Emacs返回縮進代碼行,當按下「返回」鍵
我在.emacs文件這樣做。每次按'''時縮進並創建一個新行;或「{}」
if(success == 0)
{
printf("Success\n");
<---- if I press return key here it will go
<-- to here, and I have to tab to go to the code line.
但是,如果我按返回鍵會帶我去柱0不是代碼的縮進行我的工作即
(require 'cc-mode)
;; Auto indent on insertion of a curly brace
(add-hook 'c-mode-hook '(lambda()
(c-toggle-auto-state t)))
;; Set coding style to indent 4 spaces
(setq c-default-style "bsd"
c-basic-offset 4)
你真的想'''創建一個換行符?這對循環做了什麼?如果你這樣做,那麼我會建議創建一個自插入的新函數;然後執行換行和縮進。 – 2009-10-28 18:48:57