Tuesday, October 31, 2023

Re: Regular expression tokens to identify *screen* lines?

On Mo, 30 Okt 2023, Tim Chase wrote:

> I was playing around with tokens like
>
> :help /\%l
>
> and was curious if there was a way to identify *screen* lines rather
> than *file* lines. So imagining something like "\%5H" or "\%3L"
> would match the fifth-from-top line or the third-from-bottom line
> of the screen.

I am pretty sure we do not have regex atoms for screen lines.

> The initial idea was some sort of focused-writing where the top/bottom
> lines were dark-gray, getting progressively brighter in white-ness
> moving toward the center of the screen where the cursor-line (done
> with underline) would be kept in the middle with a high 'scrolloff'
> value. Maybe using syntax highlighting or :match-style invocations.
>
> It was mostly an boondoggle idea, so please nobody spend vast amounts
> of time on this silliness, but if there something obvious I've
> missed for "fade out text around the cursor" sort of functionality.
>
> Thanks for any thoughts, pointers, ideas though. :-)

Perhaps with some reasonable nice looking highlighting group, you can
use :set cursorlineopt=screenline. Or perhaps one can script something
by throwing in marks to delimit the region and then match it using the
\%'m atom (or possibly you don't even need the marks you can just try to
get the virtcol for the region and then use the \%v atom instead).

Thanks,
Christian
--
Drop in any mailbox.

--
--
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/ZUEHlcze%2Bns5svVf%40256bit.org.

Monday, October 30, 2023

Regular expression tokens to identify *screen* lines?

I was playing around with tokens like

:help /\%l

and was curious if there was a way to identify *screen* lines rather
than *file* lines. So imagining something like "\%5H" or "\%3L"
would match the fifth-from-top line or the third-from-bottom line
of the screen.

The initial idea was some sort of focused-writing where the top/bottom
lines were dark-gray, getting progressively brighter in white-ness
moving toward the center of the screen where the cursor-line (done
with underline) would be kept in the middle with a high 'scrolloff'
value. Maybe using syntax highlighting or :match-style invocations.

It was mostly an boondoggle idea, so please nobody spend vast amounts
of time on this silliness, but if there something obvious I've
missed for "fade out text around the cursor" sort of functionality.

Thanks for any thoughts, pointers, ideas though. :-)

-tim


(all kicked off by thinking about this thread

https://www.reddit.com/r/vim/comments/17jkv50/vim_for_a_non_coder/

where folks were referring to focus-writer-like functionality to
keep the focus around the cursor-line, so it was just a conceptual
plaything)





--
--
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/ZUBBPjtU6xwevqFy%40thechases.com.

Tuesday, October 24, 2023

Re: Location list entries for unsaved buffer open a new buffer



On Sat, Oct 21, 2023 at 10:08 AM Lifepillar <lifepillar@lifepillar.me> wrote:
On 2023-10-21, Yegappan Lakshmanan <yegappanl@gmail.com> wrote:
> On Sat, Oct 21, 2023 at 7:09 AM Lifepillar <lifepillar@lifepillar.me> wrote:
>> How do I generate location list entries that refer to the proper unsaved
>> buffer?
>>
>>
> There is a item in the  todo list for more than 20 years now for this:
>
> -   Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
> Govindachar)

:-) I have found the following workaround: I pass the buffer number to

I have created the PR https://github.com/vim/vim/pull/13419 to support this.
Can you try out the diff in the PR and let me know if you see any issues?

- Yegappan
 
the callback, then I iterate over each parsed line and manually set the
buffer:

    def Callback(channel: channel, msg: string, bufnr: number, ...)
      [...]
      var what = getqflist({"lines": [msg], "efm": efm})

      for item in what.items
        item["bufnr"] = bufnr
      endfor

      setloclist(winid, what.items, "a")
    enddef

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

Monday, October 23, 2023

Re: Where in VIM for Windows do you see the path to the _vmrc file that the program is actually using

On Mon, Oct 23, 2023 at 7:53 PM Christian Castro
<christian.castro@dlhcorp.com> wrote:
>
> Hello vim_use Group,
>
>
> I recently upgraded VIM 8.0 to the new 9.0 version that was out at that time for Windows.
> I want to know where VIM stores the path for the _vimrc file.
>
> See I'm not sure which copy of the _vimrc file the VIM program is using.
> I've looked at the C:\Program Files(x86)\Vim\_vimrc file and that's not it.
> The program kept the user customization so it must be using a _vimrc file from somewhere. But where?
>
> Is there a config file in Vim that tells me path it's looking for when it goes to find the _vimrc file?
> Please assist.
>
>
> Thanks

In any Vim version, the :scriptnames command will tell you the
pathfilenames of all the Vim scripts actually sourced in this instance
of Vim since it started. The vimrc should be at (or very near) the top
of the list, unless either it was not found, or it was disabled by
means of -u NONE on the command-line.

Also, in the middle part of the :version command, the config files
(vimrc etc.) which were defined at compile-time are listed, but they
can be suppressed, or other files can be used instead, by means of
command-line parameters.

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/CAJkCKXvDPOdnmDwH-53B1JaEv1u9%3DFWw29eP_nUg-euC31eHsw%40mail.gmail.com.

Re: Where in VIM for Windows do you see the path to the _vmrc file that the program is actually using

Hi,

On Monday, 2023-10-23 17:30:45 +0000, Christian Castro wrote:

> Is there a config file in Vim that tells me path it's looking for when it goes to find the _vimrc file?

:h startup
:version

To display where an option was last defined, e.g. viminfo, use
:verbose set viminfo

:h :verbose-cmd

Eike

--
OpenPGP/GnuPG encrypted mail preferred in all private communication.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A
Use LibreOffice! https://www.libreoffice.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/ZTcFOQJhYcbxWmgo%40kulungile.erack.de.

Where in VIM for Windows do you see the path to the _vmrc file that the program is actually using

Hello vim_use Group,


