Sunday, January 31, 2021

Highlight email headers with different colors

Hello,
I am a new vim+mutt user. I am wondering how to highlight email headers (from, To, CC, Subject, ...) with different colors.
I have done my homework by searching FAQs and more, but I didn't find any answer.
Thank you for your help.
Ian

--
--
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/b992fcc4-b473-4c67-ab90-d14a2ee2ab89n%40googlegroups.com.

Saturday, January 30, 2021

Announcement: New Vim Tip: Text mode menus

https://vim.fandom.com/wiki/Text_mode_menus

I added this code to my vimrc at a time when for some reason I
couldn't get menus on a menubar even in gvim. On my new computer
(which may have been set up just a tiny wee bit differently) the
menubar has reappeared, but I'm leaving this code in my vimrc because:
* it allows me to get Vim menus even when running Vim in a console
* it gives me text-style Vim menus on the gvim status line in addition
to (or as a fallback for) the menus on the menubar.
These menus use the standard gvim menus and the standard Vim wildmode
completion, which is compiled by default in all Vim builds with
expression evaluation (but the code checks for it anyway: better be
safe than sorry).

I feel that this code is now mature so I'm sharing it with the community.

Have fun!
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/CAJkCKXuB-Z_ccdjAGTe8V%2BTcFMWqLWmhgyNtixpfpchrOTH7zw%40mail.gmail.com.

Re: sorting lines by two first virtual column

Oh so Sorry. Windows 10.

Le sam. 30 janv. 2021 à 17:25, <arocker@vex.net> a écrit :

>
> I would like to sort lines by order ascendant by the alphabetical value of
> the two first columns.
>

Are you on Windoes, or an *nix?

(The example file would be more useful if the input was not in order.)

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/jmelxbd3RV4/unsubscribe.
To unsubscribe from this group and all its topics, 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/4a152c29510c7feb462a4dd53ca06f69.squirrel%40webmail.vybenetworks.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAOKxv4E9kAom_nzpmCRvdjix732udECb9xpOwkGGngxkeLyrSA%40mail.gmail.com.

Re: sorting lines by two first virtual column

I have done that kind of sort from within Vim : sort /^.\{8}\zs.\{15}\ze/ r

But it ignores stamped date hour and not  two first columns >> then do the same job.

Le samedi 30 janvier 2021 à 19:27:41 UTC+1, rwmit...@gmail.com a écrit :
The input isn't it order.  The lines ending in BAR should get intermixed with FOO.

On Saturday, January 30, 2021 at 11:25:56 AM UTC-5 aro...@vex.net wrote:

>
> I would like to sort lines by order ascendant by the alphabetical value of
> the two first columns.
>

Are you on Windoes, or an *nix?

(The example file would be more useful if the input was not in order.)

--
--
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/371e2f9b-4ef4-4d3b-8866-70514a405a44n%40googlegroups.com.

Re: sorting lines by two first virtual column

The input isn't it order.  The lines ending in BAR should get intermixed with FOO.

On Saturday, January 30, 2021 at 11:25:56 AM UTC-5 aro...@vex.net wrote:

>
> I would like to sort lines by order ascendant by the alphabetical value of
> the two first columns.
>

Are you on Windoes, or an *nix?

(The example file would be more useful if the input was not in order.)

--
--
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/275566db-532a-4b5a-baf8-b23be32b99b1n%40googlegroups.com.

Re: sorting lines by two first virtual column

>
> I would like to sort lines by order ascendant by the alphabetical value of
> the two first columns.
>

Are you on Windoes, or an *nix?

(The example file would be more useful if the input was not in order.)

--
--
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/4a152c29510c7feb462a4dd53ca06f69.squirrel%40webmail.vybenetworks.com.

Re: sorting lines by two first virtual column

This worked for me.  Put the cursor on the first line and type:
  !}sort

See the unix man page on sort for any additional options you may want to through at it.
The !  tells vim you want want process a block of text thru an external program
The } tells vim to send this paragraph
'sort' is the command to do the filtering/processing.

that's my basis understanding of what is happening.


On Saturday, January 30, 2021 at 3:41:51 AM UTC-5 niva...@gmail.com wrote:
Hi,

I would like to sort lines by order ascendant by the alphabetical value of the two first columns.

 2021/01/13 15:05:52.417 FOO
 2021/01/13 15:05:52.417 FOO
 2021/01/13 15:05:52.417 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:08.354 FOO
 2021/01/13 15:06:08.354 FOO
 2021/01/13 15:06:08.354 FOO
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:08.354 BAR
 2021/01/13 15:06:08.354 BAR
 2021/01/13 15:06:08.354 BAR



--
--
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/e8505926-0b07-4071-b02d-7485bba1e512n%40googlegroups.com.

sorting lines by two first virtual column

Hi,

I would like to sort lines by order ascendant by the alphabetical value of the two first columns.

 2021/01/13 15:05:52.417 FOO
 2021/01/13 15:05:52.417 FOO
 2021/01/13 15:05:52.417 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:05.151 FOO
 2021/01/13 15:06:08.354 FOO
 2021/01/13 15:06:08.354 FOO
 2021/01/13 15:06:08.354 FOO
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:05.151 BAR
 2021/01/13 15:06:08.354 BAR
 2021/01/13 15:06:08.354 BAR
 2021/01/13 15:06:08.354 BAR



--
--
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/fab10aa5-02db-468a-a2a7-e169333a6e2an%40googlegroups.com.

Wednesday, January 27, 2021

Re: color settings for different environments in vimrc?

On Wed, Jan 27, 2021 at 02:14:57PM -0800, Gary Johnson wrote:
> On 2021-01-27, meine wrote:
> > Hi,
> >
> > Working on my computer I sometimes use plain TTY and other times a GUI.
> > I would like to set different colorschemes for that in my vimrc.
> >
> > At this moment I have following code, but it doesn't work at all -- vim
> > only uses the nighted_16.
> >
> > if has('gui_running')
> > set t_Co=256
> > colorscheme molokai_dark
> > set guifont=Monospace\ 10
> > set columns=85 lines=30
> > if has('x11')
> > set t_Co=256
> > colorscheme nighted_16
> > set guifont=Monospace\ 10
> > else
> > set t_Co=16
> > colorscheme nighted_16
> > endif
> >
> >
> > Any suggestions on how to improve it?
>
> The code snippet above is missing something to end the first if,
> either an endif, else/endif or elseif. You probably want to change
> the second if to an elseif.

Many thanks! It now works as intended.

Kind Regards

//meine

--
--
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/YBJt6I4210E9hNYW%40trackstand.

Re: Trademark

On Tue, 26 Jan 2021 20:20:44 -0800 (PST)
Benjamin Atkin <ben@resources.co> wrote:

> Is there a trademark for vim, and is this proprietary startup in
> violation of it?
>
> https://www.vimcal.com/
>
> It doesn't look like they have a trademark, but when they do, perhaps
> it should be opposed. Startups often shorten their names, so it may
> not be great for them to get too much traction under this name.

I doubt their useage of a word containing three letters that spell
"Vim" creates any confusion in the marketplace. If it had been an
editor or advertised the use of Vim, perhaps it would have. But not as
it stands.

You can oppose it: That's your privilege. But I don't think you'll
prevail.

I'm glad that when I created VimOutliner back in 2001, nobody opposed
that naming.

SteveT

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

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

Re: color settings for different environments in vimrc?

On 2021-01-27, meine wrote:
> Hi,
>
> Working on my computer I sometimes use plain TTY and other times a GUI.
> I would like to set different colorschemes for that in my vimrc.
>
> At this moment I have following code, but it doesn't work at all -- vim
> only uses the nighted_16.
>
> if has('gui_running')
> set t_Co=256
> colorscheme molokai_dark
> set guifont=Monospace\ 10
> set columns=85 lines=30
> if has('x11')
> set t_Co=256
> colorscheme nighted_16
> set guifont=Monospace\ 10
> else
> set t_Co=16
> colorscheme nighted_16
> endif
>
>
> Any suggestions on how to improve it?

The code snippet above is missing something to end the first if,
either an endif, else/endif or elseif. You probably want to change
the second if to an elseif.

Regards,
Gary

--
--
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/20210127221457.GD5133%40phoenix.

color settings for different environments in vimrc?

Hi,

Working on my computer I sometimes use plain TTY and other times a GUI.
I would like to set different colorschemes for that in my vimrc.

At this moment I have following code, but it doesn't work at all -- vim
only uses the nighted_16.

if has('gui_running')
set t_Co=256
colorscheme molokai_dark
set guifont=Monospace\ 10
set columns=85 lines=30
if has('x11')
set t_Co=256
colorscheme nighted_16
set guifont=Monospace\ 10
else
set t_Co=16
colorscheme nighted_16
endif


Any suggestions on how to improve it?

TIA,

//meine

--
--
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/YBHUkOCLl%2BYEFURW%40trackstand.

Re: Trademark

Benjamin Atkin wrote:

> Is there a trademark for vim, and is this proprietary startup in violation
> of it?
>
> https://www.vimcal.com/
>
> It doesn't look like they have a trademark, but when they do, perhaps it
> should be opposed. Startups often shorten their names, so it may not be
> great for them to get too much traction under this name.
>
> An example is seomoz shortening to moz.

There is no official trademark registration for "Vim" as a text editor.
Vim is registered for a household product (probably for a hundred
years already).

The website has no contact info, no idea who is behind this. Good luck
competing with the hundred other Calendar apps (including Google's free
calendar, used by millions of people, and Outlook).

It looks like for this product "cal" is an essential part of the name.
In case they do shorten it to "Vim" they would be clearly in trouble.

--
hundred-and-one symptoms of being an internet addict:
244. You use more than 20 passwords.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202101271041.10RAff1g3687922%40masaka.moolenaar.net.

Tuesday, January 26, 2021

Trademark

Is there a trademark for vim, and is this proprietary startup in violation of it?

https://www.vimcal.com/

It doesn't look like they have a trademark, but when they do, perhaps it should be opposed. Startups often shorten their names, so it may not be great for them to get too much traction under this name.

An example is seomoz shortening to moz.

--
--
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/5ad18f8b-6939-46aa-8f44-3f693bd14970n%40googlegroups.com.

Monday, January 25, 2021

Re: Anyone know when Vim Versions 8.0, 8.1 and 7.4 will be End of Life

Michael.Pearson2 wrote:

> Hi All-
>
> Does anyone know when Vim Versions 8.0, 8.1 and 7.4 will be End of Life? Thanks in Advance.
>
> Michael Pearson

Vim development does not maintain multiple branches.
Only the tip of the master branch is maintained.

So I don't think it makes much sense to talk about end of life
for those vim versions. If a bug is found, it is only fixed in the
latest Vim.

I can't think of good reasons to continue using such old versions
anyway. They are missing thousands of bug fixes. Best to clone
vim from git, and build it, or download the latest pre-built snapshot
if available for your platform.

Regards
Dominique

