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.

>
>or possibly adding something like
>
> autocmd FileType pascal let b:did_indent=1
>
>to your ~/.vimrc might at least prevent the stock indentation
>settings.

The preceding didn't work, but that's OK, your main solution worked, so
thank you!

SteveT

Steve Litt
Autumn 2022 featured book: Thriving in Tough Times
http://www.troubleshooters.com/bookstore/thrive.htm

--
--
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/20230614030930.65220801%40mydesk.domain.cxm.

No comments:

Post a Comment