Friday, January 31, 2025

Re: vim build tests require xz?

On 1/31/25 8:04 AM, Christian Brabandt wrote:
Thanks for reporting. Should be fixed with v9.1.1061    

It is! Builds, tests, and runs fine on both a machine with and without unxz. Thanks much Christian.

Brian

Re: vim build tests require xz?

On Thu, 30 Jan 2025, Brian L. Matthews wrote:

> I build vim from source using:
>
> ./configure \
>     --disable-gui \
>     --enable-largefile \
>     --enable-multibyte \
>     --enable-python3interp \
>     --prefix=/usr/local \
>     --with-compiledby='Brian Matthews <blmatthews+vim@gmail.com>' &&
>     make &&
>     make test
>
> I did a git pull this morning, getting:
>
> $ git rev-parse HEAD
> 8297e2cee337c626c6691e81b25e1f1897c71b86
>
> The make and make test worked just fine on one machine. I then tried it on
> my main development machine and it ended with:
>
> 01:58 Executing Test_glvs_default_tar_xz()
> /bin/bash: unxz: command not found
> tar: dumpx.tar: Cannot open: No such file or directory
> tar: Error is not recoverable: exiting now
> mv: rename dumpx.tar to /Users/blm/src/3rdparty/vim9/src/testdir/XfakeHOME/.vim/GetLatest/Installed/dumpx.tar:
> No such file or directory
>
> On the machine the build worked on:
>
> 01:20 Executing Test_glvs_default_tar_xz()
> x dumpx/
> x dumpx/README.md
> x dumpx/LICENSE
> x dumpx/plugin/
> x dumpx/plugin/dumpx.vim
> x dumpx/plugin/autoycm.pl
> x dumpx/syntax/
> x dumpx/syntax/dumpx.vim
> x dumpx/doc/
> x dumpx/doc/dumpx.txt
>
> On the machine it fails:
>
> $ type unxz
> -bash: type: unxz: not found
>
> And where it works:
>
> $ type unxz
> unxz is /usr/local/bin/unxz
>
> I'm still on macOS Monterey, so maybe xz/unxz come standard with Xcode for a
> newer macOS? Although I do an awful lot of development on a machine with
> neither installed. :-)
>
> There's an obvious workaround, although I kind of hate installing extra
> stuff if I can avoid it, but thought someone would want to know.

Thanks for reporting. Should be fixed with v9.1.1061

Thanks,
Christian
--
You will always find something in the last place you look.

--
--
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 visit https://groups.google.com/d/msgid/vim_use/Z5z0kGU3Xn99cf0k%40256bit.org.

Thursday, January 30, 2025

vim build tests require xz?

I build vim from source using:

./configure \
    --disable-gui \
    --enable-largefile \
    --enable-multibyte \
    --enable-python3interp \
    --prefix=/usr/local \
    --with-compiledby='Brian Matthews <blmatthews+vim@gmail.com>' &&
    make &&
    make test

I did a git pull this morning, getting:

$ git rev-parse HEAD
8297e2cee337c626c6691e81b25e1f1897c71b86

The make and make test worked just fine on one machine. I then tried it
on my main development machine and it ended with:

01:58 Executing Test_glvs_default_tar_xz()
/bin/bash: unxz: command not found
tar: dumpx.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
mv: rename dumpx.tar to
/Users/blm/src/3rdparty/vim9/src/testdir/XfakeHOME/.vim/GetLatest/Installed/dumpx.tar:
No such file or directory

On the machine the build worked on:

01:20 Executing Test_glvs_default_tar_xz()
x dumpx/
x dumpx/README.md
x dumpx/LICENSE
x dumpx/plugin/
x dumpx/plugin/dumpx.vim
x dumpx/plugin/autoycm.pl
x dumpx/syntax/
x dumpx/syntax/dumpx.vim
x dumpx/doc/
x dumpx/doc/dumpx.txt

On the machine it fails:

$ type unxz
-bash: type: unxz: not found

And where it works:

$ type unxz
unxz is /usr/local/bin/unxz

I'm still on macOS Monterey, so maybe xz/unxz come standard with Xcode
for a newer macOS? Although I do an awful lot of development on a
machine with neither installed. :-)

