Re: expired certificate

2023-09-13 Thread Stan Brown
Both in Firefox and in Chrome, I pasted
https://www.vim.org/
in the address bar. They are both quick to complain about expired
certificates; neither one had a problem displaying the page or showed
any odd messages.

Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

On 2023-09-13 13:14, rwmit...@gmail.com wrote:
> Is anyone else seeing this?
> 
> Untitled.png
> 
> -- 
> -- 
> 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
> <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
> <mailto:vim_use+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_use/0dd2e1eb-2ca4-4eae-9aaf-59064e28d77fn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/vim_use/0dd2e1eb-2ca4-4eae-9aaf-59064e28d77fn%40googlegroups.com?utm_medium=email_source=footer>.

-- 
-- 
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/ac90f4b2-7a80-b437-5180-4d7e6ffed0bc%40fastmail.fm.


Re: BUG: terminal vim 9.0.1506 x64 window 10

2023-06-21 Thread Stan Brown
It's true.

I use TCCLE (free version of Take Command) as a command-line shell on my
Windows machine. In an April round of updates, Windows 11 shifted to
opening TCCLE as a tab in a MS Terminal window rather than independently
as in the past. Fortunately, with a published hack I change Windows 11
back to the previous behavior.

Windows Terminal was there before the updates, but Windows didn't try as
aggressively to have us use it.

Maybe you are thinking of the Bash shell in Windows, part of the Windows
Subsystem for Linux? I don't use it myself; but, if I'm not mistaken,
you have to change some settings to activate WSL. Googling for
"bash shell" "Windows 11"
turns up many useful-looking pages. This one seems straightforward:
<https://mspoweruser.com/different-ways-to-run-shell-script-files-on-windows/>

Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

On 2023-06-21 10:16, Christian Brabandt wrote:
> 
> 
>> Am 21.06.2023 um 18:13 schrieb Enan Ajmain <3nan.ajm...@gmail.com>:
>>
>> On Wed, 21 Jun 2023 13:41:03 +0100
>> Bram Moolenaar  wrote:
>>> Can we assume that MS Terminal is included with the distribution, or
>>> installed most widely?  If so, then investing time in making this work
>>> properly is well worth it.
>>
>> Windows 11 comes with MS Terminal and is the default [1].  
> 
> 
> Is this true? I thought I had to manually install it on my win 11 system.
> 
> Thanks 
> Chris
> 

-- 
-- 
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/ccf7fcc7-406a-6365-c33b-c8537783e486%40fastmail.fm.


Re: surprising glob() result on Windows

2023-05-01 Thread Stan Brown
On 2023-04-30 20:58, Enan Ajmain wrote:
> On Sat, 29 Apr 2023 12:37:19 -0700
> Stan Brown  wrote:
>> Some time after that, I'm not sure when but certainly by the release of
>> Windows 10, it became possible to disable SFNs for any particular disk
>> partition. And sometime after that, "LFNs only" became the default. But
>> your disk is obviously set to create SFNs from longer filenames.
> 
> I donno if something changed in Windows 11, but it doesn't seem like
> "LFN only" is the default anymore.  I didn't change any setting (didnt
> even know about them) and I get the same behavior Mike describes.  It's
> just that I never had multiple files where one's extension is a
> substring of the other's, so I havent faced this issue.

On my Windows 10 Pro system, my boot partition "C:" had SFNs and LFNs,
but the new partitions I created on the same physical drive had LFNs
only. I don't know if it would have been the same on Windows 10 Home, or
on Windows 11 Home and Pro. In any case, SFNs seem to be enabled on the
partition where the OP is running.

<https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name>
explains how to enable or disable SFNs on a partition. There are
warnings about not disabling SFNs on a partition that already has them.

Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

-- 
-- 
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/1d8a1a81-556b-af5e-09a2-4d3c95eb17d3%40fastmail.fm.


Re: surprising glob() result on Windows

2023-04-29 Thread Stan Brown



Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

