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

Docs, "Definintion"

Expand Messages
  • Hugh Sasse Staff Elec Eng
    On a Sun workstation, under CDE, in a dtterm, invoke vim and type illl where is the left arrow key in the cursor keys cluster . You
    Message 1 of 9 , Apr 20, 2000
      On a Sun workstation, under CDE, in a dtterm, invoke vim and type
      illl<left_arrow>
      where <left_arrow> is the left arrow key in the cursor keys 'cluster'.
      You get the message
      Couldn't find definition
      at the bottom of the window. Well, I couldn't find "definition" in
      the list of error messages available from the help command.
      I don't know enough to see what is happening here -- obviously I
      forgot to hit <escape> before hitting left-arrow but what is this
      definition it is looking for? If one can search for definitions
      it should be in the docs. Help definition turned up nothing either.
      Hugh
      hgs@...
    • Bram Moolenaar
      ... Well, normally the context will make clear what the message is for. It s normally given for a command to find a definition in included files. That would
      Message 2 of 9 , Apr 20, 2000
        High Sasse wrote:

        > On a Sun workstation, under CDE, in a dtterm, invoke vim and type
        > illl<left_arrow>
        > where <left_arrow> is the left arrow key in the cursor keys 'cluster'.
        > You get the message
        > Couldn't find definition
        > at the bottom of the window. Well, I couldn't find "definition" in
        > the list of error messages available from the help command.
        > I don't know enough to see what is happening here -- obviously I
        > forgot to hit <escape> before hitting left-arrow but what is this
        > definition it is looking for? If one can search for definitions
        > it should be in the docs. Help definition turned up nothing either.

        Well, normally the context will make clear what the message is for. It's
        normally given for a command to find a definition in included files. That
        would be "[d", "[D" or something like that. Apparently your cursor key
        generates an escape sequence that Vim doesn't recognize, and happens to
        include this command.

        Try using ":map <C-V><hit-left-arrow-key-here> <Left>". Type <C-V> as a real
        CTRL-V, then hit your key. <Left> is typed as six characters.

        --
        hundred-and-one symptoms of being an internet addict:
        110. You actually volunteer to become your employer's webmaster.

        /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
        \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
      • Hugh Sasse Staff Elec Eng
        ... [...] ... Agreed. This is an abnormal context. ... So why could I not find the word definition in the documentation? My point is that this is a useful
        Message 3 of 9 , May 3, 2000
          Just after I went on holiday, On Thu, 20 Apr 2000, Bram Moolenaar wrote:

          >
          > High Sasse wrote:
          >
          > > On a Sun workstation, under CDE, in a dtterm, invoke vim and type
          > > illl<left_arrow>
          > > where <left_arrow> is the left arrow key in the cursor keys 'cluster'.
          > > You get the message
          > > Couldn't find definition
          > > at the bottom of the window. Well, I couldn't find "definition" in
          > > the list of error messages available from the help command.
          [...]
          >
          > Well, normally the context will make clear what the message is for. It's

          Agreed. This is an abnormal context.

          > normally given for a command to find a definition in included files. That

          So why could I not find the word "definition" in the
          documentation? My point is that this is a useful thing to be
          able to do, so the docs should help you find this ability to
          find definitions :-).

          > would be "[d", "[D" or something like that. Apparently your cursor key
          > generates an escape sequence that Vim doesn't recognize, and happens to
          > include this command.

          Only not recognised because I had not left insert mode at the
          time.
          >
          > Try using ":map <C-V><hit-left-arrow-key-here> <Left>". Type <C-V> as a real
          > CTRL-V, then hit your key. <Left> is typed as six characters.
          >
          Thanks, but the fix I was after was a way to find this feature
          in the docs :-) Should this error message not be listed with
          the other error messages, for example?
          > --

          Thank you,
          Hugh
          hgs@...
        • Bram Moolenaar
          ... I got that point, I added a tag to the documentation, but didn t mention it: 6. Include file searches *include-search* *definition-search* -- Your mouse
          Message 4 of 9 , May 3, 2000
            Hugh Sasse wrote:

            > So why could I not find the word "definition" in the
            > documentation? My point is that this is a useful thing to be
            > able to do, so the docs should help you find this ability to
            > find definitions :-).

            I got that point, I added a tag to the documentation, but didn't mention it:

            6. Include file searches *include-search* *definition-search*

            --
            Your mouse has moved. Windows must be restarted for the change
            to take effect. Reboot now?

            /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
            \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
          • jason
            Bram Moolenaar wrote .. ... ohmygod .. now that is a cool feature (that I hadn t been aware of previously) tell me .. is there any ability built in to provide
            Message 5 of 9 , May 3, 2000
              Bram Moolenaar wrote ..

              >Hugh Sasse wrote:
              >
              >> So why could I not find the word "definition" in the
              >> documentation? My point is that this is a useful thing to be
              >> able to do, so the docs should help you find this ability to
              >> find definitions :-).
              >
              >I got that point, I added a tag to the documentation, but
              >didn't mention it:
              >
              >6. Include file searches *include-search*
              >*definition-search*

              ohmygod .. now that is a cool feature (that I hadn't been aware of
              previously)

              tell me .. is there any ability built in to provide a suffix for this
              search to append during it's search for files ? .. strikes me that this
              would be useful for languages like Java and Perl where you don't supply
              a full filename - but rather a class or package name

              for much the same reason it would be nice to be able to specify some
              directory separator mapping type thing so that

              import java.net.Socket;

              in Java .. and

              use Data::Dumper;

              in Perl resulted in searches of <PATH>/java/net/Socket.java and
              <PATH>/Data/Dumper.pm respectively

              also .. it'd be nice to be able to specify wildcard characters so that

              import java.net.*;

              resulted in a search of all *.java files in that directory

              if no one wants to look at this then I will have a (fairly) novice
              attempt - all I ask is that someone points me in the direction of the
              relevant source code (having zero experience with the source it could
              take me all day to find this stuff)

              --
              jason -- elephant@... --
            • Hugh Sasse Staff Elec Eng
              ... Thank you. ... Hugh
              Message 6 of 9 , May 4, 2000
                On Wed, 3 May 2000, Bram Moolenaar wrote:

                >
                > Hugh Sasse wrote:
                >
                > > able to do, so the docs should help you find this ability to
                > > find definitions :-).
                >
                > I got that point, I added a tag to the documentation, but didn't mention it:
                >
                > 6. Include file searches *include-search* *definition-search*

                Thank you.
                >
                > --
                > Your mouse has moved. Windows must be restarted for the change
                > to take effect. Reboot now?

                :-)
                >
                > /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
                > \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
                >
                Hugh
              • Bram Moolenaar
                ... I m working on this. I have a patch for it, but it has to be merged with another one. This is for Vim 6.0... ... That s a new feature request. Hmm,
                Message 7 of 9 , May 4, 2000
                  Hugh Sasse wrote:
                  > >6. Include file searches *include-search*
                  > >*definition-search*
                  >
                  > ohmygod .. now that is a cool feature (that I hadn't been aware of
                  > previously)
                  >
                  > tell me .. is there any ability built in to provide a suffix for this
                  > search to append during it's search for files ? .. strikes me that this
                  > would be useful for languages like Java and Perl where you don't supply
                  > a full filename - but rather a class or package name

                  I'm working on this. I have a patch for it, but it has to be merged with
                  another one. This is for Vim 6.0...

                  > for much the same reason it would be nice to be able to specify some
                  > directory separator mapping type thing so that
                  >
                  > import java.net.Socket;
                  >
                  > in Java .. and
                  >
                  > use Data::Dumper;
                  >
                  > in Perl resulted in searches of <PATH>/java/net/Socket.java and
                  > <PATH>/Data/Dumper.pm respectively

                  That's a new feature request. Hmm, looks like we need some kind of substitute
                  command. For example, substitute "." with "/" and append ".java". Hmm, don't
                  see how this can be done with one substitute command. Perhaps an expression
                  should be used:

                  javapath . substitute(v:name, '\.', "/", "g") . ".java"

                  > also .. it'd be nice to be able to specify wildcard characters so that
                  >
                  > import java.net.*;
                  >
                  > resulted in a search of all *.java files in that directory

                  Hmm, it's possible, but this is yet another thing that has to be added.

                  > if no one wants to look at this then I will have a (fairly) novice
                  > attempt - all I ask is that someone points me in the direction of the
                  > relevant source code (having zero experience with the source it could
                  > take me all day to find this stuff)

                  If you want to have a try, look in the function find_file_in_path() in
                  src/window.c. Search for the use of "mch_getperm()", which is the check for
                  existence of the file.

                  --
                  hundred-and-one symptoms of being an internet addict:
                  214. Your MCI "Circle of Friends" are all Hayes-compatible.

                  /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
                  \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
                • Hugh Sasse Staff Elec Eng
                  ... No I didn t! I wrote the stuff that has been trimmed away! ... Hugh hgs@dmu.ac.uk
                  Message 8 of 9 , May 4, 2000
                    On Thu, 4 May 2000, Bram Moolenaar wrote:

                    >
                    > Hugh Sasse wrote:

                    No I didn't! I wrote the stuff that has been trimmed away!
                    :-)
                    Hugh
                    hgs@...

                    > > >6. Include file searches *include-search*
                    > > >*definition-search*
                    > >
                    > > ohmygod .. now that is a cool feature (that I hadn't been aware of
                    > > previously)
                    > >
                    > > tell me .. is there any ability built in to provide a suffix for this
                    > > search to append during it's search for files ? .. strikes me that this
                    > > would be useful for languages like Java and Perl where you don't supply
                    > > a full filename - but rather a class or package name
                    >
                    > I'm working on this. I have a patch for it, but it has to be merged with
                    > another one. This is for Vim 6.0...
                    >
                    > > for much the same reason it would be nice to be able to specify some
                    > > directory separator mapping type thing so that
                    > >
                    > > import java.net.Socket;
                    > >
                    > > in Java .. and
                    > >
                    > > use Data::Dumper;
                    > >
                    > > in Perl resulted in searches of <PATH>/java/net/Socket.java and
                    > > <PATH>/Data/Dumper.pm respectively
                    >
                    > That's a new feature request. Hmm, looks like we need some kind of substitute
                    > command. For example, substitute "." with "/" and append ".java". Hmm, don't
                    > see how this can be done with one substitute command. Perhaps an expression
                    > should be used:
                    >
                    > javapath . substitute(v:name, '\.', "/", "g") . ".java"
                    >
                    > > also .. it'd be nice to be able to specify wildcard characters so that
                    > >
                    > > import java.net.*;
                    > >
                    > > resulted in a search of all *.java files in that directory
                    >
                    > Hmm, it's possible, but this is yet another thing that has to be added.
                    >
                    > > if no one wants to look at this then I will have a (fairly) novice
                    > > attempt - all I ask is that someone points me in the direction of the
                    > > relevant source code (having zero experience with the source it could
                    > > take me all day to find this stuff)
                    >
                    > If you want to have a try, look in the function find_file_in_path() in
                    > src/window.c. Search for the use of "mch_getperm()", which is the check for
                    > existence of the file.
                    >
                    > --
                    > hundred-and-one symptoms of being an internet addict:
                    > 214. Your MCI "Circle of Friends" are all Hayes-compatible.
                    >
                    > /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
                    > \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
                    >
                  • Thomas Köhler
                    On Thu, May 04, 2000 at 10:42:33AM +0200, ... Yet another reason to stay tuned for vim-6 pre-releases :-) ... Yes, and one I d also like to see :-) ... Yes, or
                    Message 9 of 9 , May 4, 2000
                      On Thu, May 04, 2000 at 10:42:33AM +0200,
                      Bram Moolenaar <Bram@...> wrote:
                      > > >6. Include file searches *include-search*
                      > > >*definition-search*
                      > >
                      > > ohmygod .. now that is a cool feature (that I hadn't been aware of
                      > > previously)
                      > >
                      > > tell me .. is there any ability built in to provide a suffix for this
                      > > search to append during it's search for files ? .. strikes me that this
                      > > would be useful for languages like Java and Perl where you don't supply
                      > > a full filename - but rather a class or package name
                      >
                      > I'm working on this. I have a patch for it, but it has to be merged with
                      > another one. This is for Vim 6.0...

                      Yet another reason to stay tuned for vim-6 pre-releases :-)

                      > > for much the same reason it would be nice to be able to specify some
                      > > directory separator mapping type thing so that
                      > >
                      > > import java.net.Socket;
                      > >
                      > > in Java .. and
                      > >
                      > > use Data::Dumper;
                      > >
                      > > in Perl resulted in searches of <PATH>/java/net/Socket.java and
                      > > <PATH>/Data/Dumper.pm respectively
                      >
                      > That's a new feature request.

                      Yes, and one I'd also like to see :-)

                      > Hmm, looks like we need some kind of substitute command. For example,
                      > substitute "." with "/" and append ".java". Hmm, don't see how this
                      > can be done with one substitute command. Perhaps an expression should
                      > be used:
                      >
                      > javapath . substitute(v:name, '\.', "/", "g") . ".java"

                      Yes, or

                      perlpath . substitute(v:name, '::', '.', 'g') . '.pm'

                      > > also .. it'd be nice to be able to specify wildcard characters so that
                      > >
                      > > import java.net.*;
                      > >
                      > > resulted in a search of all *.java files in that directory
                      >
                      > Hmm, it's possible, but this is yet another thing that has to be added.

                      Well, not needed for my current perl coding, so this can wait :-)

                      CU,
                      Thomas [awaiting first vim-6 alpha release :-)]

                      --
                      Thomas Köhler Email: jean-luc@... | LCARS - Linux
                      <>< WWW: http://jeanluc-picard.de | for Computers
                      IRC: jeanluc | on All Real
                      PGP public key available from Homepage! | Starships
                    Your message has been successfully submitted and would be delivered to recipients shortly.