[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] electric-pair, autopair, smartparens, etc in org-mode
From: |
Roland Everaert |
Subject: |
Re: [O] electric-pair, autopair, smartparens, etc in org-mode |
Date: |
Wed, 24 Oct 2018 12:38:27 +0200 |
User-agent: |
mu4e 1.1.0; emacs 26.1 |
I will borrow your config for the emphasis symbols, but for all the
paren-related symbols, I will keep the global mapping, so it will still
work when writing codes and the like ;)
Pleased to see it was helpful. The funny thing is that I use that config
for, maybe, 10 years and never think about changing it.
stardiviner writes:
> 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
--
Luke, use the FOSS
Sent from Emacs
- [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, 2018/10/23
- 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 <=
- 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
- Re: [O] electric-pair, autopair, smartparens, etc in org-mode, Tim Cross, 2018/10/26