Loading ...
Sorry, an error occurred while loading the content.

Re: More newbie questions

Expand Messages
  • Antoine J. Mechelynck
    ... Maybe. The helpfile says that the default setting for lcs is eol:$ (and tab empty, ie, ^I). But I didn t actually check if it s true. My own preference
    Message 1 of 13 , Aug 1, 2003
    • 0 Attachment
      Antony Scriven <ads1@...> wrote:
      > Antoine Mechelynck wrote:
      >
      > > 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.
      >
      > Antony

      Maybe. The helpfile says that the default setting for lcs is "eol:$" (and
      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
      best.

      Regards,
      Tony.
    • Jürgen Krämer
      Hi, ... you only need one greater-than or lower-than while in visual mode. Those mappings (un-)indent the selected block, hide the selection and than wait for
      Message 2 of 13 , Aug 4, 2003
      • 0 Attachment
        Hi,

        uws wrote:
        > På Wed, Jul 30, 2003 at 11:25:38AM -0400, Daniel Bron skrev:
        >
        >> 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
        >> shift+tab?
        >
        >
        > :vnoremap <Tab> >>
        > :vnoremap <S-Tab> <<

        you only need one greater-than or lower-than while in visual mode.
        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

        Regards,
        Jürgen

        --
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.