Code Monkey home page Code Monkey logo

zhaoemacs.d's Introduction

Okay , it comes from flyingmchine, I have test in the two systems windows10 and ubuntu, all valid for newer.

参考我写的emacs安装教程 for ubuntu and windows

C-c [a-z] and F5~F9是专门预留给用户自定义快捷键的,所有的major和minor都应该遵守这一规范。 key-binding-convention

1.为了引入clj-refactor(一个好用的补全包的工具)

click clj-refactor

  1. M-X package-install clj-refactor(感觉每次得装上2遍) 然后在setup-clojure.el添加配置代码
(require 'clj-refactor)

(defun my-clojure-mode-hook ()
    (clj-refactor-mode 1)
    (yas-minor-mode 1) ; for adding require/use/import statements
    ;; This choice of keybinding leaves cider-macroexpand-1 unbound
    (cljr-add-keybindings-with-prefix "C-c C-m"))

2.为了使用类似nerdtree的neotree(ui.el)

click neotree

click all-the-icons

  1. 在init.el添加了
     neotree
     all-the-icons   ;;;you need to download fonts

注意,在第一次使用时候,执行M-x all-the-icons-install-fonts,会提示安装字体,不然 打开neotree会出现部分无法显示。

  1. 并且在ui.el添加了

(require 'neotree)
(global-set-key [f6] 'neotree-toggle)
(require 'all-the-icons)
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))


3.增加了一些其他插件

放在了init.el auto-complete

dracula-theme

hlinum

which-key

restclient

browse-kill-ring

对应的auto-complete(editing.el)配置如下

;; init auto-complete
(require 'auto-complete-config)
(ac-config-default)


对应的dracula-theme(ui.el)配置如下

(load-theme 'dracula t)
;; workaround blue problem https://github.com/bbatsov/solarized-emacs/issues/18
(custom-set-faces
(if (not window-system)
  '(default ((t (:background "nil"))))))

对应的which-key(ui.el)和hlinum(editing.el)配置如下

;; set up some useful mode
(which-key-mode)


(require 'hlinum)
(hlinum-activate)
(set-face-attribute 'linum nil :background nil)
(set-face-foreground 'linum "#f8f8f2")
(setq linum-format "%d ")
;; (set-face-attribute 'hl-line nil :foreground nil :background "#330")
(set-face-attribute 'hl-line nil :foreground nil :background "#353535")

;; 2017/7/13
(browse-kill-ring-default-keybindings)

 

4. 修正rainbow(editing.el)

;; yay rainbows!
;;(global-rainbow-delimiters-mode t)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)

5. expand-region(editing.el)

Seen from emacs-rocks-9

click expand-region

;; init expand-region
(require 'expand-region)
(global-unset-key (kbd "M--"))
(global-set-key (kbd "M-=") 'er/expand-region)
(global-set-key (kbd "M--") 'er/contract-region)


可以快选择。

6. bookmark

click bookmark+

快捷键

c-x r l : 查询bookmark
c-x r m : 添加
c-x r b : 跳转

7. org-mode

特详细的org-mode教程

GTD Workflow

常用快捷键:

Tab打开标题
c-c c-n 光标沿标题方向向下移动
c-c c-p 光标沿标题方向向上移动
c-c c-q 添加标题的tag
c-c a 打开agender
c-c c-t 添加当前标题的todo
c-c c-d 添加当前标题deadline
c-c c-s 添加当前标题的schedule
<s Tab 添加src块
<e Tab  添加example快

c-c shift-< 打开calendar
c-c shift-> 添加calendar鼠标下的日期



M-RET 插入同级列表项
M-S-RET 插入有 checkbox的同级列表项
C-c C-c 改变 checkbox状态
M-left/right 改变列表项层级关系
M-up/dowm 上下移动列表项

输入C-c . 会出现一个日历,我们点选相应的时间即可插入。

8. chez-scheme的集成(scheme-editing.el)

注意你的scheme路径,参考 emacs


(require 'cmuscheme)
(setq scheme-program-name "E:\\ChezScheme\\a6nt\\bin\\a6nt\\scheme")         ;; 如果用 Petite 就改成 "petite"

打开ss,scm,rkt结尾的文件即可执行F5和F7(其他文件未绑定)

Okey, below is the new interface,

image

9. cua mode(deleted)

本来想着配置cua(Common User Access) mode,后来想着ctrl-v和传统的kill-ring 冲突,于是就把它删掉, 而且传统的kill-ring 队列的风格也是不错。

当前的配置文档使用M-y就可以调用(注意ctrl+y表示黏贴 M-W表示添加到黏贴板) (browse-kill-ring-default-keybindings),这样可以看到所有删除和剪切的历史, 通过多次摁M-y可以切换不同的历史(还得多熟练),查看editing.el最后一行。

10. 想着安装上markdown-mode+(major-mode)

M-x package-install  markdown-mode+

在init.el的my-package list 增加markdown-mode+,这样每次打开markdown的md后缀结尾的后缀名就会自动渲染,这也是emacs的mode的一种运用.

11. server+clinet

emacs经常地使用方式是

 长时间打开server(通过runemacs daemon,并敲入M-x server-start)
 然后就可以在ubuntu系统的命令行使用emacsclient 文件名
 或者 windows系统的TotalCommander通过emacsclientw(相比于emacsclient,他能够直接跳转到serve断)查看文件,这样打开的文件
 就会出现在server端的屏幕上,使用ctrl+x #来关闭

这样启动emacs方便些。

现在在配置文件init.el增加了(server start) 这样就不需要每次runemacs daemon的时候还需要启动server。



到目前位置,ubuntu和windows的配置能够同时使用!!!Excellent!

new Pic

12. info window

类似于vim的help系统,emacs的info系统也做得很强大,

使用 C-h i 可以得到一个info window, 一个不错的帮助平台

  1. 使用space键执行翻屏(scroll one screen at a time)

  2. [ and ] Previous /Next node

  3. 使用n和p跳转上下章节(同级目录跳转)(Previous/next sibling node)

  4. l and r可以返回和向前跳转(in history)(l and r go back /forward in history) 类似于浏览器的回退和前进

  5. Tab 表示在links之间跳转

  6. Enter进入链接, m 弹出一个prompt minibuffer, for a menu item name to choose it.

  7. q 推出info browser

     Everyday reading
     For everyday reading, you want SPACE for browsing and reading 
     as it "does what you want". It thumbs through a page until it
     reaches the end. Then, it either picks the next sub node or the
     next chapter. For browsing ,use [ and ] to cycle back and forth
     through nodes.
    

c-h i 具有menu的文档下,可以输入m 命令得到menu菜单,执行定义到某个manual下, 常用的组合过程c-h i m

C-h F 函数说明M-x describe-function

C-h V 变量说明M-x describe-variable

C-h a 打开apropos symbol的regex字符关联的系统说明

C-h d 类似于apropos的regex字符关联的系统文档

C-h k 查看绑定快捷键的说明,比如你想查看C-x #表示什么意思,就可以执行该命令

13. mode helper system

使用C-h m等效于M-x describe-mode 可以很方便打开当前的buffer后缀对应的major-mode的帮助信息(一般一个 文件后缀对应一个major-mode和多个minor-modes)

比如在打开的markdown md后缀文件下,会打开markdown major-mode的帮助信息,有相关的 快捷键等帮助信息

14. 多窗口

C-x 5 2 打开当前window相同的frame 如果关掉当前frame,执行C-x 5 0 如果关掉其他frame,执行C-x 5 1

C-x 1 delete other windows. C-x 2 split window below. C-x 3 split window right. C-x 0 delete the actie window right.

15. 括号相关的跳转

C-M-d Move down into a list

C-M-u Move up out of a list

C-M-n Move forward to the next list

C-M-p Move backward to the previous list

C-M-a Move to beginning of defun

C-M-e Move to end of defun

16. multiple-cursors(editiing.el)

Seen from emacs-rocks-13

函数名

  1. mc/mark-next-like-this (C->)
  2. mc/edit-lines (C-S-c C-S-c 标记M-h区域)
  3. mc/mark-previous-like-this(C-<)
  4. mc/mark-all-like-this (C-c C-<)

按照官网简单配置

在没有multiple-cursors的前提下,你也可以使用C-x r t 来标记当前 光标前的所有行,当作一个矩形区域,然后可以多行编辑

当然你也可以使用C-x Space Esc Down Down 等操作来标记多行

而有了multiple-cursors, 你现在可以配合M-h 选择一个段落,然后C-S-c C-S-c

或者你可以使用C-> 来mark当前光标下单词,并查找下一处出现的地方,最终摁下Enter 键,表示确认 。

较常用的命令,M-x mc/mark-all-words-like-this

17. vim-surround to evil-surround

有时候需要给单词或者字段组合增加个双引号或者单引号, 亦或者括号, 在emcas可以使用evil-surround(vim中使用vim-surround)

add (global-evil-surround-mode 1) in the editing.el

add evil-surround into my-package list

18. mo-git-blame and ivy

函数名

  1. ivy-resume
  2. counsel-M-x
  3. counsel-find-file
  4. counsel-describe-variable
  5. counsel-find-library
  6. counsel-info-lookup-symbol
  7. counsel-unicode-char
  8. counsel-ag
  9. counsel-locate
  10. counsel-rhythmbox
  11. counsel-expression-history
  12. counsel-git-grep
  13. swiper

我见过比较好的git教程

git配置

*注意,默认的windows git 目录是在 c:/users/username/AppData/Roaming/.gitconfig *

click magit


;; set up some useful mode
(which-key-mode)

;; magit
(global-set-key (kbd "C-x g") 'magit-status)


阅读emacs教程安装了git blame git blame 安装 ivy ivy-dired-history all-the-icons-ivy ivy-rich

ivy是一个类似emacs helm的东西,可以方便查找buffer和file,

(ivy-mode 1)
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t)
(global-set-key "\C-s" 'swiper)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "<f6>") 'ivy-resume)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
(global-set-key (kbd "<f1> l") 'counsel-find-library)
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
(global-set-key (kbd "C-c g") 'counsel-git)
(global-set-key (kbd "C-c j") 'counsel-git-grep)
(global-set-key (kbd "C-c k") 'counsel-ag)
(global-set-key (kbd "C-x l") 'counsel-locate)
(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
(define-key read-expression-map (kbd "C-r") 'counsel-expression-history)

注意可以继续使用C-s搜索上一次内容,如果你执行C-s C-w那么就会搜索当前光标下的单词,如果C-r则是反向执行

我现在都是使用M-x swiper M-x-git M-x counsel-find-file

M-x counsel-find-library M-x counsel-git 来做实验,看看速度怎么样, 发现M-x counsel-git-grep速度很慢,没必要用~ M-x swiper 搜索buffer,vim的 对应功能是vimfiler,挺好用的!

ivy使用手册

于是现在也在navigation.el增加了ivy-mode.

19. 改进org-mode配置

在.orgConf.el中添加的正确org-capture-templates,使用快捷键C-c c来捕捉你的想法并进行记录。 org-remember打算删掉。

有趣的大纲查看命令 C-c \

有趣的添加当前日期命令 C-c .

在查看org-agenda 的时候可以使用v来选择你要看的日、月、年视图等

有趣的org帮助 LINK:info:org:Top.

为了显示clean的org文档,在.org.conf添加了 (setq org-startup-indented t)

为了显示图片,在.org.conf 添加了 (setq auto-image-fill-mode t)

20. add calendar and bookmark shortkey

函数名:
  1. calendar
  2. list-bookmarks

edit the ui.el, and add the below information,and also add the cal-china-x农历信息


;; in the digital keyboard add calendar and bookmark
(global-set-key [kp-7] 'calendar)
(global-set-key [kp-8] 'list-bookmarks)
(setq bookmark-save-flag 1) ;; everytime bookmark is changed, automatically save it
(setq bookmark-save-flag t) ;; save bookmark when emacs quit


注意,有可能第一次按下7和8没有反应,得emacs启动之后,就会有效果了

农历的效果。(按下S 可以查看cursor所在的日出日落时间) calendar

21. 使用21世纪产品complte替换autocomplete

函数名:

company

  1. 增加company in the my-packages @ init.el
  2. write code below in the editing.el
(add-hook 'after-init-hook 'global-company-mode)
  1. comment out关于auto-complete的配置@editing.el
;; subsititude by compltee
;; init auto-complete
;;(require 'auto-complete-config)
;;(ac-config-default)

可以进一步阅读company-mode官网

22. 添加了evil-surround(但是得有evil,所以暂时搁置)

evil-surround

  1. 增加evil-surround in the my-packages @init.el
  2. add the setting code for evil-surround

(require 'evil-surround)
(global-evil-surround-mode 1)

23. 为了使用iy-go-to-char结合key-chord

函数名:

1.iy-go-to-char 2. 宏名 key-chord-define-global

iy-go-to-char

key-chord

  1. 增加iy-go-to-char and key-chord in the my-package @init.el
  2. add the key-chord setting code @editing.el

(require 'key-chord)
(key-chord-mode 1)
;; Move to char similar to "f" in vim, f+g forward  d+f backward
(key-chord-define-global "ff" 'iy-go-to-char)
(key-chord-define-global "aa" 'iy-go-to-char-backward)

  1. so 你可以快速的摁下ff(俩字母跳转)跳转到一个输入框让你输入一个char 或者 aa向后全局跳转(进入重复查找模式,反复摁下搜索字符,逐步向前或者 向后查找)

key-chord设置的是两个相同的key是最长0.2s延迟输入,若是两个不同的key则是 0.1s延迟输入,见keychord.el

24. ace-jump-mode

Seen from emacs-rocks-10

函数名

  1. ace-jump-mode

ace-jump-mode

  1. add the ace-jump-mode in the my-packags @init.el
  2. add the setting code for the ace-jump-mode @navigation.el
(autoload
  'ace-jump-mode
  "ace-jump-mode"
  "Emacs quick move minor mode"
  t)
;; you can select the key you prefer to
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
  1. when you input "C-c SPC" , the minibuffer will prompt you to input the character you wana jump.

ace

25. emacs标记

有时候写着东西,你需要跳转到文内其他地方,查完之后,又想跳回来,vim比较简单(C-o)

emacs对应的先标记 C-x SPC a, a代表标记键,可以为a-z 然后调回来使用, C-x r j ,输入a即可

有些人也说可以用C-SPC,然后C-x c-x跳转即可(进一步可以参考标题16)。

26. transpose character and words

Seen from emacs-rocks-2 and 3

C-t transpose two chars

M-t transpose two words

C-x C-t transpose lines

M-u make letters uppercase in word from cursor position to end

M-c simply make first letter in word uppercase

M-l opposite to M-u

27. Dired details

  1. add dired-details+ and dired+ to mypackages @init.el

  2. add the below code @ui.el

(require 'dired-details)
(setq-default dired-details-hidden-string "--- ")
(dired-details-install)


;;Move files between split panes
(setq dired-dwim-target t)

  1. when you M-x dired you can see the clean info in the directory, then you can use right parenthesis to get the detail info(user,priviliedge,dates etc) ,you can use left parenthesis to hide the details of file.

so

a. use m to mark the files, use u to unmark the files

b. use D to delete the files in prepare, and execute with x

c. when you finish m , you can move(with command R) ,you can copy(with command C), you can delete(with command d)

d. use plus(+) to create an new directory.

e. Funny place. Emacs can simultaneously open two directory by open two buffers in the left-right zones, so you can use left zones as source directory, the right zones as target directory for copying and moving files.

dired

28. modify yassnipet and dired from magnars

M-x package-install buster-snippet

M-x package-install angular-snippet

M-x package-install datomic-snippet

  1. copy all the snippets folder into your .emacs.d dir.
  2. add require message @init.el(you can check it)

and also add the htmlize, highlight-escape-sequences,and js2-mode package

29.html-mode

函数

  1. zencoding-expand-line add the zencoding-mode @setup-html-mode.el.

在html-mode中又增加了zen-conding-mode,快捷的编辑html(C-j)

30. move-text

函数

  1. move-text-up
  2. move-text-down

move-text

(move-text-default-bindings) add in the editing.el,

31. 我有一个困惑:how should I do with Org-mode

看了Sachac的baby-steps-org-todo,我明白了relate(关系到底是什么),也就是todo大致应该group into project, all the subtitle should be connected or related to the project, that's todo!

* Project ABC
** TODO A task related to Project ABC(The first most important thing)
** TODO Another task related to ABC(The second most important thing)
** TODO Etc.(What about others?)
* Project XYZ
** TODO A task related to Project XYZpll(The first most important thing)
** TODO Another task related to XYZ(The second most important thing)
** TODO Etc.
* Tasks
** TODO Miscellaneous
** TODO tasks
** TODO go here

baby-org-mode

Hope ,when you see it, do work for you!

32. 快速注释

C-x C-; 单行注释

M-h M-x comment-with-box 注释一个区域

33. projectile介绍

函数

  1. projectile-find-file 快捷键C-c p f

你可以使用 M-x projectile 进入projectile模式

在vim中有一个类似的软件叫做Ctrl-space,projectile会把git或者其他代码管理软件,亦或者你的lein,maven,budler等 相关的文件夹当作一个project,如果啥都没有创建一个.projectile,那么该文件夹也会被识别为project

基本查找项目文件内的file(C-c是保留的快捷键)

C-c p f

projectile

34. Web-mode介绍

web-mode.el is an emacs major mode for editing web templates aka HTML files embedding parts (CSS/JavaScript) and blocks (pre rendered by client/server side engines).

更详细的使用方法参考Web-mode.org

35. 自动弹出org-agenda窗口(5min idle)

在阅读Sachac.org的idle-time了解到在emacs闲置状态时候可以让其自动 打开org-agenda的命令,她也是参考了Displaying your Org agenda after idle time, 进一步使用spacemacs-dark主题替换掉之前的的dracula-theme,参考editing.el的配置

spacemacs

36. tag标签增加

在emacs配置文件夹下的.orgConf增加了新的标签控制,觉得还是挺有用的,有时候可以在newgtd.org中c-c c-q添加一下 这样就能提醒你,同时也加入了project和context的**(参考todotxt.org),project在标签中使用+打头的,而 context类似于签到地方,使用@字符打头的。

("紧急重要" . ?a)
("紧急不重要" . ?b)
("不紧急重要" . ?c)
("不紧急不重要" . ?d)

37. org-capture-template的修改

("t" "Todo" entry  (file+headline "~/.emacs.d/GTD/newgtd.org" "Tasks")
                    "* TODO [#B] %^{Task} %^g
                    :PROPERTIES:
                    :Effort: %^{effort|1:00|0:05|0:15|0:30|2:00|4:00}
                    :END:
                    Captured %<%Y-%m-%d %H:%M>
                    %?

                    %i
                    " )
  1. todo模板增加了^g的控制,强制需要输入tag才让你键入org system中
  2. 模板中的%?的作用表示当完成之后 cursor会出现在那里,并且可以开始输入
  3. 增加了权限控制[#A] [#B] [#C] ,并且在随后的org-agenda-custom-command中增加了pa,pb,pc快速定义到满足某一权限的todo terms
  4. 增加了Effort的属性控制, %^{}是一个listbox的选项,prompt you to input the values in the list.

部分org-agenda-custom-command的代码:

        ("p" . "Priorities")
        ("pa" "A items" tags-todo "+PRIORITY=\"A\"")
        ("pb" "B items" tags-todo "+PRIORITY=\"B\"")
        ("pc" "C items" tags-todo "+PRIORITY=\"C\"")

38. cljr-refactor实验

函数

  1. cljr-thread-last-all 使用-->进行重构,-->意思抽取最后一个参数放在第一行,然后倒数第二个第二行 依次排列
  2. cljr-thread-first-all 使用->进行重构, -> 意思抽取最内层的第一个参数放在第一行 然后递归出来。
  3. cljr-unwind-all -->和->的反向操作
  4. cljr-unwind
  5. cljr-cycle-privacy
  6. cljr-add-missing-libspec
  7. cljr-promote-function 从#(%)匿名函数的形式提高到(fn [k] (-> k ..))的形式,类似于org-mode的%^{}会提醒 你输入对应的值,所以现在如果有几个%就会提醒你输入几次

(map square (filter even? [1 2  3 4]))
(->> [1 2  3 4]
     (filter even?)
     (map square))
(-> square
    (map (filter even? [1 2  3 4])))

(map str/join (map reverse (map (conj [:a :ab] :abc))))
;; cljr-unwind-all   pk   cljr-thread-last-all       pk cljr-thread-first-all
(->> :abc
     (conj [:a :ab])
     map
     (map reverse)
     (map str/join))
(map str/join (map reverse (map (conj [:a :ab] :abc))))

;; cljr-cycle-privacy
(defn- foo
  (println "hello"))


(map #(-> % (str "!") symbol) '[aaa bbb]) ;;光标定位到#()里头即可
(map (fn [k] (-> k (str "!") symbol)) '[aaa bbb])


(reduce #(assoc %1 %2 (name %2)) {} [:a :b :c])
(reduce (fn [k m] (assoc k m (name m))) {} [:a :b :c])

39. 重新思考init.el

你会使用(add-to-list 'load-path Directory-name) 来添加Directory-name的信息到Emacs interpreter的查找路径中, 这样你就可以load-file或者你可以使用(eval-after-load 'js2-mode '(require 'setup-js2-mode))来加载provide内容(注意你之所以能够require,是因为你做了两部分工作

  1. (add-to-list 'load-path "~/.emacs.d/customizations/magnars/") 添加文件搜索路径
  2. 你在setup-js2-mode.el最后一行添加了(provide 'setup-js2-mode)

经过1和2两个工作之后你才可以在init.el中执行, (eval-after-load 'js2-mode '(require 'setup-js2-mode))

Emacs is an programmable text and plain editor(Emacs lisp is a programmable program langauge), you can extend,tinker,tweak it with your imagenation. Some one said:"If you teach some one emacs command,he can hack one night,and if you teach someone how to create emacs commands ,he can hack one lifetime". Emacs is wonderful, fucking awesome, fucking flexible.

Go to understand what emacs thinks and touch the emacs interpreter, read the book 《Writing Gnu Emacs Extension

**C-c 通常代表的是 applied 某种功能到文件中 **

40. emacs结合fortran(windows 和ubuntu开始有点不一样了)

使用fortpy,但是安装它废了不少劲,首先得安装deferred M-x package-install deferred 安了4遍才安装上

然后是结合python,所以得事先在python命令行安装

pip install virtualenv
pip install epc
pip install fortpy

安装fortpy python还提醒vcpython.exe(windows user 需要注意)

针对windows的/问题

stutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27


原因是需要vcpython2.7来编译 fortpy套装的scipy-0.19.1.tar.gz,所以如果事先
安装scipy,可能不需要vcpython2.7. 这一步编译时间也得10min钟

Installing collected packages: numpy, scipy, pytz, cycler, pyparsing, functools32, matplotlib, tqdm, argparse, pycparser, cffi, pynacl, asn1crypto, idna, ipaddress, enum34, cryptography, bcrypt, pyasn1, paramiko, termcolor, fortpy

总共需要安装的python套件

又遇到这种问题
      raise NotFoundError('no lapack/blas resources found')
    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
缺少lapacka/blas

通过http://www.voidcn.com/article/p-cyvbbzty-bhh.html
python资源真是丰富
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

通过http://blog.csdn.net/inter_peng/article/details/53222562
指示,进行命令行安装whl文件(pip识别文件)

D:\迅雷下载>pip install "numpy-1.13.3+mkl-cp27-cp27m-win_amd64.whl"
Processing d:\????\numpy-1.13.3+mkl-cp27-cp27m-win_amd64.whl
Installing collected packages: numpy
  Found existing installation: numpy 1.13.3
    Uninstalling numpy-1.13.3:
      Successfully uninstalled numpy-1.13.3
Successfully installed numpy-1.13.3+mkl

D:\迅雷下载>pip install scipy-0.19.1-cp27-cp27m-win_amd64.whl
Processing d:\????\scipy-0.19.1-cp27-cp27m-win_amd64.whl
Requirement already satisfied: numpy>=1.8.2 in c:\python27\lib\site-packages (from scipy==0.19.1)
Installing collected packages: scipy
Successfully installed scipy-0.19.1



Fuck, it works!
  Running setup.py install for pycparser ... done
  Running setup.py install for termcolor ... done
Successfully installed argparse-1.4.0 asn1crypto-0.23.0 bcrypt-3.1.3 cffi-1.11.0 cryptography-2.0.3 cycler-0.10.0 enum34-1.1.6 fortpy-1.7.7 functools32-3.2.3.post2 idna-2.6 ipaddress-1.0.18 matplotlib-2.0.2 paramiko-2.3.1 pyasn1-0.3.6 pycparser-2.18 pynacl-1.1.2 pyparsing-2.2.0 pytz-2017.2 termcolor-1.1.0 tqdm-4.17.1


41 使用frotran-index-args

fortran-index-args

科研遗产fortran代码经常出现大量的变量,为了方便观看最好使用该工具,可以看一个小的fortran-index-args gif

为了使打开fortran90文件加载f90-mode,于是在fortran-editing.el增加如下代码

;;---------------f90--------------------
(setq auto-mode-alist
    (append '(("\\.f90\\'" . f90-mode)
             ("\\.f95\\'" . f90-mode))
     auto-mode-alist))

f90-mode

42. Ubuntu system quickly download leining

You need to have java in your system first.

  1. download leining baiduyun,and put it under the ~/.lein/self-installs/ directory.
  2. download the lein script in the official network, chmod +x lein
  3. lein repl, ok it runs

43. quick sort

seen from jianshu

(defn quick-sort [nums] 
  (if (< (count nums) 2) 
    nums 
    (concat 
      (quick-sort (filter #(< % (first nums)) nums)) 
      (filter #(= % (first nums)) nums) 
      (quick-sort (filter #(> % (first nums)) nums)))))


C-c C-e to see the sexp result,

quicsort

44. literal programming and gtd

  1. literal programming

  2. how-to-use-Org-Babal-for-R

  3. uncle glassman

  4. How I use Emacs and Org-mode to implement GTD very important for using org-mode in emacs!

  5. Norang: org-mode Organize Your life in plain text 6. Remember Mode Tutorial 早先使用remember mode,现在基本上替换为org capture即可

  6. Your Mind is for having ideas, not holding them---David Allen Use org-mode to hold it

    a. Capture(collect what has your attention) Use an in-tray, notepad, digital list, or voice recorder to capture everything that has your attention. Little, big, personal and professional—all your to-do’s, projects, things to handle or finish. b. Clarify(Process what it means) Take everything that you capture and ask: Is it actionable? If no, then trash it, incubate it, or file it as reference. If yes, decide the very next action required. If it will take less than two minutes, do it now. If not, delegate it if you can; or put it on a list to do when you can. c. Organize(put it where it belongs) Put action reminders on the right lists. For example, create lists for the appropriate categories —calls to make, errands to run, emails to send, etc. d. Reflect(review frequently,weekly review, monthly review) Look over your lists as often as necessary to trust your choices about what to do next. Do a weekly review to get clear, get current, and get creative. e. Engage(Simply do) Use your system to take appropriate actions with confidence.

45. 更好的org-mode bullet

Frome uncle glassman , found the setting about the bullets orgmode-wordprocessor,

add code below in the .orgConf.el

(require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))

bullet style

46. more better font title bullet

(let* ((variable-tuple (cond ((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro"))
                             ((x-list-fonts "Lucida Grande")   '(:font "Lucida Grande"))
                             ((x-list-fonts "Verdana")         '(:font "Verdana"))
                             ((x-family-fonts "Sans Serif")    '(:family "Sans Serif"))
                             (nil (warn "Cannot find a Sans Serif Font.  Install Source Sans Pro."))))
       (base-font-color     (face-foreground 'default nil 'default))
       (headline           `(:inherit default :weight bold :foreground ,base-font-color)))

  (custom-theme-set-faces 'user
                          `(org-level-8 ((t (,@headline ,@variable-tuple))))
                          `(org-level-7 ((t (,@headline ,@variable-tuple))))
                          `(org-level-6 ((t (,@headline ,@variable-tuple))))
                          `(org-level-5 ((t (,@headline ,@variable-tuple))))
                          `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1))))
                          `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25))))
                          `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.5))))
                          `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.75))))
                          `(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil))))))

new gtd style

47. 常见verb(*****)

任务(TASKS)

任何任务都应该用明确的动词来表征「Next Action」的行为,并记述该动词的目的和行为的目标。这样一来你不需要再次思考任务的形式,从而简单地执行。比如,与其写「周报告」不如以「总结这一周的来表述任务的内容更加能够容易理解该做什么。

我用以下的词汇来表征任务表:


处理,提问,回避,购买,变更,明确(澄清),收集,委托,从事,深思,创建,决定,延期,开发,废弃,
重做,下载,输入,整理(file),跟踪,雇佣,改善,增 加,通知,查询,维持,测定,监测,订货,
描画,打电话,设置优先级,购入,质疑,减少,记忆,修理,回复,报告,调查研究,解决,回顾,
安排,卖,送,服务,详细设定,开始, 停止,建议,清扫,坐车,更新,升级,写。

构建,定义,执行列表(makefile),做, 执行, 安排, 推送, 拉取, 观察, 仔细观察,感觉,拾取,拓展
工作,学习,使用,提高,查找,分类,阅读,练习,分解,深入,
见面,加载,调试,追踪

Each task is written to begin with a "Next Action" Verb and an object or target of the verb. It is much easier to take action if you know what you need to do without reassessing the task. For example, "Weekly Report" is unclear whereas "Compile weekly call statistics" tells me what needs to be done.

Here is my list of action verbs:

Address, ask, avoid, buy, change, clarify, collect, commend confront, consider, create, decide, defer, develop, discard, 
do again, download, enter, file, follow up, hire, improve, increase, inform, inquire, maintain, measure, monitor, order, 
paint, phone, prioritize, purchase, question, reduce, remember, repair, reply, report, research, resolve, review, schedule, 
sell, send, service, specify, start, stop, suggest, tidy, train, update, upgrade, write. 
Build, Define, Make , do, perform, arrange, push, pull, watch,perceive,sense,pick,extend
work, learn,use, improve, find, classify, read,practice,break into pieces(decompose),delve into
meet,load,debug,track

One task list:

   Tasks:      TODO Write descrip of my GTD / orgmode                  :COMPUTER:
   Tasks:      TODO Study the Inkscape Tutorial Book                   :COMPUTER:
   Tasks:      TODO Write an article about org-mode vocabulary capture :COMPUTER:
   Projects:   TODO Write notes and lists of Japanese adjectives       :COMPUTER:
   Financial:  TODO Pay Mastercard                                     :COMPUTER:
   Projects:   TODO Tidy up my GTD web site .. directory on display    :COMPUTER:
   Tasks:      TODO Watch TOKYO STORY                                       :DVD:
   Projects:   TODO Daily Hiragana review on Anki                          :HOME:
   Projects:   TODO Daily Katakana review on Anki                          :HOME:
   Projects:   TODO Study - Beyond Words: A Guide to Drawing Out Ideas     :HOME:
   Projects:   TODO Read TALE OF THE GENJI                              :READING:
  

工程项目

我使用这个分类来记录各个工程项目中的详细信息。一个工程项目对应一个以上的行动,并且它们通常都付有结束的日期。 在各个工程项目的目录中记述项目的内容,换句话说就是细化项目流程,在其下方用目录构造表示。 与任务的(Next Action)中说明的一样,这里我也用一些动词来表述项目:

终结,决定,处理,调查,提交,扩大,组织,设计,完成,
确保,研究,展开,更新,安装,改良,设定,缩小。

This section is used to store details of each project I am working on. A project is a group of activities with a specific outcome that requires more than one action step and usually has a target date for completion. Each project is stored as as heading with a subheading to contain a description of the project, and a work breakdown structure. I use a set of Project Verbs in a similar manner to how I write Tasks (Next Actions):

Finalize, resolve, handle, look into, submit, maximize, organize, design, complete,
ensure, research, roll out, update, install, implement, set-up, minimize. 

48. 被忽略的细节:Tag具有继承性

Tag(org-tag-alist)是有继承性的,也就是说,假如一级标题的tag有work,则该级标题以下的所有子标题无论是否显式注明,都自动具有work的标签。例如:

: * Meeting with sb. :work:
 
: ** Summary with sb1. :boss:notes:
 
: *** TODO Prepare slides for him :action:

Summary with sb1的标签就是work, boss, notes,最后一项的标签就是work, boss, notes, action.

49. 打开evil-mode和关闭evil-mode

执行一次M-x evil-mode 表示打开,这样就可以使用vim的text object, 和跳转之类的命令了。

再执行一次M-x evil-mode 表示关闭

50. org-mode thinking(philosophy)

writing can be seen from your organization and simplication.

    Writing can be both art and communication; indeed, real communication
    happens only when writing is charged with artistic passion.
    For Nils, a key word is Composition. Nils once took a course in photography from a teacher
    who declared that:
    Composition = Organisation + Simplification.
    "composition is the best way of seeing"

orgmode计时, 在todo.org中,移到一个条目上,按Ctrl-c Ctrl-x Ctrl-i即可对该条目开始计时,Ctrl-c Ctrl-x Ctrl-o停止当前计时。 如果在Agenda中,移到条目按I(大写)即可对该条目开始计时,O(大写)即可停止计时。



zhaoemacs.d's People

Contributors

jueqingsizhe66 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.