From: DongJazz <elite_edu@live.cn>
To: <help-gnu-emacs@gnu.org>
Subject: Problem: can't indent correct!
Date: Thu, 22 Nov 2012 02:33:17 +0000 [thread overview]
Message-ID: <COL111-W1882707C2342A23CD3989D955B0@phx.gbl> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2457 bytes --]
Hello!
when i use GNU Emacs to edit with php file, the indent style like the screentshot emacs1.png.
I want to the source formated as the sceenshot emacs2.png or emacs3.png.
Can u help me?
Thanks!
attach: The content of .emacs:
(require 'erc)
;;设置tab宽度为4
(setq-default indent-tabs-mode nil)
(setq tab-width 4 c-basic-offset 4)
;;关闭启动画面
(setq inhibit-startup-message t)
;;php-mode安装
;;(add-to-list 'load-path "~/elisp")
(require 'php-mode)
;;autocoplete安装
(add-to-list 'load-path "~/.emacs.d/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)(require 'auto-complete)
(require 'auto-complete-config)
(global-auto-complete-mode t)
(setq ac-auto-start 2)
(setq ac-auto-show-menu nil)
(setq ac-dwim nil) ; To get pop-ups with docs even if a word is uniquely completed
;; (setq ac-ignores '("." "=" "@" "[" "]" "(" ")"))
(define-key ac-completing-map (kbd "C-n") 'ac-next)
(define-key ac-completing-map (kbd "C-p") 'ac-previous)
;;----------------------------------------------------------------------------
;; Use Emacs' built-in TAB completion hooks to trigger AC (Emacs >= 23.2)
;;----------------------------------------------------------------------------
(setq tab-always-indent 'complete) ;; use 'complete when auto-complete is disabled
(add-to-list 'completion-styles 'initials t)
;; hook AC into completion-at-point
(defun set-auto-complete-as-completion-at-point-function ()
(setq completion-at-point-functions '(auto-complete)))
(add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point-function)
(set-default 'ac-sources
'(ac-source-dictionary
ac-source-words-in-buffer
ac-source-words-in-same-mode-buffers
ac-source-words-in-all-buffer))
(dolist (mode '(magit-log-edit-mode log-edit-mode org-mode text-mode haml-mode
sass-mode yaml-mode csv-mode espresso-mode haskell-mode
html-mode nxml-mode sh-mode smarty-mode clojure-mode
lisp-mode textile-mode markdown-mode tuareg-mode
js3-mode css-mode less-css-mode))
(add-to-list 'ac-modes mode))
;; Exclude very large buffers from dabbrev
(defun sanityinc/dabbrev-friend-buffer (other-buffer)
(< (buffer-size other-buffer) (* 1 1024 1024)))
(setq dabbrev-friend-buffer-function 'sanityinc/dabbrev-friend-buffer)
;;autocomplete安装
[-- Attachment #1.2: Type: text/html, Size: 3518 bytes --]
[-- Attachment #2: emacs1.png --]
[-- Type: image/png, Size: 31921 bytes --]
[-- Attachment #3: emacs2.png --]
[-- Type: image/png, Size: 31842 bytes --]
[-- Attachment #4: emacs3.png --]
[-- Type: image/png, Size: 31827 bytes --]
reply other threads:[~2012-11-22 2:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=COL111-W1882707C2342A23CD3989D955B0@phx.gbl \
--to=elite_edu@live.cn \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.