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

Indentation file for Specman E language

Expand Messages
  • צביקה הרמתי
    Hi. I ve created a VIM indentation file for Specman E language. Please see it at: https://specman1.wordpress.com/2013/01/20/vim-specman-indentation/ I ve been
    Message 1 of 2 , Jul 17, 2013
    • 0 Attachment
      Hi.

      I've created a VIM indentation file for Specman E language.
      Please see it at:
      https://specman1.wordpress.com/2013/01/20/vim-specman-indentation/

      I've been using it for 6 months, and while it's not perfect, it seems
      to generally do the job.

      Feedbacks and suggestions are welcomed!

      Someone commented on that page, and suggested using 'indentkeys'.
      However, I don't understand how using, or not using 'indentkeys',
      would affect editing experience.

      Thanks,
      Zvika

      --
      --
      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Paul Isambert
      ... The “indentexpr” function is executed when a new line is created, but also when something matching a part of “indentkeys” is typed; for the latter
      Message 2 of 2 , Jul 17, 2013
      • 0 Attachment
        צביקה הרמתי <haramaty.zvika@...> a écrit:
        > Hi.
        >
        > I've created a VIM indentation file for Specman E language.
        > Please see it at:
        > https://specman1.wordpress.com/2013/01/20/vim-specman-indentation/
        >
        > I've been using it for 6 months, and while it's not perfect, it seems
        > to generally do the job.
        >
        > Feedbacks and suggestions are welcomed!
        >
        > Someone commented on that page, and suggested using 'indentkeys'.
        > However, I don't understand how using, or not using 'indentkeys',
        > would affect editing experience.

        The “indentexpr” function is executed when a new line is created, but
        also when something matching a part of “indentkeys” is typed; for the
        latter case, you should ask yourself “what kind of things should
        trigger a reeindentation of the current line?”

        For instance, if you’re writing this code in Vimscript:

        if whatever
        dosomething
        end

        one you’ve typed “end” you’ll want that line to be unindented, so it
        matches the first one (whereas for the moment it matches the second
        one, as expected by default). That is done automatically because
        “indentkeys” for Vim contains “=end” (just do “:echo &indentkeys” in a
        Vim file), which means “reindent whenever ‘end’ is typed”.

        Note that the default value of “indentkeys” might already (partially)
        suit your needs (for instance, it reindents on braces). I don’t know
        Specman, so I can’t help you any further.

        Best,
        Paul

        --
        --
        You received this message from the "vim_use" 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_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.