Thursday, March 31, 2022

XSetWMNormalHints

I recently upgraded from Debian 10 to Debian 11.

My gvim used to always do resize increments by character.  Dragging a window edge would resize the window by snapping to the nearest whole character.  I would even see the window size written on screen, as characters, not pixels.  Now I see sizes by pixels.  My xterm windows still resize by character, as before.

I use fvwm on my host, but I also tried this on a PopOS VM, for whatever the default WM is for that.  The Windows 10 VM does still resize on characters.

For what I have read, this is part of ICCCM, specifically setting PResizeSize with XSetWMNormalHints().  The only thing I saw in the vim source is

#define XSetWMNormalHints XSETWMNORMALHINTS

I'm not sure where that is even used.

I've been digging around for a few hours now and was hoping someone could give me hint where to look next.

--
--
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/aeb6fc82-46de-42a7-90af-e5b3484d9c55n%40googlegroups.com.

Re: How to suppress screen message when using indentation in command line?

I still get this message. How to suppress it but leave potential error messages still printed?

$ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal gg=G' -c 'silent x' x.sh < /dev/tty
"x.sh" 4L, 61B

As Christian suggested, using :silent for the :x command is probably best:

$ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal gg=G' -c 'silent x' x.sh < /dev/tty

You could also add the "-s" argument, but that might also hide error
messages.

--
--
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/0f38e3e3-6b54-460a-bd04-9d6fbeef1f4dn%40googlegroups.com.

Re: How to suppress screen message when using indentation in command line?

Peng Yu wrote:

> Now I still get this message. How to remove this message?
>
> $ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal
> gg=G' -c x x.sh < /dev/tty
> "x.sh" 4L, 61B
> "x.sh" 4L, 60B written

As Christian suggested, using :silent for the :x command is probably best:

$ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal gg=G' -c 'silent x' x.sh < /dev/tty

You could also add the "-s" argument, but that might also hide error
messages.

--
TALL KNIGHT: Firstly. You must get us another shrubbery!
OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni!
ARTHUR: Not another shrubbery -
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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

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

Re: How to suppress screen message when using indentation in command line?

On Mi, 30 Mär 2022, Peng Yu wrote:

> Now I still get this message. How to remove this message?
>
> $ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal gg=G' -c x x.sh < /dev/tty
> "x.sh" 4L, 61B
> "x.sh" 4L, 60B written

I am not sure why it matters so much. But try using `:silent`


Best,
Christian
--
Tritt man auf die Harke drauf, gibt's am Kopf 'n blauen Knauf.

--
--
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/20220331070132.GE1540926%40256bit.org.

Wednesday, March 30, 2022

Re: How to suppress screen message when using indentation in command line?

Now I still get this message. How to remove this message?

$ vim -n --cmd ':set t_ti= t_te=' --cmd ':set report=1000' -X -E -c 'normal gg=G' -c x x.sh < /dev/tty
"x.sh" 4L, 61B
"x.sh" 4L, 60B written


:set report=1000

--
--
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/f52947e1-5899-4bc8-86ad-925c8e0acd00n%40googlegroups.com.

Re: How to suppress screen message when using indentation in command line?

On Mi, 30 Mär 2022, Peng Yu wrote:

> Hi,
>
> I see the message like "4 lines indented ... 60B written". I do not see to this message. Besides piping it to /dev/null, is there a way to configure vim so that vim doesn't print it in the first place?
>
> $ vim -n --cmd ':set t_ti= t_te=' -X -E -c 'normal gg=G' -c x /tmp/mktemp/tmp.6CgoYSnUWk.sh < /dev/tty
> 4 lines indented
> "/private/tmp/mktemp/tmp.6CgoYSnUWk.sh" 4L, 60B written

:set report=1000


Best,
Christian
--
Leitfaden durch die Phraseologie wissenschaftlicher Veröffentlichungen:
Englisch:
To our knowledge, this is the first paper which reports that
Deutsch:
Prioritätsanspruch für eine unbedeutende Entdeckung

--
--
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/20220330200448.GD1540926%40256bit.org.

How to suppress screen message when using indentation in command line?

Hi,

I see the message like "4 lines indented ... 60B written". I do not see to this message. Besides piping it to /dev/null, is there a way to configure vim so that vim doesn't print it in the first place?

$ vim -n --cmd ':set t_ti= t_te=' -X -E -c 'normal gg=G' -c x /tmp/mktemp/tmp.6CgoYSnUWk.sh < /dev/tty
4 lines indented
"/private/tmp/mktemp/tmp.6CgoYSnUWk.sh" 4L, 60B written

--
--
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/42d3d43b-2998-4374-80a1-01182988fe05n%40googlegroups.com.

Thursday, March 24, 2022

Re: '%' matches but it doesn't when executed

On 24/03/2022 01:22, Eli the Bearded wrote:
> Adri Verhoef <a3@a3.xs4all.nl> wrote:
>> Hi, I've been using Vi and Vim since the eighties. My current Vim
>> version is 8.2.4579, provided by Fedora Linux.
>>
>> I have this line in a file:
>> <a href="[^"]+_trk([^"]+)">
>>
>> When the cursor is on the first or second [, then the matching ] lights up.
>> When the cursor is on the first [ and I type %, the cursor jumps to the
>> second ].
>> When the cursor is on the (, the ) lights up.
>> When the cursor is on the ( and I type %, nothing happens.

> I suppose you know about the M and % compatibility options?
>
> :help cpo-M
> :help cpo-%

I did read that before posting, yes.

> It sounds like the matchparen plugin is showing you a "match" without
> properly taking the cpoptions setting into account or is being confused
> by the syntax highlighting guess of content type. Personally I find
> matchparen and showmatch highly distracting and don't use them. Maybe
> you'd enjoy that, too.

Actually, I've never found it too distracting, so never thought of
turning it off.

Still, Vim shows one thing and does the other. That is not logical.
Is that because the old Vi (behaviour) does the wrong thing?
Because if I do in Vim:
se cpoptions=aABceFs (this is my default, apparently)
se cpoptions+=%
... then it works as expected, i.e. logically. WYSIWYG. :-)
And when I do
vim -u NONE "+se cpo"
I get:
cpoptions=aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;

Adri

--
--
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/4957f8a3-f867-d23f-d51d-0b1220f81d65%40a3.xs4all.nl.

Wednesday, March 23, 2022

Re: '%' matches but it doesn't when executed

Adri Verhoef <a3@a3.xs4all.nl> wrote:
> Hi, I've been using Vi and Vim since the eighties. My current Vim
> version is 8.2.4579, provided by Fedora Linux.
>
> I have this line in a file:
> <a href="[^"]+_trk([^"]+)">
>
> When the cursor is on the first or second [, then the matching ] lights up.
> When the cursor is on the first [ and I type %, the cursor jumps to the
> second ].
> When the cursor is on the (, the ) lights up.
> When the cursor is on the ( and I type %, nothing happens.
> When the cursor is on the underscore _ and I type %, nothing happens.

I suppose you know about the M and % compatibility options?

:help cpo-M
:help cpo-%

It sounds like the matchparen plugin is showing you a "match" without
properly taking the cpoptions setting into account or is being confused
by the syntax highlighting guess of content type. Personally I find
matchparen and showmatch highly distracting and don't use them. Maybe
you'd enjoy that, too.

For the plugin:

:help pi_paren.txt

Elijah
------
will spare you the parse html-with-regexp comments

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

'%' matches but it doesn't when executed

Hi, I've been using Vi and Vim since the eighties. My current Vim
version is 8.2.4579, provided by Fedora Linux.

I have this line in a file:
<a href="[^"]+_trk([^"]+)">

When the cursor is on the first or second [, then the matching ] lights up.
When the cursor is on the first [ and I type %, the cursor jumps to the
second ].
When the cursor is on the (, the ) lights up.
When the cursor is on the ( and I type %, nothing happens.
When the cursor is on the underscore _ and I type %, nothing happens.

As a result, when the cursor is on the first [ and I type d%, the result is:
<a href="+)">

This bit me when I was editing the following line with the cursor on the
underscore _ and I typed d%, deleting 93 lines unexpectedly:

do { $credit[$n] = $2; $explicit[$n] = ""; $track[$n++] = $1; next } if
/<a class="a-size-base-plus a-link-normal a-color-base TitleLink
a-text-bold" href="[^"]+_trk([^"]+)">([^<]+)<\/a> <br\/> <span
class="a-size-base a-color-tertiary"> by <\/span> <span
class="a-size-base a-color-base">([^<]+)<\/span>/;

So, that's why I wrote "'%' matches but it doesn't when executed", as it
doesn't seem logical to me when a matching ) lights up and 'suddenly' it
doesn't match when I type %.

Adri (puzzled)
--
I lost a buttonhole somewhere today.

--
--
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/113c2290-aacc-bdda-c8f5-3dd34704ee5b%40a3.xs4all.nl.

Sunday, March 20, 2022

Vim script syntax highlighting with line continuations

Is there a Vim script syntax highlighting file that can handle statements split across multiple lines? For example, consider the following:

syn region tmuxUninterpolatedString start=+'+ skip=+\\$+ ...  

I would like to split this across multiple lines, to it looks something like this:

syn region tmuxUninterpolatedString  \ start=+'+  \ skip=+\\$+  ...  

Unfortunately this breaks syntax highlighting when using Vim, and the arguments for "start" and "skip" are not highlighted correctly.

Eric

--
--
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/20220321005342.GA2451%40sinister.lan.codevat.com.

Re: Should Darkyellow, Lightmagenta, Lightred be defined in colors/lists/default.vim?

> highlight.c (and, formerly, syntax.c) mention the three colors in the
> subject. Curiously, they are not defined in colors/lists/default.vim. Is
> that an oversight or is it intentional?
>
> I ask because, AFAICS, all the other colors are defined in default.vim.

These colors were not in the rgb.txt file used by X11.
I see no reason to omit them, I'll add them.


--
FATHER: Make sure the Prince doesn't leave this room until I come and
get him.
FIRST GUARD: Not ... to leave the room ... even if you come and get him.
FATHER: No. Until I come and get him.
SECOND GUARD: Hic.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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

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

Re: Should Darkyellow, Lightmagenta, Lightred be defined in colors/lists/default.vim?

On 2022-03-20, Lifepillar <lifepillar@lifepillar.me> wrote:
> highlight.c (and, formerly, syntax.c) mention the three colors in the
> subject. Curiously, they are not defined in colors/lists/default.vim. Is
> that an oversight or is it intentional?

Aargh, I was looking at syntax.c in an older Vim source. I see that in
highlight.c they are now marked as "No X11". So, that answers my
question.

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/t17bbi%248fv%242%40ciao.gmane.io.

Should Darkyellow, Lightmagenta, Lightred be defined in colors/lists/default.vim?

highlight.c (and, formerly, syntax.c) mention the three colors in the
subject. Curiously, they are not defined in colors/lists/default.vim. Is
that an oversight or is it intentional?

I ask because, AFAICS, all the other colors are defined in default.vim.

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/t17b4o%248fv%241%40ciao.gmane.io.

Friday, March 18, 2022

Re: vim substituting '.' with '/' for filenames (gf)?

includeexpr is empty.
Also just tried starting with vim --clean, got the same...

strangely, just found out that if the file where the path is inside is not .py, it does not make this strange substitution.

On Fri, Mar 18, 2022 at 2:55 PM Renato Fabbri <renato.fabbri@gmail.com> wrote:

any idea why or how to solve it?
PS. tried some things out and was not able to solve it, thus help is greatly appreciated.
Using OSX, :version:




--
Renato Fabbri
--


--
Renato Fabbri
--

--
--
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/CALqdYOwFqJqwEW%2B5wgwBuhJ6mZrTyJ_h3pRLaDAg3uWzEv%2BsRA%40mail.gmail.com.

vim substituting '.' with '/' for filenames (gf)?


any idea why or how to solve it?
PS. tried some things out and was not able to solve it, thus help is greatly appreciated.
Using OSX, :version:




--
Renato Fabbri
--

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

Thursday, March 17, 2022

Re: Need help with vim-plug

> On Mar 17, 2022, at 4:44 PM, Eric Weir <eric.e.weir@gmail.com> wrote:
>
>> On Mar 15, 2022, at 6:06 PM, Eric Weir <eric.e.weir@gmail.com> wrote:
>>> On Mar 15, 2022, at 10:29 AM, David Lowry-Duda <david@lowryduda.com> wrote:
>>> 
>>>> I'd like to switch from vundle to vim-plug for managing plugins. I
>>>> copied the vim-plug script and pasted it into ~.vim/autoload. I put
>>>> the following at the top of my .vimrc:
>>>
>>>> If I've understood correctly, that should be sufficient. But when I
>>>> issue PlugInstall I get "Not an editor command."
>>>
>>> I was going to note that you might get a better response by raising an
>>> issue at the repo, but I see you've done that:
>>> https://github.com/junegunn/vim-plug/issues/1163
>>>
>>> That `:PlugInstall` isn't recognized means that `plug.vim` is not being
>>> read on startup. This either means that there is something going wrong
>>> with how you've copied `plug.vim` into `~/.vim/autoload/plug.vim`, or
>>> that `~/.vim/autoload` isn't being sourced.
>>
>> Thank you. I thought something along that line might be the problem. The instructions say to copy the script to the autoload folder, then gives a command for automating the process.
>>
>> I wasn't sure I could use that on my system, so I simply copied the script and pasted it into the autoload folder.
>>
>> Maybe I should just have tried the command. 🙂
>
> Instructions for installing the script say "Download plug.vim and put it in the "autoload" directory."
>
> Then they give this for UNIX, which I take would be what a macOS/MacVim user would use:
>
> curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
> https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

But wondering if manually copying and pasting the script, which is what I did initially, should be equally effective.

Again, thanks,

-----------------------------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eeweir@comcast.net

"Look deep into nature, you will understand everything better."

- Albert Einstein

------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eeweir@comcast.net

"What is man without the beasts? If all the beasts were gone,
men would die from a great loneliness of spirit."

- Chief Seattle






--
--
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/DE10C794-D347-41E4-945D-64FC66FB14D2%40comcast.net.

Re: Large file - Opening n head lines

Thank you all of you. 

Le jeu. 17 mars 2022 à 19:24, Ni Va <nivaemail@gmail.com> a écrit :
Thank you Steve i think you sum up the more efficient way. Thank you. Nicolas. 😉 

Le jeu. 17 mars 2022 à 11:38, Steve Litt <slitt@troubleshooters.com> a écrit :
Ni Va said on Thu, 17 Mar 2022 01:41:08 -0700 (PDT)

>Hi All,
>
>Is it possible to open a Large File Vim but just only few beginning
>lines of it, edit one of these 50 first lines and then save and quit ?

head -n 50 bigfile.txt | vim -
# NOTE: Save as bigfile.new
tail +51 bigfile.txt >> bigfile.new
# NOTE: bigfile.new is now your edited file.

If you do it often, you can put it in a shellscript, and can even
rename the original to .bak.

HTH

SteveT

Steve Litt
March 2022 featured book: Making Mental Models: Advanced Edition
http://www.troubleshooters.com/mmm

--
--
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/jtqUuvOLZ5Y/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/20220317063748.7670a1c1%40mydesk.domain.cxm.

--
--
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/CAOKxv4HQ9a2os0BcTixD9Mgs12%3DZA2yyRjjvzgT_ynV65bp%2BSQ%40mail.gmail.com.

Re: Large file - Opening n head lines

Thank you Steve i think you sum up the more efficient way. Thank you. Nicolas. 😉 

Le jeu. 17 mars 2022 à 11:38, Steve Litt <slitt@troubleshooters.com> a écrit :
Ni Va said on Thu, 17 Mar 2022 01:41:08 -0700 (PDT)

>Hi All,
>
>Is it possible to open a Large File Vim but just only few beginning
>lines of it, edit one of these 50 first lines and then save and quit ?

head -n 50 bigfile.txt | vim -
# NOTE: Save as bigfile.new
tail +51 bigfile.txt >> bigfile.new
# NOTE: bigfile.new is now your edited file.

If you do it often, you can put it in a shellscript, and can even
rename the original to .bak.

HTH

SteveT

Steve Litt
March 2022 featured book: Making Mental Models: Advanced Edition
http://www.troubleshooters.com/mmm

--
--
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/jtqUuvOLZ5Y/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/20220317063748.7670a1c1%40mydesk.domain.cxm.

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

Re: Large file - Opening n head lines

Thank you Charles. Many years i use your largefile.vim. Thank you Charles. 😊 

Le jeu. 17 mars 2022 à 18:50, Charles Campbell <campbell@drchip.org> a écrit :
Stan Brown wrote:
> On 2022-03-17 02:55, Lifepillar wrote:
>> On 2022-03-17, Ni Va <nivaemail@gmail.com> wrote:
>>> Is it possible to open a Large File Vim but just only few beginning lines
>>> of it, edit one of these 50 first lines and then save and quit ?
>> I don't think that is possible with Vim without the help of some
>> pre/post-processing tool, but... Vim can edit pretty large files
>> relatively quickly, if set up properly. Have you tried playing with
>> Vim's settings already?
> What settings do you have in mind? I wasn't aware that Vim needed to be
> set up differently for files of different sizes.
>
Vim doesn't "need" to be set up differently for large files. However,
options can be selected to make it faster.
See http://www.drchip.org/astronaut/vim/index.html#LARGEFILE for a
plugin that helps with large files.

Chip Campbell

--
--
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/jtqUuvOLZ5Y/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/177e85f5-d1a2-abd1-d2db-29e7b2fde5bf%40drchip.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/CAOKxv4ETU8q98hQ4zFkVFw2WyGq0o_n2XiPjO98QNJe8A7EJQw%40mail.gmail.com.

Re: Large file - Opening n head lines

Sorry for late answer, that was to modify a 50Go VMware .vmdk file. Just to modify disk space allocation. 😊

I tried this morning. Vim succeed to open but not to save and close. 

NV

Le jeu. 17 mars 2022 à 18:50, Charles Campbell <campbell@drchip.org> a écrit :
Stan Brown wrote:
> On 2022-03-17 02:55, Lifepillar wrote:
>> On 2022-03-17, Ni Va <nivaemail@gmail.com> wrote:
>>> Is it possible to open a Large File Vim but just only few beginning lines
>>> of it, edit one of these 50 first lines and then save and quit ?
>> I don't think that is possible with Vim without the help of some
>> pre/post-processing tool, but... Vim can edit pretty large files
>> relatively quickly, if set up properly. Have you tried playing with
>> Vim's settings already?
> What settings do you have in mind? I wasn't aware that Vim needed to be
> set up differently for files of different sizes.
>
Vim doesn't "need" to be set up differently for large files. However,
options can be selected to make it faster.
See http://www.drchip.org/astronaut/vim/index.html#LARGEFILE for a
plugin that helps with large files.

Chip Campbell

--
--
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/jtqUuvOLZ5Y/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/177e85f5-d1a2-abd1-d2db-29e7b2fde5bf%40drchip.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/CAOKxv4E%2BEdO%3DHDqvjb9kE1kOVKE1Lo-ifraGVUXFLMQJ4OQJwg%40mail.gmail.com.

Re: Large file - Opening n head lines

Stan Brown wrote:
> On 2022-03-17 02:55, Lifepillar wrote:
>> On 2022-03-17, Ni Va <nivaemail@gmail.com> wrote:
>>> Is it possible to open a Large File Vim but just only few beginning lines
>>> of it, edit one of these 50 first lines and then save and quit ?
>> I don't think that is possible with Vim without the help of some
>> pre/post-processing tool, but... Vim can edit pretty large files
>> relatively quickly, if set up properly. Have you tried playing with
>> Vim's settings already?
> What settings do you have in mind? I wasn't aware that Vim needed to be
> set up differently for files of different sizes.
>
Vim doesn't "need" to be set up differently for large files. However,
options can be selected to make it faster.
See http://www.drchip.org/astronaut/vim/index.html#LARGEFILE for a
plugin that helps with large files.

Chip Campbell

--
--
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/177e85f5-d1a2-abd1-d2db-29e7b2fde5bf%40drchip.org.

Re: Large file - Opening n head lines

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

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

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

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/0b5e7bdd-5d2f-f46d-23c4-8232de72de88%40fastmail.fm.

Re: Large file - Opening n head lines

On 2022-03-17 01:41, Ni Va wrote:
> Is it possible to open a Large File Vim but just only few beginning
> lines of it, edit one of these 50 first lines and then save and
> quit ?

I don't think it's readily doable inside vim, but if I had such a
situation, I'd split it into the two portions like

$ sed -n -e '1,50w head.txt' -e '51,$w tail.txt' bigfile.txt

I could then edit head.txt easily and write it back out. I can then
recombine the pieces when done:

$ cat head.txt tail.txt > edited_bigfile.txt

-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/20220317070124.59ad6b1f%40bigbox.attlocal.net.

Re: Large file - Opening n head lines


чт, 17 мар. 2022 г. в 11:41, Ni Va <nivaemail@gmail.com>:
Hi All,

Is it possible to open a Large File Vim but just only few beginning lines of it, edit one of these 50 first lines and then save and quit ?

Thank you
NV

--
--
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/65df570f-36f5-415b-8b07-1111b4bda4f6n%40googlegroups.com.

Inserting data, in general case (i.e. if the size may change), is non-trivial. That is, one has to append a copy of the original file's tail and then flush everything to disk again.So even if you do

    :read !head -n 20 foobar.txt

and edit it, you still must do

    :saveas temp
    :!tail -n +21 foobar.txt >>temp
    :!mv temp foobar.txt

to create a new version. And it does not look like some gain to me.

Regards,
Matvey

--
--
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/CAFsTB%2BJYqMwD%2Bv2LdJ4xg4YDUpa_6VTNYxPNQC-TnSMbw3Qriw%40mail.gmail.com.

Re: Large file - Opening n head lines

Ni Va said on Thu, 17 Mar 2022 01:41:08 -0700 (PDT)

>Hi All,
>
>Is it possible to open a Large File Vim but just only few beginning
>lines of it, edit one of these 50 first lines and then save and quit ?

head -n 50 bigfile.txt | vim -
# NOTE: Save as bigfile.new
tail +51 bigfile.txt >> bigfile.new
# NOTE: bigfile.new is now your edited file.

If you do it often, you can put it in a shellscript, and can even
rename the original to .bak.

HTH

SteveT

Steve Litt
March 2022 featured book: Making Mental Models: Advanced Edition
http://www.troubleshooters.com/mmm

--
--
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/20220317063748.7670a1c1%40mydesk.domain.cxm.

Re: Large file - Opening n head lines

On 2022-03-17, Ni Va <nivaemail@gmail.com> wrote:
> Is it possible to open a Large File Vim but just only few beginning lines
> of it, edit one of these 50 first lines and then save and quit ?

I don't think that is possible with Vim without the help of some
pre/post-processing tool, but... Vim can edit pretty large files
relatively quickly, if set up properly. Have you tried playing with
Vim's settings already?

Of course, all depends on what "large" and "quick" mean to you. And
I believe that the line length of the edited files is also an important
factor.

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/t0v0i1%2416vt%241%40ciao.gmane.io.

Large file - Opening n head lines

Hi All,

Is it possible to open a Large File Vim but just only few beginning lines of it, edit one of these 50 first lines and then save and quit ?

Thank you
NV

--
--
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/65df570f-36f5-415b-8b07-1111b4bda4f6n%40googlegroups.com.

Wednesday, March 16, 2022

Re: Avoid jumping cursor after undo

On 2022-03-14, Lifepillar <lifepillar@lifepillar.me> wrote:
> I have defined this function:
>
> fun! Lint()
> let l:view = winsaveview()
> keepjumps normal gggqG
> call winrestview(l:view)
> endf
>
> When the function is executed, the cursor does not move, as expected.
> Unfortunately, pressing u after that makes the cursor jump to the top
> of the buffer. I had hoped that keepjumps would prevent that, but that
> does not seem the case. How can I avoid moving the cursor upon undoing
> (without touching registers)?

I have found a rational for this behaviour (Vim restores the position to
where the undone change has happened), and a way to keep the cursor
where it is:

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

Perhaps, there is a less hackish way that does not modify the buffer.

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/t0tc0t%2410vm%241%40ciao.gmane.io.

Tuesday, March 15, 2022

Re: Need help with vim-plug

> On Mar 15, 2022, at 10:29 AM, David Lowry-Duda <david@lowryduda.com> wrote:
> 
>> I'd like to switch from vundle to vim-plug for managing plugins. I
>> copied the vim-plug script and pasted it into ~.vim/autoload. I put
>> the following at the top of my .vimrc:
>
>> If I've understood correctly, that should be sufficient. But when I
>> issue PlugInstall I get "Not an editor command."
>
> I was going to note that you might get a better response by raising an
> issue at the repo, but I see you've done that:
> https://github.com/junegunn/vim-plug/issues/1163
>
> That `:PlugInstall` isn't recognized means that `plug.vim` is not being
> read on startup. This either means that there is something going wrong
> with how you've copied `plug.vim` into `~/.vim/autoload/plug.vim`, or
> that `~/.vim/autoload` isn't being sourced.

Thank you. I thought something along that line might be the problem. The instructions say to copy the script to the autoload folder, then gives a command for automating the process.

I wasn't sure I could use that on my system, so I simply copied the script and pasted it into the autoload folder.

Maybe I should just have tried the command. 🙂

———————————
Eric Weir
Atlanta, GA USA

"It has all been combustion."

- W.G. Sebald

--
--
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/EF0D97E9-0512-4BED-8301-1A79647105BB%40gmail.com.

Monday, March 14, 2022

GTK error when starting with --role option

Version info:
IM - Vi IMproved 8.1 (2018 May 18, compiled Feb 01 2022 09:16:32)
Included patches: 1-2269, 3612, 3625, 3669, 3741
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version with GTK3 GUI.

on ubuntu 20.04, i3 window manager.

When starting gvim from a terminal as follows:
gvim --role="helpscreen"
I get the following message:
(gvim:10303): Gtk-CRITICAL **: 13:50:30.814:
gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed
The message repeats whenever I mouse over.

It appears that the message is triggered when I use the role option.

Any ideas about what may be causing this and how to suppress the message?
thanks

--
Tim (RIP Sven)
tj49.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/6ba7a535-3810-ed2c-4436-1124fdf05dbe%40akwebsoft.com.

Re: Sven Guckes passed away

I miss him. He helped me get on board with vim and mutt.
Even tho' he was younger than I, he had more forehead.
Well, what the heck, you can't have hair and brains both
and boy did he ever have brains.

My condolences to his family and loved ones and also to
all those whose life he made better.

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

--
Tim
tj49.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/6d24fe74-7969-a6ba-8b3b-d655999b29ac%40akwebsoft.com.

Re: Avoid jumping cursor after undo


On Mon, Mar 14, 2022, 14:10 Lifepillar <lifepillar@lifepillar.me> wrote:
I have defined this function:

fun! Lint()
  let l:view = winsaveview()
  keepjumps normal gggqG
  call winrestview(l:view)
endf

When the function is executed, the cursor does not move, as expected.
Unfortunately, pressing u after that makes the cursor jump to the top of
the buffer. I had hoped that keepjumps would prevent that, but that does
not seem the case. How can I avoid moving the cursor upon undoing
(without touching registers)?

Thanks,
Life.

I don't know of a built-in way, but maybe you could write a function as above that saves and restores the view, though it would be tricky if the undo adds or removes lines above the cursor location. Then, map u to it.

It's easy to figure out whether the undo added or removed lines (and how many). Then, you could look at where the cursor has ended up. If it's before your original location, then you need to adjust the values you pass to winrestview to move the return location up or down by the number of rows added. 

It'll probably still be less than perfect if the change is right around the cursor location, but those don't move the cursor much. 

Salman

--
--
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/CANuxnEe_vn87LiVR%2Bf-rOPQsCJaYTnDcXEh7BhwHdrRDuE1cww%40mail.gmail.com.

Avoid jumping cursor after undo

I have defined this function:

fun! Lint()
let l:view = winsaveview()
keepjumps normal gggqG
call winrestview(l:view)
endf

When the function is executed, the cursor does not move, as expected.
Unfortunately, pressing u after that makes the cursor jump to the top of
the buffer. I had hoped that keepjumps would prevent that, but that does
not seem the case. How can I avoid moving the cursor upon undoing
(without touching registers)?

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

Re: Need help with vim-plug

> I'd like to switch from vundle to vim-plug for managing plugins. I
> copied the vim-plug script and pasted it into ~.vim/autoload. I put
> the following at the top of my .vimrc:

> If I've understood correctly, that should be sufficient. But when I
> issue PlugInstall I get "Not an editor command."

I was going to note that you might get a better response by raising an
issue at the repo, but I see you've done that:
https://github.com/junegunn/vim-plug/issues/1163

That `:PlugInstall` isn't recognized means that `plug.vim` is not being
read on startup. This either means that there is something going wrong
with how you've copied `plug.vim` into `~/.vim/autoload/plug.vim`, or
that `~/.vim/autoload` isn't being sourced.

- DLD

--
--
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/Yi%2BACpo%2BiPCdaEoh%40icerm-dld.

Need help with vim-plug

I'd like to switch from vundle to vim-plug for managing plugins. I copied the vim-plug script and pasted it into ~.vim/autoload. I put the following at the top of my .vimrc:

call plug#begin(~/.vim/plugged')

Plug 'xolox/vim-misc'
Plug 'xolox/vim-session'
Plug 'xolox/vim-notes'
Plug 'davidoc/taskpaper.vim'
Plug 'vimwiki/vimwiki'
Plug 'junegunn/vim-plug'

" Initialize plugin system
call plug

Need help with vim-plug

I'd like to switch from vundle to vim-plug for managing plugins. I copied the vim-plug script and pasted it into ~.vim/autoload. I put the following at the top of my .vimrc:

call plug#begin(~/.vim/plugged')

Plug 'xolox/vim-misc'
Plug 'xolox/vim-session'
Plug 'xolox/vim-notes'
Plug 'davidoc/taskpaper.vim'
Plug 'vimwiki/vimwiki'
Plug 'junegunn/vim-plug'

" Initialize plugin system
call plug

Sunday, March 13, 2022

Re: matchit

Elimar Riesebieter wrote:

> > Hi all,
> >
> > since a while I didn't get matches if/fi anymore. I am running
> > packadd! matchit. Fror instance brackets are matching...
> >
> > How can I debug it?
>
> :echo exists("loaded_matchit")
>
> gives 1

Is this in a shell script? Please give more information.

--
Vi is clearly superior to emacs, since "vi" has only two characters
(and two keystrokes), while "emacs" has five. (Randy C. Ford)

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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

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

Re: matchit

* Elimar Riesebieter <riesebie@lxtec.de> [2022-03-13 14:21 +0100]:

> * Elimar Riesebieter <riesebie@lxtec.de> [2022-03-13 13:59 +0100]:
>
> > Hi all,
> >
> > since a while I didn't get matches if/fi anymore. I am running
> > packadd! matchit. Fror instance brackets are matching...
> >
> > How can I debug it?
>
> :echo exists("loaded_matchit")
>
> gives 1

hl_matchit is what I was looking for.

Thanks
Elimar
--
>what IMHO then?
IMHO - Inhalation of a Multi-leafed Herbal Opiate ;)
--posting from alex in debian-user--

--
--
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/20220313152314.5l5jo27wrt7im2kl%40baumbart.home.lxtec.de.

Re: New User -- regex question(s) ...

On 2022-03-09, LOSS PREVENTION <980beadvised@gmail.com> wrote:
> I have read, both http://www.vimregex.com/ -and- various sections of
> http://vimdoc.sourceforge.net/htmldoc/help.html. That said, I just can't
> figure out what I'm doing incorrectly. Please follow the live examples
> below:
>
> 1) Using \+ is not working for me in the following example -
> Original 01 --> Theft Attempted or Completed Offense? Completed
> Original 02 --> Theft Attempted or Completed Offense? Attempted
> Broken --> %s/\v\s(Attempted or Completed Offense\?)\s(\u\w\+)\s/,\1,\2,/g

With \v, you should use + instead of \+.

> I cannot find a written reason for this failure.

I have taken a quick look at the help of \v and, in fact, I cannot find that
difference explained in the table. Maybe, it should.

> --Next--
>
> %s/^M//g <--will work from the cmd-line, how do I do this from within a
><script>.vim?

That is an ex command: it works in exactly the same way in a script.

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/t0kt03%241659%241%40ciao.gmane.io.

Re: matchit

* Elimar Riesebieter <riesebie@lxtec.de> [2022-03-13 13:59 +0100]:

> Hi all,
>
> since a while I didn't get matches if/fi anymore. I am running
> packadd! matchit. Fror instance brackets are matching...
>
> How can I debug it?

:echo exists("loaded_matchit")

gives 1

Elimar
--
Excellent day for drinking heavily.
Spike the office water cooler;-)

--
--
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/20220313132142.hnd4bcwayotgchcg%40baumbart.home.lxtec.de.

matchit

Hi all,

since a while I didn't get matches if/fi anymore. I am running
packadd! matchit. Fror instance brackets are matching...

How can I debug it?

Thanks in advance
Elimar
--
The path to source is always uphill!
-unknown-

--
--
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/20220313125917.attwjykebqbb6plz%40baumbart.home.lxtec.de.

Tuesday, March 8, 2022

New User -- regex question(s) ...

 I have read, both http://www.vimregex.com/ -and- various sections of http://vimdoc.sourceforge.net/htmldoc/help.html. That said, I just can't figure out what I'm doing incorrectly. Please follow the live examples below:

1) Using \+ is not working for me in the following example -
Original 01 --> Theft Attempted or Completed Offense? Completed
Original 02 --> Theft Attempted or Completed Offense? Attempted
Broken --> %s/\v\s(Attempted or Completed Offense\?)\s(\u\w\+)\s/,\1,\2,/g

Working --> %s/\v\s(Attempted or Completed Offense\?)\s(\u\w.......)\s/,\1,\2,/g

I cannot find a written reason for this failure.

--Next--

%s/^M//g <--will work from the cmd-line, how do I do this from within a <script>.vim? I'm not understand the help files explanation on this; from a <script>.vim?

Respectfully.

--
--
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/49e7a378-21d3-48e0-9a31-1ec68ec9f836n%40googlegroups.com.

Sunday, March 6, 2022

Re: Dictionary Completion of Capitalized Words

On 2022-03-05, Lifepillar wrote:

> Have you tried setting infercase?

No, I hadn't. That seems to do just what I want. Thank you!

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/20220306170144.GA5869%40phoenix.

Saturday, March 5, 2022

Re: Dictionary Completion of Capitalized Words

On 2022-03-04, Gary Johnson <garyjohn@spocom.com> wrote:
> On 2022-03-04, Bram Moolenaar wrote:
>> Gary Johnson wrote:
>>
>> > Typing part of a word, then using Ctrl-X Ctrl-K to complete the word
>> > from entries in a dictionary works fine as long as the word (not
>> > a proper noun) is all lower case. But when a word that is lower
>> > case in the dictionary is capitalized when typed, as at the start of
>> > a sentence or in a title, completion from the dictionary fails.
>> >
>> > Is there a way to have Ctrl-X Ctrl-K complete a capitalized word
>> > even though it is not capitalized in the dictionary?
>> >
>> > Example:
>> >
>> > cornu<C-X><C-K> expands to cornucopia (or cornucopias), but
>> > Cornu<C-X><C-K> results in E486 Pattern not found.
>> >
>> > I'm using Vim 8.2.4127 in a terminal on Linux.
>>
>> You can set 'ignorecase' to find matches. It's not clever though, it
>> will then remove the capital letter.
>
> That's an improvement over what I had been doing. Thank you.
>
> I always have 'ignorecase' set, but I also have 'smartcase' set.

Have you tried setting infercase?

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

Friday, March 4, 2022

Re: Dictionary Completion of Capitalized Words

Gary Johnson wrote:

> > > Typing part of a word, then using Ctrl-X Ctrl-K to complete the word
> > > from entries in a dictionary works fine as long as the word (not
> > > a proper noun) is all lower case. But when a word that is lower
> > > case in the dictionary is capitalized when typed, as at the start of
> > > a sentence or in a title, completion from the dictionary fails.
> > >
> > > Is there a way to have Ctrl-X Ctrl-K complete a capitalized word
> > > even though it is not capitalized in the dictionary?
> > >
> > > Example:
> > >
> > > cornu<C-X><C-K> expands to cornucopia (or cornucopias), but
> > > Cornu<C-X><C-K> results in E486 Pattern not found.
> > >
> > > I'm using Vim 8.2.4127 in a terminal on Linux.
> >
> > You can set 'ignorecase' to find matches. It's not clever though, it
> > will then remove the capital letter.
>
> That's an improvement over what I had been doing. Thank you.
>
> I always have 'ignorecase' set, but I also have 'smartcase' set.
> I know the following has limitations, but it helps. I'll have to
> see if it interferes too much with other completions.
>
> au InsertEnter * set nosmartcase
> au InsertLeave * set smartcase

Using 'smartcase' works halfway a sentence, so that when, for example,
you complete "Ne" the country name "Netherlands" matches, and not words
starting with "ne". But it's different at the start of a sentence. It
would require the smartness of spell checking to detect that. I'm not
sure if we would need to build in support for this, or that it can be
done with a plugin.

--
Send $25.00 for handy leaflet on how to make money by selling leaflets

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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

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

Re: Dictionary Completion of Capitalized Words

On 2022-03-04, Bram Moolenaar wrote:
> Gary Johnson wrote:
>
> > Typing part of a word, then using Ctrl-X Ctrl-K to complete the word
> > from entries in a dictionary works fine as long as the word (not
> > a proper noun) is all lower case. But when a word that is lower
> > case in the dictionary is capitalized when typed, as at the start of
> > a sentence or in a title, completion from the dictionary fails.
> >
> > Is there a way to have Ctrl-X Ctrl-K complete a capitalized word
> > even though it is not capitalized in the dictionary?
> >
> > Example:
> >
> > cornu<C-X><C-K> expands to cornucopia (or cornucopias), but
> > Cornu<C-X><C-K> results in E486 Pattern not found.
> >
> > I'm using Vim 8.2.4127 in a terminal on Linux.
>
> You can set 'ignorecase' to find matches. It's not clever though, it
> will then remove the capital letter.

That's an improvement over what I had been doing. Thank you.

I always have 'ignorecase' set, but I also have 'smartcase' set.
I know the following has limitations, but it helps. I'll have to
see if it interferes too much with other completions.

au InsertEnter * set nosmartcase
au InsertLeave * set smartcase

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/20220304161814.GE18373%40phoenix.

Re: Dictionary Completion of Capitalized Words

Gary Johnson wrote:

> Typing part of a word, then using Ctrl-X Ctrl-K to complete the word
> from entries in a dictionary works fine as long as the word (not
> a proper noun) is all lower case. But when a word that is lower
> case in the dictionary is capitalized when typed, as at the start of
> a sentence or in a title, completion from the dictionary fails.
>
> Is there a way to have Ctrl-X Ctrl-K complete a capitalized word
> even though it is not capitalized in the dictionary?
>
> Example:
>
> cornu<C-X><C-K> expands to cornucopia (or cornucopias), but
> Cornu<C-X><C-K> results in E486 Pattern not found.
>
> I'm using Vim 8.2.4127 in a terminal on Linux.

You can set 'ignorecase' to find matches. It's not clever though, it
will then remove the capital letter.

--
hundred-and-one symptoms of being an internet addict:
156. You forget your friend's name but not her e-mail address.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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

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

Thursday, March 3, 2022

Dictionary Completion of Capitalized Words

Typing part of a word, then using Ctrl-X Ctrl-K to complete the word
from entries in a dictionary works fine as long as the word (not
a proper noun) is all lower case. But when a word that is lower
case in the dictionary is capitalized when typed, as at the start of
a sentence or in a title, completion from the dictionary fails.

Is there a way to have Ctrl-X Ctrl-K complete a capitalized word
even though it is not capitalized in the dictionary?

Example:

cornu<C-X><C-K> expands to cornucopia (or cornucopias), but
Cornu<C-X><C-K> results in E486 Pattern not found.

I'm using Vim 8.2.4127 in a terminal on Linux.

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/20220304073049.GD18373%40phoenix.