Summary: | Vi Keybindings - Replace modes not working correctly | ||
---|---|---|---|
Product: | [ECD] Orion (Archived) | Reporter: | Stephen Jahns <s.t.jahns> |
Component: | Editor | Assignee: | Silenio Quarti <Silenio_Quarti> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | gheorghe, Silenio_Quarti |
Version: | 4.0 | Keywords: | triaged |
Target Milestone: | --- | Flags: | s.t.jahns:
review?
(gheorghe) |
Hardware: | PC | ||
OS: | Mac OS X | ||
Whiteboard: |
Description
Stephen Jahns
2013-10-20 13:57:47 EDT
I have a fix here: https://github.com/stjahns/orion.client/commit/6f495b1ef0b2c82b3846a368a1c7e94fb6133b8a Patch looks good - just a few things: i) End location of caret after performing Number + r differs than in vi: Take the following line: License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). If you put the cursor on L and type '3r' then 'a' you end up with: aaaense v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). With the caret position on the 3rd a. With the patch we end up on the first a. ii) Can't do multiple Number + R. With the same line, if I start at L and type 3R then type bog and esc, I end up with the following in vi: bogbogbog1.0 (http://www.eclipse.org/org/documents/edl-v10.html). iii) Both types of R changes should be using the undo compound changes to allow for undoing the operation in 1 step. Take a look at linkedMode.js#startUndo to see how this can be used. (In reply to Bogdan Gheorghe from comment #2) > Patch looks good - just a few things: > > i) End location of caret after performing Number + r differs than in vi: > > Take the following line: > > License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). > > If you put the cursor on L and type '3r' then 'a' you end up with: > > aaaense v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). > > With the caret position on the 3rd a. With the patch we end up on the first > a. > > ii) Can't do multiple Number + R. With the same line, if I start at L and > type 3R then type bog and esc, I end up with the following in vi: > > bogbogbog1.0 (http://www.eclipse.org/org/documents/edl-v10.html). > > iii) Both types of R changes should be using the undo compound changes to > allow for undoing the operation in 1 step. Take a look at > linkedMode.js#startUndo to see how this can be used. I have an additional commit that addresses points i) and iii) here: https://github.com/stjahns/orion.client/commit/9eb85d0ed03d26a16034ef1a2873fbe11e432754 ii) is more complicated, something I'll need to tackle later along with hitting '.' in normal mode to repeat the last edit, as hitting 3Raaa<esc> is equivalent to hitting Raaa<esc>.. (hitting the '.' key 2 times) or Raaa<esc>2. ii) is also a problem for regular insert mode. |