I recently upgraded VIM 8.0 to the new 9.0 version that was out at that time for Windows.
I want to know where VIM stores the path for the _vimrc file.

See I'm not sure which copy of the _vimrc file the VIM program is using.
I've looked at the C:\Program Files(x86)\Vim\_vimrc file and that's not it.
The program kept the user customization so it must be using a _vimrc file from somewhere. But where?

Is there a config file in Vim that tells me path it's looking for when it goes to find the _vimrc file?
Please assist.


Thanks



-----Original Message-----
From: vim_use@googlegroups.com <vim_use@googlegroups.com> On Behalf Of Lifepillar
Sent: Saturday, October 21, 2023 1:09 PM
To: vim_use@googlegroups.com
Subject: Re: Location list entries for unsaved buffer open a new buffer

On 2023-10-21, Yegappan Lakshmanan <yegappanl@gmail.com> wrote:
> On Sat, Oct 21, 2023 at 7:09 AM Lifepillar <lifepillar@lifepillar.me> wrote:
>> How do I generate location list entries that refer to the proper
>> unsaved buffer?
>>
>>
> There is a item in the todo list for more than 20 years now for this:
>
> - Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
> Govindachar)

:-) I have found the following workaround: I pass the buffer number to the callback, then I iterate over each parsed line and manually set the
buffer:

def Callback(channel: channel, msg: string, bufnr: number, ...)
[...]
var what = getqflist({"lines": [msg], "efm": efm})

for item in what.items
item["bufnr"] = bufnr
endfor

setloclist(winid, what.items, "a")
enddef

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

****WARNING**** This email message (including any attachments) are to be treated as confidential/proprietary and may contain copyrighted or other legally protected information. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this information in error, please destroy the information and notify the sender of the error. 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/MN2PR13MB33265DB9F17ADC6D4B5B708A9CD8A%40MN2PR13MB3326.namprd13.prod.outlook.com.

Re: Edit edit tar.gz file

On Mon, 23 Oct 2023 at 14:54, Yongwei Wu <wuyongwei@gmail.com> wrote:
On Mon, 23 Oct 2023 at 03:33, Nutcha Schonn <aplushosting.asia@gmail.com> wrote:
I get this:

 :~# vi --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 04 2023 10:24:44)
Included patches: 1-1378, 1499
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Tiny version without GUI.  Features included (+) or not (-):

You have the "tiny" version. You may use `sudo apt install vim-nox` to install the complete non-GUI version on Debian or Ubuntu.

Also, you may want to check whether names like `vi` and `vim` point to the correct executables by the command `update-alternatives --get-selections`. If they are not to your satisfaction,use commands like `sudo update-alternatives --config vi` to change the selection.

--
Yongwei Wu
URL: http://wyw.dcweb.cn/

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

Sunday, October 22, 2023

Re: Edit edit tar.gz file

On Mon, 23 Oct 2023 at 03:33, Nutcha Schonn <aplushosting.asia@gmail.com> wrote:
I get this:

 :~# vi --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 04 2023 10:24:44)
Included patches: 1-1378, 1499
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Tiny version without GUI.  Features included (+) or not (-):

You have the "tiny" version. You may use `sudo apt install vim-nox` to install the complete non-GUI version on Debian or Ubuntu.

--
Yongwei Wu
URL: http://wyw.dcweb.cn/

--
--
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/CADs46ie%3Dp-wGsudFf5LPqeKj58OF4qFXQqsxAbL6g7OBOmUb9A%40mail.gmail.com.

Re: Edit edit tar.gz file

I get this:

 :~# vi --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 04 2023 10:24:44)
Included patches: 1-1378, 1499
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Tiny version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      -mouse_urxvt       -tcl
-arabic            -find_in_path      +mouse_xterm       -termguicolors
+autocmd           +float             +multi_byte        -terminal
-autochdir         -folding           -multi_lang        +terminfo
-autoservername    -footer            -mzscheme          +termresponse
-balloon_eval      +fork()            -netbeans_intg     +textobjects
-balloon_eval_term -gettext           +num64             -textprop
-browse            -hangul_input      -packages          -timers
++builtin_terms    +iconv             +path_extra        +title
-byte_offset       +insert_expand     -perl              -toolbar
-channel           -ipv6              -persistent_undo   +user_commands
+cindent           -job               -popupwin          -vartabs
-clientserver      +jumplist          -printer           +vertsplit
-clipboard         -keymap            -profile           +vim9script
+cmdline_compl     -lambda            -python            -viminfo
+cmdline_hist      -langmap           -python3           +virtualedit
+cmdline_info      -libcall           -quickfix          +visual
+comments          -linebreak         -reltime           +visualextra
-conceal           +lispindent        -rightleft         +vreplace
-cryptv            +listcmds          -ruby              +wildignore
-cscope            +localmap          +scrollbind        +wildmenu
+cursorbind        -lua               -signs             +windows
-cursorshape       -menu              +smartindent       +writebackup
-dialog            -mksession         -sodium            -X11
-diff              +modify_fname      -sound             +xfontset
-digraphs          +mouse             -spell             -xim
-dnd               -mouseshape        -startuptime       -xpm
-ebcdic            -mouse_dec         -statusline        -xsmp
-emacs_tags        -mouse_gpm         -sun_workshop      -xterm_clipboard
-eval              -mouse_jsbterm     -syntax            -xterm_save
+ex_extra          -mouse_netterm     +tag_binary
-extra_search      +mouse_sgr         -tag_old_static
-farsi             -mouse_sysmouse    -tag_any_white
   system vimrc file: "/etc/vim/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-JA6Vy9/vim-9.0.1378=. -fstack-protector-strong -Wformat -Werror=format-security -DSYS_VIMRC_FILE=\"/etc/vim/vimrc\" -DSYS_GVIMRC_FILE=\"/etc/vim/gvimrc\" -DTINY_VIMRC -DSYS_TINYRC_FILE=\"/etc/vim/vimrc.tiny\" -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lacl -lattr