On 2023-04-29 08:28, Mike wrote:
> On 04/29/2023 10:51 AM, Mike wrote:
>> On 04/28/2023 9:32 PM, Mike wrote:
>>> Briefly, I have a case where glob("*.ext") returns more files than I
>>> expect.
>>>
>>> To give an example, in a directory of your choice create two files
>>> named "test.any" and "zest.anyother".  The important detail is that
>>> the second filename's extension be prefixed by the first filename's
>>> extension.
>>>
>>> Then launch Vim in that directory and run the command
>>>     :echo glob("*.any")
>>> Both files are returned, not just "test.any".
>>>
>>> I see this on Windows running vim 9.0.1240 with normal features built
>>> with Visual C.  On the other hand, Vim on my linux box returns only
>>> "test.any", as I would expect, so I don't think this a feature. :)
>>
>> I've since rebuilt Vim to include patches up to 1494 and still see the
>> same results on my Windows 10 system.  I thought that patches 1400 and
>> 1458 might help but they did not.
> 
> More potatoes for the stew.
> 
> Create 5 files: test.a, test.ab, test.abc, test.abcd and test.abcde.
> Then, using gvim -u NONE -U NONE --noplugin or gvim --clean:
>     glob("*.a") returns test.a
>     glob("*.ab") returns test.ab
>     glob("*.abc") returns test.abc, test.abcd and test.abcde
>     glob("*.abcd") returns test.abcd
> 
> So the problem occurs when the glob pattern has a 3-character extension.

Mike, I saw someone answered this, but maybe their answer didn't reach you?

Short version: Windows is doing what it's supposed to, and so is Vim.

The original MS-DOS and MS-Windows file system, in the 1980s, allowed up
to 8 characters, and then optionally a dot (period, full stop) plus up
to 3 characters. Even if the file was created with lower-case characters
in its name, Windows would change those characters to upper case. We can
call these "8.3 filenames" for short.

Around the turn of the millennium (in Windows XP, if I recall
correctly), Windows added so-called long filenames (LFNs), which could
be longer than 8.3 and could contain lower-case.

Rather than start with a completely new file system (which would then
make floppy disks and other interchangeable media unreadable on the
previous generation of computers, Microsoft gave any filename that
exceeded 8.3 _two_ entries in the directory: one for the actual
filename, and one for an 8.3 "short filename" (SFN). If the new file's
name fit within 8.3, then it would get only that one entry, an SFN, in
the directory. Thus  _every_ file had an SFN, but not every file had an
LFN. The graphical interface (called File Explorer, Windows Explorer, or
Explorer) would show an LFN if one existed, otherwise the SFN.

Some time after that, I'm not sure when but certainly by the release of
Windows 10, it became possible to disable SFNs for any particular disk
partition. And sometime after that, "LFNs only" became the default. But
your disk is obviously set to create SFNs from longer filenames.

Your test.a, test.ab, and test.abc all fit in the 8.3 paradigm, and
therefore they have only SFNs.  Your test.abcd exceeds 8.3, so when you
created it Windows set up an SFN for it. How is the SFN formed? Windows
ignores any characters beyond the 6.3 limits (6.3, not 8.3), and for the
7th and 8th characters before the dot it adds ~1. Therefore your
test.abcd has two names, test.abcd and test~1.abc (probably ~1, but it
might be ~ and some other number). test.abcde is probably test~2.abc.
When you glob *.abc, the SFN name test~1.abc is caught in that net. But
since Windows prefers to show an LFN when one exists, you see them as
test.abcd and test.abcde.

None of the SFN/LFN business exists on Linux, and since glob() is a
Linux thing in origin it doesn't seem unreasonable to me that it doesn't
handle this.

If you really need to have more than three characters after the dot in
filenames, then the simplest thing would be for you to create a wrapper
function that calls glob and then in its return filters out anything
that doesn't match the input expression.

-- 
-- 
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/2b0898b6-90f3-0fe8-077e-8761a263c0ca%40fastmail.fm.


Re: Searching across a range of lines

2023-01-14 Thread Stan Brown
On 2023-01-13 17:52, Salman Halim wrote:
> On Fri, Jan 13, 2023 at 8:13 PM Tim Chase  <mailto:v...@tim.thechases.com>> wrote:
> 
> While possibly not quite what you're looking for, if I want such, I use
> ...>   :50,100g/cat/#
> 
> Tim, this doesn't do what I'm trying to do, but the bigger problem is
> that :g absolutely moves the cursor, putting it on the last found match.

I use :g as Tim does. I don't particularly want the cursor moved, but
after looking at the results I simply type `` and the cursor is back
where it was.

Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

-- 
-- 
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/f7d3ab30-e8cd-6e68-08d0-cf920b9e895f%40fastmail.fm.


Re: Emulate keyboard keys through Vim that the OS interpret it.

2022-11-12 Thread Stan Brown


On 2022-11-12 03:05, Nicolas wrote:
> Is it possible to emulate keyboard keys through Vim Editor so that the
> OS interprets them?
> 
> example: Is is possible to emulate Windows Key(VK_LWIN)+R keys?
> 
> VK_LWIN as defined here
> https://learn.microsoft.com/fr-fr/windows/win32/inputdev/virtual-key-codes

The interpretation of keys goes in the other direction: first Windows
interprets a keypress, then it passes on the possibly-remapped key to
Vim or whatever other application has focus, and _that_ application
interprets what it got from Windows.

But Windows+R is just the Run command, so you could emulate it by the :!
command in Vim.

There are some differences in the implementation details between :! and
Windows+R, so if you really want to you could use the excellent and free
Autohotkey <https://www.autohotkey.com/> to sense when you press :! (or
any other chosen combination)  in a Vim window and pass Widows+R to the OS.

Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

-- 
-- 
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/f4a3f5ac-1406-6b23-c7f8-c604e1f91a2d%40fastmail.fm.


Re: Control keys not working

2022-07-29 Thread Stan Brown


On 2022-07-29 19:54, Salman Halim wrote:
> As an addendum, here is a simple example that works (as in, doesn't
> work) even with gvim -u NONE -U NONE:
> 
> imap  TEST
> 
> Hitting  (I usually just hit control-hyphen, but
> control-shift-hyphen doesn't work, either) and just inserts a hyphen.
> 
> On Fri, Jul 29, 2022 at 10:35 PM Salman Halim  <mailto:salmanha...@gmail.com>> wrote:
> 
> Hello,
> 
> I'm using 32-bit GVim on Windows 10, 9.0 with patches 1-107, though
> I noticed this with just patches 1-27, also: when I hit control keys
> in insert mode, it just inserts the key as if control hadn't been
> pressed.
> 
> Simple example: 0, which is supposed to delete all indent from
> the line. I just get a '0D' onscreen.
> 
> I can accept that this might be caused by a plugin, but it wasn't
> happening in the 8.2 days, so thought I would mention it in case
> someone else had seen it, also.

I wonder if this is a hardware problem.

Do control keys still work normally in other programs? For example, when
you make a change to a document in Word or Outlook and then press
Ctrl+Z, is the change reverted, or do you see a Z inserted the document?

Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

-- 
-- 
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/a74657b9-cf05-f107-bf22-35d2c9191224%40fastmail.fm.


Re: vim with gui in windows

2022-07-24 Thread Stan Brown
On 2022-07-24 01:40, Igor Spiridonov wrote:
> I would like for example to have "Visual selection automatically copied
> to the clipboard." in windows as it is described here -
> https://vim.fandom.com/wiki/Easy_pasting_to_Windows_applications
> <https://vim.fandom.com/wiki/Easy_pasting_to_Windows_applications>.
> Console vim cannot provide it because it works only when gui is enabled.

Does "*y not work for you? It does for me, when running vim (not gvim)
in a command window in Windows 10. (I have actually mapped ^C
(control+C) to "*y so that Ctrl+C behaves the same in Windows GUI
applications and in command-prompt Vim.)

My Vim is 7.4, but Id be awfully surprised if that stopped working in
later versions.

Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

-- 
-- 
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/89c4dffe-121f-99ac-9ec8-c01da3193778%40fastmail.fm.


Re: % and matchpairs

2022-06-05 Thread Stan Brown


On 2022-06-05 17:47, Eli the Bearded wrote:
> One neat thing about vim is configurability. I think it's widely known
> (and done) to add < and > to matchpairs for %, but you can add Unicode
> pairs in the list to, for smart quotes and quote styles not used in
> English (at ast not often).

Thanks for posting about this, Eli.  I did not know about matchpairs,
but adding < > and the Windows "curly quotes" will be a help to me in
editing files that will eventually be ebooks.

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

-- 
-- 
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/bf65707e-bec5-28e1-c989-3ed28871886c%40fastmail.fm.


Re: global command

2022-04-09 Thread Stan Brown
On 2022-04-09 01:27, Ni Va wrote:
> How to not moving cursor when executing global command ?
> 
> g/^EOF/call add(g:ends, line('.'))

I don't know of any way within the g command. However, what I do after a
global command is move the cursor back to where it was before the
command: either '' or ``

See <:help ''> and <:help restore-position>.

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

-- 
-- 
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/8a08f47d-686d-0476-bc08-2bec25f80a76%40fastmail.fm.


Re: Large file - Opening n head lines

2022-03-17 Thread Stan Brown


On 2022-03-17 02:55, Lifepillar wrote:
> On 2022-03-17, Ni Va  wrote:
>> Is it possible to open a Large File Vim but just only few beginning lines
>> of it, edit one of these 50 first lines and then save and quit ?
> 
> I don't think that is possible with Vim without the help of some
> pre/post-processing tool, but... Vim can edit pretty large files
> relatively quickly, if set up properly. Have you tried playing with
> Vim's settings already?

What settings do you have in mind? I wasn't aware that Vim needed to be
set up differently for files of different sizes.

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

-- 
-- 
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/0b5e7bdd-5d2f-f46d-23c4-8232de72de88%40fastmail.fm.


Re: Sven Guckes passed away

2022-02-21 Thread Stan Brown
That's sad news.

I remember a number of interactions with Sven, in email and in various
newsgroups, and he was always courteous, and generous with his time.
He'll be missed.

Bram, I like your idea to dedicate release 9 to his memory.

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com

On 2022-02-21 05:48, Bram Moolenaar wrote:
> 
> Forwarding this text from Antonio Colombo:
> 
> ==
> 
> Our friend Sven Guckes died in Berlin on February 20, 2022.
> He was diagnosed with a brain tumor in December 2021.
> He went to a hospital, but surgeons could not do much for him.
> At the end of January he was moved to a Hospice.
> A group of friends has been with him as much as possible during all his
> sickness.
> He died while Pugs, one of his friends, was with him.
> They had just finished a chat, and Sven was smiling, but then he quieted
> down and in a few moments he did not breathe any more.
> 
> Sven (when he was still a student at the Free University of Berlin) was very
> active in the Vim development team in the Nineties. He was the one who set
> up the vim.org domain. Later on he had the idea of "What is Vim?", an
> explanation of Vim in six kilobytes, and helped with some versions of
> Vimtutor.
> 
> Sven worked (and gave talks) also on a lot of other free software projects,
> let us remember here just "plain" vi and mutt, but there are several
> others. He had friends all over the world, and helped them, for software
> problems and for real life problems in any way he could.
> 
> Let us recall here just one of his "pet projects", the mythical
> "alternate.fan.warlord" FAQ, in which appears one of his signatures,
> in newsgroup alt.fan.warlord.
> 
> Vale, Sven!
> 
> ==
> 
> 
> I met Sven only a couple of times.  What I remember most is his never
> ending enthusiasm.  He was a good person.
> 
> I would like to dedicate the upcoming Vim 9.0 release to Sven in his
> memory.
> 
> Article in German: https://linuxnews.de/2022/02/sven-guckes-verstorben/
> Hacker news: https://news.ycombinator.com/item?id=30410077
> 

-- 
-- 
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/5ac241bd-5a9a-6995-c003-9ba49b8bda91%40fastmail.fm.


Re: Vim9 script feature-complete

2021-12-30 Thread Stan Brown
Sorry for sending to Bran directly: I didn't notice till it was too late
that ThUnderbird ignored the Reply-to line.

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com


-- 
-- 
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/2cf92d24-4bee-888f-4307-c8650f5f26b6%40fastmail.fm.


Re: See the contents of an included file

2021-05-12 Thread Stan Brown


On 2021-05-12 10:03, russurquhart1 via vim_use wrote:
> To save time and keep consistency, I've been
> using include files for boilerplate text. It is usually of a form:
> 
> #include doc/site/pages/include/sample.tmpl
> 
> Just having that line in another file, I was wondering if there was a
> way I could expand the contents, temporarily, so I could read the text
> in the current flow while still keeping it in its include location? Kind
> of like folding/unfolding.

I have this mapping in my _vimrc, as suggested by the help:
:map gf :sp
Then when I type gf Vim splits the window, opens the file in the new
window, and jumps to it. (The cursor can be anywhere on the file name;
see ":h gf" for more.)

You can close the file and window with :q in the usual way.

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

-- 
-- 
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/48eaf28e-2f3f-1441-7565-6a2b896a0b14%40fastmail.fm.


Re: Automating paragraphs (was Re: Dump help pages)

2021-04-17 Thread Stan Brown


On 2021-04-17 06:30, Julius Hamilton wrote:
> Would you mind providing a simple outline of a function which would
> terminate on some basic condition, such as, the next line is a blank
> newline? I will read those docs.

The first step is for you to clarify your criteria. Then :help
:function, :help if, and so on, to turn your intentions into code. Or
you may not need code as such in your function. :help / tells you how to
do searches based on all sorts of criteria, and any Vim command can be
included in a function.

> I use Vim in Termux, an Android terminal emulator app. I don't know if I
> have buttons such as F9. I will investigate it. However, is there a way
> to check what non-F keys are free to be mapped to something? Thanks very
> much.

:help :map

I would suggest you not set a goal of reading all the help documents; I
believe even experienced Vim users could find that overwhelming. (I know
I would.) A much more reasonable goal is to read appropriate _portions_
that answer your questions. And when you're reading something for which
you have immediate use, you're much more likely to retain what you read.

There is also Google, of course. Just a day or two ago I couldn't think
what term to query via :help, so I googled my query and got an answer
immediately.

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

-- 
-- 
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/3b0e07a3-6474-e8d6-4378-b54d7ec85f13%40fastmail.fm.


Automating paragraphs (was Re: Dump help pages)

2021-04-16 Thread Stan Brown
On 2021-04-16 09:42, Julius Hamilton wrote:

> At the beginning of a paragraph which has been separated mid-sentence
> onto separate lines, how might I automate the process of calling CTRL-J
> until all the separated lines in the paragraph have been combined into
> one line? Will Vim be able to call CTRL-J until a condition is met, for
> example, that the single line being built ends in a sentence (a period),
> or until the next line is a blank newline?

The short answer is go to the top of the paragraph and press Shift+V,
then to the bottom and press Shift+J (not Ctrl+J). You can automate this
further by writing a function that would figure out the top and bottom
of the paragraph via whatever logic you build in. See :help :function.

> Then, how might I automate the process of entering N newlines between
> every sentence? I.e., automating pressing ), i, enter a few times, then
> escape, for multiple sentences? I could create a shortcut to execute
> these commands and call it myself, or it could also repeat until the
> conditions above. How would I do either?

