Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Typographer's quotes do not pair #23

Closed
zmlka opened this Issue Oct 8, 2012 · 3 comments

Comments

Projects
None yet
2 participants

zmlka commented Oct 8, 2012

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)
Owner

jiangmiao commented Oct 9, 2012

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

zmlka commented Oct 9, 2012

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 Oct 9, 2012

Owner

jiangmiao commented Oct 9, 2012

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