On Sunday, October 22, 2023 at 8:45:30 PM UTC+7 Tony Mechelynck wrote:
On Sat, Oct 21, 2023 at 3:34 PM Lifepillar <lifep...@lifepillar.me> wrote:
>
> On 2023-10-21, Nutcha Schonn <aplushos...@gmail.com> wrote:
> > About 3-4 years ago I remember that I could edit a edit tar.gz file with vi
> > command.
> > When trying that today it does not work, is there something I can do to get
> > it to work with the latest VIM 9 version?
>
> It works with Vim 9.0.1946. Besides:
>
> :echo g:loaded_tarPlugin
>
> prints `v32`.
>
> Either your runtime does not have the plugin (try `:e
> $VIMRUNTIME/plugin/tarPLugin.vim`), or your configuration is preventing
> the plugin from loading (for instance, if you set g:loaded_tarPlugin=1
> in your vimrc).
>
> You mention vi rather than vim: that may make a difference.
>
> Hope this helps,
> Life.

Yeah, if you type :version (followed by <Enter>), vim (or vim
masquerading as vi) answers with about a page of information beginning
(in Vim on my system) with

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 22 2023 01:25:49)
Included patches: 1-2059
Compiled by antoine.m...@gmail.com
Huge version with GTK3 GUI. Features included (+) or not (-):

In a typical "Vim built as vi" the fourth line above typically begins
instead "Tiny version without GUI", like this:

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 22 2023 01:25:29)
Included patches: 1-2059
Compiled by antoine.m...@gmail.com
Tiny version without GUI. Features included (+) or not (-):

A tiny version of Vim is built with no expression evaluation (lower
down, in the part I didn't paste, it says -eval rather than +eval as
in a full-featured Vim or gvim), and that prevents some plugins
(including IIRC the tar plugin) from running.

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/1de29c76-9eeb-4aca-8746-4ad12cb59ae7n%40googlegroups.com.

Re: Edit edit tar.gz file

On Sat, Oct 21, 2023 at 3:34 PM Lifepillar <lifepillar@lifepillar.me> wrote:
>
> On 2023-10-21, Nutcha Schonn <aplushosting.asia@gmail.com> wrote:
> > About 3-4 years ago I remember that I could edit a edit tar.gz file with vi
> > command.
> > When trying that today it does not work, is there something I can do to get
> > it to work with the latest VIM 9 version?
>
> It works with Vim 9.0.1946. Besides:
>
> :echo g:loaded_tarPlugin
>
> prints `v32`.
>
> Either your runtime does not have the plugin (try `:e
> $VIMRUNTIME/plugin/tarPLugin.vim`), or your configuration is preventing
> the plugin from loading (for instance, if you set g:loaded_tarPlugin=1
> in your vimrc).
>
> You mention vi rather than vim: that may make a difference.
>
> Hope this helps,
> Life.

Yeah, if you type :version (followed by <Enter>), vim (or vim
masquerading as vi) answers with about a page of information beginning
(in Vim on my system) with

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 22 2023 01:25:49)
Included patches: 1-2059
Compiled by antoine.mechelynck@gmail.com
Huge version with GTK3 GUI. Features included (+) or not (-):

In a typical "Vim built as vi" the fourth line above typically begins
instead "Tiny version without GUI", like this:

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 22 2023 01:25:29)
Included patches: 1-2059
Compiled by antoine.mechelynck@gmail.com
Tiny version without GUI. Features included (+) or not (-):

A tiny version of Vim is built with no expression evaluation (lower
down, in the part I didn't paste, it says -eval rather than +eval as
in a full-featured Vim or gvim), and that prevents some plugins
(including IIRC the tar plugin) from running.

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/CAJkCKXut_M3ob7iW6RVAE9DdPjiaGSgb3eGneJ%3Duk8aH1u3S-Q%40mail.gmail.com.

Saturday, October 21, 2023

Re: Location list entries for unsaved buffer open a new buffer

On 2023-10-21, Yegappan Lakshmanan <yegappanl@gmail.com> wrote:
> On Sat, Oct 21, 2023 at 7:09 AM Lifepillar <lifepillar@lifepillar.me> wrote:
>> How do I generate location list entries that refer to the proper unsaved
>> buffer?
>>
>>
> There is a item in the todo list for more than 20 years now for this:
>
> - Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
> Govindachar)

:-) I have found the following workaround: I pass the buffer number to
the callback, then I iterate over each parsed line and manually set the
buffer:

def Callback(channel: channel, msg: string, bufnr: number, ...)
[...]
var what = getqflist({"lines": [msg], "efm": efm})

for item in what.items
item["bufnr"] = bufnr
endfor

setloclist(winid, what.items, "a")
enddef

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

Re: Location list entries for unsaved buffer open a new buffer

Hi,

On Sat, Oct 21, 2023 at 7:09 AM Lifepillar <lifepillar@lifepillar.me> wrote:
I have a function that pipes a buffer into an external program, then
parses its output in a callback and adds the parsed results to
a location list. Simplified code for the callback:

    def Callback(channel: job, msg: string, winid: number, efm: string, cwd: string)
      silent execute "lcd" cwd
      var what = getqflist({"lines": [msg], "efm": efm})
      silent lcd -
      setloclist(winid, what.items, "a")
    enddef

The lines to be parsed have a pretty standard format:

    filename:line:col message

The program reads from stdin, hence `filename` is passed as an argument
to the program. The program simply puts whatever filename it gets into
its output messages.

This works fine for buffers backed up by a file: I pass the buffer's
name as the filename argument. My problem is that I don't know how to
create an entry in the location list for an unsaved buffer. Passing
something like '[No Name]', 'unnamed', or similar does not work. The
location list ends up having entries that look like this:

    unnamed|1 col 8 E123| some message

If the unsaved buffer ia buffer 1, then the message above is parsed as:

    {'items': [{'bufnr': 2, 'lnum': 1, 'col': 8, 'text': 'some message', ...}]}

Therefore, selecting such entries causes a new buffer 2 to be created.

