I have the following in my .vimrc
on both machines:
filetype plugin indent on
syntax on
And yet, for some reason I only see the expected behavior on my Mac, and not on the other computer (which is a Windows 7 box running MobaXterm).
The auto-unindenting after I type }
is really quite nice, and I'd like it to work in both places.
Is this an issue with a missing "filetype plugin?" I can't find any directory where "filetype plugins" are stored and I never installed any myself; how does that work, anyway?
The language I was using at the time I noticed the discrepancy was awk
, and Vim chose the correct syntax highlighting on both machines (based on the .awk
file extension), but failed to handle the autoindent the way I expected on Windows.
I have installed no plugins at all on either machine. The .vimrc
is practically empty in each case. MobaXterm has Vim 7.3.646; the Mac just says 7.3.
awk.vim
in/usr/share/vim/vim73/indent
and the MobaXterm seems to have no such file (and a lot fewer syntax files in general). But how can I fix this? (I've never installed any plugins at all, just using Vim "out of the box".) – Wildcard Jan 26 '16 at 18:19$VIMRUNTIME
(/usr/share/vim/vim73
in the Mac) aren't plugins in the usual sense, they come with Vim, depending on compilation flags, I think. I have never used MobaXterm, but it seems to have GVim available (it's listed in mobaxterm.mobatek.net/plugins.html) - maybe try that. Or you can just create~/.vim/indent/awk.vim
containingsetlocal autoindent
. – muru Jan 26 '16 at 18:36