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

RE: Autoindenting for non - C files

Expand Messages
  • David Fishburn
    I have found vim61 indent ada.vim which has a similar syntax. So I am creating an indent file based on this. Sorry for the emails. Dave ... From: David
    Message 1 of 4 , Jul 31, 2002
    View Source
    • 0 Attachment
      I have found vim61\indent\ada.vim which has a similar syntax.

      So I am creating an indent file based on this.

      Sorry for the emails.

      Dave

      -----Original Message-----
      From: David Fishburn [mailto:fishburn@...]
      Sent: Wednesday, July 31, 2002 8:58 PM
      To: fishburn@...; vim@...
      Subject: RE: Autoindenting for non - C files



      I have looked into some of the other languages (vb.vim) that don't use
      curlys {}, and I don't see any autoindenting for them.

      It appears you can specify the words that force an indent:
      cinwords=if,else,while,do,for,switch

      But the indent isn't triggered until you type in a "{".

      So I guess the question becomes:
      Is there anyway to tell vim to use other characters to trigger an indent
      (ie THEN), since many languages look like this:

      If( ) then
      do something;
      again;
      end if;

      Thx,
      Dave

      -----Original Message-----
      From: David Fishburn [mailto:fishburn@...]
      Sent: Wednesday, July 31, 2002 4:28 PM
      To: vim@...
      Subject: Autoindenting for non - C files



      W2K vim 6.1 (no updates)

      I am reading up on how the autoindent feature works.

      There is cinwords = cinwords=if,else,while,do,for,switch that
      automatically tells vim to indent when it encounters them.

      If I am editing a SQL file, I would like to do the same thing. I noticed
      that cinwords is already set (with the same values above) but nothing
      happens.

      I was wondering what else controls this and what changes will I have to
      make automatically set this up.

      If VIM is capable of doing it, I expect I should create a file in:
      vim61\ftplugin\sql.vim

      I can then set all my options so they are automatically picked up (just
      like c.vim).

      Thanks,
      Dave
    • Mikolaj Machowski
      ... Or create indent file (look in vim61 indent for examples) You can also try to find something on http://vim.sf.net But I don t know if there are only
      Message 2 of 4 , Aug 1, 2002
      View Source
      • 0 Attachment
        On Wed, 31 Jul 2002, David Fishburn wrote:

        > There is cinwords = cinwords=if,else,while,do,for,switch that
        > automatically tells vim to indent when it encounters them.
        >
        > If I am editing a SQL file, I would like to do the same thing.
        > I noticed that cinwords is already set (with the same values above) but
        > nothing happens.
        >
        > I was wondering what else controls this and what changes will I have to
        > make automatically set this up.
        >
        > If VIM is capable of doing it, I expect I should create a file in:
        > vim61\ftplugin\sql.vim

        Or create indent file (look in vim61\indent\ for examples)

        You can also try to find something on http://vim.sf.net

        But I don't know if there are only syntax files (for various sql dialects)
        or something more.

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