Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Add new commands for moving between words - #645

Merged
benogle merged 7 commits into
masterfrom
bo-move-word-behavior
Jul 23, 2013
Merged

benogle merged 7 commits into
masterfrom
bo-move-word-behavior

Conversation

@benogle

@benogle benogle commented Jul 19, 2013

Copy link
Copy Markdown
Contributor

Moving between words with editor:move-to-end-of-word and editor:move-to-beginning-of-word confuse me. So I'm adding new commands that work more like sublime. They will be:

  • editor:move-to-previous-word-boundary
  • editor:move-to-next-word-boundary
  • editor:select-to-previous-word-boundary
  • editor:select-to-next-word-boundary

Basically, my issues are:

  • Moving around wordwise messes with my expectations

    • expect it to stop at end of line
    • expect it to stop at begin of line
    • (@somevar|, omg) cursor at pipe, move word left x2, expect it to be (|@somevar, omg) but is |(@somevar, omg)
  • Moving around wordwise should be consistent backward to forward
    Cursor is at pipe

      @scrollView.on 'scroll', =>|
        if @scrollLeft() == 0
    

    Then move right one word, it does this:

      @scrollView.on 'scroll', =>
        if| @scrollLeft() == 0
    

    I expect cursor to land at pipes when moving right from initial

      @scrollView.on 'scroll', =>|
    |  |if| @scrollLeft() == 0
    

@benogle

benogle commented Jul 19, 2013

Copy link
Copy Markdown
Contributor Author

This is ready to go. @probablycorey fire at will.

@benogle benogle mentioned this pull request Jul 22, 2013
12 of 14 tasks
Conflicts:
	src/app/editor.coffee
benogle added a commit that referenced this pull request Jul 23, 2013
Add new commands for moving between words
@benogle
benogle merged commit 18370bb into master Jul 23, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant