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

Fix vi modelines #989

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Fix vi modelines #989

merged 1 commit into from
Dec 5, 2023

Conversation

mrdomino
Copy link
Collaborator

@mrdomino mrdomino commented Dec 5, 2023

At least in neovim, │vi: is not recognized as a modeline because it has no preceding whitespace. After fixing this, opening a file yields an error because net is not an option. (noet, however, is.)

At least in neovim, `│vi:` is not recognized as a modeline because it
has no preceding whitespace. After fixing this, opening a file yields
an error because `net` is not an option. (`noet`, however, is.)
@mrdomino mrdomino reopened this Dec 5, 2023
@mrdomino
Copy link
Collaborator Author

mrdomino commented Dec 5, 2023

Accidentally included some unrelated changes. Good thing the tests caught it. Reran from a clean master. For posterity, I did this:

rg  '^│vi: (.*)  :vi│' -l -0 | xargs -0 sed -i '' \
  's/│vi: \(.*\)net\(.*\)   :vi│/│ vi: \1noet\2:vi │/'
rg  '^│vi: (.*)  :vi│' -l -0 | xargs -0 sed -i '' \
  's/│vi: \(.*\)  :vi│/│ vi: \1:vi │/'

@jart
Copy link
Owner

jart commented Dec 5, 2023

Approved!

@jart jart merged commit 394d998 into jart:master Dec 5, 2023
10 checks passed
@mrdomino mrdomino deleted the modeline branch December 5, 2023 23:41
G4Vi pushed a commit to G4Vi/cosmopolitan that referenced this pull request Jan 19, 2024
At least in neovim, `│vi:` is not recognized as a modeline because it
has no preceding whitespace. After fixing this, opening a file yields
an error because `net` is not an option. (`noet`, however, is.)
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