Алексей Данченков wrote:
Hi!
I just started diving into vi (and just subscribed to the mailing
list) and so far learned a basic moving around/editing commands. While
I am going through the basic book, is there a fast way to comment out
a paragraph with |-#| in the same column with the cursor position
(indenting the lines accordingly)?
Let's say I have a piece of code:
|%table
- unless paginate(@clients).nil?
%tr
%th
=t('index.name <http://index.name>')
%th
=t('index.address')
%th
=t('index.phone')
=render :partial => 'client', :collection => @clients
|
and I want to comment out 9 lines (or a paragraph?) between |- unless|
and |=render :partial| with |-#| in one column like that...
|%table
-# - unless paginate(@clients).nil?
-# %tr
-# %th
-# =t('index.name <http://index.name>')
-# %th
-# =t('index.address')
-# %th
-# =t('index.phone')
-# =render :partial => 'client', :collection => @clients
|
...and then be able to comment them in again. What command would that be?
Cheers, Alexei
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Hi,
There are several way to do it.
If you go to www.vim.org and search for "comment line" you'll end up
with this page:
http://www.vim.org/scripts/script.php?script_id=1528
You should be able to edit it and add any custom comments.
If you don't want to install plugins, there are also tips on vim.org
that may help you:
http://vim.wikia.com/wiki/Commenting_out_a_range_of_lines
Cheers,
JM
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php