Hi Im trying to write my first vim script. I want to write a function that will comment out PHP code by the block or curly brackets.
Here is what I've come up with, but I can't get it to work:
:function Mycom()
:let b = line(".")
:echo "this is "b
// trying to grab the matching bracket, not sure wheather this is ok
:%
//keeps missing and going to end og file
:let e = line(".")
:echo "here is end" e
//here is where i want to comment out the block
:echo b,e s%^%//%
:endfunction