Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.98k stars 117 forks source link

Problem with MacVim gui and combining characters #245

Open dbmrq opened 8 years ago

dbmrq commented 8 years ago

I use the US International keyboard profile, so when I type 'a I get á, and to get a single quote I must type '<space>. The same goes for double quotes, "a gives me ä.

Using MacVim at the command line everything works perfectly, but for some reason the quotes go crazy with the gui. If I type "a I get ä", and if I type "<space> I get just a single quote, without the auto-completion.

I tried the exact same dotfiles in a Linux system with vim and gvim, and delimitMate works perfectly with both. So it seems like this only happens with MacVim and only with the gui version, I have no clue why.

Any ideas?


Edit:

Here are the exact steps to reproduce:

  1. mvim -u NONE -U NONE -N
  2. :so ~/.vim/bundle/delimitMate/autoload/delimitMate.vim<cr>
  3. :so ~/.vim/bundle/delimitMate/plugin/delimitMate.vim<cr>

    (the files have to be there, obviously)

  4. :DelimitMateOn<cr>
  5. i<m->a(that'soption + `, withoutmacmeta`)

    This should type à, but instead it types `à``. It only happens in the MacVim gui, at the command line it works as it should.

  6. `<space>

    This should result in | (| is the cursor), but instead it does just ```. Again, it only happens in the gui.

I'm actually using the US International keyboard profile, which has many more combining characters, and this happens with others too. (The steps above use the regular US keyboard profile.)

Raimondi commented 8 years ago

I can not reproduce this. are you using the latest macvim? I use the Spanish ISO layout and also tried with the U.S. layout but it works as expected. Also tried switching the Use Core Text renderer option in Advanced preferences but it works fine.

dbmrq commented 8 years ago

Aha! I hadn't looked into the advanced options, now I went there and disabled the "Draw marked text inline" option, and it works! I had to disable the "Use Core Text renderer" option too, or I wouldn't get the little lines below combining characters. I don't know if these changes will have any unintended effects, but so far everything seems to be working great. Did you have both of these options enabled when you tried it? I do have the latest version, 7.4.1831.

eirnym commented 5 years ago

@dbmrq things has been changed since times you file an issue. In current version (156, Vim base 8.1.1517) I can't reproduce it, is it still an issue for you?

dbmrq commented 5 years ago

I’m on a trip and won’t be able to check until next week, my apologies. I think I kept “draw marked text inline” disabled ever since and didn’t run into the issue anymore, but I’ll make sure next week when I’m back home.