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

RE: visual basic ftplugins, anyone?

Expand Messages
  • Michael Geddes
    Hey Hari, I have one that allows you to go to the line as it would be in the editor window. SO 1gvb goes to the first line as it appears in the VB editor.
    Message 1 of 4 , Jan 1, 2004
      Hey Hari,

      I have one that allows you to go to the line as it would be in the
      editor window. SO 1gvb goes to the first line as it appears in the VB
      editor.
      http://www.vim.org/scripts/script.php?script_id=464

      I also have a script that allows you to do abbreviations that only work
      outside of comments..
      http://www.vim.org/scripts/script.php?script_id=872

      then my ftplugin/vb.vim looks like this:
      -----------------------8<--------------------------------
      so ~/vim/synabbrev.vim
      set et
      set ts=4
      set sw=4
      Synabbrev <buffer> set Set
      Synabbrev <buffer> for For
      Synabbrev <buffer> to To
      Synabbrev <buffer> end End
      Synabbrev <buffer> next Next
      Synabbrev <buffer> property Property
      Synabbrev <buffer> private Private
      Synabbrev <buffer> while While
      Synabbrev <buffer> As As
      Synabbrev <buffer> if If
      Synabbrev <buffer> byval ByVal
      Synabbrev <buffer> byref ByRef
      Synabbrev <buffer> get Get
      Synabbrev <buffer> let Let
      Synabbrev <buffer> sub Sub
      Synabbrev <buffer> is Is
      Synabbrev <buffer> nothing Nothing
      Synabbrev <buffer> then Then
      Synabbrev <buffer> true True
      Synabbrev <buffer> false False
      Synabbrev <buffer> and And
      Synabbrev <buffer> or Or
      Synabbrev <buffer> not Not
      Synabbrev <buffer> function Function
      Synabbrev <buffer> boolean Boolean
      Synabbrev <buffer> integer Integer
      Synabbrev <buffer> string String
      Synabbrev <buffer> long Long
      Synabbrev <buffer> dim Dim
      Synabbrev <buffer> as As

      so ~\vim\vblinenr.vim



      -----Original Message-----
      From: Hari Krishna Dara [mailto:hari_vim@...]
      Sent: Tuesday, 23 December 2003 11:08 AM
      To: vim@...
      Subject: visual basic ftplugins, anyone?


      Wondering if anyone has vb ftplugins available, even if unfinished. I am
      most interested in the matchit configuration, but others will be a bonus
      too.

      Thanks,
      Hari

      __________________________________
      Do you Yahoo!?
      New Yahoo! Photos - easier uploading and sharing.
      http://photos.yahoo.com/
    • Dan Sharp
      Copying back to vim@vim.org, which I believe was supposed to be included in Hari s reply... ... With just a quick glance at the vb.vim and basic.vim syntax
      Message 2 of 4 , Jan 5, 2004
        Copying back to vim@..., which I believe was supposed to be included
        in Hari's reply...

        Hari Krishna Dara wrote:
        > On Mon, 22 Dec 2003 at 7:14pm, Dan Sharp wrote:
        >
        >>Hari Krishna Dara wrote:
        >>
        >>>Wondering if anyone has vb ftplugins available, even if unfinished. I am
        >>>most interested in the matchit configuration, but others will be a bonus
        >>>too.
        >>
        >>The vim62/ftplugin/vb.vim that I have (dated from November of 2001)
        >>includes the matchit configuration. If you don't have it, check
        >>ftp://ftp.vim.org/pub/vim/runtime/ftplugin/vb.vim to see if it is more
        >>current.
        >>
        >>Dan Sharp
        >
        > This is interesting, there seems to be two supported filetypes called
        > "basic" and "vb" and for "basic" there isn't even a ftplugin created.
        > In my case, the file is being detected as "basic" though I am sure it is
        > a "visual basic" file (an Actuate library). I don't know how different
        > these languages are (I am just trying to hack into, right now)
        > syntactically, but it almost looks like the "vb" plugins could be
        > written to be supersets of "basic" plugins, by reorganizing the code.

        With just a quick glance at the vb.vim and basic.vim syntax files, it
        appears that is true. At the very least, the basic.vim could be reduced
        to about a third of its current size by replacing all the keyword
        variations (like 'syn keyword basicStatement RETURN return Return') with
        just one of the choices and adding a 'syn case ignore' at the top.

        > Can anyone tell if I need to modify the "vb" matchit definitions before
        > using them for "basic" ?

        It looks like another superset. Most of them should be applicable, and
        the ones that aren't (the OO-ish ones that use public / private)
        shouldn't hurt since they probably won't come up in a plain 'basic' file
        anyway.

        Dan Sharp
      • Antoine J. Mechelynck
        ... [...] ... See also ... HTH, Tony.
        Message 3 of 4 , Jan 5, 2004
          Dan Sharp <dwsharp@...> wrote:
          > Copying back to vim@..., which I believe was supposed to be
          > included in Hari's reply...
          >
          > Hari Krishna Dara wrote:
          [...]
          > > This is interesting, there seems to be two supported filetypes
          > > called "basic" and "vb" and for "basic" there isn't even a ftplugin
          > > created.
          > > In my case, the file is being detected as "basic" though I am sure
          > > it is a "visual basic" file (an Actuate library). I don't know how
          > > different these languages are (I am just trying to hack into, right
          > > now) syntactically, but it almost looks like the "vb" plugins could
          > > be written to be supersets of "basic" plugins, by reorganizing the
          > > code.
          >
          > With just a quick glance at the vb.vim and basic.vim syntax files, it
          > appears that is true. At the very least, the basic.vim could be
          > reduced to about a third of its current size by replacing all the
          > keyword variations (like 'syn keyword basicStatement RETURN return
          > Return') with just one of the choices and adding a 'syn case ignore'
          > at the top.
          >
          > > Can anyone tell if I need to modify the "vb" matchit definitions
          > > before using them for "basic" ?
          >
          > It looks like another superset. Most of them should be applicable,
          > and the ones that aren't (the OO-ish ones that use public / private)
          > shouldn't hurt since they probably won't come up in a plain 'basic'
          > file anyway.
          >
          > Dan Sharp

          See also
          :help basic

          HTH,
          Tony.
        Your message has been successfully submitted and would be delivered to recipients shortly.