How do I generate location list entries that refer to the proper unsaved
buffer?


There is a item in the  todo list for more than 20 years now for this:

-   Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh Govindachar)

- Yegappan

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAAW7x7nVk9-jZ1f%2B-9hKuHUyBmvNLm56FG4-e02vuxHamvXX0g%40mail.gmail.com.

Location list entries for unsaved buffer open a new buffer

I have a function that pipes a buffer into an external program, then
parses its output in a callback and adds the parsed results to
a location list. Simplified code for the callback:

def Callback(channel: job, msg: string, winid: number, efm: string, cwd: string)
silent execute "lcd" cwd
var what = getqflist({"lines": [msg], "efm": efm})
silent lcd -
setloclist(winid, what.items, "a")
enddef

The lines to be parsed have a pretty standard format:

filename:line:col message

The program reads from stdin, hence `filename` is passed as an argument
to the program. The program simply puts whatever filename it gets into
its output messages.

This works fine for buffers backed up by a file: I pass the buffer's
name as the filename argument. My problem is that I don't know how to
create an entry in the location list for an unsaved buffer. Passing
something like '[No Name]', 'unnamed', or similar does not work. The
location list ends up having entries that look like this:

unnamed|1 col 8 E123| some message

If the unsaved buffer ia buffer 1, then the message above is parsed as:

{'items': [{'bufnr': 2, 'lnum': 1, 'col': 8, 'text': 'some message', ...}]}

Therefore, selecting such entries causes a new buffer 2 to be created.

How do I generate location list entries that refer to the proper unsaved
buffer?

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/uh0m28%244lk%241%40ciao.gmane.io.

Re: Edit edit tar.gz file

On 2023-10-21, Nutcha Schonn <aplushosting.asia@gmail.com> wrote:
> About 3-4 years ago I remember that I could edit a edit tar.gz file with vi
> command.
> When trying that today it does not work, is there something I can do to get
> it to work with the latest VIM 9 version?

It works with Vim 9.0.1946. Besides:

:echo g:loaded_tarPlugin

prints `v32`.

Either your runtime does not have the plugin (try `:e
$VIMRUNTIME/plugin/tarPLugin.vim`), or your configuration is preventing
the plugin from loading (for instance, if you set g:loaded_tarPlugin=1
in your vimrc).

You mention vi rather than vim: that may make a difference.

Hope this helps,
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/uh0k1d%2416j5%241%40ciao.gmane.io.

Edit edit tar.gz file

About 3-4 years ago I remember that I could edit a edit tar.gz file with vi command.
When trying that today it does not work, is there something I can do to get it to work with the latest VIM 9 version?

--
--
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/8cfa6b3f-d13c-445b-b03e-105ac7378eafn%40googlegroups.com.

Thursday, October 19, 2023

Can not get mode() to return '!'

Hello,

system: gVim on Windows 10 Pro 64-bit.

I am reworking my statusline and titlestring, and have a question
about the mode() function.

Using :set statusline=%{mode()}, and :help mode() as a reference, I have
tested every return value for mode() that I might need.  However, I
tried many different Shell and external commands, and
can not get mode() to return '!'.

Any help would be appreciated.

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/a65b2302-1496-17f9-9f11-252ae7674295%40fourbarlinkage.net.

Wednesday, October 18, 2023

A moment for peace!

I hope you won't take too much exception for asking that we all take a moment to consider our own potential in contributing towards World Peace.

To that end I invite you to read a 2-page posting that my wife came across on Facebook.


With the best of intentions ...

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/f7030805-cb7b-44c9-9760-d27a0d6146aan%40googlegroups.com.

Tuesday, October 17, 2023

Re: Licensing question: compatibility between Vim license and GPL

On 2023-10-16, Christian Brabandt <cblists@256bit.org> wrote:
>
> On So, 15 Okt 2023, Tony Mechelynck wrote:
>
>> On Sun, Oct 15, 2023 at 7:29 PM Lifepillar <lifepillar@lifepillar.me> wrote:
>> >
>> > Can code released under Vim license include third-party code released
>> > under GPLv2 or GPLv3?
>> >
>> > I have read that Vim license is "GPL-compatible", but it is not clear to
>> > me which way such compatibility works.
>> >
>> > Thanks for providing legal advice for free ;)
>> > Life
>>
>> I am not a lawyer, nor do I play one on TV; but I believe that the
>> following (at the bottom of the ":help license" text) is relevant:
>>
>> - According to Richard Stallman the Vim license is GNU GPL compatible.
>> A few minor changes have been made since he checked it, but that should not
>> make a difference.
>>
>> - If you link Vim with a library that goes under the GNU GPL, this limits
>> further distribution to the GNU GPL. Also when you didn't actually change
>> anything in Vim.
>>
>> - Once a change is included that goes under the GNU GPL, this forces all
>> further changes to also be made under the GNU GPL or a compatible license.
>>
>> - If you distribute a modified version of Vim, you can include your name and
>> contact information with the "--with-modified-by" configure argument or the
>> MODIFIED_BY define.
>
> Thanks, that is also my understanding of the compatibility of the
> licenses.

Thanks, that's useful.

This licensing stuff has higher complexity than the halting problem.

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

Re: typewriter sounds

On 2023-10-17, rwmit...@gmail.com <rwmitchell@gmail.com> wrote:
> Lifepillar,
>
> Could you include a sample g:keysound configuration that makes use of the
> auxiliary typewriter-sounds ? It would be nice to start from a known
> interesting setup.
>
> ( the help file mentions using keyN.mp3 where all of the auxiliary sounds
> are keyNNN.mp3; yes, that is an easy conversion to make, but it just feels
> out of sync starting with different names)

I have added an example to lifepillar/vim-keysound's Readme.

As this is a question about a plugin, using GitHub or contacting me via
email is preferable to using Vim's mailing list.

Enjoy,
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/ugmt2a%241682%241%40ciao.gmane.io.

typewriter sounds

Lifepillar,

