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

developing a plugin for fortran

Expand Messages
  • Rudra Banerjee
    Hi, I am vim user for long time, but have not done much development (except a colour-scheme). But, for fortran (my principle language), I dearly miss some
    Message 1 of 4 , May 20, 2014
    • 0 Attachment
      Hi,
      I am vim user for long time, but have not done much development (except a colour-scheme). But, for fortran (my principle language), I dearly miss some plugins.
      There is only one (fortran_code_complete(fcc), but guess, is not maintained. Also, has some odd format). So, I want to dig deep, and start developing a full fortran plugin (including code-complete and indent).

      But, given that I have not done anything as such before, I am bit puzzled on where to start. Can anyone kindly provide me a sample for ftplugin/code_complete?

      I guess, for the blocks like:
      sample: do i=1,10<F-7>

      should yeild:

      sample do i=1,10
      <cursor here>
      end do sample

      fcc does same thing, but, I am not sure if the approach is efficient one. That code is http://www.vim.org/scripts/script.php?script_id=2487

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • LCD 47
      ... The buzzword you re looking for is snippets . There are a number of snippet plugins around, f.i.: https://github.com/SirVer/ultisnips
      Message 2 of 4 , May 21, 2014
      • 0 Attachment
        On 20 May 2014, Rudra Banerjee <bnrj.rudra@...> wrote:
        > Hi,

        > I am vim user for long time, but have not done much development
        > (except a colour-scheme). But, for fortran (my principle language), I
        > dearly miss some plugins.
        > There is only one (fortran_code_complete(fcc), but guess, is not
        > maintained. Also, has some odd format). So, I want to dig deep, and
        > start developing a full fortran plugin (including code-complete and
        > indent).
        >
        > But, given that I have not done anything as such before, I am bit
        > puzzled on where to start. Can anyone kindly provide me a sample for
        > ftplugin/code_complete?
        >
        > I guess, for the blocks like:
        > sample: do i=1,10<F-7>
        >
        > should yeild:
        >
        > sample do i=1,10
        > <cursor here>
        > end do sample

        The buzzword you're looking for is "snippets". There are a number
        of snippet plugins around, f.i.:

        https://github.com/SirVer/ultisnips
        https://github.com/Shougo/neosnippet.vim
        https://github.com/garbas/vim-snipmate

        You should probably avoid the original snipmate, which is no longer
        maintained:

        https://github.com/msanders/snipmate.vim

        Snippets for various languages are maintained separately:

        https://github.com/honza/vim-snippets

        At the time of this writing, the archive doesn't seem to have any
        snippet for Fortran, so this is your chance to achieve eternal glory as
        a snippet creator. :)

        "Code completion" is a very different animal. Still useful, but
        quite different from what you're asking for. See for example:

        https://github.com/Shougo/neocomplete.vim

        > fcc does same thing, but, I am not sure if the approach is efficient
        > one. That code is http://www.vim.org/scripts/script.php?script_id=2487

        You can safely forget about this one, it hasn't been updated since
        December 2008. Use neocomplete instead if you want code completion, or
        ultisnips (or another snippet plugin) if you want snippets.

        /lcd

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • LCD 47
        On 21 May 2014, LCD 47 wrote: [...] ... [...] Related screencast by Drew Neil: http://vimcasts.org/episodes/meet-ultisnips/ /lcd -- -- You
        Message 3 of 4 , May 21, 2014
        • 0 Attachment
          On 21 May 2014, LCD 47 <lcd047@...> wrote:
          [...]
          > The buzzword you're looking for is "snippets". There are a number
          > of snippet plugins around, f.i.:
          >
          > https://github.com/SirVer/ultisnips
          [...]

          Related screencast by Drew Neil:

          http://vimcasts.org/episodes/meet-ultisnips/

          /lcd

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • Rudra Banerjee
          ... Thanks LCD 47, I am using snippets for ~1 year (and cant believe how idiot I was of not using them before). The problem is, I am looking for a full fortran
          Message 4 of 4 , May 23, 2014
          • 0 Attachment
            On Wednesday, May 21, 2014 11:02:23 AM UTC+1, LCD 47 wrote:
            >
            >
            > The buzzword you're looking for is "snippets". There are a number
            >
            > of snippet plugins around, f.i.:
            >
            Thanks LCD 47,
            I am using snippets for ~1 year (and cant believe how idiot I was of not using them before). The problem is, I am looking for a full fortran plugin, which will have indent, color etc as well. This is a long and weekend plan. Though for the present, snippets are very useful, can that be in the same place as my plugin dir, or must be in the snips dir?

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          Your message has been successfully submitted and would be delivered to recipients shortly.