emacs - add org init file
authorPeng Li <seudut@gmail.com>
Sun, 16 Aug 2015 16:21:02 +0000 (00:21 +0800)
committerPeng Li <seudut@gmail.com>
Sun, 16 Aug 2015 16:21:02 +0000 (00:21 +0800)
emacs.d/config/init-ggtags.el
emacs.d/config/init-helm.el
emacs.d/config/init-org.el
emacs.d/config/my-packages.el
emacs.d/init.el

index bc22547..d109e68 100644 (file)
@@ -2,14 +2,14 @@
 ;;;; show default directory on mode-line
 (ggtags-mode 1)
 
-;; using ido-completion for ggtags
-;; https://github.com/leoliu/ggtags/issues/56
-(setq ggtags-completing-read-function
-      (lambda (&rest args)
-        (apply #'ido-completing-read
-               (car args)
-               (all-completions "" ggtags-completion-table)
-               (cddr args))))
+;;;; using ido-completion for ggtags
+;;;; https://github.com/leoliu/ggtags/issues/56
+;;(setq ggtags-completing-read-function
+;;      (lambda (&rest args)
+;;        (apply #'ido-completing-read
+;;               (car args)
+;;               (all-completions "" ggtags-completion-table)
+;;               (cddr args))))
 
 (custom-set-variables
  '(ggtags-split-window-function (quote split-window-vertically)))
index 1b423b5..2487a0a 100644 (file)
@@ -4,12 +4,22 @@
 (require 'helm-adaptive)
 (helm-mode 1)
 
+;; helm-M-x
 (global-set-key (kbd "M-x") 'helm-M-x)
-;; http://tuhdo.github.io/helm-intro.html
-(global-set-key (kbd "C-x b") 'helm-mini)
+(setq helm-M-x-fuzzy-match t) ;; optional fuzzy matching for helm-M-x
+
+;; helm-mini
+;;(global-set-key (kbd "C-x b") 'helm-mini)
+(global-set-key (kbd "C-o C-j") 'helm-mini)
 (setq helm-buffers-fuzzy-matching t
       helm-recentf-fuzzy-match    t)
 
+;; helm-find-file
+;(global-set-key (kbd "C-x C-f") 'helm-find-files)
+(global-set-key (kbd "C-o C-f") 'helm-find-files)
+
+
+
 ;; http://stackoverflow.com/questions/9992475/how-to-show-anything-buffers-always-in-new-window
 (setq helm-display-function
       (lambda (buf)
         (switch-to-buffer buf)))
 
 
+;;;;;;; http://tuhdo.github.io/helm-intro.html
+;;;;;(setq helm-split-window-in-side-p           t ; open helm buffer inside current window, not occupy whole other window
+;;;;;      helm-move-to-line-cycle-in-source     t ; move to end or beginning of source when reaching top or bottom of source.
+;;;;;      helm-ff-search-library-in-sexp        t ; search for library in `require' and `declare-function' sexp.
+;;;;;      helm-scroll-amount                    8 ; scroll 8 lines other window using M-<next>/M-<prior>
+;;;;;      helm-ff-file-name-history-use-recentf t)
+
+
+
 (helm-autoresize-mode 1)
 (helm-adaptive-mode 1)
 (helm-adaptative-mode 1)
index 6d23722..f814058 100644 (file)
 (global-set-key "\C-cb" 'org-iswitchb)
 
 
-(add-hook 'org-mode-hook
-          (lambda ()
-                      (org-set-local 'yas/trigger-key [tab])
-                      (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
+;;(add-hook 'org-mode-hook
+;;          (lambda ()
+;;                      (org-set-local 'yas/trigger-key [tab])
+;;                      (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
+
+
+
+
+;; org-capture
+(setq org-directory "~/Private/org")
+(setq org-default-notes-file (concat org-directory "/notes.org"))
+(define-key global-map "\C-cc" 'org-capture)
+
+
+
+(provide 'init-org)
index e953b74..39faf48 100644 (file)
@@ -57,6 +57,8 @@
     pp-c-l
     session
     use-package
+    helm-gtags
+    icicles
   ) "a list of packages to ensure are installed at launch.")
 
 (require 'cl)
index 9005a3a..d0c3e17 100644 (file)
 ;;        savehist-additional-variables '(extended-command-history)) 
 
 ;    (setq split-height-threshold 0)
+
+
+
+
+
+;;;(require 'helm-gtags)
+;;;;(require 'setup-helm-gtags)
+;;;;(helm-gtags-mode 1)
+;;;;;; Enable helm-gtags-mode
+;;;(add-hook 'c-mode-hook 'helm-gtags-mode)
+;;;(add-hook 'c++-mode-hook 'helm-gtags-mode)
+;;;(add-hook 'asm-mode-hook 'helm-gtags-mode)
+;;;
+;;;;; customize
+;;;(custom-set-variables
+;;; '(helm-gtags-path-style 'relative)
+;;; '(helm-gtags-ignore-case t)
+;;; '(helm-gtags-auto-update t))
+;;;
+;;;;; key bindings
+;;;(eval-after-load "helm-gtags"
+;;;  '(progn
+;;;     (define-key helm-gtags-mode-map (kbd "M-t") 'helm-gtags-find-tag)
+;;;     (define-key helm-gtags-mode-map (kbd "M-r") 'helm-gtags-find-rtag)
+;;;     (define-key helm-gtags-mode-map (kbd "M-s") 'helm-gtags-find-symbol)
+;;;     (define-key helm-gtags-mode-map (kbd "M-g M-p") 'helm-gtags-parse-file)
+;;;     (define-key helm-gtags-mode-map (kbd "C-c <") 'helm-gtags-previous-history)
+;;;     (define-key helm-gtags-mode-map (kbd "C-c >") 'helm-gtags-next-history)
+;;;     (define-key helm-gtags-mode-map (kbd "M-,") 'helm-gtags-pop-stack)))
+
+
+;(require 'icicles)
+;(icy-mode 1)
+
+
+(require 'init-org)