Could you include a sample g:keysound configuration that makes use of the auxiliary typewriter-sounds ?  It would be nice to start from a known interesting setup.

( the help file mentions using keyN.mp3 where all of the auxiliary sounds are keyNNN.mp3; yes, that is an easy conversion to make, but it just feels out of sync starting with different names)

--
--
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/4e1d3bad-e8e5-46d0-98c8-6726ffa7c30dn%40googlegroups.com.

Monday, October 16, 2023

Re: Licensing question: compatibility between Vim license and GPL

On So, 15 Okt 2023, Tony Mechelynck wrote:

> On Sun, Oct 15, 2023 at 7:29 PM Lifepillar <lifepillar@lifepillar.me> wrote:
> >
> > Can code released under Vim license include third-party code released
> > under GPLv2 or GPLv3?
> >
> > I have read that Vim license is "GPL-compatible", but it is not clear to
> > me which way such compatibility works.
> >
> > Thanks for providing legal advice for free ;)
> > Life
>
> I am not a lawyer, nor do I play one on TV; but I believe that the
> following (at the bottom of the ":help license" text) is relevant:
>
> - According to Richard Stallman the Vim license is GNU GPL compatible.
> A few minor changes have been made since he checked it, but that should not
> make a difference.
>
> - If you link Vim with a library that goes under the GNU GPL, this limits
> further distribution to the GNU GPL. Also when you didn't actually change
> anything in Vim.
>
> - Once a change is included that goes under the GNU GPL, this forces all
> further changes to also be made under the GNU GPL or a compatible license.
>
> - If you distribute a modified version of Vim, you can include your name and
> contact information with the "--with-modified-by" configure argument or the
> MODIFIED_BY define.

Thanks, that is also my understanding of the compatibility of the
licenses.

Thanks,
Christian
--
"Someone's been mean to you! Tell me who it is, so I can punch him tastefully."
-- Ralph Bakshi's Mighty Mouse

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

Re: Licensing question: compatibility between Vim license and GPL

On Mo, 16 Okt 2023, Ruben Safir wrote:

> no
>
> don't use google mail. It sucks

Wow, we all enjoy your constructive contribution to the question asked.

Thanks,
Christian
--
I want you to organize my PASTRY trays ... my TEA-TINS are gleaming in
formation like a ROW of DRUM MAJORETTES -- please don't be FURIOUS with me --

--
--
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/ZSzwS3B27O856PE%2B%40256bit.org.

Re: Is uploading new scripts to vim.org possible?

On So, 15 Okt 2023, Gary Johnson wrote:

> I have a cron job that checks for new and changed scripts by
> comparing certain sections of the scripts page to the previously
> downloaded page. I was concerned that changes to the site might
> break that cron job, but I am happy to report that it still works.

good to hear, thanks.

Christian
--
QOTD:
"If you keep an open mind people will throw a lot of garbage in it."

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

Sunday, October 15, 2023

Re: Licensing question: compatibility between Vim license and GPL

no

don't use google mail.  It sucks


On Sun, Oct 15, 2023 at 8:29 PM Lifepillar <lifepillar@lifepillar.me> wrote:
Can code released under Vim license include third-party code released under GPLv2 or GPLv3? I have read that Vim license is "GPL-compatible", but it is not clear to me which way such compatibility works. Thanks for providing legal advice for
ZjQcmQRYFpfptBannerStart
WARNING: This email originated from outside of Long Island University. Do not click links or open attachments unless you recognize the sender and know the content is safe. - LIU Information Technology
 
ZjQcmQRYFpfptBannerEnd
Can code released under Vim license include third-party code released  under GPLv2 or GPLv3?    I have read that Vim license is "GPL-compatible", but it is not clear to  me which way such compatibility works.    Thanks for providing legal advice for free ;)  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 https://urldefense.com/v3/__http://www.vim.org/maillist.php__;!!DeIc-uvKXH9G!-3he3UKLyDJS6OCZDRvG3NOxZkWCK2dIUIGcoWt5go3-6igfdP8i4XDBHofam7IyQJfphy5Og49CFEnkqTu9nJYk_sQCnw$    ---   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://urldefense.com/v3/__https://groups.google.com/d/msgid/vim_use/ugh7h1*24g46*241*40ciao.gmane.io__;JSUl!!DeIc-uvKXH9G!-3he3UKLyDJS6OCZDRvG3NOxZkWCK2dIUIGcoWt5go3-6igfdP8i4XDBHofam7IyQJfphy5Og49CFEnkqTu9nJZwEkjd4Q$.  

--
--
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/CA%2BQUzrHSvgEYaxqq%3DXHaAgyztxTH5zPZf1LC7EQrBvDg3vHU-g%40mail.gmail.com.

Re: Licensing question: compatibility between Vim license and GPL

On Sun, Oct 15, 2023 at 7:29 PM Lifepillar <lifepillar@lifepillar.me> wrote:
>
> Can code released under Vim license include third-party code released
> under GPLv2 or GPLv3?
>
> I have read that Vim license is "GPL-compatible", but it is not clear to
> me which way such compatibility works.
>
> Thanks for providing legal advice for free ;)
> Life

I am not a lawyer, nor do I play one on TV; but I believe that the
following (at the bottom of the ":help license" text) is relevant:

- According to Richard Stallman the Vim license is GNU GPL compatible.
A few minor changes have been made since he checked it, but that should not
make a difference.

- If you link Vim with a library that goes under the GNU GPL, this limits
further distribution to the GNU GPL. Also when you didn't actually change
anything in Vim.

- Once a change is included that goes under the GNU GPL, this forces all
further changes to also be made under the GNU GPL or a compatible license.

- If you distribute a modified version of Vim, you can include your name and
contact information with the "--with-modified-by" configure argument or the
MODIFIED_BY define.


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/CAJkCKXt920iePmFus_-LRU4xysLATV6S9yVNinq7SsTZGAm%2B1A%40mail.gmail.com.

Re: Is uploading new scripts to vim.org possible?

On 2023-10-15, Christian Brabandt wrote:
> On Sa, 14 Okt 2023, Lifepillar wrote:
>
> > Now, after pressing "upload" I'm sent back to the form page, but the
> > script is still not uploaded.
>
> I tried it yesterday and it worked. I now tried it again and it still
> works.

I have a cron job that checks for new and changed scripts by
comparing certain sections of the scripts page to the previously
downloaded page. I was concerned that changes to the site might
break that cron job, but I am happy to report that it still works.

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/20231015184530.GG7180%40phoenix.

Licensing question: compatibility between Vim license and GPL

Can code released under Vim license include third-party code released
under GPLv2 or GPLv3?

I have read that Vim license is "GPL-compatible", but it is not clear to
me which way such compatibility works.

Thanks for providing legal advice for free ;)
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/ugh7h1%24g46%241%40ciao.gmane.io.

Re: Is uploading new scripts to vim.org possible?

On 2023-10-15, Christian Brabandt <cblists@256bit.org> wrote:
>
> On Sa, 14 Okt 2023, Lifepillar wrote:
>
>> Now, after pressing "upload" I'm sent back to the form page, but the
>> script is still not uploaded.
>
> I tried it yesterday and it worked. I now tried it again and it still
> works.
>
> Let's take this off-list. Can we connect around 14:00 EST so I can watch
> the log files while you are trying to do it?

Sorry, I had to go. Anyway, I've found that the problem is the upload
size limit, which my file, weighing at >500KB, exceeds. Somehow,
yesterday I've missed the "Request Entity Too Large" error at the top of
the page.

Removing some assets from the plugin has made the upload go through.

I will consider a different way of distributing the assets: in fact,
I don't like such large plugins myself.

Thanks for your support!
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/uggarg%24q73%241%40ciao.gmane.io.

Re: Is uploading new scripts to vim.org possible?

On Sa, 14 Okt 2023, Lifepillar wrote:

> Now, after pressing "upload" I'm sent back to the form page, but the
> script is still not uploaded.

I tried it yesterday and it worked. I now tried it again and it still
works.

Let's take this off-list. Can we connect around 14:00 EST so I can watch
the log files while you are trying to do it?

Thanks,
Christian
--
Mary Tyler Moore's SEVENTH HUSBAND is wearing my DACRON TANK TOP in a
cheap hotel in HONOLULU!

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

Saturday, October 14, 2023

Re: Is uploading new scripts to vim.org possible?

On 2023-10-14, Christian Brabandt <cblists@256bit.org> wrote:
>
> On Sa, 14 Okt 2023, Lifepillar wrote:
>
>> On 2023-10-14, Christian Brabandt <cblists@256bit.org> wrote:
>> >
>> > On Sa, 14 Okt 2023, Lifepillar wrote:
>> >
>> >> I am not able to upload new scripts to www.vim.org. The "type" drop-down
>> >> is empty and there is no "upload/submit" button or similar. Is that
>> >> intentional?
>> >
>> > of course not :) Sorry should be fixed now.
>>
>> Thanks, the page now look fine, but after pressing "upload",
>> add_script.php send me to an empty page and the plugin is not uploaded.
>
> Ah okay, I did not try to upload a new script. This also should work
> now.

Now, after pressing "upload" I'm sent back to the form page, but the
script is still not uploaded.

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

Re: Are function evaluated at Lambda declaration ?

Hi,

On Sat, Oct 14, 2023 at 9:05 AM Nicolas <nivaemail@gmail.com> wrote:
Hi,

Is this line declaration in vim9script evaluate the LogX_FOOBAR function or not ?


  var LambdDetectInLine: func = function('LogX_FOOBAR',
                                      [ LogX.pattern.start.func, LogX.codefunc]) # lambda like function 



The function is not invoked at the time of assigning a funcref variable.  But the function
will be compiled.

- Yegappan

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

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

Re: Is uploading new scripts to vim.org possible?

On Sa, 14 Okt 2023, Lifepillar wrote:

> On 2023-10-14, Christian Brabandt <cblists@256bit.org> wrote:
> >
> > On Sa, 14 Okt 2023, Lifepillar wrote:
> >
> >> I am not able to upload new scripts to www.vim.org. The "type" drop-down
> >> is empty and there is no "upload/submit" button or similar. Is that
> >> intentional?
> >
> > of course not :) Sorry should be fixed now.
>
> Thanks, the page now look fine, but after pressing "upload",
> add_script.php send me to an empty page and the plugin is not uploaded.

Ah okay, I did not try to upload a new script. This also should work
now.

Thanks,
Christian
--
"You've got to have a gimmick if your band sucks."
-- Gary Giddens

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

Re: Is uploading new scripts to vim.org possible?

On 2023-10-14, Christian Brabandt <cblists@256bit.org> wrote:
>
> On Sa, 14 Okt 2023, Lifepillar wrote:
>
>> I am not able to upload new scripts to www.vim.org. The "type" drop-down
>> is empty and there is no "upload/submit" button or similar. Is that
>> intentional?
>
> of course not :) Sorry should be fixed now.

Thanks, the page now look fine, but after pressing "upload",
add_script.php send me to an empty page and the plugin is not uploaded.

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

Are function evaluated at Lambda declaration ?

Hi,

Is this line declaration in vim9script evaluate the LogX_FOOBAR function or not ?


  var LambdDetectInLine: func = function('LogX_FOOBAR',
                                      [ LogX.pattern.start.func, LogX.codefunc]) # lambda like function 


Thank you
Nicolas

--
--
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/60ef68d3-6f94-4789-ac6b-c47ddca9f9abn%40googlegroups.com.

Re: Is uploading new scripts to vim.org possible?

On Sa, 14 Okt 2023, Lifepillar wrote:

> I am not able to upload new scripts to www.vim.org. The "type" drop-down
> is empty and there is no "upload/submit" button or similar. Is that
> intentional?

of course not :) Sorry should be fixed now.

