CatCoding

A Emacs func

2011-12-21

这个操作好像经常要用到,拷贝当前光标连续的一段字符串 (除了空白和换行), 写了个小函数来实现。

(defun get-continue-string ()
  (interactive)
  (skip-chars-backward "^ \n")
  (setq low (point))
  (skip-chars-forward "^ \n")
  (setq high (point))
  (copy-region-as-kill low high)
  (message (buffer-substring low high)))

(global-set-key (kbd "C-x y") 'get-continue-string)

公号同步更新,欢迎关注👻