On 03/11/2011 05:02 PM, Charles Campbell wrote:
Jeroen Budts wrote:
Hi,
I'm looking for the quickest method to yank an entire (php) function
when the cursor is somewhere in the first line of the function
definition like this (| = cursor):
fun|ction foobar() {
if (true) {
return "not false :)";
}
}
[snip]
If you use syntax folding... (put into ~/.vim/ftplugin/php.vim)
let php_folding= 1
set fdm=syntax
then a simple Y with the cursor atop a folded function will yank it.
Normally I don't use folding, because I don't really like it (i set
nofoldenable in my vimrc), but this is a nice case of when it can be
useful as this does indeed do exactly what i was looking for!
Thx!
Jeroen
--
website: http://budts.be/ - twitter: @teranex
___________________________________
Registered Linux User #482240 - GetFirefox.com - ubuntu.com
--
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