Friday, November 30, 2018

Re: How to set noexpandtab for a specific file

On Saturday, November 24, 2018 at 3:20:32 PM UTC-6, Bradley Bell wrote:
> I have the following two lines in my .vimrc:
> :set tabstop=4 softtabstop=4 shiftwidth=4 expandtab
> set modeline
>
> On the first line of a file called automake.am, I have
> # vim: set noexpandtab:
>
> When I open automake.am and enter a tab I spaces instead of tabs.
>
> How do I set noexpandtab for automake.am automatically, so I do
> not forget to enter it every time I edit that file ?

Is your 'modeline' option set? Some Linux distros disable modelines in a system vimrc, for security reasons. If 'modeline' is not turned on, then your method will not work.

--
--
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