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: previewing and editing files on windows #214

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Conversation

stevearc
Copy link
Owner

@stevearc stevearc commented Nov 4, 2023

closes #204

There are a lot of problems with special characters and :edit on Windows. neovim/neovim#3912 and vim/vim#541
I think that with the current utilities, there is literally no way to make :edit behave properly in all cases. As an example, on Windows:
:edit fname$PATH.txt will expand the $PATH variable, leading to a garbage filename
:edit fname\$PATH.txt will treat the \ as a path separator, causing fname to be a directory and $PATH.txt the file within it.

I'm trying to work around this issue entirely by using bufadd to load the file path directly as a buffer, then using the :buffer command to switch to it. Preliminary results look good, but it needs more testing because I'm not at all confident that :buffer will run all the same autocmds and have all the same side effects as :edit.

@stevearc stevearc force-pushed the stevearc-replace-edit branch from 1c884f1 to fa078a0 Compare November 4, 2023 16:16
@stevearc stevearc merged commit 3727410 into master Nov 10, 2023
7 checks passed
@stevearc stevearc deleted the stevearc-replace-edit branch November 10, 2023 05:31
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.

bug: can't open or preview files whose path includes special character like brackets.
1 participant