ZiYang-oyxy / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

rot13 'g??' shortcut depends incorrectly on mapping of '?' #268

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run vim -u NONE
2. Insert text "test"
3. Press "g??"
4. Text in buffer is now "grfg" as expected.
5. :map ? -
6. Press "g??".

What is the expected output? What do you see instead?
Expected "test".
Saw instead "grfg".

What version of the product are you using? On what operating system?
Vim 7.3.429
Vim 7.4.475 (compiled with default options from 79c59b4c9d20)
Ubuntu 12.04.5 LTS

Original issue reported on code.google.com by r4m...@gmail.com on 14 Oct 2014 at 9:56

GoogleCodeExporter commented 9 years ago
What you are seeing here as a variant of what is described in the help at:
                                                        g? rot13
  g?{motion}              Rot13 encode {motion} text. {not in Vi}

which in your case translates to Rot13 encode the current line and the line 
above ('-' motion).

Since you do not have a line above, the command aborts. Leaving you with the 
Rot13 encoded word.

Original comment by chrisbr...@googlemail.com on 14 Oct 2014 at 4:35

GoogleCodeExporter commented 9 years ago
Ah, I see. A bit unorthogonal since you cannot then use backward search for the 
motion ;-)

Thanks for the reply!

Original comment by r4m...@gmail.com on 14 Oct 2014 at 7:39