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

Using Vim with Java and Packages -- how do y'all do it?

Expand Messages
  • David Risner
    I have been using Vim for quite a few years, but I have never felt that I am using things optimally in regards to packages and Java. I set my Vim up so I have
    Message 1 of 10 , Dec 1, 2003
    • 0 Attachment
      I have been using Vim for quite a few years, but I have never felt that I am
      using things optimally in regards to packages and Java.

      I set my Vim up so I have the current directory be the base directory of my Java
      project. I then create a tags file that includes all of the Java files I'm using
      in various packages. I set up a batch file (or sometimes a build.xml file for
      Ant) in my base directory and compile and run from there.

      The problem is that many of the scripts (like cppcomplete.vim for example) on the
      Vim site seem to assume that you are in the same directory as your Java files,
      but then it seems like you would have to have copies of tags files in each
      package directory and copies of your compile script or build.xml file (modified
      to work correctly with the directories) in each package directory.

      So, how do the rest of you work with Java and Vim? Do you not use packages? Do
      you do something similar to what I do? Do you just change directory to whatever
      the current file is you are working on?

      Thank you for any advise you can give.
    • Taylor, Kevin
      I haven t used ant.vim but I have a custom mapping for my :make that calls ant. I have a custom Ant menu item with each of my commonly called ant tasks, such
      Message 2 of 10 , Dec 4, 2003
      • 0 Attachment
        I haven't used ant.vim but I have a custom mapping for my :make that calls
        ant. I have a custom "Ant" menu item with each of my commonly called ant
        tasks, such as compile, clean, deploy, etc.

        I have found ctags to be very useful. My directory structure is usually
        something like:
        project_root/
        dist/
        src/
        gen-src/
        lib/
        public_html/
        ...

        I use project_root as my working directory and store my Session.vim's in
        there. I put my tags file in project_root/dist so that it only tags my
        mulitple source trees and not a bunch of crap like JSP files, class files,
        etc. Then as I update code, I occasionally run "ctags -R ." in my dist dir
        to update my tags.

        I use xmledit, xmllint, and tidy to write, validate and cleanup
        XML/HTML/JSP.

        I use bufexplorer.vim, taglist.vim and savevers.vim.

        I keep a "project-agnostic" vimrc in my home dir and project-specific
        vimrc's in each of my project_root dirs.

        I am generally very satisfied with this approach but am always looking to
        tweek it.

        Deficiencies with my approach:
        -Don't have any code insight beyond ctags preview.
        -imports/packages are not handled at all.
        -A lot of vimrc files and Session.vim files get spread around (one of each
        in each project_root + my main vimrc in $HOME).

        HTH. I feel like we need a support group for Java Vim users. B-)

        --Kevin Taylor
        Sr Web Developer
        The Pampered Chef LTD
        630-261-3557

        > > > -----Original Message-----
        > > > From: David Risner [SMTP:java102dave-vim@...]
        > > > Sent: Monday, December 01, 2003 1:05 PM
        > > > To: vim@...
        > > > Subject: Using Vim with Java and Packages -- how do y'all do it?
        > > >
        > > > I have been using Vim for quite a few years, but I have never felt
        > that I
        > > > am
        > > > using things optimally in regards to packages and Java.
        > > >
        > > > I set my Vim up so I have the current directory be the base directory
        > of
        > > > my Java
        > > > project. I then create a tags file that includes all of the Java
        > files
        > > > I'm using
        > > > in various packages. I set up a batch file (or sometimes a build.xml
        > file
        > > > for
        > > > Ant) in my base directory and compile and run from there.
        > > >
        > > > The problem is that many of the scripts (like cppcomplete.vim for
        > example)
        > > > on the
        > > > Vim site seem to assume that you are in the same directory as your
        > Java
        > > > files,
        > > > but then it seems like you would have to have copies of tags files in
        > each
        > > > package directory and copies of your compile script or build.xml file
        > > > (modified
        > > > to work correctly with the directories) in each package directory.
        > > >
        > > > So, how do the rest of you work with Java and Vim? Do you not use
        > > > packages? Do
        > > > you do something similar to what I do? Do you just change directory
        > to
        > > > whatever
        > > > the current file is you are working on?
        > > >
        > > > Thank you for any advise you can give.
      • Patrick Nichols
        Note: Java-centric post For a long time I used the vi plugin for JBuilder, but as the project I work on grew (and as Jbuilder slowed down ever more) I
        Message 3 of 10 , Dec 5, 2003
        • 0 Attachment
          Note: Java-centric post

          For a long time I used the vi plugin for JBuilder, but as the project I work
          on grew (and as Jbuilder slowed down ever more) I gradually switched over to
          a full vim IDE. This has taken place over the course of a couple of years,
          and so I've developed quite a lot of scripts to support java development.

          Naturally, the big drawback to vim for java development is the lack of class
          insight. ctags is fine, but not enough.

          I was really excited by the cppcomplete script that appeared a while ago,
          but I had to give up because of the ten second wait every time I pressed "."
          (like I said...the project I work on is big)

          The general approach I've adopted has several parts:

          1. For each project, I create a config file with a list of the "libraries" I
          use for that project. Each library has the full paths to the jar/directory
          which constitutes the lib.

          2. I have a vim function which walks the list of libraries, and generates a
          "ClassList" file. Basically this is just a list of every class, its package,
          and its library number (which points back to the library file). The list is
          generated by doing a "find" for all of the directory-based libraries, and
          calling jar -t for all the jars.

          Using the ClassList to obtain the fully-qualified name and library(and the
          list of imports in a file to distinguish same-named classes) I can get
          whatever info I need about the class.

          - I can put the cursor on a class name and automatically add the correct
          import line by looking up all the classes with that name
          - I have a tiny java app which uses reflection to print the list of
          methods for a class. I can filter and sort the results - say, only look at
          the methods beginning with a certain string, or only look at methods in the
          class and its immediate parent, or look at all methods up to the level of
          Object
          - If I add the http: prefix of the javadoc api to the library file, I can
          pull up the api in explorer for any given class

          Basically, having the class list makes it easy to map to any information I
          need about the class from its name. And while generating the full class list
          the first time is slow, you only have to gen it once and then you can just
          update it. And looking up a name in a text file is FAST.

          I've been meaning to eventually upload the whole thing to the Vim site, but
          at the moment its not nearly complete. If there are any interested java
          developers out there, though, perhaps we could pool our efforts and set up a
          sourceforge project. In any case, I'd be interested to hear from other java
          developers about their tricks for java development in Vim.

          Patrick Nichols


          ----- Original Message -----
          From: "Taylor, Kevin" <Kevin_Taylor@...>
          To: "'David Risner'" <java102dave-vim@...>; <vim@...>
          Sent: Thursday, December 04, 2003 4:15 PM
          Subject: RE: Using Vim with Java and Packages -- how do y'all do it?


          >
          > I haven't used ant.vim but I have a custom mapping for my :make that calls
          > ant. I have a custom "Ant" menu item with each of my commonly called ant
          > tasks, such as compile, clean, deploy, etc.
          >
          > I have found ctags to be very useful. My directory structure is usually
          > something like:
          > project_root/
          > dist/
          > src/
          > gen-src/
          > lib/
          > public_html/
          > ...
          >
          > I use project_root as my working directory and store my Session.vim's in
          > there. I put my tags file in project_root/dist so that it only tags my
          > mulitple source trees and not a bunch of crap like JSP files, class files,
          > etc. Then as I update code, I occasionally run "ctags -R ." in my dist dir
          > to update my tags.
          >
          > I use xmledit, xmllint, and tidy to write, validate and cleanup
          > XML/HTML/JSP.
          >
          > I use bufexplorer.vim, taglist.vim and savevers.vim.
          >
          > I keep a "project-agnostic" vimrc in my home dir and project-specific
          > vimrc's in each of my project_root dirs.
          >
          > I am generally very satisfied with this approach but am always looking to
          > tweek it.
          >
          > Deficiencies with my approach:
          > -Don't have any code insight beyond ctags preview.
          > -imports/packages are not handled at all.
          > -A lot of vimrc files and Session.vim files get spread around (one of each
          > in each project_root + my main vimrc in $HOME).
          >
          > HTH. I feel like we need a support group for Java Vim users. B-)
          >
          > --Kevin Taylor
          > Sr Web Developer
          > The Pampered Chef LTD
          > 630-261-3557
          >
          > > > > -----Original Message-----
          > > > > From: David Risner [SMTP:java102dave-vim@...]
          > > > > Sent: Monday, December 01, 2003 1:05 PM
          > > > > To: vim@...
          > > > > Subject: Using Vim with Java and Packages -- how do y'all do it?
          > > > >
          > > > > I have been using Vim for quite a few years, but I have never felt
          > > that I
          > > > > am
          > > > > using things optimally in regards to packages and Java.
          > > > >
          > > > > I set my Vim up so I have the current directory be the base
          directory
          > > of
          > > > > my Java
          > > > > project. I then create a tags file that includes all of the Java
          > > files
          > > > > I'm using
          > > > > in various packages. I set up a batch file (or sometimes a
          build.xml
          > > file
          > > > > for
          > > > > Ant) in my base directory and compile and run from there.
          > > > >
          > > > > The problem is that many of the scripts (like cppcomplete.vim for
          > > example)
          > > > > on the
          > > > > Vim site seem to assume that you are in the same directory as your
          > > Java
          > > > > files,
          > > > > but then it seems like you would have to have copies of tags files
          in
          > > each
          > > > > package directory and copies of your compile script or build.xml
          file
          > > > > (modified
          > > > > to work correctly with the directories) in each package directory.
          > > > >
          > > > > So, how do the rest of you work with Java and Vim? Do you not use
          > > > > packages? Do
          > > > > you do something similar to what I do? Do you just change directory
          > > to
          > > > > whatever
          > > > > the current file is you are working on?
          > > > >
          > > > > Thank you for any advise you can give.
        • Geoffrey Mann
          I would definitely be interested in a java/vim users group!!! I use the following plugins: project.vim intellisense.vim jad.vim JavaImp.vim JavaRun.vim
          Message 4 of 10 , Dec 5, 2003
          • 0 Attachment
            I would definitely be interested in a java/vim users group!!!

            I use the following plugins:
            project.vim
            intellisense.vim
            jad.vim
            JavaImp.vim
            JavaRun.vim
            jcommenter.vim
            taglist.vim
            javabrowser.vim

            I use the following ftplugins:
            java_checkstyle.vim
            java_getset.vim
            java_vis.vim

            I use JavaImp heavily. It does much of the API doc reading stuff, adding imports, etc..
            The get/set is nice.

            I have started making notes on how to add functionality to project.vim, so that we could turn vim
            into a java refactoring tool(e.g. Rename a file in the project, hit a key and rename it every
            where else that class is referenced). I have added key bindings to wrap try/catch around visually
            highlighted blocks (modified from HALIM comment on vim website).

            Also, I use key bindings to switch my makeprg for different build files (I am lazy).

            G

            -----Original Message-----
            From: Taylor, Kevin [mailto:Kevin_Taylor@...]
            Sent: Thursday, December 04, 2003 4:16 PM
            To: 'David Risner'; vim@...
            Subject: RE: Using Vim with Java and Packages -- how do y'all do it?



            I haven't used ant.vim but I have a custom mapping for my :make that calls
            ant. I have a custom "Ant" menu item with each of my commonly called ant
            tasks, such as compile, clean, deploy, etc.

            I have found ctags to be very useful. My directory structure is usually
            something like:
            project_root/
            dist/
            src/
            gen-src/
            lib/
            public_html/
            ...

            I use project_root as my working directory and store my Session.vim's in
            there. I put my tags file in project_root/dist so that it only tags my
            mulitple source trees and not a bunch of crap like JSP files, class files,
            etc. Then as I update code, I occasionally run "ctags -R ." in my dist dir
            to update my tags.

            I use xmledit, xmllint, and tidy to write, validate and cleanup
            XML/HTML/JSP.

            I use bufexplorer.vim, taglist.vim and savevers.vim.

            I keep a "project-agnostic" vimrc in my home dir and project-specific
            vimrc's in each of my project_root dirs.

            I am generally very satisfied with this approach but am always looking to
            tweek it.

            Deficiencies with my approach:
            -Don't have any code insight beyond ctags preview.
            -imports/packages are not handled at all.
            -A lot of vimrc files and Session.vim files get spread around (one of each
            in each project_root + my main vimrc in $HOME).

            HTH. I feel like we need a support group for Java Vim users. B-)

            --Kevin Taylor
            Sr Web Developer
            The Pampered Chef LTD
            630-261-3557

            > > > -----Original Message-----
            > > > From: David Risner [SMTP:java102dave-vim@...]
            > > > Sent: Monday, December 01, 2003 1:05 PM
            > > > To: vim@...
            > > > Subject: Using Vim with Java and Packages -- how do y'all do it?
            > > >
            > > > I have been using Vim for quite a few years, but I have never felt
            > that I
            > > > am
            > > > using things optimally in regards to packages and Java.
            > > >
            > > > I set my Vim up so I have the current directory be the base directory
            > of
            > > > my Java
            > > > project. I then create a tags file that includes all of the Java
            > files
            > > > I'm using
            > > > in various packages. I set up a batch file (or sometimes a build.xml
            > file
            > > > for
            > > > Ant) in my base directory and compile and run from there.
            > > >
            > > > The problem is that many of the scripts (like cppcomplete.vim for
            > example)
            > > > on the
            > > > Vim site seem to assume that you are in the same directory as your
            > Java
            > > > files,
            > > > but then it seems like you would have to have copies of tags files in
            > each
            > > > package directory and copies of your compile script or build.xml file
            > > > (modified
            > > > to work correctly with the directories) in each package directory.
            > > >
            > > > So, how do the rest of you work with Java and Vim? Do you not use
            > > > packages? Do
            > > > you do something similar to what I do? Do you just change directory
            > to
            > > > whatever
            > > > the current file is you are working on?
            > > >
            > > > Thank you for any advise you can give.
          • Taylor, Kevin
            Thanks for the tips. In your JavaImp.vim, how did you setup the JavaDoc viewing? I am having problems getting it to launch iexplore.exe on WinXP. Also, doesn t
            Message 5 of 10 , Dec 11, 2003
            • 0 Attachment
              Thanks for the tips. In your JavaImp.vim, how did you setup the JavaDoc
              viewing? I am having problems getting it to launch iexplore.exe on WinXP.

              Also, doesn't taglist.vim and javabrowser.vim do about the same thing?

              --Kevin Taylor

              > -----Original Message-----
              > From: Geoffrey Mann [SMTP:Geoffrey.Mann@...]
              > Sent: Friday, December 05, 2003 10:00 PM
              > To: Taylor, Kevin; vim@...
              > Subject: RE: Using Vim with Java and Packages -- how do y'all do it?
              >
              >
              > I would definitely be interested in a java/vim users group!!!
              >
              > I use the following plugins:
              > project.vim
              > intellisense.vim
              > jad.vim
              > JavaImp.vim
              > JavaRun.vim
              > jcommenter.vim
              > taglist.vim
              > javabrowser.vim
              >
              > I use the following ftplugins:
              > java_checkstyle.vim
              > java_getset.vim
              > java_vis.vim
              >
              > I use JavaImp heavily. It does much of the API doc reading stuff, adding
              > imports, etc..
              > The get/set is nice.
              >
              > I have started making notes on how to add functionality to project.vim, so
              > that we could turn vim
              > into a java refactoring tool(e.g. Rename a file in the project, hit a key
              > and rename it every
              > where else that class is referenced). I have added key bindings to wrap
              > try/catch around visually
              > highlighted blocks (modified from HALIM comment on vim website).
              >
              > Also, I use key bindings to switch my makeprg for different build files (I
              > am lazy).
              >
              > G
            • Geoffrey Mann
              I had to play around with the ftplugin/java.vim a bit to get it to work. The following should get you most of the way there, if it doesn t let me know. let
              Message 6 of 10 , Dec 11, 2003
              • 0 Attachment
                I had to play around with the ftplugin/java.vim a bit to get it to work.
                The following should get you most of the way there, if it doesn't let me know.

                let g:JavaImpPaths = "/Projects/webcom/CLINT/src,/j2sdk1.4.2_01/src"
                let g:JavaImpDataDir = "/vim/JavaImp"
                let g:JavaImpDocPaths = "/j2sdk1.4.2_01/docs/api"
                let g:JavaImpDocViewer = "iexplore.exe"
                exe "setlocal dict=" . g:JavaImpDataDir . "/JavaImp.txt"
                "invoke through Alt-a
                nmap <M-a> :JID<CR>



                At one point I was using java_apidoc.vim to do this but switched to JavaImp
                "let browser="/Program Files/Internet Explorer/IEXPLORE.EXE"
                "let javadoc_path="/j2sdk1.4.1_02/docs/api,/projects/webcom/CLINT/dist/javadoc"
                "nmap <M-a> viw"jy:call OpenJavadoc("j")

                You are correct about taglist.vim and javabrowser.vim, they both use ctags to do
                their business!

                I am always curious to optimize my efficiency. If you have any tips let me know!

                G

                -----Original Message-----
                From: Taylor, Kevin [mailto:Kevin_Taylor@...]
                Sent: Thursday, December 11, 2003 9:43 AM
                To: Geoffrey Mann; vim@...
                Subject: RE: Using Vim with Java and Packages -- how do y'all do it?


                Thanks for the tips. In your JavaImp.vim, how did you setup the JavaDoc
                viewing? I am having problems getting it to launch iexplore.exe on WinXP.

                Also, doesn't taglist.vim and javabrowser.vim do about the same thing?

                --Kevin Taylor

                > -----Original Message-----
                > From: Geoffrey Mann [SMTP:Geoffrey.Mann@...]
                > Sent: Friday, December 05, 2003 10:00 PM
                > To: Taylor, Kevin; vim@...
                > Subject: RE: Using Vim with Java and Packages -- how do y'all do it?
                >
                >
                > I would definitely be interested in a java/vim users group!!!
                >
                > I use the following plugins:
                > project.vim
                > intellisense.vim
                > jad.vim
                > JavaImp.vim
                > JavaRun.vim
                > jcommenter.vim
                > taglist.vim
                > javabrowser.vim
                >
                > I use the following ftplugins:
                > java_checkstyle.vim
                > java_getset.vim
                > java_vis.vim
                >
                > I use JavaImp heavily. It does much of the API doc reading stuff, adding
                > imports, etc..
                > The get/set is nice.
                >
                > I have started making notes on how to add functionality to project.vim, so
                > that we could turn vim
                > into a java refactoring tool(e.g. Rename a file in the project, hit a key
                > and rename it every
                > where else that class is referenced). I have added key bindings to wrap
                > try/catch around visually
                > highlighted blocks (modified from HALIM comment on vim website).
                >
                > Also, I use key bindings to switch my makeprg for different build files (I
                > am lazy).
                >
                > G
              • Taylor, Kevin
                This is an FYI for anyone else trying to get the the JavaImpl Javadoc viewer to work with a windows+gvim+cygwin configuration. These are the settings that I
                Message 7 of 10 , Dec 23, 2003
                • 0 Attachment
                  This is an FYI for anyone else trying to get the the JavaImpl Javadoc viewer
                  to work with a windows+gvim+cygwin configuration.

                  These are the settings that I used in my .vimrc. I had a lot of trouble with
                  the DocPaths and DocViewer settings:
                  let g:JavaImpPaths = "/tpc/dist/src,/tpc/dist/gen-src,/jdk_src"
                  let g:JavaImpDataDir = "/vim/JavaImp"
                  let g:JavaImpDocPaths = "y\:/kevin_doc_root/javadoc/jdk1.3"
                  let g:JavaImpDocViewer = "c\:/Program\\ Files/Internet\\
                  Explorer/iexplore.exe"

                  Two questions: When the ie window pops up, a DOS window is also launched.
                  Anyway to get rid of the DOS window? Also, when the ie window pops up, gvim
                  is frozen until I close the ie and DOS windows. Any way to launch this
                  process in the background instead?

                  --Kevin Taylor

                  > -----Original Message-----
                  > From: Geoffrey Mann [SMTP:Geoffrey.Mann@...]
                  > Sent: Thursday, December 11, 2003 7:03 PM
                  > To: Taylor, Kevin; vim@...
                  > Subject: RE: Using Vim with Java and Packages -- how do y'all do it?
                  >
                  >
                  > I had to play around with the ftplugin/java.vim a bit to get it to work.
                  > The following should get you most of the way there, if it doesn't let me
                  > know.
                  >
                  > let g:JavaImpPaths = "/Projects/webcom/CLINT/src,/j2sdk1.4.2_01/src"
                  > let g:JavaImpDataDir = "/vim/JavaImp"
                  > let g:JavaImpDocPaths = "/j2sdk1.4.2_01/docs/api"
                  > let g:JavaImpDocViewer = "iexplore.exe"
                  > exe "setlocal dict=" . g:JavaImpDataDir . "/JavaImp.txt"
                  > "invoke through Alt-a
                  > nmap <M-a> :JID<CR>
                  >
                  >
                  >
                  > At one point I was using java_apidoc.vim to do this but switched to
                  > JavaImp
                  > "let browser="/Program Files/Internet Explorer/IEXPLORE.EXE"
                  > "let
                  > javadoc_path="/j2sdk1.4.1_02/docs/api,/projects/webcom/CLINT/dist/javadoc"
                  > "nmap <M-a> viw"jy:call OpenJavadoc("j")
                  >
                  > You are correct about taglist.vim and javabrowser.vim, they both use ctags
                  > to do
                  > their business!
                  >
                  > I am always curious to optimize my efficiency. If you have any tips let
                  > me know!
                  >
                  > G
                  >
                  > -----Original Message-----
                  > From: Taylor, Kevin [mailto:Kevin_Taylor@...]
                  > Sent: Thursday, December 11, 2003 9:43 AM
                  > To: Geoffrey Mann; vim@...
                  > Subject: RE: Using Vim with Java and Packages -- how do y'all do it?
                  >
                  >
                  > Thanks for the tips. In your JavaImp.vim, how did you setup the JavaDoc
                  > viewing? I am having problems getting it to launch iexplore.exe on WinXP.
                  >
                  > Also, doesn't taglist.vim and javabrowser.vim do about the same thing?
                  >
                  > --Kevin Taylor
                  >
                  > > -----Original Message-----
                  > > From: Geoffrey Mann [SMTP:Geoffrey.Mann@...]
                  > > Sent: Friday, December 05, 2003 10:00 PM
                  > > To: Taylor, Kevin; vim@...
                  > > Subject: RE: Using Vim with Java and Packages -- how do y'all do it?
                  > >
                  > >
                  > > I would definitely be interested in a java/vim users group!!!
                  > >
                  > > I use the following plugins:
                  > > project.vim
                  > > intellisense.vim
                  > > jad.vim
                  > > JavaImp.vim
                  > > JavaRun.vim
                  > > jcommenter.vim
                  > > taglist.vim
                  > > javabrowser.vim
                  > >
                  > > I use the following ftplugins:
                  > > java_checkstyle.vim
                  > > java_getset.vim
                  > > java_vis.vim
                  > >
                  > > I use JavaImp heavily. It does much of the API doc reading stuff,
                  > adding
                  > > imports, etc..
                  > > The get/set is nice.
                  > >
                  > > I have started making notes on how to add functionality to project.vim,
                  > so
                  > > that we could turn vim
                  > > into a java refactoring tool(e.g. Rename a file in the project, hit a
                  > key
                  > > and rename it every
                  > > where else that class is referenced). I have added key bindings to wrap
                  > > try/catch around visually
                  > > highlighted blocks (modified from HALIM comment on vim website).
                  > >
                  > > Also, I use key bindings to switch my makeprg for different build files
                  > (I
                  > > am lazy).
                  > >
                  > > G
                • Paul Brinkley
                  ... I hate to pour some sort of fuel on this fire, but I have a script similar to JavaDoc.vim that I wrote from scratch a while back, for Windows. Seems to
                  Message 8 of 10 , Dec 29, 2003
                  • 0 Attachment
                    At 02:56 PM 12/23/2003 -0600, Taylor, Kevin wrote:
                    >This is an FYI for anyone else trying to get the the JavaImpl Javadoc viewer
                    >to work with a windows+gvim+cygwin configuration.
                    >
                    >These are the settings that I used in my .vimrc. I had a lot of trouble with
                    >the DocPaths and DocViewer settings:
                    >let g:JavaImpPaths = "/tpc/dist/src,/tpc/dist/gen-src,/jdk_src"
                    >let g:JavaImpDataDir = "/vim/JavaImp"
                    >let g:JavaImpDocPaths = "y\:/kevin_doc_root/javadoc/jdk1.3"
                    >let g:JavaImpDocViewer = "c\:/Program\\ Files/Internet\\
                    >Explorer/iexplore.exe"
                    >
                    >Two questions: When the ie window pops up, a DOS window is also launched.
                    >Anyway to get rid of the DOS window? Also, when the ie window pops up, gvim
                    >is frozen until I close the ie and DOS windows. Any way to launch this
                    >process in the background instead?

                    I hate to pour some sort of fuel on this fire, but I have a script
                    similar to JavaDoc.vim that I wrote from scratch a while back, for Windows.
                    Seems to avoid any and all frozen Vims, lingering DOS windows (one pops up
                    but immediately goes away), etc. Works on my Win2k box at work, and my
                    Win98 box at home. (I think. There may be -very- slight differences.)

                    One known "bug". I set the script so that if there's more than one package
                    containing the class name under the cursor (e.g., java.util.List and
                    java.awt.List), it'll open a browser page for each. Firebird seems to not
                    enjoy having multiple copies of itself summoned all at once; it complains
                    about "no XML binding" or some such and opens a blank window filling the
                    screen. It's not fatal, but it's annoying. My workaround is to already
                    have a Firebird window running in the background when I do this.

                    I should probably submit this to vim.org. See if it does what you need.
                  • Dan Sharp
                    ... Does this work (should be on one line, of course)? let g:JavaImpDocViewer = start c :/Program Files/Internet Explorer/iexplore.exe Dan Sharp
                    Message 9 of 10 , Dec 29, 2003
                    • 0 Attachment
                      Taylor, Kevin wrote:
                      > This is an FYI for anyone else trying to get the the JavaImpl Javadoc viewer
                      > to work with a windows+gvim+cygwin configuration.
                      >
                      > These are the settings that I used in my .vimrc. I had a lot of trouble with
                      > the DocPaths and DocViewer settings:
                      > let g:JavaImpPaths = "/tpc/dist/src,/tpc/dist/gen-src,/jdk_src"
                      > let g:JavaImpDataDir = "/vim/JavaImp"
                      > let g:JavaImpDocPaths = "y\:/kevin_doc_root/javadoc/jdk1.3"
                      > let g:JavaImpDocViewer = "c\:/Program\\ Files/Internet\\
                      > Explorer/iexplore.exe"
                      >
                      > Two questions: When the ie window pops up, a DOS window is also launched.
                      > Anyway to get rid of the DOS window? Also, when the ie window pops up, gvim
                      > is frozen until I close the ie and DOS windows. Any way to launch this
                      > process in the background instead?

                      Does this work (should be on one line, of course)?

                      let g:JavaImpDocViewer = "start c\:/Program\\ Files/Internet\\
                      Explorer/iexplore.exe"

                      Dan Sharp
                    • Hari Krishna Dara
                      ... viewer ... with ... Somewhere, a long time ago, I found a way to let windows explorer open the appropriate program based on the file types setup, and have
                      Message 10 of 10 , Jan 5, 2004
                      • 0 Attachment
                        On Mon, 29 Dec 2003 at 11:12pm, Dan Sharp wrote:

                        > Taylor, Kevin wrote:
                        > > This is an FYI for anyone else trying to get the the JavaImpl Javadoc
                        viewer
                        > > to work with a windows+gvim+cygwin configuration.
                        > >
                        > > These are the settings that I used in my .vimrc. I had a lot of trouble
                        with
                        > > the DocPaths and DocViewer settings:
                        > > let g:JavaImpPaths = "/tpc/dist/src,/tpc/dist/gen-src,/jdk_src"
                        > > let g:JavaImpDataDir = "/vim/JavaImp"
                        > > let g:JavaImpDocPaths = "y\:/kevin_doc_root/javadoc/jdk1.3"
                        > > let g:JavaImpDocViewer = "c\:/Program\\ Files/Internet\\
                        > > Explorer/iexplore.exe"
                        > >
                        > > Two questions: When the ie window pops up, a DOS window is also launched.
                        > > Anyway to get rid of the DOS window? Also, when the ie window pops up, gvim
                        > > is frozen until I close the ie and DOS windows. Any way to launch this
                        > > process in the background instead?
                        >
                        > Does this work (should be on one line, of course)?
                        >
                        > let g:JavaImpDocViewer = "start c\:/Program\\ Files/Internet\\
                        > Explorer/iexplore.exe"
                        >
                        > Dan Sharp
                        >
                        >

                        Somewhere, a long time ago, I found a way to let windows explorer open
                        the appropriate program based on the file types setup, and have been
                        using it for various things (e.g., to launch a word or a pdf document
                        from within my Perforce plugin). Try the following:

                        let g:JavaImpDocViewer = 'start rundll32 url.dll,FileProtocolHandler'

                        There are many good things about this command:
                        - one command handles all file types (well, all those that are setup
                        under windows explorer). This also has the advantage of bringing
                        up the user's preferred browser.
                        - mends well with the rest of the windows.
                        - no setup required from the user for any windows OS.
                        - no dos window showing up. For a console vim, I think this even
                        avoids Vim briefly showing up the console.
                        - You can even avoid "hit enter" prompt by prefixing the bang
                        with :silent!, like this:

                        exec 'silent! !'.g:JavaImpDocViewer ...

                        HTH,
                        Hari

                        __________________________________
                        Do you Yahoo!?
                        Find out what made the Top Yahoo! Searches of 2003
                        http://search.yahoo.com/top2003
                      Your message has been successfully submitted and would be delivered to recipients shortly.