misfo / jim

Vim mode for Ace (Github & Cloud9's editor)
http://misfo.github.com/jim
MIT License
65 stars 3 forks source link

Issue 10 #29

Closed sourrust closed 13 years ago

sourrust commented 13 years ago

Feature request in issue #10 Visual mode o, it also does the same for O since we don't have visual block mode yet.

misfo commented 13 years ago

I like it. Looks perfect in characterwise visual mode. In linewise, however, pressing o twice doesnt put the cursor back where it started...

sourrust commented 13 years ago

This should fix it, however I noticed, when both anchor and lead are the same, linewise selection disappears visually, but really is still there.

misfo commented 13 years ago

Yeah, that's because this hack isn't used in this patch. Unfortunately we'll have to keep track of the position of the selection anchor in the modeState so that we can use that hack to set the selection anchor (when linewise) and still know where to put the cursor when the user hits o or O.

sourrust commented 13 years ago

Alright looks like everything is good, thanks for telling me about modeState.

sourrust commented 13 years ago

Never mind my response to your comment, I think I understand what you were getting at after messing around a bit more. I think this is what you asked for.

misfo commented 13 years ago

Looks good. Thanks!