Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versus vim-smartchr #2

Closed
kana opened this issue Feb 13, 2012 · 1 comment
Closed

Versus vim-smartchr #2

kana opened this issue Feb 13, 2012 · 1 comment
Labels

Comments

@kana
Copy link
Owner

kana commented Feb 13, 2012

For example,

  • IEnumerable# -- < -> IEnumerable<#> (with vim-smartpunc) is useful to write type pameters in C#.
  • _<_ <--> < (read _ as a whitespace / with vim-smartchr) is useful to write comparison expressions.

Both configurations are conflicted. What is the best way to coexist such configurations?
Some thoughts:

  • Both plugins have the similar purpose that is to support user's input.
  • vim-smartpunc is mostly a superset of vim-smartchr.
    So that conflicts can be resolved by using only vim-smartpunc
    if it supports features which are available only in vim-smartchr.
  • vim-smartchr is available in both Insert mode and Command-line mode,
    while vim-smartpunc is available only in Insert mode.
    • It's hard to make vim-smartpunc available in Command-line mode
      because of the current implementation,
      especially for interpretation of "at" in Command-line mode.
    • But Command-line mode is the mode to input Ex commands interactively.
      Though input assistants are useful to write source code,
      I doubt that such assistants are also useful in Command-line mode,
      because most input is very short commands such as :wqall
      or commands with special syntax such as :s/.../.../g.
      It's rarely to type complex expressions in Command-line mode.
      So, is it really necessary to support Command-line mode?
  • vim-smartpunc provides flexible rules to configure its behavior,
    while vim-smarchr is not so flexible.
    • On vim-smartpunc, it's easy to write context-sensitive rules with "at", "filetype" and "syntax".
    • On vim-smartchr,
      "at" is not configurable ('foo\%#'-style only),
      "filetype" depends on how rules are defined (e.g. via filetype plugins or :autocmd FileType)
      and "syntax" is not supported completely.
    • On vim-smartpunc, it's possible to specify an arbitrary "input" for any rule.
    • On vim-smartchr,
      "input" is limited to a normal string,
      in other words, it's not possible to adjust the cursor position.
@kana
Copy link
Owner Author

kana commented Mar 3, 2012

I've decided to treat vim-smartpunc as vim-smartchr 2.0.

@kana kana closed this as completed Mar 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant