X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d_2%2Fconfig.org;h=a128b4abe3c224782a0f0c74b95ff5a9269624f1;hb=47cda1910204303533831b488c1bddc527e0c801;hp=438add5ab1a5742afc9dfb092cbdaa3768a490bd;hpb=3ceaa13d38dc0a152c6f613c5690f9fae3bd1271;p=dotfiles.git diff --git a/emacs.d_2/config.org b/emacs.d_2/config.org index 438add5..a128b4a 100644 --- a/emacs.d_2/config.org +++ b/emacs.d_2/config.org @@ -8,15 +8,7 @@ Most config are just copied from [[https://github.com/howardabrams/dot-files][ho * Basic Settings -** Setting Path - -Set the system PATH environment - -#+BEGIN_SRC emacs-lisp :tangle yes :results silent - - (setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin")) - -#+END_SRC +** Setting loading Path Set the emacs load path @@ -237,40 +229,30 @@ improve color for org-mode #+END_SRC - * Org-mode Settings -** 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)))) - -#+END_SRC - ** 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 - (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) + (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) @@ -283,6 +265,42 @@ Always indents header, and hide header leading starts so that no need type =#+ST #+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)))) + +#+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-]= + +#+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 + ** Task Management ** Capture @@ -415,6 +433,29 @@ I like [[https://github.com/coldnew/linum-relative][linum-relative]], just like #+END_SRC +** Multi-term + +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + + (use-package multi-term + :ensure t) + +#+END_SRC + +** ace-link + +[[https://github.com/abo-abo/ace-link][ace-link]] is a package written by [[https://github.com/abo-abo][Oleh Krehel]]. It is convenient to jump to link in help mode, info-mode, etc +Type =o= to go to the link + +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + + (use-package ace-link + :ensure t + :init + (ace-link-setup-default)) + +#+END_SRC + * Programming Languages ** Emacs Lisp @@ -425,14 +466,25 @@ I like [[https://github.com/coldnew/linum-relative][linum-relative]], just like :ensure t :init (add-hook 'emacs-lisp-mode-hook 'color-identifiers-mode) + :diminish color-identifiers-mode) #+END_SRC +** Perl + +[[https://www.emacswiki.org/emacs/CPerlMode][CPerl mode]] has more features than =PerlMode= for perl programming. Alias this to =CPerlMode= + +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + + (defalias 'perl-mode 'cperl-mode) + +#+END_SRC + * Others ** Shell pop mode ** Smartparens mode -** +***