[英]My .vimrc file is completely ignored
我从我的一个朋友那里得到了一个.vimrc
文件,但是vim
忽略了它。 在另一个主题( 激活 `.vimrc` 文件)中发现 VIM 变量的值可能会导致问题(/usr/share/vim 而不是 /home/tobias)。 我应该为另一条路线更改这条路线吗? 如果答案是肯定的,我该如何执行? 谢谢你的回答。
- 编辑 -
$ vim --version
:
VIM - Vi IMproved 7.1 (2007 May 12, compiled Oct 18 2008 09:05:15)
Included patches: 1-314
Compiled by buildd@excelsior.roeckx.be
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist`
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
-netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile
-python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -O2 -g -Wall
Linking: gcc -Wl,--as-needed -L/usr/local/lib -o vim -lncurses -lselinux -lacl -lgpm
-- 结束编辑 --
只需将vimrc放入$HOME/.vimrc
。 您可以检查它是否通过:scriptnames
。 为了进行故障排除,您还可以在其中临时添加:echomsg "hello"
。 您无需弄乱$VIM
变量。 :help initialization
包含所有可怕的细节,如果您有兴趣的话。
就我而言,我的 Ubuntu 安装只附带了这个 tiny-vim 东西。 我通过运行sudo apt install vim-gtk3
解决了这个问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.