Skip to content

Instantly share code, notes, and snippets.

@perveziqbal
Created November 26, 2012 14:23
Show Gist options
  • Select an option

  • Save perveziqbal/4148479 to your computer and use it in GitHub Desktop.

Select an option

Save perveziqbal/4148479 to your computer and use it in GitHub Desktop.
test .emacs
(add-to-list 'load-path "~/.emacs.d/")
(add-to-list 'load-path "~/.emacs.d/elpa/")
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))
(package-initialize)
(setq x-select-enable-clipboard t) ;; work with clipbaord
(delete-selection-mode 1) ;; selected text works like other editors
(fset 'yes-or-no-p 'y-or-n-p) ;; y instead of yes
(global-set-key [(f9)] 'compile)
(setq c-toggle-hungry-state 1) ;; delete all trailing space with single del
(setq-default c-basic-offset 4) ;; tab indent to 4 spaces
;;scons config
(setq auto-mode-alist
(cons '("SConstruct" . python-mode) auto-mode-alist))
(custom-set-variables
'(compile-command "scons -Q")
'(ede-project-directories (quote ("/home/pervez/programs/cpp/cpp_batch"))))
(add-to-list 'semantic-default-submodes 'global-semantic-mru-bookmark-mode)
(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-scheduler-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-stickyfunc-mode)
(add-to-list 'semantic-default-submodes 'global-cedet-m3-minor-mode 1)
(add-to-list 'semantic-default-submodes 'global-semantic-highlight-func-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-completions-mode)
(semantic-mode 1)
(global-ede-mode t)
(add-hook 'c-mode-common-hook
(lambda()
(local-set-key (kbd "C-c o") 'ff-find-other-file)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment