vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

Citation syntax cause 'Segment fault' #88

Closed lambdalisue closed 10 years ago

lambdalisue commented 11 years ago

Vim raise 'Segment fault' when I type '@' in pandoc file or open a pandoc file which contains '@' (And no error message except 'Segment fault'). It happen even when I use minimal vimrc (with NeoBundle).

Well this is most strange point but if I comment out 'syntax on', then it doesn't happen and even omni completion works perfectly. I already tried to change the position of 'syntax on' (like before NeoBundle or middle of or so on)

Any idea?

My vimrc is:

" vim: foldlevel=0 sts=2 sw=2 smarttab et ai textwidth=0
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim
call neobundle#rc()
NeoBundle "vim-pandoc/vim-pandoc"

filetype plugin indent on
syntax on

vim-pandoc version is:

% git log | head -3                                                                                                                                                                         
commit b959ecf6631bc3c82e7082b1ef70cb2e41ccef0c
Author: David Sanson <dsanson@gmail.com>
Date:   Mon Jul 29 08:45:45 2013 -0500

My Vim version is:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul  3 2013 02:17:19)
Included patches: 1-1287
Compiled by alisue@alisue-labdesk
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     +tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    
+farsi           +mouse_netterm   +syntax          
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -D_REENTRANT -DORBIT2=1 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0   -I/usr/local/include  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     -I/usr/include/tcl8.5  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1  
Linking: gcc   -L. -Wl,-z,relro -rdynamic -Wl,-export-dynamic -Wl,-E   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0     -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl   -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.1 -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/lib/perl/5.14/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib -ltcl8.5 -ldl -lpthread -lieee -lm -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib   
jldiaz commented 11 years ago

Yes, this is the same issue I reported (#87). It also happens with macvim. Does not happen with terminal-only vim flavors.

Currently I avoid this problem by putting a file ~/.vim/after/ftplugin/pandoc.vim containing:

syntax clear pandocPCite
lambdalisue commented 11 years ago

Does not happen with terminal-only vim flavors.

It happend even with terminal vim as well.

And also your recommendation did not work unfortunately. syntax clear pandocPCite remove all syntax of pandoc files (and of course if I recall syntax on then it raise Segmentation fault.)

jldiaz commented 11 years ago

It happend even with terminal vim as well.

Oh, probably you are right. My terminal vim is not the same version than MacVim.

And also your recommendation did not work unfortunately. syntax clear pandocPCite remove all syntax of pandoc files (and of course if I recall syntax on then it raise Segmentation fault.)

Are you sure? syntax clear pandocPCite should remove only the syntax pattern for the pandocPCite element, and in my case this is what it does. The rest of the pandoc syntax still works as expected.

As a last resort you can edit the main syntax/pandoc.vim file in the installed bundle and remove (or comment-out) the lines related to parenthetical citations (lines 129 to 137 in the latest version, b959ecf commit).

fmoralesc commented 10 years ago

pandocPCite's rules have been rewritten, and this issue might be solved already. Please confirm, I can't reproduce this.

lambdalisue commented 10 years ago

Yes it have solved. Thanks :-)