Re: More newbie questions
- Antony Scriven <ads1@...> wrote:
> Antoine Mechelynck wrote:Maybe. The helpfile says that the default setting for lcs is "eol:$" (and
> > Antony Scriven <ads1@... >wrote:
> > > [...] I've also just noticed that the default for
> > > 'lcs' is not vi compatible: it doesn't show tabs as
> > > ^I (at least not in my vim6.1). I'm guessing this is
> > > because it fouls up alignment.
> > According to what is said in the help, if you ":set
> > list" and 'lcs' haven't been set (for instance in the
> > vimrc) then tabs will appear as ^I. To make them appear
> > white with 'list' on, then ":set lcs +=tab:\ \ ". But if
> > 'list' is off (the default) vim shows tabs as whitespace
> > and doesn't show any of the other suboptions (eol,
> > trail, precedes, extends) of 'listchars'.
> Hmm, I'm glad you've pointed this out. Of course vim
> displays tabs as `^I' by default. Doing vim -u NONE a moment
> ago and then :set list I get `^I' for tabs which is I what I
> would have expected. Now, I then :set lcs=+tab:>-, and then
> > set lcs& and had nothing displaying for tabs. :set lcs=
> however did result in `^I' displaying for tabs.
> I was able to reproduce this behaviour, but in the course of
> writing up my exact steps it stopped happening. And now it
> doesn't happen. Go figure. I think it was probably just a
> glitch in the screen redrawing.
tab empty, ie, ^I). But I didn't actually check if it's true. My own
preference goes to ":set lcs=tab:\ \ ,eol:¶" but other people have other
tastes and that's what options are for: let everyone use what suits them
> På Wed, Jul 30, 2003 at 11:25:38AM -0400, Daniel Bron skrev:you only need one greater-than or lower-than while in visual mode.
>> 3) How can I remap the tab key so that if a block of text is selected
>> and tab is pressed, the entire block is indented, and vice-versa for
> :vnoremap <Tab> >>
> :vnoremap <S-Tab> <<
Those mappings (un-)indent the selected block, hide the selection
and than wait for the user to tell VIM the objects which are to be
(un-)indented next. So
:vnoremap <tab> >
:vnoremap <s-tab> <
would be better. And if Daniel wants to (un-)indent the selected
block more than once, he can automatically restore the selection
at the end of the mapping
:vnoremap <tab> >gv
:vnoremap <s-tab> <gv
Jürgen Krämer Softwareentwicklung
Habel GmbH mailto:jkraemer@...
Hinteres Öschle 2 Tel: (0 74 61) 93 53 15
78604 Rietheim-Weilheim Fax: (0 74 61) 93 53 99