또 하나의 snippet. yasnippet 기본 사용법
(use-package yasnippet-snippets :ensure t)
(use-package yasnippet
:ensure t
:config
(yas-global-mode 1))
또 하나의(yet another) snippet. 반복 작업을 줄여주는 거라 잘 쓰면 좋을 것 같은데, 손이 잘 안 간다. 없이도 잘 살아와서일까? 초반 설정의 귀찮음 때문일까? org 파일 헤더를 반복해서 입력하는 게 귀찮아서 드디어 손을 댔다.
# -*- mode: snippet -*- # name: org header # key: orgheader # -- # -*- mode: org -*- # -*- coding: utf-8 -*- #+TITLE: $1 #+AUTHOR: Jongbin Oh #+EMAIL: ohyecloudy@gmail.com $0
만들기 쉽다. yas-new-snippet
함수를 실행하고 시키는 대로 따라가면 된다. $0
키워드가 시작인 줄 알았는데, 종료다. 시작은 $1
키워드부터.
링크 - github/yasnippet
C-x C-s C-x C-c
@ohyecloudy
,ohyecloudy@gmail.com