julia-vim icon indicating copy to clipboard operation
julia-vim copied to clipboard

LaTeX to Unicode autosub feature incompatible with auto-pairs plugin

Open felixjung opened this issue 10 years ago • 6 comments

Hi,

I've recently started to face the following issue. When I press Enter in insert mode, julia-vim seems to put the following string in my code:

LaTeXtoUnicode#AutoSub("\n", "\
")

To me this looks like some vim script from the package itself. Any idea what's going on here? I have to disable LaTeX to Unicode entirely to get rid of this problem.

Here is my julia-vim config from my vimrc:

" Configure julia-vim {
  let g:julia_latex_to_unicode=0
  let g:julia_latex_suggestions_enabled=0
  let g:julia_auto_latex_to_unicode=1
" }

Thanks,

Felix

felixjung avatar Jan 12 '15 10:01 felixjung

I can't reproduce this locally. I tried disabling all settings in my vimrc except for the julia-vim loading and using your julia-vim config options. Everything works as it should for me.

The output looks indeed like code from the script itself, and precisely this code.

That line defines a mapping which should never be printed, since it's declared with the <expr> attribute, which means it should be evaluated. Therefore, something weird is going on.

I assume it was working before; can you pinpoint which commit introduced the behaviour you observe, by git bisection? (Maybe the last one?) BTW did you by any chance modify the code? What's your OS and vim version? Do other configuration options change anything in this regard?

carlobaldassi avatar Jan 12 '15 13:01 carlobaldassi

I'm sorry, I should have done more research... Might be that the auto-pairs plugin causes this? Here's the output of :verbose inoremap <CR>.

i  <CR>        &@LaTeXtoUnicode#AutoSub("\n", "\<CR>")<SNR>76_AutoPairsReturn
Last set from ~/.vim/bundle/Auto-Pairs/plugin/auto-pairs.vim

I have not modified the code and am running Macvim (Vim 7.4) in tmux on OS X 10.10.1. I'll have a look at the commit stuff later.

Thanks,

Felix

felixjung avatar Jan 12 '15 13:01 felixjung

I don't see the output, anyway I can see how the two plugins may clash. I could try to see if I manage to make them compatible at some point. In the meanwhile I'll rename this issue.

carlobaldassi avatar Jan 12 '15 14:01 carlobaldassi

I'll also put a link here for reference: https://github.com/jiangmiao/auto-pairs

carlobaldassi avatar Jan 12 '15 14:01 carlobaldassi

Cool, thanks! I'll have a closer look some time. Pretty busy at work right now.

felixjung avatar Jan 13 '15 09:01 felixjung

julia-vim also clashes with delimitMate.

IngoMeyer441 avatar Aug 03 '18 12:08 IngoMeyer441