在vim启动时提示

时间:2013-11-17 11:14:06

标签: vim

每当我在vim中打开一个文件(使用vim filename)时,我会首先看到以下提示:

"filename" 44L, 1055C
--- Local option values ---
  autoindent          cursorline          grepprg=            makeprg=            path=               smartindent         textwidth=79
--autoread            define=             include=            nrformats=hex       relativenumber      syntax=javascript   undofile
  colorcolumn=80      errorformat=        keywordprg=         number              scroll=21           tabstop=2
  cryptmethod=        expandtab           list                numberwidth=5       shiftwidth=2        tags=
  fileencoding=utf-8
  filetype=javascript
  formatoptions=qrn1
  iskeyword=@,48-57,_,192-255,$
--- Local option values ---
  autoindent          cursorline          grepprg=            makeprg=            path=               smartindent         textwidth=79
--autoread            define=             include=            nrformats=hex       relativenumber      syntax=javascript   undofile
  colorcolumn=80      errorformat=        keywordprg=         number              scroll=21           tabstop=2
  cryptmethod=        expandtab           list                numberwidth=5       shiftwidth=2        tags=
  fileencoding=utf-8
  filetype=javascript
  formatoptions=qrn1
  iskeyword=@,48-57,_,192-255,$
Press ENTER or type command to continue

如何禁用此提示?当我打开没有文件名作为参数的编辑器时,它不会发生。

1 个答案:

答案 0 :(得分:0)

Sergi,您可以通过执行:setlocal(或setl)命令重现相同的内容。即在你的情况下,这个命令没有选项执行。 以下是帮助中的片段,其中解释了:

:setl[ocal] ... Like ":set" but set only the value local to the
                current buffer or window.  Not all options have a
                local value.  If the option does not have a local
                value the global value is set.
                With the "all" argument: display local values for all
                local options.
                Without argument: Display local values for all local
                options which are different from the default.
                When displaying a specific local option, show the
                local value.  For a global/local boolean option, when
                the global value is being used, "--" is displayed
                before the option name.
                For a global option the global value is
                shown (but that might change in the future). 

因此,您需要检查.vimrc,自动命令和用户定义的函数,以查找问题实际出现的位置。您是否还记得第一次发生问题之前您的.vimrc(或其他vim文件)中的更改?