With about the same amount of keystrokes you could use :
a \t ;
a - for append to end of line then tab then whatever comment
character you want. If you record this to a macro you can use @
[char] to add the comment char to the end of any line no matter where
you are in the line.
Kevin
On Jun 2, 2006, at 2:57 PM, Charles E Campbell Jr wrote:
Eric Luo wrote:
I want to comment a new line or comment an existing line at the
end of
the current line. In Emacs, I have M-; to do the job.
Could anyone tell me that weather the similar functionality existed?
I have no idea what emacs does, and I suspect that there's quite a
few folks
who use Vim have no idea, either.
In the vein of "give a man a fish, feed him once; teach a man to
fish, feed him forever":
do a search at http://vim.sf.net/ for "comment". Perhaps one of
the plugins there will
address your wishes -- I got 84 hits when I just did it.
Regards,
Chip Campbell