[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] electric-pair, autopair, smartparens, etc in org-mode
From: |
stardiviner |
Subject: |
Re: [O] electric-pair, autopair, smartparens, etc in org-mode |
Date: |
Tue, 23 Oct 2018 19:48:33 +0800 |
User-agent: |
mu4e 1.1.0; emacs 26.1 |
Roland Everaert <address@hidden> writes:
> Hi,
>
> I use the following configuration:
>
> ;;;;;;;;;;;;;;;; parenthèses, accolades et brackets ;;;;;;
> (setq skeleton-pair t)
> (global-set-key "[" 'skeleton-pair-insert-maybe)
> (global-set-key "{" 'skeleton-pair-insert-maybe)
> (global-set-key "(" 'skeleton-pair-insert-maybe)
> (global-set-key "\"" 'skeleton-pair-insert-maybe)
> (global-set-key "'" 'skeleton-pair-insert-maybe)
>
> This will only close the defined characters.
>
>
> Hope this will help.
>
> Roland.
>
This is really helpful for me, I use smartparens before, but it is a little
heavy. So I disabled it. I found your solution is simple and fast. I modified a
little:
#+begin_src emacs-lisp
(require 'skeleton)
(setq skeleton-pair t)
(define-key org-mode-map (kbd "~") 'skeleton-pair-insert-maybe)
(define-key org-mode-map (kbd "=") 'skeleton-pair-insert-maybe)
(define-key org-mode-map (kbd "*") 'skeleton-pair-insert-maybe)
(define-key org-mode-map (kbd "+") 'skeleton-pair-insert-maybe)
(define-key org-mode-map (kbd "[") 'skeleton-pair-insert-maybe)
(define-key org-mode-map (kbd "{") 'skeleton-pair-insert-maybe)
(define-key org-mode-map (kbd "(") 'skeleton-pair-insert-maybe)
(define-key org-mode-map (kbd "\"") 'skeleton-pair-insert-maybe)
(define-key org-mode-map (kbd "'") 'skeleton-pair-insert-maybe)
#+end_src
--
[ stardiviner ]
I try to make every word tell the meaning what I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
- [O] electric-pair, autopair, smartparens, etc in org-mode, Matt Price, 2018/10/20
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Nicolas Goaziou, 2018/10/21
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Matt Price, 2018/10/21
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Roland Everaert, 2018/10/23
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode,
stardiviner <=
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Eric S Fraga, 2018/10/23
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Matt Price, 2018/10/24
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Eric S Fraga, 2018/10/24
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Roland Everaert, 2018/10/24
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Eric S Fraga, 2018/10/24
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Tim Cross, 2018/10/24
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Eric S Fraga, 2018/10/25
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Samuel Wales, 2018/10/25
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Samuel Wales, 2018/10/25
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Eric S Fraga, 2018/10/26