Skip to content

Added vim command output #21

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

Merged
merged 2 commits into from
Mar 22, 2023
Merged

Added vim command output #21

merged 2 commits into from
Mar 22, 2023

Conversation

dave3d
Copy link
Member

@dave3d dave3d commented Mar 22, 2023

Now the 'vim' output option will print out a vim command that loads the file and jumps to the line with the misspelling.

Also added the 'first' option, so that you can show only the first instance of a misspelled word.

Now the 'vim' output option will print out a vim command that loads
the file and jumps to the line with the misspelling.

Also added the 'first' option, so that you can show only the first
instance of a misspelled word.
@dave3d dave3d requested a review from zivy March 22, 2023 16:46
codespell.py Outdated
@@ -333,10 +339,15 @@ def main():
prev = ""
bc = 0
for x in bad_words:
Copy link
Member

Choose a reason for hiding this comment

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

Possibly improve readability, what are x[0], x[1], x[2]? Use explicit names, guessing here but something like the following will be more readable:

for misspelled_word, optional_replacement, number_of_times in bad_words:
...

@dave3d dave3d merged commit efa2730 into SimpleITK:main Mar 22, 2023
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.

2 participants