Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL: transpose words with Alt-t #23378

Merged
merged 2 commits into from
Aug 22, 2017
Merged

Conversation

rfourquet
Copy link
Member

No description provided.

* these allow to request the position past the end (at least
  for `String`); this is useful when working with `IOBuffer`,
  which has one more position than there are valid indexes in
  the corresponding `String`.
* ind2chr becomes slightly faster as a result of removing
  one unnecessary `next` call
* the main logic of these functions is factored out into one
  single function
@rfourquet rfourquet added the REPL Julia's REPL (Read Eval Print Loop) label Aug 21, 2017
Copy link
Sponsor Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. You are really intent on turning the REPL into a full-blown editor-equal, aren't you 😁

@rfourquet
Copy link
Member Author

You are really intent on turning the REPL into a full-blown editor-equal, aren't you

Oh that was so obvious? 😊
Well, I wanted first to catch up with readline, at least for the functionalities I use. But I have to admit that I started to see beyond that recently...

@StefanKarpinski StefanKarpinski merged commit 4739ca0 into master Aug 22, 2017
@StefanKarpinski StefanKarpinski deleted the rf/REPL-transpose-words branch August 22, 2017 19:55
edit_transpose_words(s) = edit_transpose_words(buffer(s)) && refresh_line(s)

function edit_transpose_words(buf::IOBuffer, mode=:emacs)
mode in [:readline, :emacs] ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to describe what the difference in behavior is in words somewhere? this doesn't have a docstring, but a comment would do if anyone is going to be customizing these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants