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

Add default rules for operators #14

Closed
kana opened this issue Feb 18, 2012 · 4 comments
Closed

Add default rules for operators #14

kana opened this issue Feb 18, 2012 · 4 comments
Labels

Comments

@kana
Copy link
Owner

kana commented Feb 18, 2012

For example:

  • Typing =:
    1. foo#
    2. foo = #
    3. foo == #
  • Typing <BS>:
    1. foo == #
    2. foo = #
    3. foo#
@kana
Copy link
Owner Author

kana commented Feb 18, 2012

  • Common operators
    • =
    • +=, -=, ...
    • ==, !=, <=, >=, <, >
    • +, -, *, /, %
    • ++, --
    • <<, >>
    • !, ||, &&
    • |, &, ^, ~
    • ?, :
  • Something special
    • ?? (cs)
    • => (ruby)
    • ===, !== (javascript)
    • ==#, ==?, ... (vim)
    • =~, !~, ... (vim)
    • is, isnot, ... (vim)
    • ... and more.

@kana
Copy link
Owner Author

kana commented Feb 19, 2012

Rules for most operators are defined.
But there are several exceptions for each 'filetype'. For example, :symbol in Ruby, <element> in XML, and so forth.

@kana
Copy link
Owner Author

kana commented Feb 20, 2012

  • Consider about writing an operator at the beginning/end of a line.

@kana
Copy link
Owner Author

kana commented Feb 21, 2012

Partially resolved by: https://github.com/kana/vim-smartpunc/compare/f607953fb0...7bc9d63e43
There are many rules to define for each filetype. Rules for other filetypes are deferred.

@kana kana closed this as completed Feb 21, 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