- (global-set-key (kbd "s-`") 'mode-line-other-buffer)
-
- (global-set-key (kbd "s-n") 'persp-next)
- (global-set-key (kbd "s-p") 'persp-prev)
-
- (global-set-key (kbd "s-=") 'text-scale-increase)
- (global-set-key (kbd "s--") 'text-scale-decrease)
-
-
- ;; someothers default mapping on super (command) key
- ;; s-s save-buffer
- ;; s-k kill-this-buffer
-
-
- ;; s-h --> ns-do-hide-emacs
- ;; s-j --> ido-switch-buffer +
- ;; s-k --> kill-this-buffer
- ;; s-l --> goto-line
- ;; s-; --> undefined
- ;; s-' --> next-multiframe-window
- ;; s-ret --> toggle-frame-fullscreen +
-
- ;; s-y --> ns-paste-secondary
- ;; s-u --> revert-buffer
- ;; s-i --> undefined - but used for iterm globally
- ;; s-o --> used for emacs globally
- ;; s-p --> projectile-persp-switch-project +
- ;; s-[ --> next-buffer +
- ;; s-] --> previous-buffer +
-
- ;; s-0 --> undefined
- ;; s-9 --> undefined
- ;; s-8 --> undefined
- ;; s-7 --> undefined
- ;; s-6 --> undefined
- ;; s-- --> center-line
- ;; s-= --> undefined
-
- ;; s-n --> make-frame
- ;; s-m --> iconify-frame
- ;; s-b --> undefined
- ;; s-, --> customize
- ;; s-. --> undefined
- ;; s-/ --> undefined
-
- ;; s-g --> isearch-repeat-forward
- ;; s-f --> projectile-find-file +
- ;; s-d --> isearch-repeat-background
- ;; s-s --> save-buffer
- ;; s-a --> make-whole-buffer
-
- ;; s-b --> undefined
- ;; s-v --> yank
- ;; s-c --> ns-copy-including-secondary
-
- ;; s-t --> ns-popup-font-panel
- ;; s-r --> undefined
- ;; s-e --> isearch-yanqk-kill
- ;; s-w --> delete-frame
- ;; s-q --> same-buffers-kill-emacs
-
- ;; s-` --> other-frame
-#+END_SRC
-
-** =M-s= bindings for searching
-
-I use the prefix =M-s= for searching in buffers
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
- (defun pl-make-keymap (key bindings)
- (setq keymap (make-sparse-keymap))
- (dolist (binding bindings)
- (define-key keymap (car binding) (cdr binding)))
- (global-set-key key keymap))
-
- (define-key minibuffer-local-map "\M-s" nil)
-
- (global-set-key (kbd "M-s s") 'isearch-forward-regexp)
- (define-key isearch-mode-map "\M-s" 'isearch-repeat-forward)
- (global-set-key (kbd "M-s r") 'isearch-backward-regexp)
- (define-key isearch-mode-map "\M-r" 'isearch-repeat-backward)
-
- (global-set-key (kbd "s-/") 'isearch-forward-regexp)
- (define-key isearch-mode-map (kbd "s-/") 'isearch-repeat-forward)
- (define-key isearch-mode-map (kbd "C-n") 'isearch-repeat-forward)
-
-
- (set-face-background 'ido-first-match "white")
-
- ;; M-s o --> occur
- ;; M-s s --> isearch-forward-regexp
- ;; M-s r --> isearch-backward-regexp
- ;; M-s w --> isearch-forward-word
- ;; M-s . --> isearch-forward-symbol-at-point
- ;; M-s _ --> isearch-forward-symbol
-
- ;; highlight bindings
- ;; M-s h . --> highlight-symbol-at-point
- ;; M-s h r --> highlight-regexp
- ;; M-s h u --> unhighlight-regexp
- ;; M-s h l --> highlight-lines-match-regexp
- ;; M-s h p --> highlight-phrase
- ;; M-s h f --> hi-lock-find-patterns
-
- ;;
- ;; (global-set-key (kbd "M-s M-r") 'isearch-backward-regexp)
- ;;
-
- ;; M-c
- ;; M-r
- ;; M-t
- ;; M-u,
-#+END_SRC
-
-Occur search key bindings
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
- (define-key occur-mode-map (kbd "C-n")
- (lambda ()
- (interactive)
- (occur-next)
- (occur-mode-goto-occurrence-other-window)
- (recenter)
- (other-window 1)))
-
- (define-key occur-mode-map (kbd "C-p")
- (lambda ()
- (interactive)
- (occur-prev)
- (occur-mode-goto-occurrence-other-window)
- (recenter)
- (other-window 1)))
-
-#+END_SRC
-
-
-** =M-o= as prefix key for windows
-
-** =M-g= as prefix key for launcher
-
-** others
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
-
- ;; C-' undefined
- ;; C-. undefined
-#+END_SRC
-
-* Org-mode Settings
-
-** Org-mode Basic setting
-
-Always indents header, and hide header leading starts so that no need type =#+STATUP: indent=
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
- (use-package org
- :ensure t
- :init
- (setq org-startup-indented t)
- (setq org-hide-leading-starts t)
- (setq org-src-fontify-natively t)
- (setq org-src-tab-acts-natively t)
- (setq org-confirm-babel-evaluate nil)
- (setq org-use-speed-commands t)
- (setq org-completion-use-ido t))
-
- (org-babel-do-load-languages
- 'org-babel-load-languages
- '((python . t)
- (C . t)
- (perl . t)
- (calc . t)
- (latex . t)
- (java . t)
- (ruby . t)
- (lisp . t)
- (scheme . t)
- (sh . t)
- (sqlite . t)
- (js . t)))
-
- ;; use current window for org source buffer editting
- (setq org-src-window-setup 'current-window )
-
-#+END_SRC
-
-** Org-bullets
-
-use [[https://github.com/sabof/org-bullets][org-bullets]] package to show utf-8 charactes
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (use-package org-bullets
- :ensure t
- :init
- (add-hook 'org-mode-hook
- (lambda ()
- (org-bullets-mode t))))
-
- (setq org-bullets-bullet-list '("⦿" "✪" "◉" "○" "►" "◆"))
-#+END_SRC
-
-** Worf Mode
-
-[[https://github.com/abo-abo/worf][worf]] mode is an extension of vi-like binding for org-mode.
-In =worf-mode=, it is mapping =[=, =]= as =worf-backward= and =worf-forward= in global, wich
-cause we cannot input =[= and =]=, so here I unset this mappings. And redifined this two to
-=M-[= and =M-]=. see this [[https://github.com/abo-abo/worf/issues/19#issuecomment-223756599][issue]]
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
- (use-package worf
- :ensure t
- :commands worf-mode
- :init (add-hook 'org-mode-hook 'worf-mode)
- ;; :config
- ;; (define-key worf-mode-map "[" nil)
- ;; (define-key worf-mode-map "]" nil)
- ;; (define-key worf-mode-map (kbd "M-[") 'worf-backward)
- ;; (define-key worf-mode-map (kbd "M-]") 'worf-forward)
- )
-
-#+END_SRC
-
-** Get Things Done
-
-Refer to [[http://doc.norang.ca/org-mode.html][Organize Your Life in Plain Text]]
-*** basic setup
-
-standard key binding
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (global-set-key "\C-cl" 'org-store-link)
- (global-set-key "\C-ca" 'org-agenda)
- (global-set-key "\C-cb" 'org-iswitchb)
-#+END_SRC
-
-*** Plain List
-
-Replace the list bullet =-=, =+=, with =•=, a litter change based [[https://github.com/howardabrams/dot-files/blob/master/emacs-org.org][here]]
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- ;; (use-package org-mode
- ;; :init
- ;; (font-lock-add-keywords 'org-mode
- ;; '(("^ *\\([-+]\\) "
- ;; (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))))
-#+END_SRC
-
-*** Todo Keywords
-
-refer to [[http://coldnew.github.io/coldnew-emacs/#orgheadline94][fancy todo states]],
-
-To track TODO state changes, the =!= is to insert a timetamp, =@= is to insert a note with
-timestamp for the state change.
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- ;; (setq org-todo-keywords
- ;; '((sequence "☛ TODO(t)" "|" "✔ DONE(d)")
- ;; (sequence "⚑ WAITING(w)" "|")
- ;; (sequence "|" "✘ CANCELLED(c)")))
- ; (setq org-todo-keyword-faces
- ; (quote ("TODO" . (:foreground "red" :weight bold))
- ; ("NEXT" . (:foreground "blue" :weight bold))
- ; ("WAITING" . (:foreground "forest green" :weight bold))
- ; ("DONE" . (:foreground "magenta" :weight bold))
- ; ("CANCELLED" . (:foreground "forest green" :weight bold))))
-
-
- (setq org-todo-keywords
- (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)")
- ;; (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" "PHONE" "MEETING")
- (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" ))))