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

Re: 60am: can this be done?

Expand Messages
  • Zdenek Sekera
    ... I don t know, neither of them works for me. ... Aha, forgot about that one, I ll have a look at it, thanks.
    Message 1 of 5 , Jul 2, 2001
    • 0 Attachment
      Neil Bird wrote:
      >
      > Zdenek Sekera wrote:
      > > I'd like the '0' (place cursor st the beginning of the line)
      > > to always place the cursor say at virtcol 5.
      >
      > Is that not ':noremap 0 05gl' ?
      >
      > > Similarly, '^' to place the cursor on the first nonblank
      > > that follows after the first 4 virtcols (that is ignoring
      > > whatever is in col 1-4 and start looking for first nonblank
      > > afterwards.
      >
      > Similarly; ':noremap ^ 04glw'
      >

      I don't know, neither of them works for me.

      > > - restrict search, editing etc only to certain virtcols of the
      > > file?
      >
      > TRhat's gonna have to be a function. ^V selection followed by
      > :B s///?
      >
      > Now, who wrote that B I have ... hey, how do I find out what
      > file a command got loaded from?? Ah, got it. "vis.vim", Stefan
      > Roemer.

      Aha, forgot about that one, I'll have a look at it, thanks.

      ---Zdenek
    • Neil Bird
      ... You could make that more convoluted by doing a :normal! that uses the current valus of &sw etc. instead of 5 or 4 . -- =================-
      Message 2 of 5 , Jul 3, 2001
      • 0 Attachment
        Zdenek Sekera wrote:
        > Neil Bird wrote:
        > > Is that not ':noremap 0 05gl' ?
        > > Similarly; ':noremap ^ 04glw'
        >
        > I don't know, neither of them works for me.

        D'Oh! Sorry; try:

        :noremap 0 g05l
        :noremap ^ g04lw

        You could make that more convoluted by doing a :normal! that
        uses the current valus of &sw etc. instead of '5' or '4'.

        --
        =================- http://www.thalesgroup.com/ -================
        Neil Bird Principal Engineer |
        work - mailto:neil.bird@... | $> cd /pub
        personal - mailto:neil@... | $> more beer
      • Zdenek Sekera
        ... I foundout by now how to do that, I have functions that do all I want. The key here to avoid recursion is to use systematically normal! (note the bang,
        Message 3 of 5 , Jul 3, 2001
        • 0 Attachment
          Neil Bird wrote:
          >
          > Zdenek Sekera wrote:
          > > Neil Bird wrote:
          > > > Is that not ':noremap 0 05gl' ?
          > > > Similarly; ':noremap ^ 04glw'
          > >
          > > I don't know, neither of them works for me.
          >
          > D'Oh! Sorry; try:
          >

          :-)

          > :noremap 0 g05l
          > :noremap ^ g04lw
          >
          > You could make that more convoluted by doing a :normal! that
          > uses the current valus of &sw etc. instead of '5' or '4'.

          I foundout by now how to do that, I have functions that do all
          I want. The key here to avoid recursion is to use systematically
          normal! (note the bang, actually you've suggested that, too)
          inside those functions. However, it gets little bit worse: all
          scripts/functions that have now 'normal 0' etc...must be fixed
          to use the bang version. Nuisance, but doable.
          Thanks to all.

          ---Zdenek
        Your message has been successfully submitted and would be delivered to recipients shortly.