joom / latex-unicoder.vim

A plugin to type Unicode chars in Vim, using their LaTeX names.
90 stars 14 forks source link

Inserting symbols in edit mode adds a redundant space before them #25

Open narodnik opened 2 years ago

narodnik commented 2 years ago

When adding symbols in normal mode, everything is perfect. But in edit mode an extra space is added before the inserted character.

lgaeher commented 1 year ago

I've also recently encountered an issue similar to this: when inserting a symbol (from insert mode) in the middle of the line, the symbol will be added after the position of the cursor (skipping over the symbol at the current cursor position), instead of at the position of the cursor, whereas doing the same at the end of the line will insert at the expected cursor position. Strangely, I'm only encountering this on a Mac, but not on Linux (I literally copied my vimrc from Linux to Mac and the behaviour is different between the two).

Anyway, on Mac I managed to get the same behaviour I was used to on Linux by changing the following line to:

    if isend
      let how = 'a'
    else 
      let how = 'i'
    endif

But reading the code, maybe what I observed is actually the intended behaviour, and for some reason it was acting different on Linux?