Aaron Lewis <aaron.lewis1989@gmail.com> (2010-07-17 19:24 +0800):
> I'm trying to implement a custom script used for commenting and
> uncommenting , we have two types , like c-style `//' and shell-style `#'
> , how can i detect the first characters ?
Not really answering your question, but if you aren't writing the script
just for fun or education I would recommend the existing NERD commenter
plugin, which does its job pretty well for all kinds of comments:
http://www.vim.org/scripts/script.php?script_id=1218
HTH,
Frank
--
Frank Blendinger | fb@intoxicatedmind.net | GPG: 0BF2FE7A | :(){:|:&};:
No comments:
Post a Comment