--
--
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/CAON-T_jTmis%3Dq3nxTAMy5AF0ioWUFSx9ZKJ2-5o9CNh6vOTjWA%40mail.gmail.com.

Anyone know when Vim Versions 8.0, 8.1 and 7.4 will be End of Life

Hi All-

 

Does anyone know when Vim Versions  8.0, 8.1 and 7.4 will be End of Life? Thanks in Advance.

 

Michael Pearson

Application Products Center of Excellence (APCoE)

Enterprise Application Portfolio Management (EAPM) | Wells Fargo Technology

Mobile (515) 339-8592 | MAC F2505-03A

 

To better manage and track requests related to the products aligned to the Applications Products Competency Center, please access the APCoE PPM Service Center page as a starting point for Product Owner engagement. 

 

Re: how to replace selected text using keyboard shortcut

Another mapping that does the job: vnoremap <C-b> s<h1><C-r>"</h1>

"s" in visual mode deletes the selected text (which puts the deleted text in the " register) and then enters insert mode.

In insert mode, <C-r>" inserts the contents of the " register. See ":help i^r" for more about inserting registers during insert.

On Wednesday, January 6, 2021 at 2:12:44 AM UTC-5 pengembar...@gmail.com wrote:
Dear all,

Sorry if this question is already asked before, but googling does not give enough result, maybe wrong search key.

what i want to do is:
- select text using mouse/trackpad (i'm in wondows).
- press some control-key to replace that text.

example, i have following line in file:
===
one
two
three
===

result:
===
<h1>one</h1>
<h2>two</h2>
three
===

usually what i am doing is:
:%s'one'<h1>one</h1>'
:%s'two'<h2>two</h2>'

can i change with:
1. select 'one' with mouse
2. Press <Ctrl-B> (or some other combination) to convert it to <h1>one</h1>.
So Ctrl-B is associated with <h1> and </h1> tag.
3. select 'two' with mouse
4. press Ctrl-2 (or other combination) to convert to '<h2>two</h2>'.
Ctrl-2 is associated with <h2> and </h2> tag.

thanks.


--
--
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/02dbb4ff-fb6d-4a15-97af-5ba8862e24b7n%40googlegroups.com.

Saturday, January 23, 2021

write errors

Hi,

I have a few files where I yank/paste some lines from the internet as a
reference. Often (not always) Vim gives some errors after `: wq`

E37: No write since last change
E162: nothing saved since last change of buffer "<path/filename>"
Type ENTER or type a command to continue

What is happening here, and how can I resolve it?

Further observations:

When this happens there are one or more files with the same filename,
but different 'file types', eg. with a .md file there is a .md~ and
sometimes an .mx .my. mz file, besides a .<filename>.md.swp which is
logical because editing the file wasn't formally closed in Vim.

Other observation is that there mostly is a strange character in the
markdown file, comming from the y/p from a browser. In many cases it is
a `¿`. When I replace that character and delete the temporary files, all
is right again.

TIA

//meine

--
--
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/YAyLSdxgqdQT/Gh2%40trackstand.

Thursday, January 21, 2021

I want to auto enter the insert mode after use f command how to make it?

As the title said I want to edit immediately after using f command.

seems cant remap the f direct, because f need a parameter. 

--
--
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/23fcf013-ffbe-49af-b85d-cc3a32ce153dn%40googlegroups.com.

Re: How to update GVim_8.2.2332_x64 to a more current patch level?

On 1/20/2021 4:21 PM, Christian Brabandt wrote:
> On Di, 19 Jan 2021, Mike O'Brien wrote:
>
>> Relative newbie here with a simple question—probably.
>>
>> Having successfully installed (on Win 8.1x64 Pro), what is the procedure for
>> updating to a later patch level?
>>
>> I assumed it would be to download/execute the desired package; e.g.
>> gvim_8.2.2374_x64_signed.exe . . .
>>
>> That is not working for me: trashes/locks-up the existing %HOMEDRIVE% \Program
>> Files\Vim\vim82 directory!? A Restart clears the lock-up (of course) and
>> deletes the ..\vim82 sub-directory. I can install like new again using the
>> downloaded package—and all is well.
> That should work and has always worked for me.
> Kill all running Vim instances before updating, otherwise the installer
> may not be able to delete and re-install. Or what exactly do you mean
> with "trashes/locks-up"?
>
> Yes, 'delete and re-install' is what is failing, though I have no Vim instances running.
>> I figured out that I could, alternatively, download  and extract the .zip
>> package—replacing the ..\vim82 sub-directory with cut&paste—and all is well as
>> well !-|
> That should also work, as long as no process is open from that
> directory.
>
>
> Best,
> Christian

Thank you very much, Christian, for your insight and for confirming my expectations.
I'll take it from here; closer scruitiny is required, obviously.

Thanks again,
Mike

--
Mater mea, et are Hibernica Pater...et Ego Hibernica quoque!

--
--
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/144156e7-db15-7c34-5a41-c0ac66d0cd39%40gmail.com.

Wednesday, January 20, 2021

Re: How to update GVim_8.2.2332_x64 to a more current patch level?

On Di, 19 Jan 2021, Mike O'Brien wrote:

> Relative newbie here with a simple question—probably.
>
> Having successfully installed (on Win 8.1x64 Pro), what is the procedure for
> updating to a later patch level?
>
> I assumed it would be to download/execute the desired package; e.g.
> gvim_8.2.2374_x64_signed.exe . . .
>
> That is not working for me: trashes/locks-up the existing %HOMEDRIVE% \Program
> Files\Vim\vim82 directory!? A Restart clears the lock-up (of course) and
> deletes the ..\vim82 sub-directory. I can install like new again using the
> downloaded package—and all is well.

That should work and has always worked for me.
Kill all running Vim instances before updating, otherwise the installer
may not be able to delete and re-install. Or what exactly do you mean
with "trashes/locks-up"?


>
> I figured out that I could, alternatively, download  and extract the .zip
> package—replacing the ..\vim82 sub-directory with cut&paste—and all is well as
> well !-|

That should also work, as long as no process is open from that
directory.


Best,
Christian
--
Adam war ein Mensch; er wollte den Apfel nicht des Apfels wegen,
sondern nur, weil er verboten war.
-- Mark Twain, Querkopf Wilsons Kalender

--
--
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/20210120212157.GG2910256%40256bit.org.

Tuesday, January 19, 2021

Fwd: How to update GVim_8.2.2332_x64 to a more current patch level?

My first post: I'm guessing this was misdirected (vim@vim.org) initially . . .

-------- Forwarded Message --------
Subject: How to update GVim_8.2.2332_x64 to a more current patch level?
Date: Tue, 19 Jan 2021 14:54:49 -0500
From: Mike O'Brien <jmobr7@gmail.com>
To: vim@vim.org


Relative newbie here with a simple question—probably.

Having successfully installed (on Win 8.1x64 Pro), what is the procedure for updating to a later patch level?

I assumed it would be to download/execute the desired package; e.g. gvim_8.2.2374_x64_signed.exe . . .

That is not working for me: trashes/locks-up the existing %HOMEDRIVE% \Program Files\Vim\vim82 directory!? A Restart clears the lock-up (of course) and deletes the ..\vim82 sub-directory. I can install like new again using the downloaded package—and all is well.

I figured out that I could, alternatively, download  and extract the .zip package—replacing the ..\vim82 sub-directory with cut&paste—and all is well as well !-|

I also figure 'this ain't right: I've got a problem; think I better ask'.

Any help appreciated. TIA.

Mike O'B.

--   Mater mea, et are Hibernica Pater...et Ego Hibernica quoque!and all is well  

How to update GVim_8.2.2332_x64 to a more current patch level?

Relative newbie here with a simple question—probably.

Having successfully installed (on Win 8.1x64 Pro), what is the procedure for updating to a later patch level?

I assumed it would be to download/execute the desired package; e.g. gvim_8.2.2374_x64_signed.exe . . .

That is not working for me: trashes/locks-up the existing %HOMEDRIVE% \Program Files\Vim\vim82 directory!? A Restart clears the lock-up (of course) and deletes the ..\vim82 sub-directory. I can install like new again using the downloaded package—and all is well.

I figured out that I could, alternatively, download  and extract the .zip package—replacing the ..\vim82 sub-directory with cut&paste—and all is well as well !-|

I also figure 'this ain't right: I've got a problem; think I better ask'.

Any help appreciated. TIA.

Mike O'B.

--   Mater mea, et are Hibernica Pater...et Ego Hibernica quoque!and all is well

Re: Syntax highlighting

Dominique wrote:

> Tony Mechelynck wrote:
>
> > On Tue, Jan 19, 2021 at 9:53 AM Softwafe Engineer <timsofteng@gmail.com> wrote:
> > >
> > > Hello. Any plans about improving of syntax highlighting? I've tried treesitter in neovim and it's pretty cool. In other hand vim's regexp solution is not best I suppose.
> > >
> > > Thanks
> >
> > IMHO, the Vim way of highlighting syntax gives pretty cool results;
>
> To be fair, supporting tree-sitter seems really nice.
> Perhaps it does not need native support but can be implemented
> as a plugin, using Vim text properties?
>
> I have not tried tree-sitter yet, but I glanced at at:
> https://tree-sitter.github.io/tree-sitter/
> https://github.com/nvim-treesitter/nvim-treesitter
>
> It could provide syntax highlighting for several languages,
> based on a real parser of each language. In contrast, vim
> native syntax highlighting is based on heuristics with regexps.
> Vim syntax highlighting works quite well in general despite using
> heuristics, but some complex languages are impossible to get
> 100% right with vim syntax highlighting (e.g. sh, Perl, c++,...).
> It's a bit similar to heuristic indexing (ctags, cscope) vs indexing
> with clangd, rtags (etc) which have a full parser and are thus 100%
> reliable in principle.
>
> Syntax highlighting with tree-sitter may not only be more accurate,
> but perhaps faster and we piggy-back on another tool to support
> languages.

The idea is that this solution for syntax highlighting would be much
faster. That matters especially for languages where the pattern
matching struggles to do the job.

Last time I looked there were also several disadvantages, I don't know
how many of these have been tackled. I believe the parser needs to be
compiled, which means you can't just drop-in support for a language.
Also, I wonder how the parser handles a file that's halfway being
edited. Does the highlighting stop or get messed up at the first
unfinished line?

It appears the work in Neovim took a long time, thus one can guess that
including it in Vim will also be a lot of work.

It's unlikely the old regexp based syntax engine will ever go away, thus
there will be two implementations to maintain. That is only justifiable
if the new one is really much better.

--
hundred-and-one symptoms of being an internet addict:
183. You move your coffeemaker next to your computer.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202101191729.10JHTIRP1318031%40masaka.moolenaar.net.

Re: Syntax highlighting

Hi,

On Tue, Jan 19, 2021 at 4:04 AM Dominique Pellé <dominique.pelle@gmail.com> wrote:
Tony Mechelynck wrote:

> On Tue, Jan 19, 2021 at 9:53 AM Softwafe Engineer <timsofteng@gmail.com> wrote:
> >
> > Hello. Any plans about improving of syntax highlighting? I've tried treesitter in neovim and it's pretty cool. In other hand vim's regexp solution is not best I suppose.
> >
> > Thanks
>
> IMHO, the Vim way of highlighting syntax gives pretty cool results;

To be fair, supporting tree-sitter seems really nice.
Perhaps it does not need native support but can be implemented
as a plugin, using Vim text properties?


I agree. We should look into seamlessly integrating the following tools
into VIm (mostly using plugins):


These will greatly help programmers who use Vim for development.
We should look into adding native features that will help simplify
the implementation of these plugins.

Regards,
Yegappan
 
I have not tried tree-sitter yet, but I glanced at at:
  https://tree-sitter.github.io/tree-sitter/
  https://github.com/nvim-treesitter/nvim-treesitter

It could provide syntax highlighting for several languages,
based on a real parser of each language. In contrast, vim
native syntax highlighting is based on heuristics with regexps.
Vim syntax highlighting works quite well in general despite using
heuristics, but some complex languages are impossible to get
100% right with vim syntax highlighting (e.g. sh, Perl, c++,...).
It's a bit similar to heuristic indexing (ctags, cscope) vs indexing
with clangd, rtags (etc) which have a full parser and are thus 100%
reliable in principle.

Syntax highlighting with tree-sitter may not only be more accurate,
but perhaps faster and we piggy-back on another tool to support
languages.

Regards
Dominique


--
--
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/CAAW7x7mS5Yr9LrsaAC%3D_zQ9JZG2%2B2Ec6mXNMMtV3K6EgOHpDRQ%40mail.gmail.com.

Re: Syntax highlighting

Tony Mechelynck wrote:

> On Tue, Jan 19, 2021 at 9:53 AM Softwafe Engineer <timsofteng@gmail.com> wrote:
> >
> > Hello. Any plans about improving of syntax highlighting? I've tried treesitter in neovim and it's pretty cool. In other hand vim's regexp solution is not best I suppose.
> >
> > Thanks
>
> IMHO, the Vim way of highlighting syntax gives pretty cool results;

To be fair, supporting tree-sitter seems really nice.
Perhaps it does not need native support but can be implemented
as a plugin, using Vim text properties?

I have not tried tree-sitter yet, but I glanced at at:
https://tree-sitter.github.io/tree-sitter/
https://github.com/nvim-treesitter/nvim-treesitter

It could provide syntax highlighting for several languages,
based on a real parser of each language. In contrast, vim
native syntax highlighting is based on heuristics with regexps.
Vim syntax highlighting works quite well in general despite using
heuristics, but some complex languages are impossible to get
100% right with vim syntax highlighting (e.g. sh, Perl, c++,...).
It's a bit similar to heuristic indexing (ctags, cscope) vs indexing
with clangd, rtags (etc) which have a full parser and are thus 100%
reliable in principle.

Syntax highlighting with tree-sitter may not only be more accurate,
but perhaps faster and we piggy-back on another tool to support
languages.

Regards
Dominique

--
--
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/CAON-T_iRSZud%2Br7toSYSP%2BDGjsb00WC%3DTR0F4yRbuvR2YjtEyg%40mail.gmail.com.

Re: Syntax highlighting

On Tue, Jan 19, 2021 at 9:53 AM Softwafe Engineer <timsofteng@gmail.com> wrote:
>
> Hello. Any plans about improving of syntax highlighting? I've tried treesitter in neovim and it's pretty cool. In other hand vim's regexp solution is not best I suppose.
>
> Thanks

IMHO, the Vim way of highlighting syntax gives pretty cool results;
but it's free and open source software, and with the possible
exception of Bram, no one is paid for even part-time work on it. This
has the following consequences:
- All (or almost all) developers are volunteers, nobody brings any
changes in Vim unless he (or she, for that matter) wants it.
- If you don't like something, there are no rules against backward
engineering: all the source is where anyone can find it, and if you
think you can make it work better, go ahead and propose (in the
vim_dev list) a patch to either the C source or the runtime files, or
both.
- But be warned that Bram highly values backward compatibility, and
changes which break existing runtime files, or existing user scripts,
have a vanishingly small chance of being accepted into the "official"
Vim source. However you're welcome to fork your own version of Vim the
way the Neovim developers did, and to distribute it yourself in a way
compatible with the Vim license. Or if Neovim is exactly what you
prefer, well, go ahead and use it.

Oh, and BTW, if you don't like this answer, please read "How To Ask
Questions The Smart Way"
http://catb.org/~esr/faqs/smart-questions.html then reformulate your
question.

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/CAJkCKXtDBszFCTHy8AQ4EcDcFZyiHsDkKytWGEW3KQYLCk5M4g%40mail.gmail.com.

Monday, January 18, 2021

Re: E994: Not allowed in a popup window

Hi again,

Specifically for vifm, I just discovered <S-Tab> works to switch to/from preview window.

take care,
-m
On Monday, January 18, 2021 at 1:08:46 PM UTC-5 mckel...@gmail.com wrote:
Bram, hi

Thanks so much!  That works great.
If <C-w>w in a vim terminal will always get me E994 then do you see a reason to not add something like:

tnoremap <C-w>w  <C-w>.w

to my .vimrc ?

thx for vim,
-m

On Monday, January 18, 2021 at 12:55:59 PM UTC-5 Bram Moolenaar wrote:

> I just wanted to add, I am not trying to go back to main window - I am
> just wanting to send <C-w>w in app in terminal window for it to use
> internally.

Try using CTRL-W . w
The dot means "this terminal". See ":help t_CTRL-W_."

--
The CIA drives around in cars with the "Intel inside" logo.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/0a24f51f-6e86-4f52-9815-7517d80f39e2n%40googlegroups.com.

Re: vim9script: dump file content to list of list question !

Hi Jürgen and thank you.

  •  this seems to work well !
             var bigData_records = mapnew(getline(1, '$'), '' v:val->split() ' )

  • Considering this kind of records:
2021/01/14 07:42:22.588 InformationFoo dbg 
2021/01/14 07:42:22.588 InformationBar dbg  
 

I wonder if I can build big dict in one line
  • first key level is day
  • second key level would be hour stamped  
  • value is list of rest of infos
It should look like that inline:

mapnew(getline(1, '$'),     ' g:bigData[v:val->split()[0][v:val->split()[1]] = v:val->split()[2 : -1]  ')

Actually I have a more developped vimscript that ensure existence of keys ...

var lines: list<string> = getline(1, '$')     
var l: list<string> = []                      
var day: string = ''                          
var hour: string = ''                         
var infos: string = ''                        
var hourDict:  dict<any> = {}                 
var infosList: list<any> = []                 
                                              
for line in lines[0 : g:dataRows]             
                                              
  l     = line->split()                       
  day   = l[0]                                
  hour  = l[1]                                
  infos = l[2 : ]->join()                     
  #echomsg day .. ' ' .. hour .. ' ' .. infos 
                                              
  # Hours' dict                               
  if !has_key(hourDict, hour)                 
    hourDict[hour] = [infos]                  
  else                                        
    hourDict[hour]->add(infos)                
  endif                                       
                                              
  # Days' dict                                
  if !has_key(g:dataD, day)                   
    g:dataD[day] = hourDict                   
  endif                                       
                                              
endfor                                        


Le lundi 18 janvier 2021 à 08:34:34 UTC+1, jottkaerr@googlemail.com a écrit :

Hi,

Ni Va schrieb am 15.01.2021 um 14:38:
>
> I got this kind of classical logfile :
>
> 2021/01/14 07:42:22.588 InformationFoo dbg 
> 2021/01/14 07:42:22.588 InformationBar dbg 
> 2021/01/14 07:42:22.588 Information    Foobar dbg 
> 2021/01/14 07:42:22.588 Information    Barbar dbg 
> ..
> .
>
> and would like to add all lines' informations split by space into dict or array in vim9script.
> ['2021/01/14', '07:42:22.588', 'Information  Foo dbg   ']
>
> trying map(getline(1, '$'), ' v:val->split() ') it returns list<list<string>> but impossible to declare var foo: list<list<string>>
>
> How can I fix it ?

you need to use mapnew() instead of map(), because the item type changes.

getline() returns a list of strings. The supplied expression would replace
every item of type string by an item of type list<string>. In Vim9 script
this is not allowed. Instead you need to use mapnew() which creates a new
list which is then filled with the results of the mapping expression.

Regards,
Jürgen

--
--
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/b2a289af-1c08-4ff9-8a4a-17ae510cded1n%40googlegroups.com.

Re: E994: Not allowed in a popup window

Bram, hi

Thanks so much!  That works great.
If <C-w>w in a vim terminal will always get me E994 then do you see a reason to not add something like:

tnoremap <C-w>w  <C-w>.w

to my .vimrc ?

thx for vim,
-m

On Monday, January 18, 2021 at 12:55:59 PM UTC-5 Bram Moolenaar wrote:

> I just wanted to add, I am not trying to go back to main window - I am
> just wanting to send <C-w>w in app in terminal window for it to use
> internally.

Try using CTRL-W . w
The dot means "this terminal". See ":help t_CTRL-W_."

--
The CIA drives around in cars with the "Intel inside" logo.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/4974ce5c-a23e-4780-b01a-c28ee0973e76n%40googlegroups.com.

Re: E994: Not allowed in a popup window

> I just wanted to add, I am not trying to go back to main window - I am
> just wanting to send <C-w>w in app in terminal window for it to use
> internally.

Try using CTRL-W . w
The dot means "this terminal". See ":help t_CTRL-W_."

--
The CIA drives around in cars with the "Intel inside" logo.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202101181755.10IHtkV8962354%40masaka.moolenaar.net.

Re: E994: Not allowed in a popup window

Hi,

I just wanted to add, I am not trying to go back to main window - I am just wanting to send <C-w>w in app in terminal window for it to use internally.

thx,
-m
On Monday, January 18, 2021 at 10:03:46 AM UTC-5 mckel...@gmail.com wrote:
Hi,

If I use vifm in a vim terminal window and I use <C-w>w to switch to preview window to scroll the file preview I get this -

E994: Not allowed in a popup window

Does anyone know if there is any way to get this to work ?

thx,
-m

--
--
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/07ca86e6-08ca-49ea-9184-43765eff86ebn%40googlegroups.com.

E994: Not allowed in a popup window

Hi,

If I use vifm in a vim terminal window and I use <C-w>w to switch to preview window to scroll the file preview I get this -

E994: Not allowed in a popup window

Does anyone know if there is any way to get this to work ?

thx,
-m

--
--
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/59d90875-82cc-4849-a66b-1f1ce6ab1c87n%40googlegroups.com.

Sunday, January 17, 2021

Re: vim9script: dump file content to list of list question !

Hi,

Ni Va schrieb am 15.01.2021 um 14:38:
>
> I got this kind of classical logfile :
>
> 2021/01/14 07:42:22.588 InformationFoo dbg 
> 2021/01/14 07:42:22.588 InformationBar dbg 
> 2021/01/14 07:42:22.588 Information    Foobar dbg 
> 2021/01/14 07:42:22.588 Information    Barbar dbg 
> ..
> .
>
> and would like to add all lines' informations split by space into dict or array in vim9script.
> ['2021/01/14', '07:42:22.588', 'Information  Foo dbg   ']
>
> trying map(getline(1, '$'), ' v:val->split() ') it returns list<list<string>> but impossible to declare var foo: list<list<string>>
>
> How can I fix it ?

you need to use mapnew() instead of map(), because the item type changes.

getline() returns a list of strings. The supplied expression would replace
every item of type string by an item of type list<string>. In Vim9 script
this is not allowed. Instead you need to use mapnew() which creates a new
list which is then filled with the results of the mapping expression.

Regards,
Jürgen

--
--
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/5faab10b-5dc8-4b39-f5f9-b8f87da6f4ef%40googlemail.com.

Syntax highlighting

Hello. Any plans about improving of syntax highlighting? I've tried treesitter in neovim and it's pretty cool. In other hand vim's regexp solution is not best I suppose.

Thanks

--
--
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/CAP7bFfA7pMGGJ61kNMfr5LN%2Bv%2BA4zHNoCWsHLOKAKi5wu%3DFF%3DQ%40mail.gmail.com.

Friday, January 15, 2021

Re: vim9script: dump file content to list of list question !


------ Original Message ------
From: "Ni Va" <nivaemail@gmail.com>
To: "vim_use" <vim_use@googlegroups.com>
Sent: Friday, 15 Jan, 2021 At 13:38
Subject: vim9script: dump file content to list of list question !

Hi,

I got this kind of classical logfile :

2021/01/14 07:42:22.588 Information Foo dbg
2021/01/14 07:42:22.588 Information Bar dbg
2021/01/14 07:42:22.588 Information Foobar dbg
2021/01/14 07:42:22.588 Information Barbar dbg
..
.

and would like to add all lines' informations split by space into dict or array in vim9script.
['2021/01/14', '07:42:22.588', 'Information Foo dbg ']

trying map(getline(1, '$'), ' v:val->split() ') it returns list<list<string>> but impossible to declare var foo: list<list<string>>

How can I fix it ?

Best Wishes 2021
NiVa

Hi

not quite clear on what you want to achieve. If it's lines like the square bracketed example (rather than internal Vim arrays), then you cd use 4 :%s constructs:

:%s/^/['/
:%s/$/']/
:%s/ /','/
:%s/ /','/

which cd of course be canned in a single command. Note not to use a global instead of the two single replacements.

regards - 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 unsubscribe@googlegroups.com">vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/051f67c9-a061-46a7-9c3b-794b563ea565n%40googlegroups.com.

vim9script: dump file content to list of list question !

Hi,

I got this kind of classical logfile :

2021/01/14 07:42:22.588 Information Foo dbg 
2021/01/14 07:42:22.588 Information Bar dbg 
2021/01/14 07:42:22.588  Information    Foobar dbg 
2021/01/14 07:42:22.588  Information    Barbar dbg 
..
.

and would like to add all lines' informations split by space into dict or array in vim9script.
['2021/01/14', '07:42:22.588', 'Information  Foo dbg   ']

trying map(getline(1, '$'), ' v:val->split() ') it returns list<list<string>> but impossible to declare var foo: list<list<string>>

How can I fix it ?

Best Wishes 2021
NiVa

--
--
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/051f67c9-a061-46a7-9c3b-794b563ea565n%40googlegroups.com.

Fast Dump file content into array or dict

Hi,

I got this kind of classical logfile :

2021/01/14 07:42:22.588 Information  Foo dbg 
2021/01/14 07:42:22.588 Information  Bar dbg 
2021/01/14 07:42:22.588  Information    Foobar dbg 
2021/01/14 07:42:22.588  Information    Barbar dbg 
..
.

and would like to add all lines' informations split by space into dict or array in vim9script.
['2021/01/14', '07:42:22.588', 'Information  Foo dbg   ']


What's the fastest method please ?

Best Wishes 2021
NiVa

--
--
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/5fcc9436-545c-4b37-b265-1d748a3a620en%40googlegroups.com.

Thursday, January 14, 2021

Re: Language Server Protocol (LSP) plugin using Vim9 script

Hi,

Thank you so much!
I will add my old rtags mappings to these functions and try it out soon.

-m

On Monday, January 4, 2021 at 12:09:17 AM UTC-5 Yegappan wrote:
Hi all,

I have created a language server protocol (LSP) client plugin using
the Vim9 script features. It is available at:


You need the latest Vim to use this plugin. Note that this is still a
work in progress. Any comments, suggestions, bug reports and
PRs are welcome.

Thanks,
Yegappan

--
--
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/05151921-3ce6-4d25-9c34-2c5455c9bb38n%40googlegroups.com.

Re: vim terminal - cannot generate C-Space (C-@)

Den tors 14 jan. 2021 09:06Tony Mechelynck <antoine.mechelynck@gmail.com> skrev:

> There are keystrokes which are difficult to get on some keyboard
> layouts or on some terminals. A workaround is to define a mapping with
> the desired keystroke as {rhs} and something which you know how to
> type, but don't need in Vim, as {lhs}.

Since I have cerebral palsy it is difficult for me to press more than one key at the same time, especially with the same hand, so I have remapped most commands which involve pressing two keys simultaneously to sequences starting with an F-key which I can press one after another. This was before I discovered sticky keys, but I still prefer my remappings to sticky keys. In fact this was the reason I started to use Vim in the first place, although it is not the main reason I stay with Vim and do almost everything in Vim. :-) I also use other applications with a Vi(m)-like interface like Zathura, or plugins which allow the use of Vi(m) style key sequences in things like web browsers and mail clients. I also use several key maps so that I easily can type "special" characters and other scripts — including a hack so that I quickly can switch keymaps just by pressing a sequence of two keys.[^1] I use a mouse too — actually a trackball attached to my laptop — but precision pointing, and GUIs in general, just isn't my thing!

[^1]: <https://git.io/JtJI3> I haven't kept the keymaps in that repo up to date with what's on my local machine but those autoload functions for switching keymaps and defining mappings to do it are the same. Basically I type something like <F11>g to switch to a keymap for Ancient Greek, then I type <F11><F11> to disable it *or* switch to the previously used keymap if a keymap was active when I switched to Greek, then I can type <F11><F11> again to switch back to Greek, e.g. <F11>x to switch to a mapping between modified X-SAMPA <https://w.wiki/uKk> and Unicode IPA, or <F11>0 (zero) to switch to no keymap at all, all without leaving insert mode. This is achieved with two per-buffer variables which store the previous and the current value of the 'keymap' option, with the empty string being a possible value meaning that no keymap is active. There also is a helper function so that I can define multiple mappings with a common prefix trough a Dictionary in my .vimrc.

--
--
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/CADAJKhDBoEwddcAZDDK65Z6uq_BzT480mQgrzp9YvbWqoJ6VkA%40mail.gmail.com.

Re: vim terminal - cannot generate C-Space (C-@)

On Wed, Jan 13, 2021 at 6:17 PM mckel...@gmail.com
<mckelly2833@gmail.com> wrote:
>
> Hi again,
>
> Just fyi, I think adding this helps -
>
> tnoremap <C-@> <C-Space>
>
> Not sure why, and will keep trying different things.
>
> take care,
> -m
>
> On Monday, December 21, 2020 at 4:10:40 PM UTC-5 mckel...@gmail.com wrote:
>>
>> Hi,
>>
>> Just more info, I am using version 8.2.2184, on Ubuntu 18.04
>>
>> thx,
>> -m
>> On Monday, December 21, 2020 at 11:46:46 AM UTC-5 mckel...@gmail.com wrote:
>>>
>>> Hi,
>>>
>>> Thank you for awesome vim!
>>>
>>> In a vim terminal I cannot seem to get a C-@ key.
>>> This works fine in vim itself and at a normal shell prompt, but not inside a vim terminal.
>>> Is this supported ? Is there something I need to add (tmap etc.) ?
>>>
>>> thanks for any/all help,
>>> -m
>>>

There are keystrokes which are difficult to get on some keyboard
layouts or on some terminals. A workaround is to define a mapping with
the desired keystroke as {rhs} and something which you know how to
type, but don't need in Vim, as {lhs}. Here is an example:

When I started using Vim, I couldn't find how to get Ctrl-] on my
AZERTY keyboard. Now that's an extremely useful keystroke in Vim: in
Normal mode it finds tags (and when in the help, it follows hotlinks),
and in Insert mode it triggers an abbreviation (if there is one) for
whatever has just been typed without inserting an additional
character. Finally I added the following to my vimrc:

if exists(':map') == 2
map <F9> <C-]>
map! <F9> <C-]>
endif

Now I can follow help links with just F9 (in +eval buids because of
the :if wrapper; in any +mouse builds I can also use a double-click,
and all builds are compiled with +mouse nowadays). Years later, I
found how to get Ctrl-] on my keyboard: it's Ctrl-AltGr-$ where $ is
the key at the end of the top alphabet row, two keys to the right of
the P in AZERTYUIOP. Now that's a fairly complicated (three-finger)
keystroke combination, so I keep using F9 (and sometimes a double
click).