Thanks,
Christian
--
ADA:
Something you need only know the name of to be an Expert in
Computing. Useful in sentences like, "We had better develop
an ADA awareness.
-- "Datamation", January 15, 1984

--
--
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/ZSq1jLir/J254WMT%40256bit.org.

Is uploading new scripts to vim.org possible?

I am not able to upload new scripts to www.vim.org. The "type" drop-down
is empty and there is no "upload/submit" button or similar. Is that
intentional?

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

Saturday, October 7, 2023

Re: Vim9 class implementation update

CC'ing: vim_use mailing list.

Hi Yegappan,

On Sa, 07 Okt 2023, Yegappan Lakshmanan wrote:

> Hi all,
>
> The following Vim9 class features have been implemented so far:
>
> 1. Class definition and object creation
> 2. Class variables and methods
> 3. Object variables and methods
> 4. Read-only, Read-write and private access control for class/object variables
> 5. Extending a class (overriding methods)
> 6. Defining an interface
> 7. Implementing an interface
> 8. Defining an abstract class
> 9. Extending an abstract class
>
> The list of known issues is here:
> https://github.com/vim/vim/issues?q=is%3Aopen+is%3Aissue+label%3Avim9class
>
> We need to freeze the Vim9 class specification for the Vim 9.1 release.
> It will be helpful if folks can try these features out and report any issues.
>
> We are mainly looking for any modifications to the specification
> that will break backward compatibility.  Bug fixes and new features can
> be addressed after the Vim 9.1 release.
>
> It is also helpful to get some feedback on the documentation:
> https://github.com/vim/vim/blob/master/runtime/doc/vim9class.txt
>
> The Vim9 class todo list is here:
> https://github.com/vim/vim/blob/master/runtime/doc/todo.txt#L124

Thanks for that. I appreciate your hard work here. Please anybody
interested in using the new Vim9 class implementation test it out and
provide feedback.


Thanks,
Christian
--
Murphy was an optimist.

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

Friday, October 6, 2023

Re: syntax files: how to prevent embedded syntax from leaking out of a region?

On Wednesday, October 4, 2023 at 8:02:42 PM UTC-5 M wrote:
> a consequence of having many poorly written syntax files. Main distribution included

Your idea of a different override for syntax-include is the practical solution. As you pointed out, syntax-include is dependent on the authors of all the syntax files in the distribution to beware of what happens when their syntax is syntax-included. It's the moral equivalent of cooperative multitasking or running a processor in real mode -- you have to trust every other syntax not to step on yours. A region needs some way to absolutely stop an included syntax from highlighting past the region.

My project is a free syntax file for Noweb source files.* A single Noweb source file can contain all the objects in multiple languages that make up a package. Those objects can be represented in the Noweb source file as fragments, to be pieced together by Noweb. For example, an inner syntax region can easily contain the open-brace for a block but not the close-brace.

An included syntax file will seize on that open-brace and highlight forward until it finds a matching close-brace. But it actually needs to stop at the end of the region that contains the code fragment. Because the close-brace it finds is likely to be in a different inner syntax region, maybe even one written in a different language!

As a plan "B", I hate to have to reinvent stock syntaxes, and I would probably do a poor job. This is my first major foray into Vim syntax highlighting. I might eventually take a stab at it, for languages I use where I have run into the problem. Plan "C" is to just document the problem, and give advice if I can for writing code fragments that sidestep the problem. Or plan "D", I could disable recognition of certain languages, which is what I do now, but I had been thinking of that as a stopgap measure during development, not a solution.

* https://metaed.com/papers/vim-noweb/

--
--
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/9f9dd00c-784b-4518-9560-152f0aff5c3cn%40googlegroups.com.

Wednesday, October 4, 2023

Re: syntax files: how to prevent embedded syntax from leaking out of a region?

"extend" clearly has the highest priority, so it cannot be overridden. But that's not the problem by itself. The real trouble is a misuse of it. It looks like every person out there starts playing with syntaxes by adding "keepend" and "extend" almost everywhere. While "extend" should only be used for those very special elements that essentially "violate normal rules", like escape sequences or such.

In other words, every inner syntax region is already "extend" by default, so an outer region _may_ put "keepend" to it if needed. But the inner region _under exceptional circumstances_ still may overpower it all with "extend". Maybe, we could add yet another override specially for syntax-include but, imo, that could lead to even more confusion. Instead, we should  better clean up existing syntax files from that garbage.

So, in my opinion, the whole issue is a consequence of having many poorly written syntax files. Main distribution included.

Kind regards,
Matvey

чт, 5 окт. 2023 г., 00:09 Edward McGuire <metaed@gmail.com>:
On Wednesday, October 4, 2023 at 1:55:55 PM UTC-5 Christian Brabandt wrote:
> Either nobody knows the answer or nobody understood the problem.

Thank you Christian, I'm glad to know it got out there anyway.

So maybe it will help for me to restate the problem, maybe not.

This has to do with syntax highlighting when a file written in one language has embedded in it a code block written in a different language.
The Vim distribution includes two great practical examples of how to do this.
Both examples highlight the code inside the block using different syntax rules than the code outside the block.

One is in help document "syntax.txt" under the tag "sh-embed".
This shows how to extend the sh syntax so that embedded awk code is highlighted using awk syntax.

The other is syntax file "ant.vim", which has a powerful technique to support multiple languages embedded in Ant syntax and highlight each language using the correct syntax file.

The problem I'm having is that sometimes code past the end of the block gets highlighted using the syntax rules for the code inside the block.

Here is an excerpt from the syntax I developed.
The excerpt highlights most of the buffer using the preinstalled "tex.vim".
Then, within any embedded code block introduced by a <<blockname>>= code block introducer, and terminated by an @ or another <<blockname>>= code block introducer, the embedded code block is highlighted by the preinstalled "make.vim".

