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

Implement rot13 cypher #179

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Implement rot13 cypher #179

wants to merge 4 commits into from

Conversation

Opisek
Copy link
Contributor

@Opisek Opisek commented Jun 26, 2024

Why

ROT13 cypher is a weak cypher that allows you to quickly masquerade some text. It's a self-inverse function, so applying it again will decrypt the text. Original Vim implements ROT13 cypher under the g? keybinding.

It is particularly useful for note-taking as an example. In a studying scenario, you can write down questions with answers while applying ROT13 on the latter. To check the answers, you simply need to apply the transformation again.

What changed

Added the g? operator.

Test plan

I modified the tests for gu and gU, since they implement similar functionality. I currently test:

  • A few example words
  • Involution of g?
  • g? on a single line
  • g? with motions
  • g? in visual mode

@Opisek Opisek marked this pull request as draft June 26, 2024 13:06
@Opisek Opisek marked this pull request as ready for review June 26, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant