ashersyed / macvim

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

Man page syntax highlighting broken with MacVim snapshot 70 #468

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This a problem with MacVim 7.4 snapshot 70:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 18:40:52)
MacOS X (unix) version
Compiled by Douglas Drumond <douglas@eee19.com>
Huge version with MacVim GUI.  Features included (+) or not (-):
+arabic          +emacs_tags      +localmap        +postscript      +textobjects
+autocmd         +eval            -lua             +printer         +title
+balloon_eval    +ex_extra        +menu            +profile         +toolbar
+browse          +extra_search    +mksession       +python          
+transparency
++builtin_terms  +farsi           +modify_fname    -python3         
+user_commands
+byte_offset     +file_in_path    +mouse           +quickfix        +vertsplit
+cindent         +find_in_path    +mouseshape      +reltime         +virtualedit
+clientserver    +float           +mouse_dec       +rightleft       +visual
+clipboard       +folding         -mouse_gpm       +ruby            +visualextra
+cmdline_compl   -footer          -mouse_jsbterm   +scrollbind      +viminfo
+cmdline_hist    +fork()          +mouse_netterm   +signs           +vreplace
+cmdline_info    +fullscreen      +mouse_sgr       +smartindent     +wildignore
+comments        -gettext         -mouse_sysmouse  -sniff           +wildmenu
+conceal         -hangul_input    +mouse_urxvt     +startuptime     +windows
+cryptv          +iconv           +mouse_xterm     +statusline      +writebackup
+cscope          +insert_expand   +multi_byte      -sun_workshop    -X11
+cursorbind      +jumplist        +multi_lang      +syntax          -xfontset
+cursorshape     +keymap          -mzscheme        +tag_binary      +xim
+dialog_con_gui  +langmap         +netbeans_intg   +tag_old_static  -xsmp
+diff            +libcall         +odbeditor       -tag_any_white   
-xterm_clipboard
+digraphs        +linebreak       +path_extra      -tcl             -xterm_save
+dnd             +lispindent      +perl            +terminfo        
-ebcdic          +listcmds        +persistent_undo +termresponse    
   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: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall 
-Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: clang   -L.    -L.     -L/usr/local/lib -o Vim -framework Cocoa 
-framework Carbon       -lncurses  -liconv -framework Cocoa   -fstack-protector 
-L/usr/local/lib  -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE 
-lperl -lm -lutil -lc -framework Python   -framework Ruby   

I have set up MacVim as my man pager with the following in my .profile

export MANPAGER='col -bx | /Applications/MacVim.app/Contents/MacOS/Vim -c ":set 
ft=man nonu nolist nomodifiable" -R -'

Now executing man will invoke MacVim to display the man page. However, after 
upgrade to MacVim 7.4 Snapshot 70, syntax highlighting of man pages no longer 
works. Basically, man headings NAME, SYNOPSIS, OPTIONS etc are not syntax 
highlighted, but command options are (of course you must have syntax 
highlighting turned on in your .vimrc).

I have attached a sample man page rendered with groff the same way man filters 
it before it passes it to vim for viewing. If you open the attached man.man, 
MacVim 7.4 will correctly detect the file type, but syntax highlighting doesn't 
quite work. If you open the same file in MacVim 7.3 it is syntax highlighted 
properly. 

Also, starting with MacVim 7.4 some man pages like system linker 'man ld' have 
weird "^[[2;2R" string at the beginning of the first line, that disappears 
after page refresh with CTRL+l.

Here is output of :scriptnames (it looks like correct syntax/man.vim is used 
Line 32):

  1: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/vimrc
  2: ~/.vimrc
  3: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/vimrc_example.vim
  4: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/syntax/syntax.vim
  5: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/syntax/synload.vim
  6: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/syntax/syncolor.vim
  7: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/filetype.vim
  8: ~/.vim/ftdetect/scala.vim
  9: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/ftplugin.vim
 10: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/indent.vim
 11: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/syntax/nosyntax.vim
 12: ~/.vim/colors/desert256.vim
 13: ~/.vim/plugin/ack.vim
 14: ~/.vim/plugin/command-t.vim
 15: ~/.vim/plugin/fugitive.vim
 16: ~/.vim/plugin/NERD_tree.vim
 17: ~/.vim/plugin/snipMate.vim
 18: ~/.vim/plugin/tagbar.vim
 19: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/getscriptPlugin.vim
 20: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/gzip.vim
 21: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/matchparen.vim
 22: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/netrwPlugin.vim
 23: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/rrhelper.vim
 24: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/spellfile.vim
 25: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/tarPlugin.vim
 26: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/tohtml.vim
 27: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/vimballPlugin.vim
 28: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/plugin/zipPlugin.vim
 29: ~/.vim/after/plugin/snipMate.vim
 30: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/scripts.vim
 31: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/ftplugin/man.vim
 32: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/syntax/man.vim
 33: /Volumes/ramdisk/MacVim.app/Contents/Resources/vim/runtime/syntax/ctrlh.vim
 34: ~/.vim/nerdtree_plugin/exec_menuitem.vim
 35: ~/.vim/nerdtree_plugin/fs_menu.vim

By the way diffing syntax/man.vim between version 7.4 and 7.3 shows no 
differences.

Original issue reported on code.google.com by veritas....@gmail.com on 11 Aug 2013 at 6:52

Attachments:

GoogleCodeExporter commented 9 years ago
I just got response from Bram Moolenaar on this issue and it looks like syntax 
highlighting problem is base vim problem (he said he would fix it soon) but I'm 
still baffled by the weird string in the first line :D. 

Original comment by veritas....@gmail.com on 11 Aug 2013 at 7:02