#vim - Wed 14 Mar 2007 between 17:40 and 17:52

NY Lost Funds



AraxiaZathrus: heh. i started off with the infinite loop. never did figure out how to kill it safely.
nikkneZathrus: I don't see how bar will help me
at least not from the help file :)
Zathrusnikkne: oops, :bar
nikkne: ipkiss had it right as well
nikkneok, that works
thanks guys
frogonwheelswhatspy: abbreviation usually works quite well
ipkissnikkne: since you need to change a couple of files, also have a look at :h :bufdo
tpopeAraxia, nice idea though, I'm going to try it myself
nikkneipkiss: that would be great
but, the number you saw, need to follow a pattern...
21001, 22001...
and I'm not that profficient with vim :(
frogonwheelseg :iabbrev for\ for( ; ; )<left><left><left><left>
whatspyfrogonwheels: niiiice
Zathrusnikkne: :he sub-replace-expression
whatspythat's a very good start, is there a way to abbreviate new lines ?
ipkissnikkne: then you may want to do a macro (:h q)
majdwhatspy, you can also hack up placeholders and move through them
frogonwheelswhatspy: put it in your vimrc btw. <CR> for newlines
whatspymajd: placeholders???
Zathruswhatspy: aka templates, there's a vim tip on it
majdwhatspy, http://www.vim.org/tips/tip.php?tip_id=322
frogonwheelswhatspy: if you want it per filetype - but it in filetype/c.vim (for example)..
whatspy: and put :iabbrev <buffer> for\ etcc..
gg
whatspyomfg, this is really nice, with such knowledge I'll become a guru soon
seriously it's very interesting
one can use huge commercial software for auto-inserting text, and vim is very lightweight in comparison to DW
nikknefollowup question :)
how can I yank content of the : line (don't know actuall name :)) to some register
and then perform :s on that register?
ipkiss:h c_ctrl-r
nikkneie. I want to place my long Ex command to a reg
thanks
frogonwheelsnikkne: :echo substitute(histget("cmd",-2), 'search', 'replace','flags)
nikkne: in combination with c_ctrl-r you can use <ctrl-r>= substitute(... etc
nikknefrogonwheels: wow! thanks
frogonwheelsdo a :help on substitute() and histget()

Page: 1 8 15 

IrcArchive

NY Lost Funds