C autocompletion and style added

This commit is contained in:
Sameer Rahmani 2011-12-03 14:58:45 +03:30
parent 5c29917c0b
commit 2b36631ba2
1 changed files with 24 additions and 8 deletions

View File

@ -14,14 +14,9 @@
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
(require 'python-mode)
;; Enabling ropemacs
;;(require 'pymacs)
;;(pymacs-load "ropemacs" "rope-")
(setq ropemacs-enable-shortcuts nil)
(setq ropemacs-local-prefix "C-c C-p")
;; php-mode
(autoload 'php-mode "php-mode" "PHP editing mode" t)
(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
(require 'yasnippet)
@ -67,6 +62,7 @@
(list "--ADDR--/pyemacs.sh" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py$" flymake-pyflakes-init)))
;; flymake shortkeys
(global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line)
(global-set-key (kbd "\C-x p") 'flymake-goto-next-error)
@ -82,5 +78,25 @@
))
(global-set-key (kbd "<backtab>") 'dabbrev-expand)
(autoload 'python-pylint "python-pylint")
(autoload 'pylint "python-pylint")
(global-linum-mode)
;; clang auto completion
(require 'auto-complete-clang)
(setq clang-completion-suppress-error 't)
(defun my-c-mode-common-hook()
(setq ac-auto-start nil)
(setq ac-expand-on-auto-complete nil)
(setq ac-quick-help-delay 0.3)
(define-key c-mode-base-map (kbd "M-3") 'ac-complete-clang)
)
;; Linux style for c programming
(setq c-default-style '((java-mode . "java")
(awk-mode . "awk")
(other . "linux")))
(load-file "--KUSOHOME--/src/kuso-ide.el")
(kuso-mode)