こんにちは、最初の vim スクリプトを作成しようとしています。ブロックまたは中かっこで PHP コードをコメント アウトする関数を作成したいと考えています。
これが私が思いついたものですが、動作させることができません:
: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