Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neovim Latex-to-Unicode Support #62

Closed
xanderdunn opened this issue Nov 23, 2015 · 9 comments
Closed

neovim Latex-to-Unicode Support #62

xanderdunn opened this issue Nov 23, 2015 · 9 comments

Comments

@xanderdunn
Copy link

I have let g:latex_to_unicode_auto = 1 in my ~/.config/nvim/init.vim.

In a julia file, when I type \neq, nothing happens.

When I type \alpha, I get:
screen shot 2015-11-22 at 20 41 17

So, it sort of worked. The unicode alpha symbol was inserted, but the alpha characters remain and it looks like some unusual character (escape?) sequence <91> was inserted.

Many thanks for this plugin!

@xanderdunn
Copy link
Author

@carlobaldassi It looks like the bit about neq can be ignored. It's defined as ne, which works the same as all the other defined symbols:
screen shot 2015-11-29 at 16 23 01

So, the issue is simply that it looks like the escape sequence to get out of completion mode isn't working in neovim, hence the <91>.

@carlobaldassi
Copy link
Contributor

Thanks for the report, I'll have to try out neovim and see what can be done.

@carlobaldassi
Copy link
Contributor

I just installed neovim and I can't reproduce the problem, everything works in my setup.
Could you provide more details about your system? In particular, the OS, the neovim version (I just cloned the most recent from github) and possibly a minimal nvim/init.vim for which you see the problem.

Did you maybe try this with vim as well?

@xanderdunn
Copy link
Author

@carlobaldassi Thanks for looking at this. I've also installed neovim from HEAD on GitHub. It's version:

NVIM 0.1.0-dev (compiled Nov 29 2015 21:04:24)
Commit: 7d42e9b7e8169da45e32c415babc27b197a26f8a

After doing a binary search commenting out lines in my init.vim, I discovered it was specifically this line and no more or less that caused it:
"inoremap <silent> <c-h> <Esc>:TmuxNavigateLeft<cr>I

Wow! These are commands I use to navigate between tmux panes from within vim from this plugin. Does this make any sense to you?

@carlobaldassi
Copy link
Contributor

Good catch. It doesn't make sense to me but I can reproduce this, even in vim. I'll investigate.

@carlobaldassi
Copy link
Contributor

Ok I found out what happens. In vim, <C-H> in insert mode is the same as backspace \b. The auto-L2U code uses \b (the escape sequence inserts a character and then deletes it), and that's what triggers the problem.
I assume you don't use backspace in your workflow (if you did, it should call your tmux navigation code).
I'm not sure how to get out of this. I'll see if I can come up with some way to avoid using \b.

@xanderdunn
Copy link
Author

@carlobaldassi

Very cool, thanks.

@carlobaldassi
Copy link
Contributor

Should be fixed now. I just forgot an option in the feedkeys call to avoid remapping.

@xanderdunn
Copy link
Author

I updated my plugin and it works even with my Tmux key mapping. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants