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.