vim - Vim 首选项
问题描述
我搜索了高低,但无法获得正确的语法等。我想设置我的vim_rc
文件,所以我使用晚上主题和16pt Lucida控制台文本作为默认值。我尝试了很多组合,但在网络上并没有太多乐趣。目前,我收到以下错误:
Error detected while processing C:\Program Files
(x86)\Vim\_vimrc:
line 47:
E518: Unknown option: Console\ 14
我的 vim 文件(基于网络建议)如下所示
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
if empty(&shellxquote)
let l:shxq_sav = ''
set shellxquote&
endif
let cmd = '"' . $VIMRUNTIME . '\diff"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
let cmd = substitute(cmd, '!', '\!', 'g')
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
if exists('l:shxq_sav')
let &shellxquote=l:shxq_sav
endif
endfunction
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set textwidth=80
set guifont=Lucida Console\ 14
解决方案
您必须使用反斜杠转义空格。您已经为“控制台”之后的空间这样做了。您只需要同时转义“控制台”之前的那个。
set guifont=Lucida\ Console\ 14
推荐阅读
- php - 使用 Laravel 为 Heroku 设置数据库。将我的数据库凭据放在哪里
- c# - 在 Windows 窗体中使用全局挂钩的问题
- node.js - 哪种MongoDB扩展策略(Sharding、Replication)适合并发连接?
- javascript - 异步函数和承诺
- django - 在应用 perform_create() 方法之前检查权限
- javascript - 如何迭代嵌套在对象中的数组作为道具
- java - 获取外部 Java 应用程序的 BackgroundColor/ForegroundColor
- javascript - 有没有办法选择页面中包含包含文本“按钮”的类的所有元素?
- c++ - 编写一个程序,将一行文本作为输入,并反向输出该行文本。C++
- python - 用python循环成绩平均函数