Wednesday, June 14, 2023

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

On Wed, Jun 14, 2023 at 3:18 AM Steve Litt <slitt@troubleshooters.com> wrote:
>
> Vim handles formatting for most computer languages wonderfully. But not
> Pascal. My writing of Pascal programs is slowed horribly by Vim's
> bizarre formatting.
>
> 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).
>
> All I really need is to disable Vim's "helpful" indentation, and then:
>
> Set ai
> Set expandtab
> Set tabstop 3
> Set shiftwidth 3
>
> Thanks,
>
> SteveT

I think Tim's answer is right. Now for a bit of explanation, as found
in the help for 'runtimepath' (in my gvim and with my 'guifont' this
uses about two screenfuls of help text):

• $HOME/.vim/ or $HOME/vimfiles (depending on OS), and their
subdirectories other than after/, are meant for single-user private
scripts to be run first;
• $VIM/vimfiles/ and its subdirectories other than after/ are meant
for system-wide scripts to be run before those distributed with Vim.
These scripts are normally put there by a system administrator;
• $VIMRUNTIME/ and its subdirectories contain scripts coming from the
Vim distribution. Users and even system administrators should keep
hands off them because any user's changes there will disappear the
next time the Vim runtime files are updated;
• $VIM/vimfiles/after/ and its subdirectories are meant for
system-wide scripts placed there by a system administrator, to be run
after those in or under $VIMRUNTIME;
• $HOME/.vim/after/ or $HOME/vimfiles/after/ (depending on OS), and
their subdirectories, are for single-user private scripts to be run
last.

So if you found nothing called "pascal" (or "pascal.vim") in or under
~/.vim/ it just means that you hadn't put anything such there
yourself. Scripts responsible for any "weird behaviour" on the part of
Vim as distributed by Bram have to be looked for in the $VIMRUNTIME
directory tree. Similarly, weird behaviour in a Vim distributed via
your Unix/Linux/Mac distribution and not found in other distributions
or in "vanilla" Vim as compiled from Bram's pristine sources, might be
due to scripts placed under $VIM by whatever software distribution
brought Vim to you, or to a "system vimrc" (often, but not
necessarily, at /etc/vimrc) of the same origin.

Best regards,
Tony.

--
--
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/CAJkCKXtS%2BpEqZsS4AOWvEJTp_jwtXieP2WwvxPJ95bWAXtSqaQ%40mail.gmail.com.

No comments:

Post a Comment