在 cygwin 中找不到 .vimrc 文件的位置

发布于 2025-01-13 04:45:09 字数 80 浏览 2 评论 0原文

我使用 Cygwin 处理一些文本文件,并且 vim 设置已损坏。在搜索解决方案时,未找到 .vimrc 文件。 .vimrc 文件可能位于哪里?

I use Cygwin to work with some text files and have corrupted vim settings. While searching the solution the .vimrc file wasn't found. Where the .vimrc file may be located?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

懵少女 2025-01-20 04:45:09

.vimrc 的预期位置是您的主目录,但也可以是
丢失的。

它更改来自系统 vimrc 的任何默认值

/etc/vimrc

the expected location of .vimrc is your home directory, but is can also be
missing.

It changes any default that is coming from the system vimrc that is on

/etc/vimrc
北陌 2025-01-20 04:45:09

我刚刚安装了 Cygwin 3.4.6(均为默认值),而 vim 开箱即用似乎一团糟。

运行“vi”时,它抱怨“无法获取defaults.vim”

虽然未安装“vim”命令,但当“vi”打开时,它显示“VIM”版本8.2.4372。它安装在/usr/bin/vi 中。

当我下载 defaults.vim(从 vim github)并将其安装到用户的主目录中时,它仍然抱怨无法获取它,并且也无法加载我的“~/.vimrc”甚至“~.virc”。

我的 $HOME 环境变量设置正确,但是 vi 在那里找不到任何文件。

不过,我确实找到了一个解决方案,那就是从我的主目录创建一个 .vim/ 文件夹,并将 .virc 和 defaults.vim 移到那里。也许应该在 cygwin 安装中默认创建它。

I just installed Cygwin 3.4.6 (all defaults) and vim seems to be messed up out of the box.

When running "vi" it complains with "Failed to source defaults.vim"

Although "vim" command is not installed, when "vi" opens, it displays "VIM" version 8.2.4372. It's installed in /usr/bin/vi.

When I downloaded and installed defaults.vim (from vim github) into my user's home directory, it still complains it cannot source it, and it also fails to load my "~/.vimrc" or even "~.virc".

My $HOME env variable is set correctly, however vi cannot find any files there.

I did find a solution however, which was to make a .vim/ folder from my home directory and move .virc and defaults.vim there. Maybe that should have been created by default in the cygwin installation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文