On 16/09/12 19:54, Tim Johnson wrote:
* Bee <[email protected]> [120916 09:09]:
On Sep 16, 9:43 am, Tim Johnson <[email protected]> wrote:
Hi :
Is there a way to apply the expand/retab process to a visual
selection?
:h ??
thanks
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot comhttp://www.akwebsoft.com
:help :retab
:[range]ret[ab][!]
[new_tabstop]
<blush> I shoulda asked for an example.
If I do the following
v " start visual mode
jjjj " select 4 more lines
:retab " nothing
:retab! " nothing
What else need I do?
thanks
When you type : in Visual mode, you should see
:'<,'>
where '< means "the first visually selected line" and '> means "the last
visually selected line". Don't erase these marks as you type :retab in
Visual mode. Or you could do without Visual mode, as follows:
:set expandtab
5:retab
(that second line will be expanded to :.,.+4retab and it should expand
tabs to spaces in the current line and the 4 following ones). Or
:set noexpandtab
5:retab!
to convert spaces to tabs instead.
See
:help v_:
:help N:
Best regards,
Tony.
--
Mandrell: "You know what I think?"
Doctor: "Ah, ah that's a catch question. With a brain your size you
don't think, right?"
-- Dr. Who
--
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