jo hu vi bul qsrc
test 1 2 3 4 5.
"get image size with F4 with perl Image::Size module<br> fun! PerlImageSize()<br> :g/src<br> normal $<br> normal N<br> normal 2w<br> perl << EOF<br> use Image::Size;<br /> $jo = VIM::Eval("expand('<cfile>')");<br /> $size = Image::Size::html_imgsize("$jo");<br /> VIM::Eval("setreg('a', '$size')");<br /> EOF<br /> normal $<br /> normal "ap<br /> endfun<br /> nnoremap <F4> :call PerlImageSize()<CR><br />
- A quick hack to enable generics:
- open your java_getset.vim file
- search for definition let s:variable = ......
- in that line add the underlined part of: let s:variable = '\(\s*\)\(\(' . s:modifier . '\s\+\)*\)\(' . s:javaname . s:generics . '\)' . s:brackets . '\s\+\(' . s:javaname . '\)\s*\(;\|=[^;]\+;\)'
- before that line add: let s:generics = '\%(\s*\%(<.*>\)\)\='
Hmm, I haven't ever used the Sandbox. I didn't expect to see any content that was clearly put on by another user.
I don't want to clobber something that another user is working on, but I need to use the Sandbox to figure out wikimarkup. So I am going to append my own experimentation instead of overwriting what I see. Hope that's ok.
Perlsomian 04:15, April 2, 2012 (UTC)
This tip pertains to interoperability between the Cygwin shell and the non-Cygwin Native Windows Application (NWApp) flavor of Vim (Gvim as well).
In surveying the existing tips on this topic, I've noticed that I've had a difficult time making quick sense of the scripting examples given for addressing the interoperability issues between Cygwin's shell and NWApp Gvim. Part of the reason for this is that the flags or switches for a single most important utility are not fully explained in those tips. That utility is "cygpath"; the purpose of cygpath is pointedly to support enhanced flexibility in how Cygwin can be used to get things done the way you want to do them.
Some Cygwin users (including people of note - who are considered knowledgeable by others) have a separatist mentality about Cygwin: don't think getting Cygwin and non-Cygwin programs working together to be interesting or appropriate. Yes, this observation is off the point of a tip about Vim, but it is made for a reason: some may find that if they ask questions in various Cygwin venues, that pertain to interoperability, a response may be of the why would you want to do that?! sort. Persevere in working out how to get things done your way, regardless.