There's an obvious workaround, although I kind of hate installing extra
stuff if I can avoid it, but thought someone would want to know.

Thanks,
Brian

--
--
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 visit https://groups.google.com/d/msgid/vim_use/ffafc666-6b93-4d5c-8d47-dd99bcd2f90c%40gmail.com.

Tuesday, January 14, 2025

Re: A gf mapping which opens a tab or window?

On Sun, Jan 12, 2025 at 3:45 AM BPJ <bpj@melroch.se> wrote:
Apologies if I'm asking the bleeding obvious, but as so often I find it hard to find what I'm looking for in the help.

The `gf` mapping opens the file name under the cursor in the same window. I have a file with one (absolute) file path on each line, and would like to be able to open two or more of them in new tabs without closing that file. If I do `gf` and then `:tabe #` I "lose my position" in the file with paths. So is there a mapping or command which opens the filepath under the cursor in a new tab or at least a new window without losing my position in the file with the path, or how could one be created (it probably could, this being Vim, but I can't figure out how...)?


:help CTRL-W_f
:help CTRL-W_gf

Regards,
-Arun

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CAJUkyiFww7LqU5KAKrS6y4JbneUH-Hpx5hv0NS8%2B6YKJTeO6jw%40mail.gmail.com.

Re: A gf mapping which opens a tab or window?

guys there is a special global option, which i won't say the name
basically it changes default behaviour of opening new buffer
so by default it opens in current window
and by changing this option you can make it open in new tab
this will change not only gf, but :e file also!

вт, 14 янв. 2025 г. в 10:44, Igbanam Ogbuluijah <xigbanam@gmail.com>:
I'd do it like so
  1. :vs (or :s) Open the buffer in a new split. This keeps your position
  2. gf to the file under the cursor.
  3. <C-W>T Move the new split into a tab



On Sun, 12 Jan 2025, 11:45 BPJ, <bpj@melroch.se> wrote:
Apologies if I'm asking the bleeding obvious, but as so often I find it hard to find what I'm looking for in the help.

The `gf` mapping opens the file name under the cursor in the same window. I have a file with one (absolute) file path on each line, and would like to be able to open two or more of them in new tabs without closing that file. If I do `gf` and then `:tabe #` I "lose my position" in the file with paths. So is there a mapping or command which opens the filepath under the cursor in a new tab or at least a new window without losing my position in the file with the path, or how could one be created (it probably could, this being Vim, but I can't figure out how...)?

TIA,
/bpj

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CADAJKhDj145XNKwep5H%3D_4EOqRLewA%2BqZybfBGbkQZjp%3DKCg1w%40mail.gmail.com.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CAOmRJrfNESO1ChTrpHhMW%2Bjyw9Djq%3DWCZKc5oF-0QrqR7ka8Dg%40mail.gmail.com.

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

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

Re: A gf mapping which opens a tab or window?

I'd do it like so
  1. :vs (or :s) Open the buffer in a new split. This keeps your position
  2. gf to the file under the cursor.
  3. <C-W>T Move the new split into a tab



On Sun, 12 Jan 2025, 11:45 BPJ, <bpj@melroch.se> wrote:
Apologies if I'm asking the bleeding obvious, but as so often I find it hard to find what I'm looking for in the help.

The `gf` mapping opens the file name under the cursor in the same window. I have a file with one (absolute) file path on each line, and would like to be able to open two or more of them in new tabs without closing that file. If I do `gf` and then `:tabe #` I "lose my position" in the file with paths. So is there a mapping or command which opens the filepath under the cursor in a new tab or at least a new window without losing my position in the file with the path, or how could one be created (it probably could, this being Vim, but I can't figure out how...)?

TIA,
/bpj

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CADAJKhDj145XNKwep5H%3D_4EOqRLewA%2BqZybfBGbkQZjp%3DKCg1w%40mail.gmail.com.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CAOmRJrfNESO1ChTrpHhMW%2Bjyw9Djq%3DWCZKc5oF-0QrqR7ka8Dg%40mail.gmail.com.

Monday, January 13, 2025

Disable bold font in terminal buffer

On GVim :terminal buffer (using Windows cmd shell), I get bold fonts
sometimes. Now, I do use clink (which is a module that adds some GNU
readline facilities to CMD) and I disable bold fonts on terminal so I
can't tell if the bold fonts are coming from clink. I disabled
everything regarding bold in clink, but I may have missed some thing.

In any case, I want to disable bold fonts in :terminal buffer regardless
of where it's coming from. Is that possible?

--
Enan

--
--
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 visit https://groups.google.com/d/msgid/vim_use/20250113211851.00005ee8%40gmail.com.

Sunday, January 12, 2025

Re: A gf mapping which opens a tab or window?

On Sun, 12 Jan 2025, Tim Chase wrote:

> On 2025-01-12 12:45, BPJ wrote:
> > The `gf` mapping opens the file name under the cursor in the same window. I
> > have a file with one (absolute) file path on each line, and would like to
> > be able to open two or more of them in new tabs without closing that file.
> > If I do `gf` and then `:tabe #` I "lose my position" in the file with
> > paths. So is there a mapping or command which opens the filepath under the
> > cursor in a new tab or at least a new window without losing my position in
> > the file with the path, or how could one be created (it probably could,
> > this being Vim, but I can't figure out how...)?
>
> While I don't use tabs much and can't speak to them, for windows, you can use
>
> :help CTRL-W_f

... and for tabpages there is CTRL-W_gf (mentioned just a few lines
below the above entry :))

Thanks,
Christian
--
If you had better tools, you could more effectively demonstrate your
total incompetence.

--
--
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 visit https://groups.google.com/d/msgid/vim_use/Z4QYCRRUGg/cNgxo%40256bit.org.

Re: A gf mapping which opens a tab or window?

Hi,

there is this the family of commands, of which this is the most representative:

CTRL-W gf                        *CTRL-W_gf*
        Open a new tab page and edit the file name under the cursor.
        Like "tab split" and "gf", but the new tab page isn't created
        if the file does not exist.

Best regards,

Martino

On 12/01/25 12:45, BPJ wrote:
Apologies if I'm asking the bleeding obvious, but as so often I find it hard to find what I'm looking for in the help.

The `gf` mapping opens the file name under the cursor in the same window. I have a file with one (absolute) file path on each line, and would like to be able to open two or more of them in new tabs without closing that file. If I do `gf` and then `:tabe #` I "lose my position" in the file with paths. So is there a mapping or command which opens the filepath under the cursor in a new tab or at least a new window without losing my position in the file with the path, or how could one be created (it probably could, this being Vim, but I can't figure out how...)?

TIA,
/bpj
--
--
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 visit https://groups.google.com/d/msgid/vim_use/CADAJKhDj145XNKwep5H%3D_4EOqRLewA%2BqZybfBGbkQZjp%3DKCg1w%40mail.gmail.com.

Re: A gf mapping which opens a tab or window?

On 2025-01-12 12:45, BPJ wrote:
> The `gf` mapping opens the file name under the cursor in the same window. I
> have a file with one (absolute) file path on each line, and would like to
> be able to open two or more of them in new tabs without closing that file.
> If I do `gf` and then `:tabe #` I "lose my position" in the file with
> paths. So is there a mapping or command which opens the filepath under the
> cursor in a new tab or at least a new window without losing my position in
> the file with the path, or how could one be created (it probably could,
> this being Vim, but I can't figure out how...)?

While I don't use tabs much and can't speak to them, for windows, you can use

:help CTRL-W_f

to open the filename under the cursor in a new window.

-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 visit https://groups.google.com/d/msgid/vim_use/Z4PaO4F_UIWGQGKY%40thechases.com.

A gf mapping which opens a tab or window?

Apologies if I'm asking the bleeding obvious, but as so often I find it hard to find what I'm looking for in the help.

The `gf` mapping opens the file name under the cursor in the same window. I have a file with one (absolute) file path on each line, and would like to be able to open two or more of them in new tabs without closing that file. If I do `gf` and then `:tabe #` I "lose my position" in the file with paths. So is there a mapping or command which opens the filepath under the cursor in a new tab or at least a new window without losing my position in the file with the path, or how could one be created (it probably could, this being Vim, but I can't figure out how...)?

TIA,
/bpj

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CADAJKhDj145XNKwep5H%3D_4EOqRLewA%2BqZybfBGbkQZjp%3DKCg1w%40mail.gmail.com.

Wednesday, January 8, 2025

Re: Imprecise documentation of popup_close()

On Wed, 08 Jan 2025, Lifepillar wrote:

> According to `:help popup_close()`, when a popup is closed the "window
> and the associated buffer will be deleted". That is not the case,
> however, if the popup was created with an existing buffer, e.g.:
>
> vim9script
> var bufnr = bufadd('Popup buffer')
> var winid = popup_create(bufnr, {})
> popup_close(winid)
> echo bufexists(bufnr)
>
> So, I think that the help should be amended with an additional sentence:
> "If the popup was created with an existing buffer then only the popup
> window will be closed." or something along those lines.

Thanks, fixed as of Commit 1f045f324d0a8e9e897e5e

Thanks,
Christian
--
Just because you're paranoid doesn't mean they AREN'T after 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 visit https://groups.google.com/d/msgid/vim_use/Z355U3fIRQraaBcF%40256bit.org.

Imprecise documentation of popup_close()

According to `:help popup_close()`, when a popup is closed the "window
and the associated buffer will be deleted". That is not the case,
however, if the popup was created with an existing buffer, e.g.:

vim9script
var bufnr = bufadd('Popup buffer')
var winid = popup_create(bufnr, {})
popup_close(winid)
echo bufexists(bufnr)

So, I think that the help should be amended with an additional sentence:
"If the popup was created with an existing buffer then only the popup
window will be closed." or something along those lines.

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 visit https://groups.google.com/d/msgid/vim_use/vllsl0%24umv%241%40ciao.gmane.io.

Sunday, January 5, 2025

Re: Get buffer's line count and check for emptiness

On 2025-01-05, Salman Halim <salmanhalim@gmail.com> wrote:
> I may have missed the part where you're not checking the current buffer
> (the bufnr bit). Not sure of an easier way than what you have to check if
> another buffer is empty.

Thanks. For some reason the beginning of my message got cut away. The
context is that I need to check in a Vim script function whether
a buffer passed as a parameter to the function is empty or how many
lines it has.

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 visit https://groups.google.com/d/msgid/vim_use/vles1p%24shh%241%40ciao.gmane.io.

Re: Get buffer's line count and check for emptiness

I may have missed the part where you're not checking the current buffer (the bufnr bit). Not sure of an easier way than what you have to check if another buffer is empty.

Salman

On Sun, Jan 5, 2025, 08:13 Salman Halim <salmanhalim@gmail.com> wrote:

line('$') == 1 to see if it's just one line
getline('1') == '' to see if that line is completely empty

Salman

On Sun, Jan 5, 2025, 08:09 Lifepillar <lifepillar@lifepillar.me> wrote:
    var linecount = getbufinfo(bufnr)[0].linecount

I also need to check whether a buffer is empty, which I do like this:

    var is_empty = linecount == 1 && empty(getbufoneline(bufnr, 1))

I'm wondering: is there any simpler way to perform the two tasks above
that I'm missing?

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 visit https://groups.google.com/d/msgid/vim_use/vle098%24an9%241%40ciao.gmane.io.

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CANuxnEdQ38TwkKnX3m5jcxAL0F31eoeXyTsp-G%3DPtmAetCE92Q%40mail.gmail.com.

Re: Get buffer's line count and check for emptiness

line('$') == 1 to see if it's just one line
getline('1') == '' to see if that line is completely empty

Salman

On Sun, Jan 5, 2025, 08:09 Lifepillar <lifepillar@lifepillar.me> wrote:
    var linecount = getbufinfo(bufnr)[0].linecount

I also need to check whether a buffer is empty, which I do like this:

    var is_empty = linecount == 1 && empty(getbufoneline(bufnr, 1))

I'm wondering: is there any simpler way to perform the two tasks above
that I'm missing?

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 visit https://groups.google.com/d/msgid/vim_use/vle098%24an9%241%40ciao.gmane.io.

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CANuxnEc5RKwWA9bKGmeu6cj0%3D5Ec0aJ6uzrmZ9%3DZMVFXNcUUDw%40mail.gmail.com.

Get buffer's line count and check for emptiness

var linecount = getbufinfo(bufnr)[0].linecount

I also need to check whether a buffer is empty, which I do like this:

var is_empty = linecount == 1 && empty(getbufoneline(bufnr, 1))

I'm wondering: is there any simpler way to perform the two tasks above
that I'm missing?

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 visit https://groups.google.com/d/msgid/vim_use/vle098%24an9%241%40ciao.gmane.io.

Friday, January 3, 2025

Re: Problem with keyboard mapping

Yes, the nnoremap worked perfectly! It looks to be an issue with Ctrl+space for some reason.
Thank you so much Igbanam for your help - I was struggling with this for several months and was ready to give up on getting the vim mapping right.

Thanks,
Ven

On Thu, Jan 2, 2025 at 4:24 PM Igbanam Ogbuluijah <xigbanam@gmail.com> wrote:
Could you try this mapping

nnoremap <leader><space> :SWSqlExecuteCurrent<CR>

I don't know how the leader key would work with <C-space> (which I read as <ctrl><space>). 


Igbanam


On Thu, Jan 2, 2025 at 5:47 PM Ven Tadipatri <vtadipatri@gmail.com> wrote:
Hi,
  I have the Vim Sql Workbench plugin, and I'm trying to get the keyboard shortcut working. When I type ":nmap", I see that this mapping is there:
n  \<C-Space>   @:SWSqlExecuteCurrent<CR>

However, when I type "backslash - ctrl - space" , the Terminal just flashes and does nothing. I've tried using a different leader key, and the same thing happens, so it doesn't seem to be a Mac Terminal setting. 
  This is on a mac, with vim 9.1 . On my old mac, this keymapping was working. It still works if I type ":SWSqlExecuteCurrent", it's just the keyboard shortcut that I'm struggling with.
  Would appreciate any help!

Thanks,
Ven

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CAEodY67Vww8pR%2B6K24T33YcKgsBXw97byZPYWa9YXrb4Z-3jVg%40mail.gmail.com.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CAOmRJrcZZB_kgtTSDz%3DAXUsmTp%3D0paqMv4hi%3D_6CK%3DtYaei2Mw%40mail.gmail.com.

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

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

Thursday, January 2, 2025

Re: Problem with keyboard mapping

Could you try this mapping

nnoremap <leader><space> :SWSqlExecuteCurrent<CR>

I don't know how the leader key would work with <C-space> (which I read as <ctrl><space>). 


Igbanam


On Thu, Jan 2, 2025 at 5:47 PM Ven Tadipatri <vtadipatri@gmail.com> wrote:
Hi,
  I have the Vim Sql Workbench plugin, and I'm trying to get the keyboard shortcut working. When I type ":nmap", I see that this mapping is there:
n  \<C-Space>   @:SWSqlExecuteCurrent<CR>

However, when I type "backslash - ctrl - space" , the Terminal just flashes and does nothing. I've tried using a different leader key, and the same thing happens, so it doesn't seem to be a Mac Terminal setting. 
  This is on a mac, with vim 9.1 . On my old mac, this keymapping was working. It still works if I type ":SWSqlExecuteCurrent", it's just the keyboard shortcut that I'm struggling with.
  Would appreciate any help!

Thanks,
Ven

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CAEodY67Vww8pR%2B6K24T33YcKgsBXw97byZPYWa9YXrb4Z-3jVg%40mail.gmail.com.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CAOmRJrcZZB_kgtTSDz%3DAXUsmTp%3D0paqMv4hi%3D_6CK%3DtYaei2Mw%40mail.gmail.com.

Re: Adding a single space to 'isk' but not multiple spaces?

On 2025-01-02, Tim Chase <vim@tim.thechases.com> wrote:
> Using ledger(1) for finances, fields are usually delimited by runs
> of 2+ spaces (or a tab), allowing a single space in the account-name.
> So I might have a transaction like
>
> 2024-012-31 ! Groceries
> Expenses:Household:Groceries:Food Lion $18.43
> Liabilities:Credit Card:Visa -$18.43
>
> (note the 2+ space indent and the 2+ space separation between the
> account and the amount, while the single space in "Food Lion" and
> "Credit Card")
>
> It would be awfully handy to have colons and single-spaces be part
> of 'isk' so that i_CTRL-N and i_CTRL-P can find full accounts
> is there a better solution I've overlooked?

Do you know about https://github.com/ledger/vim-ledger? Even if you
don't want a plugin, you may still copy its LedgerComplete omnifunc
function. I'm not using it currently, but I wrote the initial version of
it, and unless something was changed, it should allow you to complete
accounts by specifying prefixes. So, for instance, Ex:F:G<tab> becomes
Expenses:Food:Groceries. Very handy.

Btw, I have a bunch of mappings for several reports. They may not be up
to date, but in case you're interested:

https://github.com/lifepillar/vimrc/blob/master/after/ftplugin/ledger.vim

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 visit https://groups.google.com/d/msgid/vim_use/vl6vn3%24fci%241%40ciao.gmane.io.

Re: Adding a single space to 'isk' but not multiple spaces?

The option that you seem to exclude is setlocal complete+=k{dict} for a dict file of your accounts.
How about redefining :help 'define'/'include', or ~/.ctags suitably to detect and complete them by `i_ctrl-x_ctrl-d/i/] ?

Le jeudi 2 janvier 2025 à 20:12:20 UTC+1, Tim Chase a écrit :
Using ledger(1) for finances, fields are usually delimited by runs
of 2+ spaces (or a tab), allowing a single space in the account-name.
So I might have a transaction like

2024-012-31 ! Groceries
Expenses:Household:Groceries:Food Lion $18.43
Liabilities:Credit Card:Visa -$18.43

(note the 2+ space indent and the 2+ space separation between the
account and the amount, while the single space in "Food Lion" and
"Credit Card")

It would be awfully handy to have colons and single-spaces be part
of 'isk' so that i_CTRL-N and i_CTRL-P can find full accounts (even
if they contain the occasional space), but that starts causing weird
issues (Vim really doesn't like having space in 'isk')

I've tried i_CTRL-X_CTRL-L to do whole-line completion but I have
enough transactions (and each amount regularly differs) that this
returns dozens or hundreds of matching lines, so it's less than useful.

Short of completely hijacking ^N/^P functionality to complete from
my known chart of accounts, is there a better solution I've overlooked?

Thanks!

-tim

(1) https://ledger-cli.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 visit https://groups.google.com/d/msgid/vim_use/7d78e736-18ff-4d7f-98e0-3a1c9f6c2348n%40googlegroups.com.

Adding a single space to 'isk' but not multiple spaces?

Using ledger(1) for finances, fields are usually delimited by runs
of 2+ spaces (or a tab), allowing a single space in the account-name.
So I might have a transaction like

2024-012-31 ! Groceries
Expenses:Household:Groceries:Food Lion $18.43
Liabilities:Credit Card:Visa -$18.43

(note the 2+ space indent and the 2+ space separation between the
account and the amount, while the single space in "Food Lion" and
"Credit Card")

It would be awfully handy to have colons and single-spaces be part
of 'isk' so that i_CTRL-N and i_CTRL-P can find full accounts (even
if they contain the occasional space), but that starts causing weird
issues (Vim really doesn't like having space in 'isk')

I've tried i_CTRL-X_CTRL-L to do whole-line completion but I have
enough transactions (and each amount regularly differs) that this
returns dozens or hundreds of matching lines, so it's less than useful.

Short of completely hijacking ^N/^P functionality to complete from
my known chart of accounts, is there a better solution I've overlooked?

Thanks!

-tim

(1) https://ledger-cli.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 visit https://groups.google.com/d/msgid/vim_use/Z3blCljFHiSixi1_%40thechases.com.

Problem with keyboard mapping

Hi,
  I have the Vim Sql Workbench plugin, and I'm trying to get the keyboard shortcut working. When I type ":nmap", I see that this mapping is there:
n  \<C-Space>   @:SWSqlExecuteCurrent<CR>

However, when I type "backslash - ctrl - space" , the Terminal just flashes and does nothing. I've tried using a different leader key, and the same thing happens, so it doesn't seem to be a Mac Terminal setting. 
  This is on a mac, with vim 9.1 . On my old mac, this keymapping was working. It still works if I type ":SWSqlExecuteCurrent", it's just the keyboard shortcut that I'm struggling with.
  Would appreciate any help!

Thanks,
Ven

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CAEodY67Vww8pR%2B6K24T33YcKgsBXw97byZPYWa9YXrb4Z-3jVg%40mail.gmail.com.