Wednesday, June 14, 2023

Re: How to disable and replace Vim's standard formatting of Pascal

> Tim Chase said on Tue, 13 Jun 2023 20:37:10 -0500
>
> >On 2023-06-13 21:18, Steve Litt wrote:
> >> Using grep, I found there are no files whose names contain the string
> >> "pascal" in any case in the ~/.vim directory (I'm using Void Linux).
> >>
> >
> >I suspect your frustration is being caused by something in
> >$VIMRUNTIME/indent/pascal.vim
>
> Correct: ~/.vim/indent didn't exist, so I followed your instructions...
>
> >
> >As such, you should be able to do something like (optionally putting
> >your settings in there, too)
> >
> > $ mkdir -p ~/.vim/indent
> > $ cat >> ~/.vim/indent/pascal.vim <EOF
> > let b:did_indent = 1
> > set ai
> > set expandtab
> > set tabstop 3
> > set shiftwidth 3
> > EOF
>
> The preceding worked. Now I can tab and Ctrl+d or Ctrl+t for
> *space-only* indentation of three spaces in insert mode. Naturally,
> I can use << and >> in command mode. It's beautiful. Vim doesn't try to
> guess what I want in indentation: It lets me do it manually, which is
> just what I want.

Suggestion: Use "setlocal" instead of "set" to avoid affecting other
files. You only want to apply these options locally.

--
hundred-and-one symptoms of being an internet addict:
166. You have been on your computer soo long that you didn't realize
you had grandchildren.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230614102447.1390B1C0D60%40moolenaar.net.

No comments:

Post a Comment