misfo / jim

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

`o` in visual mode #10

Closed michaelficarra closed 13 years ago

michaelficarra commented 13 years ago

This is one of those features that you're really glad exists when you need it. I haven't seen any other editor with a similar feature either, which is a shame.

misfo commented 13 years ago

Agreed. I'll throw this in after I get out of the refactor hell that the dot command has put me in

misfo commented 13 years ago

O seems to do the same thing in visual mode. So I'll map that as well

michaelficarra commented 13 years ago

It's always best to go by the spec than just what we observe:

                                                        *v_o* 
o                       Go to Other end of highlighted text: The current 
                        cursor position becomes the start of the highlighted 
                        text and the cursor is moved to the other end of the 
                        highlighted text.  The highlighted area remains the 
                        same.                           

                                                        *v_O* 
O                       Go to Other end of highlighted text.  This is like 
                        "o", but in Visual block mode the cursor moves to the 
                        other corner in the same line.  When the corner is at 
                        a character that occupies more than one position on 
                        the screen (e.g., a ), the highlighted text may 
                        change.

And since we don't have visual block mode (hmm...), they're identical.

misfo commented 13 years ago

Yeah, without visual block mode they could both map to the same command. That is interesting that there's a distinction in Vim, though. I did not know that. Vim's thorough documentation is a godsend for a project like this

michaelficarra commented 13 years ago

Agreed, vim's documentation is some of the most thorough around.