首页 > 解决方案 > 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

标签: vim

解决方案


您必须使用反斜杠转义空格。您已经为“控制台”之后的空间这样做了。您只需要同时转义“控制台”之前的那个。

set guifont=Lucida\ Console\ 14

推荐阅读