qqzsxyz / vimwiki

Automatically exported from code.google.com/p/vimwiki
0 stars 0 forks source link

<Enter> key is inserting <SNR>58_CR() instead of newline character #341

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
2. use this .vimrc: http://pastebin.com/EjZx3AXW
3. run :BundleInstall from vim
4. restart vim and try \ww
5. on the index.wiki try to press enter in insert mode

What is the expected output? What do you see instead?

Expected: newline is inserted.
Instead: <SNR>58_CR()

What version of the product are you using? On what operating system?

VimWiki version: 2.0.stu
OS: ArchLinux

Original issue reported on code.google.com by danveld...@gmail.com on 8 Jun 2012 at 5:53

GoogleCodeExporter commented 9 years ago
Does it work for you using official packages?

Original comment by habamax on 8 Jun 2012 at 11:40

GoogleCodeExporter commented 9 years ago
There appears to be a conflict with your "auto-pairs" plugin.  I removed 
auto-pairs from your .vimrc, and the problem went away.

@maxim: ftplugin/vimwiki.vim defines the list and table mapping for <CR> which 
calls s:CR() ... and then autoload/vimwiki/lst.vim::kbd_cr() and 
autoload/vimwiki/tbl.vim::kbd_cr() 

If a list or table is *not* detected, these functions return "\<CR>" as a 
result to the map.   I think this is where auto-pairs is throwing its wrench in 
our gears.

Original comment by stu.andrews on 8 Jun 2012 at 4:33

GoogleCodeExporter commented 9 years ago
The Vundle installer used in these instructions is picking up v1.2.  In theory, 
Bundle will catch up with vimwiki 2.0, but currently it is stuck waiting for 
the vim-scripts mirror.

However, there is still a conflict with 2.0.  The best solution that I have 
right now is to add to your vimrc.

  let g:AutoPairsMapCR = 0

Also, you can remove "index.wiki" front the end of your wiki path.

Original comment by stu.andrews on 8 Jun 2012 at 5:25

GoogleCodeExporter commented 9 years ago
@stu, should we do anything about it?

Original comment by habamax on 8 Jun 2012 at 6:54

GoogleCodeExporter commented 9 years ago
If I had a better idea of what was going on, I'd suggest it.  The issue seems 
to be that there are two mappings for <CR> that are in conflict.  Do we ever 
check the LHS before creating a mapping?

Original comment by stu.andrews on 8 Jun 2012 at 10:07

GoogleCodeExporter commented 9 years ago
Nope, not for insert-mode mappings.

Is there any way we can chain those functionality across different mappings of 
different plugins?

Original comment by habamax on 9 Jun 2012 at 8:02

GoogleCodeExporter commented 9 years ago
Not sure ... maybe there's somebody who'd like to try this.

Original comment by stu.andrews on 9 Jun 2012 at 5:01

GoogleCodeExporter commented 9 years ago

Original comment by habamax on 21 Jun 2012 at 6:38