Date: Sat, 21 Feb 2009 14:50:25 +0000 From: af300wsm@gmail.com To: Johan Hendriks <Johan@double-l.nl>, Doug Poland <doug@polands.org>, freebsd-questions@freebsd.org Subject: Re: RE: vi set comment # Message-ID: <00163646d5f0bd6c9004636ee3e1@google.com> In-Reply-To: <57200BF94E69E54880C9BB1AF714BBCB5DE58B@w2003s01.double-l.local>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 20, 2009 7:56am, Johan Hendriks <Johan@double-l.nl> wrote: > >> define service{ > >> use generic-service > >> host_name w2003hk03 > >> service_description Explorer > >> check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe > >> } > >> > >> And now i want to set a # to all the 6 lines. > Thanks all for the fast and usefull response. > Regards, > Johan Hendriks As if you haven't already gotten enough help and such, I'd like to give you another alternative that will be handy in the future too. Please note however that this only applies if you're using VIM. 1) Place your cursor on top of the first character you want to put the comment in front of (in your example, which I left above, that would on top of the 'd' in "define") 2) Hit Ctrl-v (this places the editor in visual mode) 3) Hit 'j', or use the down arrows, until your highlighted section is on top of the last character you want the comment in front of (in your example, it is the closing '}') 4) Hit Shift-I 5) Type a single '#' 6) Hit escape After hitting escape, you'll have a new column of '#' characters in front of every character in that vertical column. Also, one of your first respondents mentioned a mailing list at vim.org (I believe, going off memory), you can also get great vi/vim advice from comp.editors. They discuss all kinds of editors there, but the group is mainly vi dominated. Hope this helps, Andy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00163646d5f0bd6c9004636ee3e1>