Example, for N = 4:
:imap  
Type the actual < and > characters as shown. To use this, at the end of
typing your paragraph do not press Esc but press F9 (or whatever key you
mapped).

If you sometimes want to insert N blank lines in already-written text,
add this:
:map  A
The previous map was active in insert mode; this one is active in normal
mode. It moves to the end of the current line ("A") in insert mode and
then appends the insert-mode version of F9.

Once you've verified that these work as you wish, you can put them in
your $VIM/_vimrc file so that they will be executed whenever you start Vim.

> Also, how do I go back to where the cursor previously was, in case I
> accidentally move it?

`` or ''
(One goes back to the _line_) where you were; the other goes back to the
exact position within the line.)

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

-- 
-- 
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/d9ee4264-13cb-eef7-be14-e0e68f9df155%40fastmail.fm.


Re: " -> \(lq ... " -> \(rq

2021-03-04 Thread Stan Brown


On 2021-03-04 14:36, tu...@posteo.de wrote:
> Troff distinquishes between the "opening" 
> double-quote and the "closing" double
> quote by using \(lq nad \(rq instead.
> 
> Is their a function or anything else,
> which would allow me to write someting
> which get closer to 100% error free
> detection of opening and closing "
> in vim?

If you want the actual characters, this will take you to the next
occurrence:

/[“”]/

In other words, put the two quote marks within square brackets.

If you want the troff sequences, use

/\\([lr]q/

The help text is at

:h /[]

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

-- 
-- 
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/cda161d8-3ee0-2ed7-9ca2-3879dc3dab75%40fastmail.fm.


Re: Vim9: call function from variadic function?

2021-02-28 Thread Stan Brown
:h curly-braces-names

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

On 2021-02-28 06:14, Lifepillar wrote:
> This might be a bit of a stretch, but... is it possible to
> "expand/split" variable arguments to call another function with fixed
> arguments? I would like to define a function that takes as input another
> function F and some values v1, vn... , and applies F to v1, ..., vn.
> 
> For example, I can define:
> 
> def F(a: string, b: number)
> enddef
> 
> def G(...values: list): void
>   F(values[0], values[1])
> enddef
> 
> G('xyz', 42)
> 
> I would like to generalize G so that it can invoke any function, i.e.:
> 
> def G2(F: func, ...values: list): void
>F()
> enddef
> 
> G2(F, 'xyz', 42)
> 
> The problem is: what can I put in place of ? F(values) doesn't cut
> it.
> 
> Thanks,
> Life.
> 
> 

-- 
-- 
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/12083587-0eff-07d8-b345-8d3fafd07d9b%40fastmail.fm.


Re: Stop notification from :wn

2021-02-12 Thread Stan Brown


On 2021-02-12 10:40, cjsmall wrote:
> 
> When I use the  :wn"  command,  before moving to the next file I see a
> notification like:
> 
> "file1" 137L, 5359C [w]
> "file2" 137L, 5359C
> Press ENTER or type command to continue

Set cmdheight to something larger than 2.

I found this at
 :h press-enter

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

-- 
-- 
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/c3105e23-f6e1-3b76-4e80-9516a8e39977%40fastmail.fm.


Spell check: ignoring soft hyphens

2021-01-01 Thread Stan Brown
Apologies if this is a basic question, but I've read the documentation
on spelling multiple times and must be missing the answer. Ive also
checked the FAQ and the group archives.

GVim 7.4, running in Windows 7 and 8. I use only 8-bit characters, in
Windows-1252 encoding (set enc=latin1 in Vim).

My question: I frequently use the soft hyphen (character 173, or 255
in octal) in HTML documents. How can I tell Vim to ignore these
characters for purposes of spell check?

For example, I want Vim to consider "pur<173>pose" as a good word
because "purpose" is a good word. I don't expect Vim to know what is
correct syllabication, just to ignore any soft hyphen when it's deciding
whether a word is spelled correctly.

Currently I handle this by putting "pur<173>pose" in my word list
file, but obviously I don't want to do that with every possible
hyphenation of every possible good word.

-- 
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

-- 
-- 
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/1f27dc28-16bd-5e42-c300-2098f762db58%40fastmail.fm.