[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need help

From: 马亮
Subject: need help
Date: Wed, 14 Apr 2010 15:00:09 +0800

Dear Emacs Team:
      My problem is When I input the "C", the emacs show "C-" in the command line, So I can't input the "C", this is too bother me.
Please give me a hand.
      Sorry for my poor English.
      My .emacs is:
(add-to-list 'load-path "~/.emacs.d/rails")
(add-to-list 'load-path "~/.emacs.d/yaml-mode")
(add-to-list 'load-path "~/.emacs.d/yasnippet")
(add-to-list 'load-path "~/.emacs.d/color-theme")
(add-to-list 'load-path "~/.emacs.d/auto-complete")
(add-to-list 'load-path "~/.emacs.d/git")
(add-to-list 'load-path "~/.emacs.d/js")
(add-to-list 'load-path "~/.emacs.d/cedet/common")
(add-to-list 'load-path "~/.emacs.d/ecb")
(add-to-list 'load-path "~/.emacs.d/cedet/eieio")
(add-to-list 'load-path "~/.emacs.d/cedet/speedbar")
(add-to-list 'load-path "~/.emacs.d/cedet/semantic")

(global-linum-mode t)
(require 'git-emacs)
(require 'git)
;(require 'git-blame)
(require 'rails)
(setq auto-mode-alist  (cons '("\\.rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist  (cons '("\\.erb$" . nxml-mode) auto-mode-alist))
(require 'yaml-mode)

(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
(add-hook 'yaml-mode-hook
           '(lambda ()
             (define-key yaml-mode-map "\C-m" 'newline-and-indent)))
(add-to-list 'auto-mode-alist '("\\.js\\'" . _javascript_-mode))
(autoload '_javascript_-mode "_javascript_" nil t)
;;(enabled with `font-lock-mode')
( global-font-lock-mode t)
( display-time )
( column-number-mode t)
(require 'color-theme)

(prefer-coding-system 'utf-8)
;;; VIEW
;;; No startup message
(setq inhibit-startup-message t)
;;; GUI font
;;(set-default-font "Bitstream Vera Sans Mono-12")
(set-default-font "Monaco-16")
;;; JP fonts
(set-fontset-font (frame-parameter nil 'font)
                  '("M+2VM+IPAG circle" . "unicode-bmp"))
;;; zh-CN fonts
(set-fontset-font (frame-parameter nil 'font)
                  '("Microsoft YaHei" . "unicode-bmp"))
;;; cjk-misc fonts
(set-fontset-font (frame-parameter nil 'font)
                  '("Monaco Vera Sans YuanTi Mono" . "unicode-bmp"))
;;; bopomofo fonts
(set-fontset-font (frame-parameter nil 'font)
                  '("Monaco Vera Sans YuanTi Mono" . "unicode-bmp"))
;;; symbol fonts
(set-fontset-font (frame-parameter nil 'font)
                  '("Monaco Vera Sans YuanTi" . "unicode-bmp"))


(require 'yasnippet-bundle)
(require 'auto-complete)
 (when (require 'auto-complete nil t)
   (require 'auto-complete-yasnippet)
;;   (require 'auto-complete-ruby)
;;   (require 'auto-complete-css)

   (global-auto-complete-mode t)
;;   (set-face-background 'ac-menu-face "lightgray")
;;   (set-face-underline 'ac-menu-face "darkgray")
;;   (set-face-background 'ac-selection-face "steelblue")
   (setq ac-auto-start nil)
   (global-set-key "\M-/" 'ac-start)
;;   (define-key ac-complete-mode-map "\t" 'ac-expand)
   (define-key ac-complete-mode-map "\M-j" 'ac-complete)
   (define-key ac-complete-mode-map "\M-n" 'ac-next)
   (define-key ac-complete-mode-map "\M-p" 'ac-previous)
;;   (setq ac-auto-start nil)
;;   (setq ac-dwim t)
   (set-default 'ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-words-in-buffer))

   (setq ac-modes
         (append ac-modes
   ;(add-to-list 'ac-trigger-commands 'org-self-insert-command)

   (add-hook 'emacs-lisp-mode-hook
             (lambda ()
               (setq ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-words-in-buffer ac-source-symbols))))

   (add-hook 'eshell-mode-hook
             (lambda ()
               (setq ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-files-in-current-dir ac-source-words-in-buffer))))

   (add-hook 'ruby-mode-hook
             (lambda ()
               (setq ac-omni-completion-sources '(("\\.\\=" ac-source-rcodetools))))))

(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" . python-mode)
(autoload 'python-mode "python-mode" "Python editing mode." t)

(add-hook 'dired-load-hook
               (lambda ()
                 (load "dired-x")
                 ;; Set dired-x global variables here.  For example:
                 ;; (setq dired-guess-shell-gnutar "gtar")
                 ;; (setq dired-x-hands-off-my-keys nil)
     (add-hook 'dired-mode-hook
               (lambda ()
                 ;; Set dired-x buffer-local variables here.  For example:
                 ;; (dired-omit-mode 1)
(put 'upcase-region 'disabled nil)
(add-hook 'ruby-mode-hook
            (add-hook 'local-write-file-hooks
                           (untabify (point-min) (point-max))
            (set (make-local-variable 'indent-tabs-mode) 'nil)
            (set (make-local-variable 'tab-width) 2)
            (imenu-add-to-menubar "IMENU")
            (define-key ruby-mode-map "C-m" 'newline-and-indent)
            (require 'ruby-electric)
            (ruby-electric-mode t)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]