On 2015-04-18, Peng Yu wrote:
> Hi, I have the following modline in a .sh file. It works in machine A,
> but on machine B. (All .vimrc, .vim/ are the same on both machines.)
>
> # vim: set noexpandtab tabstop=2:
>
> Vim on machine B is of the following version. Does anybody know why
> modline is not working on machine B?
It appears that 'modeline' is set "on" on machine A but "off" on
machine B. It defaults to "on" for normal users and "off" for root.
My guess is that it is being set to 'nomodeline' in your
distribution's system vimrc.
> ~$ vim --version
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:47)
> Included patches: 1-52
> Modified by pkg-vim-maintainers@lists.alioth.debian.org
You appear to be running a Debian-based distribution. Debian's vim
package includes /usr/share/vim/vimrc, which sources
$VIMRUNTIME/debian.vim, which contains
set nomodeline
The solution is to put
set modeline
somewhere in your ~/.vimrc.
Note that Fedora, for example, does not set nomodeline.
Regards,
Gary
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment