sorry no.

I was trying to print sth to my text by using external command line, which
was

.!printf "%s\n" 'hello world'

but what I got is 'a.shs'

yeah my text is 'a.sh'. so a '%' means the editing text?
I don't know what is wrong with my vim. so...

the following is my vim version compiled by me in CentOS6

====================================================
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 10 2011 17:24:52)
Included patches: 1-201, 203-212, 214-255, 257-269
Modified by <[email protected]>
Compiled by <[email protected]>
Huge 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
+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: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2
-D_FORTIFY_SOURCE=1     -I/usr/include  -D_LARGEFILE64_SOURCE=1
Linking: gcc   -L.  -rdynamic -Wl,-export-dynamic  -Wl,-E
-Wl,-rpath,/usr/lib64/perl5/CORE   -L/usr/local/lib -Wl,--as-needed -o vim
   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lelf   -lacl
-lattr -ldl    -Wl,-E -Wl,-r
path,/usr/lib64/perl5/CORE  -fstack-protector  -L/usr/lib64/perl5/CORE
-lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
-L/usr/local/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm
-Xlinker -export-dynamic  -L/usr/l
ib64 -ltcl8.5 -ldl -lieee -lm -lruby -lpthread -lrt -ldl -lcrypt -lm
 -L/usr/lib64
===================================================================================================================================================================



On Tue, Nov 8, 2011 at 8:11 PM, Taylor Hedberg <[email protected]> wrote:

> From insert mode, you can type:
>
>    <C-R>=printf('%s', 'foo')
>
> And upon hitting enter, "foo" will appear after the cursor in the
> current buffer. Is that the sort of thing you're trying to do?
>
> Note that "<C-R>" is a literal Ctrl-R in the above example.
>
> --
> 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
>



-- 
steve
<[email protected]>

-- 
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

Reply via email to