syntax include @SyntaxTeX syntax/tex.vim
unlet b:current_syntax
syntax region Normal start=/\v%^/ end=/\v%$/ contains=@SyntaxTeX
syntax match nowebCodeChunkDeclarationMake "\v^[<][<][mM]akefile(|\s.*)[>][>][=]\s*$"
\ skipnl
\ containedin=@SyntaxTeX
\ nextgroup=nowebCodeChunkBodyMake
highlight link nowebCodeChunkDeclarationMake PreProc
syntax include @SyntaxMake syntax/make.vim
unlet b:current_syntax
syntax region nowebCodeChunkBodyMake
\ keepend
\ start="\v.*"
\ end="\v^([@]($| ))|([<][<].*[>][>][=][ \t]*$)"me=s-1
\ contained
\ contains=@SyntaxMake

The key bit is the "keepend" keyword on the embedded code block.
It is there to force the block terminator to also terminate any contained item.
It should stop the embedded language from reading past the block terminator.
But the embedded language syntax can override this using "extend".
That can cause the embedded language syntax highlighting to continue past the end of the code block delimiter.
And the problem seems to be that some of the preinstalled syntaxes do use "extend".

The question is how to prevent the preinstalled syntaxes from ever highlighting past the end of the delimiter.

--
--
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/7864bd47-6f44-42c5-8449-53e7740eae17n%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/CAFsTB%2BKM0Sg8njdvXVuy2tdbu7vgZjmk1SQRn8EcoNmn6mLGqA%40mail.gmail.com.

Re: syntax files: how to prevent embedded syntax from leaking out of a region?

On Wednesday, October 4, 2023 at 1:55:55 PM UTC-5 Christian Brabandt wrote:
> Either nobody knows the answer or nobody understood the problem.

Thank you Christian, I'm glad to know it got out there anyway.

So maybe it will help for me to restate the problem, maybe not.

This has to do with syntax highlighting when a file written in one language has embedded in it a code block written in a different language.
The Vim distribution includes two great practical examples of how to do this.
Both examples highlight the code inside the block using different syntax rules than the code outside the block.

One is in help document "syntax.txt" under the tag "sh-embed".
This shows how to extend the sh syntax so that embedded awk code is highlighted using awk syntax.

The other is syntax file "ant.vim", which has a powerful technique to support multiple languages embedded in Ant syntax and highlight each language using the correct syntax file.

The problem I'm having is that sometimes code past the end of the block gets highlighted using the syntax rules for the code inside the block.

Here is an excerpt from the syntax I developed.
The excerpt highlights most of the buffer using the preinstalled "tex.vim".
Then, within any embedded code block introduced by a <<blockname>>= code block introducer, and terminated by an @ or another <<blockname>>= code block introducer, the embedded code block is highlighted by the preinstalled "make.vim".

syntax include @SyntaxTeX syntax/tex.vim
unlet b:current_syntax
syntax region Normal start=/\v%^/ end=/\v%$/ contains=@SyntaxTeX
syntax match nowebCodeChunkDeclarationMake "\v^[<][<][mM]akefile(|\s.*)[>][>][=]\s*$"
\ skipnl
\ containedin=@SyntaxTeX
\ nextgroup=nowebCodeChunkBodyMake
highlight link nowebCodeChunkDeclarationMake PreProc
syntax include @SyntaxMake syntax/make.vim
unlet b:current_syntax
syntax region nowebCodeChunkBodyMake
\ keepend
\ start="\v.*"
\ end="\v^([@]($| ))|([<][<].*[>][>][=][ \t]*$)"me=s-1
\ contained
\ contains=@SyntaxMake

The key bit is the "keepend" keyword on the embedded code block.
It is there to force the block terminator to also terminate any contained item.
It should stop the embedded language from reading past the block terminator.
But the embedded language syntax can override this using "extend".
That can cause the embedded language syntax highlighting to continue past the end of the code block delimiter.
And the problem seems to be that some of the preinstalled syntaxes do use "extend".

The question is how to prevent the preinstalled syntaxes from ever highlighting past the end of the delimiter.

--
--
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/7864bd47-6f44-42c5-8449-53e7740eae17n%40googlegroups.com.

Re: syntax files: how to prevent embedded syntax from leaking out of a region?

On Mi, 04 Okt 2023, Edward McGuire wrote:

> This question got no replies. Did it fail to be circulated? Does nobody know the answer? Is it a stupid question? :)

Either nobody knows the answer or nobody understood the problem.

Thanks,
Christian
--
There is never time to do it right, but always time to do it over.

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

Re: syntax files: how to prevent embedded syntax from leaking out of a region?

This question got no replies. Did it fail to be circulated? Does nobody know the answer? Is it a stupid question? :)

On Thursday, September 14, 2023 at 1:22:07 PM UTC-5 Edward McGuire wrote:
On Friday, July 21, 2023 at 3:18:39 PM UTC-5 Edward McGuire wrote:
> how can I reliably ALWAYS limit embedded language highlighting to the region that contains it, without the chance that the embedded language can break out?

Still looking for a solution to this -- how to prevent pre-installed language syntaxes from breaking out of syntax regions marked "keepend".

Cheers!
Edward

--
--
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/73c0b602-cb84-4597-b4f2-1256a69e1a1en%40googlegroups.com.

Tuesday, October 3, 2023

language specific glyphs

Modern fonts provide for `language specific typography' by mapping,
depending on the language or other preference, distinct sets of glyphs
to the same Unicode code points. Such is the case e.g. with Cyrillic,
where one may expect certain letters to look differently in, say,
Bulgarian, Russian, and Serbian. (And an example of a font that
provides this capability is Iosevka, which is my current favourite of
a monospaced font.)

In CSS, for example, the use of language specific glyphs is enabled
by setting `font-language-override' accordingly, while in a word
processor a generic setting, such as simply `language' is typically
used to the same end.

So, my question is: is it possible to choose language specific glyphs
in Vim? I was unable to find such an option, but I may be missing
something.

Thanks,
Boyko

--
--
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/CALdOZqmroSWX4KcYHWBjjgzQsVdix5%3Dgs9YPhbA%2BC7S-snF2BQ%40mail.gmail.com.