3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

2022年末の emacs 設定

Last updated at Posted at 2022-12-29

emacs の設定は人生(反論はない)

2022年末時点の mac 版 emacs 設定のトピックを書いておく。

  1. Cask から straight.el への移行
  2. ほとんど use-package 化 (leaf 化は挫折)
  3. (mac-auto-ascii-mode 1) をしたいので port 版 emacs に変更
  4. go-translate 導入
  5. lookup 何年振りかにインストール
  6. server-start + emacsclient 化
  7. elscreen をやめて tab-bar-mode に
  8. ispell 実行バイナリを hunspell に
  9. 検索は swiper
  10. メインUI は ivy、counsel

よく使ったコマンド

  1. ivy-switcher-buffer
  2. counsel-rg

導入した elisp 小物関数

  • 現在行を region にする
;; from http://xahlee.info/emacs/emacs/emacs_region.html
(defun my-select-line ()
  "Select current line."
  (interactive)
  (goto-char (line-beginning-position))
  (push-mark (line-end-position))
  (setq mark-active t))

region 範囲を変更するというのは意外にむずい。

  • region 範囲の数字を sum
;; https://emacs.stackexchange.com/questions/10939/sum-numbers-in-region
(require 'cl-lib)
(defun sum-numbers-in-region (start end)
  (interactive "r")
  (message "%s" (cl-reduce #'+
                           (split-string (buffer-substring start end))
                           :key #'string-to-number)))

なんてエレガントな

enjoy emacs on next year.

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?