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

Re: Ctrl-P

Expand Messages
  • A. S. Budden
    ... [snip] ... [snip] I ve tried both of these solutions, but I still can t get it to work. The result I get is that I type Pent^P and it completes the Pentref
    Message 1 of 6 , Jun 2, 2004
      Thus spake gumnos (Tim Chase):
      > > What I think I would like to do is say "let iskeyword be everything
      > > except tabs, starts of lines and ends of lines" or something like
      > > iskeyword=*-\t,\n
      >
      > Well, you can get this with (while this isn't exactly it, it's good
      > enough for the most part)
      >
      > :set iskeyword=32-255
      >
      [snip]

      Thus spake Antony Scriven:
      > A. S. Budden wrote:
      >
      > > I have a utf8 file (with a fair number of characters with accents).
      > > This file contains a lot of fields, all separated by tabs.
      > > [...]
      >
      > I don't know anything about utf8, sorry, but hopefully this
      > will still apply.
      >
      > > What I would like to be able to do when adding text to this file is to
      > > use Ctrl-P (or something similar) to complete the field that I'm typing
      > > (as opposed to just the word).
      >
      > Try something along the lines of:
      >
      > set iskeywork=1-255,^9
      >
      > Replace `1-255' with whatever range you need for utf8. `^9'
      > means exclude tabs. I don't think you need to exclude
      > newlines as I'm not sure that you can complete across a line
      > boundary, although I admit I've never tried.
      >
      > You may also want to change the 'complete' option:
      >
      > set complete=.
      >
      > to just complete from the current buffer.
      [snip]

      I've tried both of these solutions, but I still can't get it to work.
      The result I get is that I type Pent^P and it completes the Pentref bit,
      but not the rest of the field.

      In case it helps, I have uploaded the text file in question to
      http://tinyurl.com/yupsv

      Can anyone point out what I'm missing here... or at least confirm that
      it works with this file so that I can see if there's something wrong
      with my setup here...

      Many thanks again for the help,

      Al
    • Antoine J. Mechelynck
      ... [...] ... Seeing my name in the mail, I just have to answer. Yet there are a LOT of things about Vin that I don t know, even in the Unicode department.
      Message 2 of 6 , Jun 2, 2004
        gumnos (Tim Chase) <gumnos@...> wrote:
        > > What I think I would like to do is say "let iskeyword be everything
        > > except tabs, starts of lines and ends of lines" or something like
        > > iskeyword=*-\t,\n
        >
        > Well, you can get this with (while this isn't exactly it, it's good
        > enough for the most part)
        >
        > :set iskeyword=32-255

        [...]

        > I'm not sure how kindly this plays with Unicode/UTF8 joys, but perhaps
        > Antoine M. or one of the other folks better versed in the
        > peculiarities of alternate character encodings can jump in here.
        >
        > To truely just get tabs & cr/lf as your delims, you could set
        > iskeyword to"1-8,11,12,14-255" or something like that. This would
        > exclude *just* those characters. However, if you're lazy like me,
        > and don't have other control characters in your document (<32) then
        > you can just use the 32-255 range. :)
        >
        > Hope this helps,
        >
        > -tim

        Seeing my name in the mail, I just have to answer. Yet there are a LOT of
        things about Vin that I don't know, even in the Unicode department. About
        "higher" codepoints, I read under 'isfname' (to which 'iskeyword' resends)
        that "under Unicode", multibyte codepoints U+00A0 and above are always
        "included" ("multibyte" in UTF-8 means anything other than 7-bit ASCII).

        Regards,
        Tony.
      • Antony Scriven
        ... I see the problem, but I m afraid I have no further suggestions. Works fine for latin1; switch to utf-8 and it stops working. Antony
        Message 3 of 6 , Jun 2, 2004
          A. S. Budden wrote:

          > Thus spake Antony Scriven:
          > >
          > > [...]
          > >
          > > set iskeywork=1-255,^9
          > >
          > > [...]
          >
          > I've tried both of these solutions, but I still can't get it to work.
          > The result I get is that I type Pent^P and it completes the Pentref bit,
          > but not the rest of the field.
          >
          > In case it helps, I have uploaded the text file in question to
          > http://tinyurl.com/yupsv
          >
          > Can anyone point out what I'm missing here... or at least confirm that
          > it works with this file so that I can see if there's something wrong
          > with my setup here...

          I see the problem, but I'm afraid I have no further
          suggestions. Works fine for latin1; switch to utf-8 and it
          stops working.

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