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

Merge goto-word with goto-subword #33

Closed
bbatsov opened this issue May 10, 2015 · 6 comments
Closed

Merge goto-word with goto-subword #33

bbatsov opened this issue May 10, 2015 · 6 comments

Comments

@bbatsov
Copy link
Contributor

bbatsov commented May 10, 2015

I think it'd be beneficial if there were 2 commands less to remember and the goto-word commands were simply subword-mode aware - they'd respect subwords if subword-mode is enabled. Alternatively there could be some defcustom with values like - "word-start", "subword-start", "subword-start-when-subword-mode-enabled".

@aethanyc
Copy link
Contributor

We might need to fix that goto-subword-1 cannot jump to punctuation while goto-word-1 can before merging them.

@abo-abo
Copy link
Owner

abo-abo commented May 11, 2015

Actually, it seems to me that another command would need to be introduced for this for a total of 3:

  • word
  • subword
  • word-or-subword

Since there are bound to be users that would want to call word when subword-mode is on, and vice versa.

@bbatsov
Copy link
Contributor Author

bbatsov commented May 11, 2015

Since there are bound to be users that would want to call word when subword-mode is on, and vice versa.

We don't have such a distinction for words separated by - and _, so this seems a bit superficial to me. I think all composite words should be treated the same way.

What would the word-or-subword command to do? Act on subwords only when subword-mode is enabled?

@abo-abo
Copy link
Owner

abo-abo commented May 11, 2015

What would the word-or-subword command to do? Act on subwords only when subword-mode is enabled?

Exactly. It's a very simple command.

@abo-abo
Copy link
Owner

abo-abo commented May 11, 2015

We don't have such a distinction for words separated by - and _

This is mode-specific. We rely on \\b to tell us the word boundaries.

@bbatsov
Copy link
Contributor Author

bbatsov commented May 11, 2015

Exactly. It's a very simple command.

Fair enough.

This is mode-specific. We rely on \b to tell us the word boundaries.

I understand why this is behaving like it is. I'm just saying it's not a very intuitive behaviour. At any rate - I'm fine with using a word-or-subword command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants