Wednesday, January 13, 2021

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.

--
--
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.

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

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

--
--
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/ea8b7914-ac3a-41bd-aea7-d22122fd60a8n%40googlegroups.com.

Tuesday, January 12, 2021

fault in * in perl files (.pl)

Hi


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?


regards - Chris

Saturday, January 9, 2021

Re: Bug somewhere in :put/map/range/lambda functions?

On 2021-01-09 11:39, Yegappan Lakshmanan wrote:
> The lambda function is called with two arguments (the index of the
> current item in the list and the value of the item).
>
> :put=map(range(1, 10), {i, v -> v})

Ah, that makes sense. I missed that part in the docs:

If {expr2} is a |Funcref| it is called with two arguments:
1. The key or the index of the current item.
2. the value of the current item.

and now I know. Thanks!

-tim



--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210109135644.0daef11a%40bigbox.attlocal.net.

Re: Bug somewhere in :put/map/range/lambda functions?

Hi, Tim,

On Sat, Jan 9, 2021 at 11:27 AM Tim Chase <vim@tim.thechases.com> wrote:
Tried this:

  :put=range(1,10)

and it worked as expected, appending the numbers 1..10 to my file.
Same with:

  :put=map(range(1,10), 'v:val')

which worked as expected.  However using a no-op lambda function:

  :put=map(range(1,10), {v -> v})

somehow gets the numbers 0..9 in the file instead of 1..10

The lambda function is called with two arguments (the index of the current
item in the list and the value of the item). In your example, you are using
the index of the list item instead of the value. You can try using one of
the following:

     :put=map(range(1, 10), {i, v -> v})
or
     :put=map(range(1, 10), {-> v:val})
 
Regards,
Yegappan


This reduced it to the simplest case for demonstration.  I stumbled
across it attempting FizzBuzz in a one-liner:

:put=map(range(1, 100), {v -> v % 15 ? v % 5 ? v % 3 ? v : 'Fizz' :
'Buzz' : 'FizzBuzz'})

confused why it kept putting 0/FizzBuzz as the first row.

This is 8.2.1558 on FreeBSD in case it matters:

  :ver
  VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct  4 2020 13:32:14)
  Included patches: 1-1558

I'm not sure where I'd start trying to troubleshoot this, but thought
I'd at least mention the oddity here.

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAAW7x7kq5-F0H8L%3DVriUoq%2Bn7oTQmaAoPDiAFffE-V_hxuc-%3DA%40mail.gmail.com.

Bug somewhere in :put/map/range/lambda functions?

Tried this:

:put=range(1,10)

and it worked as expected, appending the numbers 1..10 to my file.
Same with:

:put=map(range(1,10), 'v:val')

which worked as expected. However using a no-op lambda function:

:put=map(range(1,10), {v -> v})

somehow gets the numbers 0..9 in the file instead of 1..10

This reduced it to the simplest case for demonstration. I stumbled
across it attempting FizzBuzz in a one-liner:

:put=map(range(1, 100), {v -> v % 15 ? v % 5 ? v % 3 ? v : 'Fizz' :
'Buzz' : 'FizzBuzz'})

confused why it kept putting 0/FizzBuzz as the first row.

This is 8.2.1558 on FreeBSD in case it matters:

:ver
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 4 2020 13:32:14)
Included patches: 1-1558

I'm not sure where I'd start trying to troubleshoot this, but thought
I'd at least mention the oddity here.

-tim




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210109132658.30fe94fa%40bigbox.attlocal.net.

Friday, January 8, 2021

Re: do plugins affect performance?

My setup has over 150 plugins. Without a doubt, there are plenty I don't use and should probably go clean up. However, as I have a noticed a drop in any speed, I haven't bothered.

--

Salman

On Fri, Jan 8, 2021, 15:30 meine <trialero@gmx.com> wrote:
> Does anyone know if installed plugins affect the speed of Vim when they
> are not used?

Many Thanks for all your replies!

Wether Vim takes more memory and/or will react slower with plugins
active, I will have to find out, e.g. by monitoring htop and just
trying.

I'm not a very extensive plugin user and my box is relatively fast. It
was foremost a theoretical question, but further (and starting to use
more plugins) it could get an issue.

KR

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

--
--
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/CANuxnEfR6KPrmwhj%3D_E7v2u9pF34ziPvHL2gTTFOyJt3rTcM0Q%40mail.gmail.com.