[vim/vim] Enable very long pathnames (260+ characters) in Windows (Issue #18850)

4 views
Skip to first unread message

BrBill

unread,
Dec 2, 2025, 3:19:36 PM (15 hours ago) Dec 2
to vim/vim, Subscribed
BrBill created an issue (vim/vim#18850)

Problem: Windows 11 is capable of handling pathnames > 260 characters, but vim and gvim will not open them.
In vim, attempting to open a file whose full pathname is longer than 260 characters results in opening a new empty file. In gvim, the program can't open the file, and instead opens a directory -- whichever directory portion of the pathname maximally fits within the first 260 characters (if the pathname were c:\<250 more characters>\folder\very_long_filename.txt, gvim would open the ...\folder directory). This is true whether opening the file from CMD shell, PowerShell, Visual Studio, MS Word, MS Edge, or via Windows Explorer (Open With) any of these applications.

A registry setting in Windows 11 enables Windows Explorer and the OS to handle such long filenames fine, but per Microsoft documentation, "the application must also enable support for this feature".

Requested solution
Enable full long pathnames to be supported, so that users can view and edit such files in vim/gvim. It's possible; Firefox and VSCode can do so.

Alternatives I've considered
There are 4 options I can imagine:

  • Avoid long pathnames. This is not always a reasonable option.
  • SUBST a virtual drive to point to a folder within the pathname that would shorten the overall length, and then open files from that virtual drive context. This (1) does not survive reboots and (2) only works if you SUBST for every different pathname scenario you have.
  • Similar to the SUBST workaround, share a subfolder via NET SHARE (etc.), and then mount that share's UNC path with NET USE (etc.). This is I/O heavy compared to SUBST and is considered a generally poor practice.
  • Use another editor. I've tried several and the only one I've found up to now is VSCode.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18850@github.com>

Christian Brabandt

unread,
2:26 AM (4 hours ago) 2:26 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18850)

duplicate of #9715


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18850/3605450318@github.com>

Christian Brabandt

unread,
2:26 AM (4 hours ago) 2:26 AM
to vim/vim, Subscribed

Closed #18850 as duplicate.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/18850/issue_event/21324876390@github.com>

Reply all
Reply to author
Forward
0 new messages