I don't have a personal vimrc. I use /etc/vimrc
. The last 2 lines are:
let testvar=999
filetype indent off
I confirmed execution at the vim prompt using :echo testver
, which displays 999
.
I tried to create a Matlab file using gvim RndSquare.m
. My first typed line is:
function m = RndSqure( n )
The following line always start indented, which I don't want.
The only way to prevent it seems to be to create ~/.vim/indent/matlab.vim
containing let b:did_indent = 1
. I also had to create tex.vim
containing the same line, for the same reason.
I don't want to create a gazillion files, one for each file extension, and all containing the same line. Why are the last 2 lines in my vimrc
ignored?
Vim version:
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jul 28 2019 14:56:47)
Included patches: 1-1772
Modified by <cygwin@cygwin.com>
Compiled by <cygwin@cygwin.com>
Huge version with GTK3 GUI. Features included (+) or not (-):
+acl -farsi -mouse_sysmouse -tag_any_white
+arabic +file_in_path +mouse_urxvt -tcl
+autocmd +find_in_path +mouse_xterm +termguicolors
+autochdir +float +multi_byte +terminal
-autoservername +folding +multi_lang +terminfo
+balloon_eval -footer -mzscheme +termresponse
+balloon_eval_term +fork() +netbeans_intg +textobjects
+browse +gettext +num64 +textprop
++builtin_terms -hangul_input +packages +timers
+byte_offset +iconv +path_extra +title
+channel +insert_expand +perl/dyn +toolbar
+cindent +job +persistent_undo +user_commands
+clientserver +jumplist +postscript +vartabs
+clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +virtualedit
+cmdline_hist +langmap +python/dyn +visual
+cmdline_info +libcall +python3/dyn +visualextra
+comments +linebreak +quickfix +viminfo
+conceal +lispindent +reltime +vreplace
+cryptv +listcmds +rightleft +wildignore
+cscope +localmap +ruby/dyn +wildmenu
+cursorbind +lua/dyn +scrollbind +windows
+cursorshape +menu +signs +writebackup
+dialog_con_gui +mksession +smartindent +X11
+diff +modify_fname +sound -xfontset
+digraphs +mouse +spell +xim
+dnd +mouseshape +startuptime +xpm
-ebcdic +mouse_dec +statusline +xsmp_interact
+emacs_tags -mouse_gpm -sun_workshop +xterm_clipboard
+eval -mouse_jsbterm +syntax -xterm_save
+ex_extra +mouse_netterm +tag_binary
+extra_search +mouse_sgr -tag_old_static