Sunday, February 28, 2021

Re: Vim9: call function from variadic function?

: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<any>): 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<any>): void
> F(XXXX)
> enddef
>
> G2(F, 'xyz', 42)
>
> The problem is: what can I put in place of XXXX? 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+unsubscribe@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.

Vim9: call function from variadic function?

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<any>): 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<any>): void
F(XXXX)
enddef

G2(F, 'xyz', 42)

The problem is: what can I put in place of XXXX? 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/s1g8fh%24frf%241%40ciao.gmane.io.

Friday, February 26, 2021

Re: How to delete from the current cursor position to a particular character on the same line?

Your {foo} to {bar} example has a more-efficient solution:

ci{

"Change inside curly-braces."

Works for quotation marks and brackets, too:

ci" or ci' or ci[ or ci<

You can be on either of the grouping characters or anywhere inside them.

Also, your ct= can be replaced with ce ("Change to end") using default delimiter chars.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, February 26, 2021 11:04 AM, Eli the Bearded <vim@eli.users.panix.com> wrote:

> On Fri, 26 Feb 2021, Joseph Wulf joseph.c.wulf@gmail.com wrote:
>
> > I've a common problem that I've never been able to find a solution for.
>
> ...
>
> > With my cursor at "B" how can I delete from the current cursor position
> > (col 18) to the first double-quote mark (") efficiently?
>
> Delete up to a quote mark later in the line:
> dt"
>
> Delete up to the third quote mark later in the line:
> d3t"
>
> Delete up to a quote mark earlier in the line:
> dT"
>
> Delete up to and including a quote mark:
> df"
>
> Delete up to and including a quote mark earlier in the line:
> dF"
>
> Delete up to and including the second quote mark earlier in the line:
> d2F"
>
> Delete forward using a repeat of last to or including search:
> d,
>
> Delete backward using a repeat of last to or including search:
> d;
>
> Delete to column 40 (either forward or backward):
> d40|
>
> I'm a frequent user of the f/F/t/T motions. Often one or the other is
> the better choice to use due to frequency of characters used and
> context.
>
> In shell scripting, say, I may want to change {foo} to {bar} and
> sometimes it will be in single quotes and sometimes double quotes, so
> I'll use c2fo with the cursor on the {f} and then the . command works
> properly.
>
> Other times I'm changing a bunch of variable names all terminated at
> the = to new different names, so I'll use ct= first and c; later.
>
> Elijah

--
--
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/vqbi0gtckAjhhZfWpIVNli7_RBE0SyDe22HEb7SsOdOcG3uZHcdrPNFR_J80ox_c9ngOTBCLVNdLa6UkRzn0Nra3BL_Q_uEUQJkP8zn_c2M%3D%40protonmail.com.

Re: How to delete from the current cursor position to a particular character on the same line?

On Fri, 26 Feb 2021, Joseph Wulf <joseph.c.wulf@gmail.com> wrote:
> I've a common problem that I've never been able to find a solution for.
...
> With my cursor at "B" how can I delete from the current cursor position
> (col 18) to the first double-quote mark (") efficiently?

Delete up to a quote mark later in the line:
dt"

Delete up to the third quote mark later in the line:
d3t"

Delete up to a quote mark earlier in the line:
dT"

Delete up to and including a quote mark:
df"

Delete up to and including a quote mark earlier in the line:
dF"

Delete up to and including the second quote mark earlier in the line:
d2F"

Delete forward using a repeat of last to or including search:
d,

Delete backward using a repeat of last to or including search:
d;

Delete to column 40 (either forward or backward):
d40|

I'm a frequent user of the f/F/t/T motions. Often one or the other is
the better choice to use due to frequency of characters used and
context.

In shell scripting, say, I may want to change {foo} to {bar} and
sometimes it will be in single quotes and sometimes double quotes, so
I'll use c2fo with the cursor on the {f} and then the . command works
properly.

Other times I'm changing a bunch of variable names all terminated at
the = to new different names, so I'll use ct= first and c; later.

Elijah

--
--
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/4DnJwm6Pb7zfYm%40panix5.panix.com.

Re: How to delete from the current cursor position to a particular character on the same line?

That surely does it.  Thank you both, very much.

On Friday, February 26, 2021 at 11:30:53 AM UTC-5 sgovin...@yahoo.com wrote:
On 2/26/2021 7:35 AM, Joseph Wulf wrote:
> I've a common problem that I've never been able to find a solution for.
> ...
> ... how can I delete from the current cursor position ... to the first
> double-quote mark (") efficiently?

In normal mode, consider "deleting with motion": dt" or df"

--Suresh



--
--
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/9f334b4b-ed7d-4319-bd0f-c5b130cfc52cn%40googlegroups.com.

Re: How to delete from the current cursor position to a particular character on the same line?

On 2/26/2021 7:35 AM, Joseph Wulf wrote:
> I've a common problem that I've never been able to find a solution for.
> ...
> ... how can I delete from the current cursor position ... to the first
> double-quote mark (") efficiently?

In normal mode, consider "deleting with motion": dt" or df"

--Suresh



--
--
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/76958eb7-7a89-96dc-fab3-54d6174cad3c%40yahoo.com.

Re: How to delete from the current cursor position to a particular character on the same line?

Moving to the next " is f" and the f motion is |inclusive| so df" should do it.

See ":help f" (without the quotes).

Best regards,
Tony.

On Fri, Feb 26, 2021 at 5:00 PM Joseph Wulf <joseph.c.wulf@gmail.com> wrote:
>
> I've a common problem that I've never been able to find a solution for.
>
> With a sample script line like the following:
> printf "A(%14s), B(%s), C(%14s), D(%14s), E(%14s), F(%3s), G(%-24s), H(%4s), I(%14s), J(%s),", "${x01}","${x02}","${x03}","${x04}","${x05}","${x06}","${x07}","${x08}","${x09}","${x10}"
>
> With my cursor at "B" how can I delete from the current cursor position (col 18) to the first double-quote mark (") efficiently?
>
> Thank you.
>
> --
> --
> 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/c8220bfd-cad2-4365-8c74-5826488d110dn%40googlegroups.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/CAJkCKXsS90Tc_4h%3DdjSs%3Dngmy7y3hb7ZRjyxn8GaTQLEyB8NeA%40mail.gmail.com.

How to delete from the current cursor position to a particular character on the same line?

I've a common problem that I've never been able to find a solution for.

With a sample script line like the following:
 printf "A(%14s), B(%s), C(%14s), D(%14s), E(%14s), F(%3s), G(%-24s), H(%4s), I(%14s), J(%s),", "${x01}","${x02}","${x03}","${x04}","${x05}","${x06}","${x07}","${x08}","${x09}","${x10}"

With my cursor at "B" how can I delete from the current cursor position (col 18) to the first double-quote mark (") efficiently?

Thank you.

--
--
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/c8220bfd-cad2-4365-8c74-5826488d110dn%40googlegroups.com.

Wednesday, February 24, 2021

Re: mapping :W to :w...

>>On 02/23 11:11, Salman Halim wrote:
>> I actually prefer to never hit shift, so map ; to : instead.
>>
>On 2021-02-24, tuxic@posteo.de <tuxic@posteo.de> wrote:
> Hi Salman,
>
> oh! :)
>
> The first is genious

Keep in mind that ; is a useful mapping in Vim. Sure, you can remap it
to :, but, in my experience, in the long term it is better not to change
Vim's default mappings (this is a matter of personal taste, of course),
except when their functionality is replicated by other mappings (as in
the next paragraph).


--
--
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/s15nab%24ph5%241%40ciao.gmane.io.

Re: mapping :W to :w...

On 02/24 08:59, arocker@Vex.Net wrote:
>
> > the distinctive feeling of flat-hand-against-my-fronthead... ;)
> >
>
> Aka (Also known as:) a face-palm. :-)*

Ok :) another face-palm (this time correctly spoke...I am no native
speaker...sorry...

But...how can I ensure, that I am talking about my face and
someone else face...?


>
> --
> --
> 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/03b0da16fc3d8e12971a9d203ee0b12d.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/20210224141114.2bdpvgl7fnobzesk%40solfire.

Re: mapping :W to :w...

> the distinctive feeling of flat-hand-against-my-fronthead... ;)
>

Aka (Also known as:) a face-palm. :-)*

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

Re: mapping :W to :w...

"I use <f2> in much the same way and just call :update. I also save automatically when the Vim window loses focus."

Tell me more about this.
On Wednesday, February 24, 2021 at 2:54:17 AM UTC-5 Salman Halim wrote:
I use <f2> in much the same way and just call :update. I also save automatically when the Vim window loses focus. 

--

Salman

On Wed, 24 Feb 2021, 02:33 Tony Mechelynck, <antoine.m...@gmail.com> wrote:
P.S. My solution to a similar problem was a little different:

        map <F3> :wa|wv<CR>
        map! <F3> <C-O>:wa|wv<CR>

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+u...@googlegroups.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/952f24b6-e2f9-47c3-a651-b05683f054c4n%40googlegroups.com.

Online Parental Controls guide for rebbemalachi.blogspot.com's users

Hi There  

 

The digital world has unfortunately become a parent’s worst nightmare. It is important for every parent to educate themselves about the many threats of social media and online available material our children are exposed to on a daily basis.

 

I’d like to share a guide with you and your readers that was written for parents with little or no technical knowledge to help parents combat these threats and keep their children “Internet Safe”.

 

The guide is titled “The Complete Guide to Online Parental Controls” 

 

And can be found here: https://www.wizcase.com/blog/guide-to-parental-controls/


I hope you will find value in sharing it on your site, maybe on this page here: http://rebbemalachi.blogspot.com/2020/02/ 

 

Best,
Robert





Tuesday, February 23, 2021

Re: mapping :W to :w...

I use <f2> in much the same way and just call :update. I also save automatically when the Vim window loses focus. 

--

Salman

On Wed, 24 Feb 2021, 02:33 Tony Mechelynck, <antoine.mechelynck@gmail.com> wrote:
P.S. My solution to a similar problem was a little different:

        map <F3> :wa|wv<CR>
        map! <F3> <C-O>:wa|wv<CR>

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/CAJkCKXvXKsyjh5z_8%3D1AYja9fF0NvceHbiBkLBnghs9Ai848Ug%40mail.gmail.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/CANuxnEdbq6Qqm5jt%2BA%3DqvUbOK8ZuJwMC8%2B%3D7cdXsMS7TXhttFA%40mail.gmail.com.

Re: mapping :W to :w...

P.S. My solution to a similar problem was a little different:

map <F3> :wa|wv<CR>
map! <F3> <C-O>:wa|wv<CR>

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

Re: mapping :W to :w...

On Wed, Feb 24, 2021 at 5:06 AM <tuxic@posteo.de> wrote:
>
> Hi,
>
> if my PC is heavily compiling things and I am editing and saving
> things repeatedly if often hit :W instead of :w (that is, I am
> still pressing SHIFT when hitting w.
>
> So I tried to map :W to :w...but it does not work for me.
>
> I tried
>
> [n]map W w
> and
> [n]map :W :w
>
> .
>
> Is there any way to map the accidentally hit :W
> command to :w somehow?
>
> Cheers!
> mcc

Like Salman said, you could define a user-comand W executing just w ;
but the reason your nmap didn't work is that by the time you'tr typing
the W, you aren't in Normal mode anymore, but in Command-line mode;
OTOH you don't want any W in the middle of a command's parameters to
always lowercased; so another possibility is a command-mode
abbreviation, as follows:

:cabbrev <expr> W ((getcmdtype() == ':' && getcmdpos() <= 4)? 'w' : 'W')

Testing getcmdtype() avoids lowercasing the W in a search command, and
testing getcmdpos() allows doing it only near the left margin. A
user-command is more elegant however; but in order to make it behave
like the w command you may want to define that :W command with the
appropriate parameters, as follows (untested):

:command -nargs=* -complete=file -range=% -bang -bar W
<line1>,<line2>w<bang> <args>

which, after all, makes it somewhat less elegant; so you may choose a
command or an abbrev to suit youor taste.

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

Re: mapping :W to :w...

Hi Salman,

oh! :)

The first is genious and while reading the second one I had
the distinctive feeling of flat-hand-against-my-fronthead... ;)
Of course!

Thank you very much! That helps me a lot!

Cheers!
mcc


On 02/23 11:11, Salman Halim wrote:
> I actually prefer to never hit shift, so map ; to : instead.
>
> You could simply define a command called W to do what you want:
>
> command! W w
>
> --
>
> Salman
>
> On Tue, 23 Feb 2021, 23:06 , <tuxic@posteo.de> wrote:
>
> > Hi,
> >
> > if my PC is heavily compiling things and I am editing and saving
> > things repeatedly if often hit :W instead of :w (that is, I am
> > still pressing SHIFT when hitting w.
> >
> > So I tried to map :W to :w...but it does not work for me.
> >
> > I tried
> >
> > [n]map W w
> > and
> > [n]map :W :w
> >
> > .
> >
> > Is there any way to map the accidentally hit :W
> > command to :w somehow?
> >
> > Cheers!
> > mcc
> >
> > --
> > --
> > 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/20210224040623.p4fmrhjxbiyf5e5n%40solfire
> > .
> >
>
> --
> --
> 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/CANuxnEcDbZWngA-58DHuvdG_fesuz5%3DCxUh_LBmOqFTzx7YTTA%40mail.gmail.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/20210224043343.y734qf2kskrdfjtm%40solfire.

Re: mapping :W to :w...

I actually prefer to never hit shift, so map ; to : instead. 

You could simply define a command called W to do what you want:

command! W w

--

Salman

On Tue, 23 Feb 2021, 23:06 , <tuxic@posteo.de> wrote:
Hi,

if my PC is heavily compiling things and I am editing and saving
things repeatedly if often hit :W instead of :w (that is, I am
still pressing SHIFT when hitting w.

So I tried to map :W to :w...but it does not work for me.

I tried

[n]map W w
and
[n]map :W :w

.

Is there any way to map the accidentally hit :W
command to :w somehow?

Cheers!
mcc

--
--
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/20210224040623.p4fmrhjxbiyf5e5n%40solfire.

--
--
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/CANuxnEcDbZWngA-58DHuvdG_fesuz5%3DCxUh_LBmOqFTzx7YTTA%40mail.gmail.com.

mapping :W to :w...

Hi,

if my PC is heavily compiling things and I am editing and saving
things repeatedly if often hit :W instead of :w (that is, I am
still pressing SHIFT when hitting w.

So I tried to map :W to :w...but it does not work for me.

I tried

[n]map W w
and
[n]map :W :w

.

Is there any way to map the accidentally hit :W
command to :w somehow?

Cheers!
mcc

--
--
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/20210224040623.p4fmrhjxbiyf5e5n%40solfire.

Sunday, February 21, 2021

Re: Less verbose way of listing files to recover?

On Fri, 19 Feb 2021 at 18:11, Ottavio Caruso
<ottavio2006-usenet2012@yahoo.com> wrote:
> $ nvi -r
> vi: no files to recover.
>
> $ vim -r
> Swap files found:
> In directory ~/.vim/tmp:
> -- none --
>
>
> Is there a way to make vim behave like nvi, that is, give a less verbose
> message natively, without, e.g., using a shell script?


I know it's rude but... bump! Anyone?


--
Ottavio Caruso

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

Saturday, February 20, 2021

Re: Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables

On 17Feb2021 22:45, vim_use <vim_use@googlegroups.com> wrote:
>I would try running the following as an ex command:
>:echo $HOME
>It might be that Vim does not see a HOME environment variable on
>Windows.
>Hi
>it seems the equivalent Windows environment variable is HOMEPATH

You could see if you can use ~/ instead of $HOME/ - if accepted that
might work in both UNIX and Windows. (Untested suggestion.)

Cheers,
Cameron Simpson <cs@cskk.id.au>

--
--
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/YDHjziE6QTdVUKAX%40cskk.homeip.net.

Re: syntax highlighting legend

On 2021-02-15, Matthew Pritchard <blackzen1101@gmail.com> wrote:
> Hello I am wondering what is the color code for the different colors vim
> displays. I am also assuming that these colors can be customized. How do I
> do this?

I'd recommend to start with:

:help coloring

In particular, some conventional names are listed under

:help group-name

The command to change colors is :highlight, so if you just want to
customize some colors of your current color scheme, that should be
enough.

If you want to develop your own color scheme instead, I'd follow the
other suggestion to look at existing color schemes and start tweaking.
This reading may also be useful:

:edit $VIMRUNTIME/colors/Readme.txt

There is a plugin called Colortemplate (developed by myself), which aims
at making the task of building color schemes easier. But it doesn't hurt
to know how things work in Vim first.

Hope this help.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/s0rgnr%244aa%242%40ciao.gmane.io.

Re: syntax highlighting legend

On Mon, Feb 15, 2021 at 03:13:52PM -0800, Matthew Pritchard wrote:
> Hello I am wondering what is the color code for the different colors vim
> displays. I am also assuming that these colors can be customized. How do I
> do this?

you can open a colorscheme in vim and see how colors are defined. then
build your own, or change some at your need.

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

Friday, February 19, 2021

Re: Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables

Happy to know you found what caused your problem. Have fun with Vim, and don't forget to upgrade to some not-too-old version of Vim 8.2, because Vim 8.0 is _still_ out of date.

Best regards,
Tony.

On Fri, Feb 19, 2021 at 4:36 PM tom <freeislandguy@gmail.com> wrote:
Tony you are correct. When I set this

Then my old vimrc started working again.

I had had this variable set for years. its also set in my bashrc. When I installed Vim 7.22 some years ago I wrote a wrapper batch file to run vim inside a bash shell. Then I change the association for text and code files to run the script instead of gvim directly. This would insure vim would see the same variables I have in any bash shell I run. When Installed the upgrade to vim this set up was blown away, and I had forgotten what I had done. Its been two years,

Thanks

On Wed, Feb 17, 2021 at 5:42 PM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
On Tue, Feb 16, 2021 at 8:03 AM tom <freeislandguy@gmail.com> wrote:
>
> I was working in vim and tried to sort something. The sort didn't work as I expected.
>
> I thought I would upgrade to version 8.0 in the hopes that would fix it. The upgrade gave me a new problem.

Upgrade "to" Vim 8.0? That's rather behind the times. The latest Vim
as of this writing is version 8.2.2529. It is not at all impossible
that one of the patches between version 8.0.0 and version 8.2.2529
fixes your problem.

>
> in my vimrc there was the line
>
> set backupdir=$HOME/vim/backup
>
> This no longer works and yields the dreaded "E303: Unable to open swap file"
>
> I fixed it this way
>
> set backupdir=c:\\Users\\myuser\\Documents\\home\\vim\\backup,c:\\TMP

This way, at least, there is a fallback if
C:/Users/myuser/Documents/home/vim/backup is for some reason not
writable; but anyway it is a strange (but IIUC allowable) value. I
never had problems with the default value, which puts the backup file
in the same directory as the original if possible (and usually it is),
which avoids name clashes if you happen to edit files with the same
name in different directories.

On Windows, if Vim finds the HOME environment unset at startup ($HOME
in Vim and Unix terminology, %HOME% in DOS/Windows terminology), that
variable will be set for the duration of the Vim process to the
expansion of $HOMEDRIVE$HOMEPATH if $HOMEDRIVE is defined, or of
$USERPROFILE otherwise, see ":help $HOME-windows".
>
>
>
> Regards Tom Bodine

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/CAJkCKXvSVcbU4utwk-qTHAdE0MW7TvcdPOnvx_AhMnQD%3DPtDsw%40mail.gmail.com.

Less verbose way of listing files to recover?

[Not sure if you have received this message already. Apologies if it
is a duplicate]


Hi,


$ nvi -r
vi: no files to recover.

$ vim -r
Swap files found:
In directory ~/.vim/tmp:
-- none --


Is there a way to make vim behave like nvi, that is, give a less verbose
message natively, without, e.g., using a shell script?

Thanks.

--
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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

Re: Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables

Tony you are correct. When I set this

Then my old vimrc started working again.

I had had this variable set for years. its also set in my bashrc. When I installed Vim 7.22 some years ago I wrote a wrapper batch file to run vim inside a bash shell. Then I change the association for text and code files to run the script instead of gvim directly. This would insure vim would see the same variables I have in any bash shell I run. When Installed the upgrade to vim this set up was blown away, and I had forgotten what I had done. Its been two years,

Thanks

On Wed, Feb 17, 2021 at 5:42 PM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
On Tue, Feb 16, 2021 at 8:03 AM tom <freeislandguy@gmail.com> wrote:
>
> I was working in vim and tried to sort something. The sort didn't work as I expected.
>
> I thought I would upgrade to version 8.0 in the hopes that would fix it. The upgrade gave me a new problem.

Upgrade "to" Vim 8.0? That's rather behind the times. The latest Vim
as of this writing is version 8.2.2529. It is not at all impossible
that one of the patches between version 8.0.0 and version 8.2.2529
fixes your problem.

>
> in my vimrc there was the line
>
> set backupdir=$HOME/vim/backup
>
> This no longer works and yields the dreaded "E303: Unable to open swap file"
>
> I fixed it this way
>
> set backupdir=c:\\Users\\myuser\\Documents\\home\\vim\\backup,c:\\TMP

This way, at least, there is a fallback if
C:/Users/myuser/Documents/home/vim/backup is for some reason not
writable; but anyway it is a strange (but IIUC allowable) value. I
never had problems with the default value, which puts the backup file
in the same directory as the original if possible (and usually it is),
which avoids name clashes if you happen to edit files with the same
name in different directories.

On Windows, if Vim finds the HOME environment unset at startup ($HOME
in Vim and Unix terminology, %HOME% in DOS/Windows terminology), that
variable will be set for the duration of the Vim process to the
expansion of $HOMEDRIVE$HOMEPATH if $HOMEDRIVE is defined, or of
$USERPROFILE otherwise, see ":help $HOME-windows".
>
>
>
> Regards Tom Bodine

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/CAAkesH%3D8t0ESwjhDpWKin6jfGmcM2Cd-axv_ej76HUrFfg%3D7EQ%40mail.gmail.com.

Thursday, February 18, 2021

Affixes in spellfile

When I'm adding proper names to my spell file I would like to add a suffix (i.e genitive)

I've tried putting 'Smith/J' and similar, but can't seem to get it working. Are affixes supported in the additional spell file?

best regards
Hans 

--
--
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/ef90fb3e-619e-466b-bd76-354b2227741bn%40googlegroups.com.

Wednesday, February 17, 2021

Re: Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables

On Tue, Feb 16, 2021 at 8:03 AM tom <freeislandguy@gmail.com> wrote:
>
> I was working in vim and tried to sort something. The sort didn't work as I expected.
>
> I thought I would upgrade to version 8.0 in the hopes that would fix it. The upgrade gave me a new problem.

Upgrade "to" Vim 8.0? That's rather behind the times. The latest Vim
as of this writing is version 8.2.2529. It is not at all impossible
that one of the patches between version 8.0.0 and version 8.2.2529
fixes your problem.

>
> in my vimrc there was the line
>
> set backupdir=$HOME/vim/backup
>
> This no longer works and yields the dreaded "E303: Unable to open swap file"
>
> I fixed it this way
>
> set backupdir=c:\\Users\\myuser\\Documents\\home\\vim\\backup,c:\\TMP

This way, at least, there is a fallback if
C:/Users/myuser/Documents/home/vim/backup is for some reason not
writable; but anyway it is a strange (but IIUC allowable) value. I
never had problems with the default value, which puts the backup file
in the same directory as the original if possible (and usually it is),
which avoids name clashes if you happen to edit files with the same
name in different directories.

On Windows, if Vim finds the HOME environment unset at startup ($HOME
in Vim and Unix terminology, %HOME% in DOS/Windows terminology), that
variable will be set for the duration of the Vim process to the
expansion of $HOMEDRIVE$HOMEPATH if $HOMEDRIVE is defined, or of
$USERPROFILE otherwise, see ":help $HOME-windows".
>
>
>
> Regards Tom Bodine

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

Re: Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables


------ Original Message ------
From: johanns@nacs.net
To: vim_use@googlegroups.com
Cc: vim@vim.org
Sent: Wednesday, 17 Feb, 2021 At 18:00
Subject: Re: Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables

On Mon, Feb 15, 2021 at 09:47:09AM -0600, tom wrote:
I was working in vim and tried to sort something. The sort didn't work as I
expected.

I thought I would upgrade to version 8.0 in the hopes that would fix it.
The upgrade gave me a new problem.

in my vimrc there was the line

set backupdir=$HOME/vim/backup

This no longer works and yields the dreaded "E303: Unable to open swap file"

I fixed it this way

set backupdir=c:\\Users\\myuser\\Documents\\home\\vim\\backup,c:\\TMP

I would try running the following as an ex command:

:echo $HOME

It might be that Vim does not see a HOME environment variable on Windows.
Hi

it seems the equivalent Windows environment variable is HOMEPATH

Chris Willis
--
--
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/20210217180002.GD14859%40linux.site.

Re: Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables

On Mon, Feb 15, 2021 at 09:47:09AM -0600, tom wrote:
>I was working in vim and tried to sort something. The sort didn't work as I
>expected.
>
>I thought I would upgrade to version 8.0 in the hopes that would fix it.
>The upgrade gave me a new problem.
>
>in my vimrc there was the line
>
>set backupdir=$HOME/vim/backup
>
>This no longer works and yields the dreaded "E303: Unable to open swap file"
>
>I fixed it this way
>
>set backupdir=c:\\Users\\myuser\\Documents\\home\\vim\\backup,c:\\TMP

I would try running the following as an ex command:

:echo $HOME

It might be that Vim does not see a HOME environment
variable on Windows.

--
--
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/20210217180002.GD14859%40linux.site.

Re: Stop notification from :wn

On Fri, Feb 12, 2021 at 10:40:15AM -0800, 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
>
>Obviously this requires a <CR> to advance to the next file. Is there a way
>to suppress this notice and simply move to the next file? I can write a
>little macro:
>
>:w^V^M:n^V^M
>
>that does the trick, but this is a pain given that ":wn" already exists.
>Suggestions?

Another option setting to consider is 'shortmess' which
can shorten message text and affect how messages are
displayed.

--
--
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/20210217162935.GC14859%40linux.site.

Monday, February 15, 2021

Re: syntax highlighting legend

On 02/15 03:13, Matthew Pritchard wrote:
> Hello I am wondering what is the color code for the different colors vim
> displays. I am also assuming that these colors can be customized. How do I
> do this?
>
> --
> --
> 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/9503a1c6-6c0a-4a9f-8d32-3ee252b6a223n%40googlegroups.com.


Hi,

in vim try

ESC : h colors

Cheers!
mcc

--
--
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/20210216070512.u2aade5ivjkwr75z%40solfire.

syntax highlighting legend

Hello I am wondering what is the color code for the different colors vim displays. I am also assuming that these colors can be customized. How do I do this?

--
--
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/9503a1c6-6c0a-4a9f-8d32-3ee252b6a223n%40googlegroups.com.

Re: Debugging my config: filetype is set wrongly...

On 02/15 09:39, Gary Johnson wrote:
> On 2021-02-15, tuxic wrote:
> > Hi,
> >
> > is there any way to pinpoint the line, which is "guilty" for
> > setting a wrong filetyoe somehow?
> >
> > Background:
> > Currently I am editing troff files a lot. The extension of that files
> > are *.mm. *.me, *.tmac, *.ms and so on...depending on what troff macro
> > package will be used.
> >
> > Everything works fine...except for the *.mm files. In case of reading
> > such a file, the filetyoe is set to "xml"...which is slightly wrong.
> > :)
> >
> > By using an empty .vimrc I know, that the problem is somewhere inside
> > my original .vimrc.
> > Grepping for the usual suspect doesn't show anything obvious, though.
> >
> > Is there any way to pinpoint the code in my vimrc, which triggers the
> > problem...?
>
> The usual way to find where an option or setting has been made is to
> use :verbose, like this:
>
> :verbose set filetype?
>
> Don't forget the question mark at the end.
>
> 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/20210215173921.GA24530%40phoenix.
>


Hi Gary,

***YOU SAVED MY DAY!***

Thanks a lot! :)

Cheers!
mcc


--
--
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/20210215174432.qomt34tcsalywmhu%40solfire.

Re: Debugging my config: filetype is set wrongly...

On 2021-02-15, tuxic wrote:
> Hi,
>
> is there any way to pinpoint the line, which is "guilty" for
> setting a wrong filetyoe somehow?
>
> Background:
> Currently I am editing troff files a lot. The extension of that files
> are *.mm. *.me, *.tmac, *.ms and so on...depending on what troff macro
> package will be used.
>
> Everything works fine...except for the *.mm files. In case of reading
> such a file, the filetyoe is set to "xml"...which is slightly wrong.
> :)
>
> By using an empty .vimrc I know, that the problem is somewhere inside
> my original .vimrc.
> Grepping for the usual suspect doesn't show anything obvious, though.
>
> Is there any way to pinpoint the code in my vimrc, which triggers the
> problem...?

The usual way to find where an option or setting has been made is to
use :verbose, like this:

:verbose set filetype?

Don't forget the question mark at the end.

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/20210215173921.GA24530%40phoenix.

Debugging my config: filetype is set wrongly...

Hi,

is there any way to pinpoint the line, which is "guilty" for
setting a wrong filetyoe somehow?

Background:
Currently I am editing troff files a lot. The extension of that files
are *.mm. *.me, *.tmac, *.ms and so on...depending on what troff macro
package will be used.

Everything works fine...except for the *.mm files. In case of reading
such a file, the filetyoe is set to "xml"...which is slightly wrong.
:)

By using an empty .vimrc I know, that the problem is somewhere inside
my original .vimrc.
Grepping for the usual suspect doesn't show anything obvious, though.

Is there any way to pinpoint the code in my vimrc, which triggers the
problem...?

Cheers!
mcc


--
--
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/20210215172822.ghzp6xpwfunjfwxj%40solfire.

Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables

I was working in vim and tried to sort something. The sort didn't work as I expected.

I thought I would upgrade to version 8.0 in the hopes that would fix it. The upgrade gave me a new problem.

in my vimrc there was the line

set backupdir=$HOME/vim/backup  

This no longer works and yields the dreaded "E303: Unable to open swap file"

I fixed it this way

set backupdir=c:\\Users\\myuser\\Documents\\home\\vim\\backup,c:\\TMP  


Regards Tom Bodine

--
--
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/CAAkesHmPF8PfkFGV6s%3DmHh%2BiO-pZbLdUuxR8rRGamoa4gqQkUw%40mail.gmail.com.

Sunday, February 14, 2021

ApplePressAndHoldEnabled issues for hold and repeat keys for vim on Macos

Hello VIMers,

Holding h j k l keys sometimes does not trigger repeated keys on Mac. Instead, some strange behaviors happen. I'm using the vim 8.2.1972 coming with Macos 11.2.1 Big Sur. I read a lot of questions asked about this issue, but they are all about VIM mode extension for IDEs like vscode. It is suggested to run something like ``defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false``. But this cannot work with command line VIM! Even setting the global defaults does not help. Any mac vim users having this issue? Maybe switching to MacVim can help. But I really don't want to do so since the stock version of vim serves me well except for this issue.

Update:
I found out how it works after writing the email. Since I didn't find any message on this by searching, I will send this out as a record. You have to set it for the terminal app you are using. Specifically, I'm using Alacritty (io.alacritty). It was really dumb of me not to realize this. iTerm seems not affected. 

Regards,
Haodong Du

--
--
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/b483239f-56ac-49ce-9ba6-c66b3429cc41n%40googlegroups.com.

Saturday, February 13, 2021

Re: Improving startup time for autocommands

On 2021-02-13, Manas wrote:
> Hi everyone, I am facing some delay in startup time and doing
> `--startuptime`, I can see that autocommands are the reason for the
> delay. Specifically those autocmds where I am using BufEnter etc. type
> events. I have quite a number of autocmds for various FileType(s)
> and various events.
>
> Can I get some suggestions on how to improve upon these or whether
> I should switch autocmds with something else to improve upon
> startuptime?

When I run vim with --startuptime, I see only two autocommand
events, "BufEnter autocommands" and "VimEnter autocommands", and
they each consume only a few milliseconds.

If you are seeing significantly longer times than these, I would
suspect one or two of your autocommands are taking an
extraordinarily long time to run. Since --startuptime doesn't
resolve individual autocommands, and since -V doesn't include times,
your best bet for finding the problem may be some sort of binary
search for the offending autocommand(s). That is, comment-out half
of your autocommands, check --startuptime times again, see how much
they improved, then comment-out or un-comment-out half of the
appropriate set and repeat.

Once you find the one(s) taking a long time, you can post them here
for some advice on improving those times.

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/20210213215148.GD16915%40phoenix.

Re: How to remove white space at the end of each line while saveing /only for ft=roff/ ?

On 2021-02-13, tuxic wrote:
> Hi,
>
> The subject nearly says it all:
>
> When editing nroff or troff files white space at the end of a line
> or on a line alone can be poisonous... :)
> On other filetypes it is not neccessarily the case and harmless.
>
> So I want to remove those white space only when saveing files in
> roff/nroff/troff format.
>
> What I accomplish so far is to remove white space for any kind
> of file...but that's not exactly what I want.
>
> How can I limit it to [nt]*roff filles only!

It should work to put the following autocommand in an after filetype
plugin file, i.e., in ~/.vim/after/ftplugin/nroff.vim:

autocmd BufWritePre <buffer> %s/\s\+$//

Alternatively, you could put this in your vimrc:

autocmd FileType nroff autocmd BufWritePre <buffer> %s/\s\+$//

Or, if some of your files were of type groff, this:

autocmd FileType groff,nroff autocmd BufWritePre <buffer> %s/\s\+$//

See:

help 40.3
help autocmd-buflocal
help BufWritePre
help FileType
help ftplugin-overrule

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/20210213211352.GC16915%40phoenix.

How to remove white space at the end of each line while saveing /only for ft=roff/ ?

Hi,

The subject nearly says it all:

When editing nroff or troff files white space at the end of a line
or on a line alone can be poisonous... :)
On other filetypes it is not neccessarily the case and harmless.

So I want to remove those white space only when saveing files in
roff/nroff/troff format.

What I accomplish so far is to remove white space for any kind
of file...but that's not exactly what I want.

How can I limit it to [nt]*roff filles only!

Cheers!
mcc


--
--
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/20210213115705.faxuimrxvnyl2vsw%40solfire.

Re: Improving startup time for autocommands

On Sat, Feb 13, 2021 at 04:19:44PM +0530, Manas wrote:
>Hi everyone, I am facing some delay in startup time and doing
>`--startuptime`, I can see that autocommands are the reason for the
>delay. Specifically those autocmds where I am using BufEnter etc. type
>events. I have quite a number of autocmds for various FileType(s)
>and various events.
>
>Can I get some suggestions on how to improve upon these or whether
>I should switch autocmds with something else to improve upon
>startuptime?

See if you can use the FileType event instead of BufEnter.

--
--
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/20210213113317.GA25509%40rainslide.net.

Re: Improving startup time for autocommands

Hi everyone, I am facing some delay in startup time and doing
`--startuptime`, I can see that autocommands are the reason for the
delay. Specifically those autocmds where I am using BufEnter etc. type
events. I have quite a number of autocmds for various FileType(s)
and various events.

Can I get some suggestions on how to improve upon these or whether
I should switch autocmds with something else to improve upon
startuptime?

Thank you
--
Manas
CSAM Undergraduate | 2022
IIIT-Delhi, India

--
--
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/20210213104944.oddlcif6nrbypqa7%40nitro-5.

Friday, February 12, 2021

Re: Stop notification from :wn

Thanks to kwezi... who suggested prefixing
"silent" to the command.

:silent wn

does indeed work, but I don't want to have to type
that every time.  Stan Brown's comment to set
cmdheight to two or more also works, but it comes at
the price of permanently losing a full line of editor space.
This is not worth it for the benefit received.  So I guess
I'll just stick with a macro that issues either the
":w^V^M:n^V^M" or ":silent wn" sequence.

Thanks for the replies!

On Friday, February 12, 2021 at 10:58:29 AM UTC-8 Stan Brown wrote:

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ff2cc3ff-4012-4e3c-9c0f-0c3b4b058aa4n%40googlegroups.com.

Re: Stop notification from :wn

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+unsubscribe@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.

Re: Stop notification from :wn

I'm not sure, but I think you could prefix the command with :silent. Have you tried that?

On 2021/02/12 20: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

Obviously this requires a <CR> to advance to the next file.  Is there a way to suppress this notice and simply move to the next file?  I can write a little macro:

:w^V^M:n^V^M

that does the trick, but this is a pain given that ":wn" already exists.  Suggestions?
--
--
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/c44a75f6-9ac9-475b-a0cf-37c17f3c2411n%40googlegroups.com.
--   Regards,  Kwezi Mhaga

Stop notification from :wn


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

Obviously this requires a <CR> to advance to the next file.  Is there a way to suppress this notice and simply move to the next file?  I can write a little macro:

:w^V^M:n^V^M

that does the trick, but this is a pain given that ":wn" already exists.  Suggestions?

--
--
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/c44a75f6-9ac9-475b-a0cf-37c17f3c2411n%40googlegroups.com.

Thursday, February 11, 2021

Re: Announcement: New Vim Tip: Text mode menus

Thank you very much, Tony

I gave a whirl on the Windows cygwin vim and ChromeOS Crostini debian console and your code worked in both instances :-)

The text mode menus really help jog the memory!

Best,
tony 

On Saturday, January 30, 2021 at 1:12:06 PM UTC-8 antoine.m...@gmail.com wrote:
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/ca74b92d-aeaa-445c-8fd2-6822dce4441fn%40googlegroups.com.