MacVim的vimrc文件识别出现问题 [英] Trouble with vimrc file recognition with MacVim

查看:163
本文介绍了MacVim的vimrc文件识别出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从升级到OS X 10.7.3后,我很难让MacVim(7.3-64)识别我的.vimrc.gvimrc文件.以前,我只是使用以下命令对.vimrc.gvimrc进行了符号链接:

I'm having difficulty getting MacVim (7.3-64) to recognize my .vimrc and .gvimrc files since upgrading to OS X 10.7.3. Previous, I've simply symlinked my .vimrc and .gvimrc using these commmands:

$ ln -s ~/.vim/vimrc /usr/local/Cellar/macvim/7.3-57/MacVim.app/Contents/Resources/vim/.vimrc 

$ ln -s ~/.vim/gvimrc /usr/local/Cellar/macvim/7.3-57/MacVim.app/Contents/Resources/vim/.gvimrc

但是,当我当前符号链接我的rc文件时,我无法使MacVim识别它们.我已经通过Homebrew安装了MacVim.有谁对问题可能有什么建议?

However, when I currently symlink my rc files, I can not get MacVim to recognize them. I've installed MacVim via Homebrew. Does anyone have any suggests as to what the problem could be?

推荐答案

保证~/.vim/文件夹(用于colorchemes和脚本)和~/.vimrc文件(用于自定义设置和映射)可以在每个类似UNIX的系统上工作.系统,但Vim(和MacVim)正常运行都不需要这些系统.

The ~/.vim/ folder (for colorschemes and scripts) and the ~/.vimrc file (for custom settings and mappings) are guaranteed to work on every UNIX-like systems but neither of these are required for Vim (and MacVim) to work properly.

  1. 开始时没有符号链接或任何符​​号:主文件夹中没有.vim文件夹,也没有.vimrc.gvimrc. MacVim是否可以工作?您应该会看到一个带有一些介绍性文字的窗口,看到了吗?

  1. Start without symlinks or whatever : no .vim folder and no .vimrc or .gvimrc in your home folder. Does MacVim work? You are supposed to see a window with some introductory text, do you see that?

退出MacVim并转到要使用的原始.(g)vimrc文件:它们在哪里?你从哪里得到的?他们的内容是什么?您是否真的需要它们?它们的名称实际上是否以点开头(您是否在Finder中看到它们)?它们的编码是什么(在vim中为:set fileencoding?,在终端中为$ file /path/to/original/.vimrc)?请粘贴要在问题中使用的.vimrc文件的内容.

Quit MacVim and turn to the original .(g)vimrc files you want to use: where are they located? Where did you get them from? What is their content? Do you actually, really need them? Do their names actually start with a dot (do you see them or not in the Finder)? What is their encoding (in vim, :set fileencoding? and in the terminal, $ file /path/to/original/.vimrc)? Please, paste the content of the .vimrc file you want to use in your question.

如果您完全确定需要这些文件才能在Vim中有效运行,并假设您在Mac上确实有自定义的.vimrc,请打开Terminal.app并键入以下命令(没有$):

If you are absolutely certain you need these files to work efficiently in Vim and assuming you actually have a custom .vimrc somewhere on your Mac, open Terminal.app and type this command (without the $):

$ cp /path/to/original/.vimrc ~/.vimrc

复制将您的.vimrc复制到规范位置.

to copy your .vimrc to the canonical location.

现在启动MacVim.你看到了什么?您应该看到一个带有一些介绍性文字的窗口,这就是您看到的内容吗?

Now launch MacVim. What do you see? You are supposed to see a window with some introductory text, is that what you see?

如果MacVim在您的~/.vimrc上无法正常使用,您可能要注释其内容,重新启动MacVim,取消注释几行,依此类推,直到最终发现错误的设置.

If MacVim doesn't work correctly with your ~/.vimrc you might want to comment its content, relaunch MacVim, uncomment a few lines and so on until you eventually find a bad setting.

这篇关于MacVim的vimrc文件识别出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