Thursday, September 21, 2017

Re: How to display tabs characters as ^I

On Thu, Sep 21, 2017 at 12:59 PM, Igor Forca <igor2x@gmail.com> wrote:
> Hi,
> when I open the file which includes tabs characters I can replace tabs with some other characters if I want like using:
> :%s/^I/ /g
> To get ^I I press Control+V and then press i key.
>
> I know ^I is a symbol for tabs. But is there a way instead of horizontal spacing produced by pressing tab key to display ^I control character?
> Just like for example when Control+V and m is pressed to display carriage return character ^M
>
> So, how to display ^I (as single character) instead of horizontal spacing produced by tab key?
>
> Thanks

See :help 'list' and :help 'listchars' -- these are local options,
boolean and comma-separated string respectively

If 'list' is off, a hard tab is represented as one or more spaces
If 'list' is on and 'listchars' includes tab:xy (where x and y are any
two characters, but see ":help option-backslash") a hard tab is
represented as one x and zero or more y (see examples under |lcs-tab|)
If 'list' is on and 'listchars' does not include tab: a hard tab is shown as ^I

Best regards,
Tony.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment