Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Typographer's quotes do not pair #23

Closed
zmlka opened this Issue · 3 comments

2 participants

@zmlka

I would like to auto pair certain typographer's quote pairs, specifically with and with .

The following is in my .vimrc:

let g:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '`':'`', '‘':'’','“':'”','«':'»'}

The French style quotes « and » auto pair, but the other two additions (‘ ’ “ ”) do not.

The unicode codes involved:

  • « and » are U+00AB and U+00BB (these work)
  • and are U+2018 and U+2019 (do not work)
  • and are U+201C and U+201D (do not work)
@jiangmiao
Owner

How to input and ?Is it by physical one key or combined key or IME?

@zmlka

I use a mac, all of the above are done with Option (Alt) and some key:

  • = Option (Alt) + ]
  • = Option (Alt) + Shift + ]
  • = Option (Alt) + [
  • = Option (Alt) + Shift + [
  • « = Option (Alt) + \
  • » = Option (Alt) + Shift + \

For instructions on other OSs there is this wiki article.

@jiangmiao jiangmiao closed this in 9758a44
@jiangmiao
Owner

If the mapping cannot work, for example in my PC which is Linux system

Alt + ] equals Û and Alt+Shift + ] equals · so have to mapping it by manual, add

imap <silent> Û <C-R>=AutoPairsInsert('“')<CR>
imap <silent> · <C-R>=AutoPairsInsert('”')<CR>

to .vimrc, then it works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.