;; 改变前
(defun my-command ()
(interactive)
;; save-excursion通常配合 slurf-sexp功能(slurf-in),把很多事情吞进来,
(do-some-things)
(do-more-things)
(conclude-doing-things))
;;改变后
(defun my-command ()
(interactive)
;; save-excursion通常配合 slurf-sexp功能(slurf-in),Spc-k 很重要! 基础操作把很多事情吞进来,
(save-excursion ;; here
(do-some-things)
(do-more-things)
(conclude-doing-things)))
;;改变前
(defun my-other-command ()
(when (and (this-predicute) ;; here
(that-predicute))
;; SPC f paredit-splice-killing-barkword 删掉当前层的括号以及前面的所有内容(一般用于删除判断条件) 破而后立和突出包围圈(只保留自己有生力量,当前括号,其他都没有了,周边事物都没有了)有所不同
;; 基础操作,很重要
;; 场景1删除条件
(do-something)
(do-some-more)
(do-a-third-thing)))
;; 改变后
(defun my-other-command ()
(do-something)
(do-some-more)
(do-a-third-thing))
;;改变前
(defun another-command ()
(when (and (some-predicate)
(some-other-predicate))
(let ((v (calcuate-v))
(x (calculate-x)))
;; 太神奇了 M-S-?表示 把头部信息调换 convolute-sexp 太神奇了 相当于做了两次SPC f 然后再复制到对应位置
;; 场景2:调换let和when表头
(do-that-thing)
(do-some-more)
(do-even-more))))
;;改变后
(defun another-command ()
(let ((v (calcuate-v))
(x (calculate-x)))
;; 太神奇了 M-S-?表示 把头部信息调换 convolute-sexp 太神奇了 相当于做了两次SPC f 然后再复制到对应位置
;; 场景2:调换let和when表头
(when (and (some-predicate)
(some-other-predicate))
(do-that-thing)
(do-some-more)
(do-even-more))))
;; 改变前
(defun some-command ()
;; So是一个组合 SpC i切分字符串 SPC o 合并字符串和库昊
;; 场景3 字符串随意切割
(do-stuff "this is one thing" 133)
(do-stuff (more-stuff "something" "and thing")))
;; 改变后
(defun some-command ()
;; So是一个组合 SpC i切分字符串 SPC o 合并字符串和库昊
;; 场景3 字符串随意切割
(do-stuff "this is ")
(do-stuff " one thing" 133)
(do-stuff (more-stuff "something" "and thing")))
;; 改变前
(ns adventur-engine.execute-room
(:use adventur-engine.utils)
(:require [adventure-core.ast-traverser :as ast])
;; 可以这样操作 spurf-in 3次 ,然后在中括号处,执行3次Spc-f 或者M-上箭头
(:require [adventure-core.rooms :as room])
(:require [adventure-core.maths :as math])
(:require [adventure-core.plotlib :as plt]))
;;改变后
(ns adventur-engine.execute-room
(:use adventur-engine.utils)
(:require [adventure-core.ast-traverser :as ast]
;; 可以这样操作 spurf-in 3次 ,然后在中括号处,执行3次Spc-f 或者M-上箭头
[adventure-core.rooms :as room]
[adventure-core.maths :as math]
[adventure-core.plotlib :as plt]))
mc特别适合编辑html,成对标签,一个地法修改,满足多个地方。
全部评论