Skip to content

Instantly share code, notes, and snippets.

@iMagesh
Created January 12, 2012 09:26
Show Gist options
  • Save iMagesh/1599553 to your computer and use it in GitHub Desktop.
Save iMagesh/1599553 to your computer and use it in GitHub Desktop.
office emacs settings
;; Interactively Do Things (highly recommended, but not strictly required)
;; (require 'ido)
;; (ido-mode t)
;; Rinari
(add-to-list 'load-path "/etc/emacs/site-start.d/rinari")
(require 'rinari)
;; Emacs Titanium mode
; (add-to-list 'load-path "/etc/emacs/site-start.d/emacs-titanium")
; (require 'ac-titanium-mobile)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(display-time-mode t)
'(lambda nil t)
'(save-place t nil (saveplace))
'(show-paren-mode t)
'(size-indication-mode t)
'(speedbar-use-images t)
'(tabbar-cycle-scope (quote tabs))
'(tabbar-mode t nil (tabbar))
'(text-mode-hook (quote (turn-off-auto-fill text-mode-hook-identify))))
(custom-set-faces
;; tabbar disable grouping
(setq tabbar-buffer-groups-function
(lambda ()
(list "All"))) ;; code by Peter Barabas
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :foundry "unknown" :family "DejaVu Sans Mono")))))
;; config for the speedbar
;; (when window-system ; start speedbar if we're using a window system
;; (speedbar t))
;; load speedbar inside the same frame
(load-file "/etc/emacs/site-start.d/cedet-1.0/common/cedet.el")
(global-ede-mode 1) ; Enable the Project management system
(semantic-load-enable-code-helpers) ; Enable prototype help and smart completion
(global-srecode-minor-mode 1) ; Enable template insertion menu
(require 'speedbar)
(defconst my-speedbar-buffer-name "SPEEDBAR")
; (defconst my-speedbar-buffer-name " SPEEDBAR") ; try this if you get "Wrong type argument: stringp, nil"
(defun my-speedbar-no-separate-frame ()
(interactive)
(when (not (buffer-live-p speedbar-buffer))
(setq speedbar-buffer (get-buffer-create my-speedbar-buffer-name)
speedbar-frame (selected-frame)
dframe-attached-frame (selected-frame)
speedbar-select-frame-method 'attached
speedbar-verbosity-level 0
speedbar-last-selected-file nil)
(set-buffer speedbar-buffer)
(speedbar-mode)
(speedbar-reconfigure-keymaps)
(speedbar-update-contents)
(speedbar-set-timer 1)
(make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook
(lambda () (when (eq (current-buffer) speedbar-buffer)
(setq speedbar-frame nil
dframe-attached-frame nil
speedbar-buffer nil)
(speedbar-set-timer nil)))))
(set-window-buffer (selected-window)
(get-buffer my-speedbar-buffer-name)))
;; Markdown Mode
(load-file "/etc/emacs/site-start.d/markdown-mode.el")
(autoload 'markdown-mode "markdown-mode.el"
"Major mode for editing Markdown files" t)
(setq auto-mode-alist
(cons '("\\.md" . markdown-mode) auto-mode-alist))
;; Android Mode
(add-to-list 'load-path "/home/magesh/android-sdk-linux_86/tools/lib/")
(require 'android)
;;; rhtml-mode
(add-to-list 'load-path "/etc/emacs/site-start.d/rhtml")
(require 'rhtml-mode)
(add-hook 'rhtml-mode-hook
(lambda () (rinari-launch)))
(add-hook 'haml-mode-hook 'rinari-minor-mode)
;; auto-refresh all buffers when file changed
(global-auto-revert-mode t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment