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

Re: [PATCH] Convert formatprg to a global-local option.

Expand Messages
  • Gary Johnson
    ... formatprg existed in Vim 6 and possibly in earlier versions; formatexpr did not appear until Vim 7. Vim seems to be moving away from relying on
    Message 1 of 10 , Apr 24 5:38 PM
      On 2013-04-24, Sung Pae wrote:

      > So I retract my last response: a global-local formatprg is clearly
      > useful for both prose and code, and comes at the cost of a small
      > non-breaking change.
      >
      > Tony Mechelynck's criticism is that it is superfluous. I disagreeน, but
      > you will have to convince him before Bram will pay any attention. :)
      >
      > Sung Pae
      >
      > น Why have formatprg at all then?

      'formatprg' existed in Vim 6 and possibly in earlier versions;
      'formatexpr' did not appear until Vim 7.

      Vim seems to be moving away from relying on external programs to
      expand functionality and toward having more capability built-in.
      One of the reasons for this is to accommodate Windows users who
      don't have access to the rich set of tools available in Unix.
      Another reason is that built-in tools have access to Vim's variables
      and functions and allow for better integration with Vim.

      I think that 'formatexpr' offers better functionality than
      'formatprg', including the ability to run external programs, which
      is probably why Tony says that it's superfluous. 'formatprg' is
      simpler to use in some cases and, more importantly, must be kept for
      backwards compatibility.

      Regards,
      Gary

      --
      --
      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/groups/opt_out.
    • Justin M. Keyes
      ... I m guessing that is just speculation. Invoking external tools which communicate via stdin/stdout, on Windows, is very useful and will continue to be one
      Message 2 of 10 , Feb 22, 2016
        On Wednesday, April 24, 2013 at 8:38:42 PM UTC-4, Gary Johnson wrote:
        > On 2013-04-24, Sung Pae wrote:
        >
        > > So I retract my last response: a global-local formatprg is clearly
        > > useful for both prose and code, and comes at the cost of a small
        > > non-breaking change.
        > >
        > > Tony Mechelynck's criticism is that it is superfluous. I disagree�, but
        > > you will have to convince him before Bram will pay any attention. :)
        > >
        > > Sung Pae
        > >
        > > � Why have formatprg at all then?
        >
        > 'formatprg' existed in Vim 6 and possibly in earlier versions;
        > 'formatexpr' did not appear until Vim 7.
        >
        > Vim seems to be moving away from relying on external programs to
        > expand functionality and toward having more capability built-in.
        > One of the reasons for this is to accommodate Windows users who
        > don't have access to the rich set of tools available in Unix.

        I'm guessing that is just speculation. Invoking external tools which communicate via stdin/stdout, on Windows, is very useful and will continue to be one of the valuable aspects of Vim. And now that git (which ships with MSYS2) is quasi-ubiquitous on Windows, unix tooling is common.

        > Another reason is that built-in tools have access to Vim's variables
        > and functions and allow for better integration with Vim.
        >
        > I think that 'formatexpr' offers better functionality than
        > 'formatprg', including the ability to run external programs, which
        > is probably why Tony says that it's superfluous. 'formatprg' is
        > simpler to use in some cases and, more importantly, must be kept for
        > backwards compatibility.

        This doesn't address the problem of being invoked on every keystroke.

        Making 'formatprg' global-local is a low-risk change that reduces inconsistency and adds some convenience and flexibiity.

        While flexibility of 'formatexpr' is nice, there should also be a continued push to make Vim's features more consistent where it can be done at negligible cost.

        ---

        Justin M. Keyes

        --
        --
        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.