Sunday, July 1, 2012

Re: print vim syntax highlighted text to stdout using ansi color

> Did you check the content of ./v? Is it the same with
> the online version? Did you chmod the script to add the execution bit?
>
> I just tried the latest version and it works for me.
> Just note that it has been renamed to `_v`.

Obviously, I did what you have mentioned.

~/dvcs_src/utils$ ./_v _v ; echo xxx
xxx

I also tired to use the script by vim directly.
~/dvcs_src/utils$ vim -e -X -R "_v" -c "source _v" -c "visual" -c
"bufdo call AnsiHighlight()" -c qa

All I got was a flash of the screen (with non content) and then exit.
So I guess may be related with my vim setup. Could anybody try the
above command and let me know what you get? Thanks!

My OS is Mac OS X snow leopard.

~/dvcs_src/utils$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 18 2012 01:05:44)
MacOS X (unix) version
Included patches: 1-244, 246-556
Compiled by root@peng-yus-macbook-pro.local
Normal version without GUI. Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent
-clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
-conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
+find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
-mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse
+mouse_xterm -mouse_urxvt +multi_byte +multi_lang -mzscheme +netbeans_intg
+path_extra -perl +persistent_undo +postscript +printer -profile +python
-python3 +quickfix +reltime -rightleft -ruby +scrollbind +signs +smartindent
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "/opt/local/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/opt/local/share/vim"
Compilation: /usr/bin/gcc-4.2 -c -I. -Iproto -DHAVE_CONFIG_H
-I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -pipe -O2 -arch
x86_64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/gcc-4.2 -L/opt/local/lib -arch x86_64
-L/usr/local/lib -o vim -lm -lncurses -liconv -lintl -framework
Cocoa -L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
-lpython2.7 -framework CoreFoundation -u _PyMac_Error
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python

--
Regards,
Peng

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: