1. 切换窗口

(windmove-default-keybindings)
(setq windmove-wrap-around t)

之后可以通过shift-方向键切换窗口

2. 将json拍平成一行

(defun json-to-single-line (beg end)
“Collapse prettified json in region between BEG and END to a single line”
(interactive “r”)
(if (use-region-p)
(save-excursion
(save-restriction
(narrow-to-region beg end)
(goto-char (point-min))
(while (re-search-forward “\\s-+\\|\n” nil t)
(replace-match “”))))
(print “This function operates on a region”)))

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>