Skip to content
This repository was archived by the owner on Apr 6, 2018. It is now read-only.

add replace mode#573

Merged
maxbrunsfeld merged 4 commits into
atom:masterfrom
jacekkopecky:replace-mode
Jul 22, 2015
Merged

add replace mode#573
maxbrunsfeld merged 4 commits into
atom:masterfrom
jacekkopecky:replace-mode

Conversation

@jacekkopecky
Copy link
Copy Markdown
Contributor

This addresses #562; also it partly addresses #564.

I got the inspiration for this implementation from @brunetton's atom-overtype-mode package.

(edited)
Features:

  • backspace acts as undo
  • block cursor and status bar indication of replace mode

Limitations:

  • . with multiple cursors may eat a character for one of those cursors, but I’ve no idea why

@jacekkopecky
Copy link
Copy Markdown
Contributor Author

merge conflicts resolved

@wvengen
Copy link
Copy Markdown

wvengen commented Apr 8, 2015

I don't think I'm able to give a good code-review, but thanks for starting this! 👍

@ssfrr
Copy link
Copy Markdown
Contributor

ssfrr commented Jun 30, 2015

It'd be great to see this merged. vim-mode has very impressive support for vim commands but I definitely get tripped up by the lack of R to replace multiple characters.

@bronson
Copy link
Copy Markdown
Contributor

bronson commented Jul 3, 2015

This is so freaking great. I love it. Would like to see it merged asap.

Any chance of using an underline cursor like gvim? (gvim's normal mode is block cursor, insert mode is vertical caret, and replace mode is underline cursor... pretty handy)

@bronson
Copy link
Copy Markdown
Contributor

bronson commented Jul 6, 2015

Underline cursor is easy: bronson/vim-mode-next@0b58132

@jacekkopecky
Copy link
Copy Markdown
Contributor Author

added handling of backspace as undo, added further tests, rebased to master, enjoy. 8-)

@bronson
Copy link
Copy Markdown
Contributor

bronson commented Jul 17, 2015

Ugh, I may have made a merge mistake... A few tests are failing and replace-mode-backspace doesn't work very well in vim-mode-next. (it's hard to describe... you can see it trying to work) Any chance you could glance at https://github.com/bronson/vim-mode-next/commits/replace-undo and see if it's an easy fix?

Otherwise I can look later next week.

@jacekkopecky
Copy link
Copy Markdown
Contributor Author

@bronson, I think just one line jacekkopecky@2d06dc7#diff-6490a794da4d70296766233694896f7fR423 is missing.

@jacekkopecky
Copy link
Copy Markdown
Contributor Author

@bronson regarding block cursor - I got inspiration from your commit, but I hope you don't mind if it ended up slightly different. Thanks for poking me about it.

@bronson
Copy link
Copy Markdown
Contributor

bronson commented Jul 17, 2015

You're right, dunno how I did that. Works great, thanks! Like the underline cursor.

@bronson
Copy link
Copy Markdown
Contributor

bronson commented Jul 17, 2015

I think you can remove "first cut of" from the PR's title. This thing is pretty darned mature now. :)

@jacekkopecky jacekkopecky changed the title add first cut of replace mode add replace mode Jul 18, 2015
@jacekkopecky
Copy link
Copy Markdown
Contributor Author

👍

@jacekkopecky
Copy link
Copy Markdown
Contributor Author

Sorry, I took the style from my own custom style and didn't realize I used px units. Relative units are more appropriate, hence the last commit.

@jacekkopecky
Copy link
Copy Markdown
Contributor Author

rebased to master; and I can't seem to replicate that weird behaviour I used to see with multiple cursors, maybe it was something in Atom that got fixed... I'll remove that comment from the docs.

@maxbrunsfeld
Copy link
Copy Markdown
Contributor

❤️

maxbrunsfeld pushed a commit that referenced this pull request Jul 22, 2015
@maxbrunsfeld maxbrunsfeld merged commit cf0c64b into atom:master Jul 22, 2015
@jacekkopecky jacekkopecky deleted the replace-mode branch July 22, 2015 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants