Re: How to disable and replace Vim's standard formatting of Pascal
Tim Chase said on Wed, 14 Jun 2023 16:14:44 -0500 >On 2023-06-14 16:44, Steve Litt wrote: >> >??? $VIMRUNTIME/ and its subdirectories contain scripts coming from >> >the >[snip >> Oh oh. See following command line session: >> >> == >> [slitt@mydesk .vim]$ echo $VIMRUNTIME >> >> [slitt@mydesk .vim]$ echo $VIM >> >> [slitt@mydesk .vim]$ >> == > >They're set internally in vim: > > $ vim > :echo $VIMRUNTIME > /usr/local/share/vim/vim90 > >-tim Thanks Tim, I confirmed that you're correct. Until now, when I see a variable beginning with a dollar sign I think either shellscript or Perl. 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230615022506.68bcc419%40mydesk.domain.cxm.
Re: How to disable and replace Vim's standard formatting of Pascal
On 2023-06-14 16:44, Steve Litt wrote: > >??? $VIMRUNTIME/ and its subdirectories contain scripts coming from the [snip > Oh oh. See following command line session: > > == > [slitt@mydesk .vim]$ echo $VIMRUNTIME > > [slitt@mydesk .vim]$ echo $VIM > > [slitt@mydesk .vim]$ > == They're set internally in vim: $ vim :echo $VIMRUNTIME /usr/local/share/vim/vim90 -tim -- -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ZIotxJlALwwDW33f%40thechases.com.
Re: How to disable and replace Vim's standard formatting of Pascal
Tony Mechelynck said on Wed, 14 Jun 2023 10:03:44 +0200 > >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): Thanks Tony! I wish somebody had told me about :h runtimepath twenty years ago. It sure would have helped in my development and tech support for VimOutliner. [snip] >• $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; Oh oh. See following command line session: == [slitt@mydesk .vim]$ echo $VIMRUNTIME [slitt@mydesk .vim]$ echo $VIM [slitt@mydesk .vim]$ == I'll be studying :h runtimepath to make me more proficient with Vim. Thanks for showing it to me. 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230614164409.5c45dfae%40mydesk.domain.cxm.
Re: How to disable and replace Vim's standard formatting of Pascal
Bram Moolenaar said on Wed, 14 Jun 2023 11:24:47 +0100 >Suggestion: Use "setlocal" instead of "set" to avoid affecting other >files. You only want to apply these options locally. Done! Thanks Bram. 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230614162819.16325769%40mydesk.domain.cxm.
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 > 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 -- b...@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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230614102447.1390B1C0D60%40moolenaar.net.
Re: How to disable and replace Vim's standard formatting of Pascal
On Wed, Jun 14, 2023 at 3:18 AM Steve Litt 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXtS%2BpEqZsS4AOWvEJTp_jwtXieP2WwvxPJ95bWAXtSqaQ%40mail.gmail.com.
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 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230614030930.65220801%40mydesk.domain.cxm.
Re: How to disable and replace Vim's standard formatting of Pascal
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 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 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ZIkZxmPxaJTMJ%2BPt%40thechases.com.