Maybe you can easily get Ctrl-] on your keyboard; but similar mappings
can be used for any difficult-to-reach keystrokes, keystrokes not
available on your keyboard layout in one or more of Vim's modes, or
even just keystrokes for which an alternative is desired.

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/CAJkCKXt2z36YMchcT4_K4%2Br4hPkfG51%2BVTaxMyQozDC3BmnPdw%40mail.gmail.com.

Wednesday, January 13, 2021

Re: fault in * in perl files (.pl)

------ Original Message ------
From: "'Paul' via vim_use" <vim_use@googlegroups.com>
To: vim_use@googlegroups.com
Sent: Wednesday, 13 Jan, 2021 At 21:40
Subject: Re: fault in * in perl files (.pl)

On Tue, Jan 12, 2021 at 03:24:52PM +0000, 'c.willis111@btinternet.com' via vim_use wrote:
in .pl files vim includes colon (:) in the identifier character set. This is sort of reasonable, as perl identifiers include those of the form /\w+::\w+/ .

Unfortunately this prevents search finding the next relevant entry in (where the search is started with a * on intl1.):

$intl1 = $intobl + 1 ; # new 12 Jan 2021
s/(\d+)/$1==4?$intl1:$row/eg ; # revised 12 Jan 2021
Can this be changed to only accept double colons as part of an identifier in a * search?

No. The subject you're looking for is :help 'iskeyword', and see 'isfname' for its format. It's a list of single characters that consist a keyword, there's no "but not a double character" option, unfortunately.

Hi Paul

thanks for that. I've added an au FileType perl set iskeyword-=: to my .vimrc. I can live with adjusting the / if I need fully qualified identifiers. (Probably very rarely). The possibility of missing a real match is a real problem.

regards - 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210113214044.GA24530%40rainslide.net.