Hi,
vim9script
vmap <F5> :<C-U>echo getpos(".") getpos("v")<CR>
When i select a visual area of text, i get the same coordinate reported for both
getpos(".") and getpos("v"). Why is that ?
--
--
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/5e3ac1e8-2cb8-4fdb-a6f2-f489b36a3fef%40gmail.com.
Sunday, July 27, 2025
Saturday, July 26, 2025
Re: Calling a vim9script function with a range
On 22/7/25 22:41, Igbanam Ogbuluijah wrote:
> May not be the most efficient way but… I'll accept a "mode" in g:Comment() as
> g:Comment(mode: string). Then in the mappings, I'd explicitly map modes with
> their strings
>
> vmap \c :<C-U>call Comment("visual")<CR>
vim9script
map <F5> :echo "N" .. mode()<CR>
vmap <F5> :<C-U>echo "V" .. mode()<CR>
In normal mode, pressing F5 gives "Nn", in visual mode, pressing F5 gives "Vn".
Why doesn't mode() print "v" in the visual mode ?
--
--
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/5692bfe6-e2e6-4839-b3f3-51221fe79bf8%40gmail.com.
> May not be the most efficient way but… I'll accept a "mode" in g:Comment() as
> g:Comment(mode: string). Then in the mappings, I'd explicitly map modes with
> their strings
>
> vmap \c :<C-U>call Comment("visual")<CR>
vim9script
map <F5> :echo "N" .. mode()<CR>
vmap <F5> :<C-U>echo "V" .. mode()<CR>
In normal mode, pressing F5 gives "Nn", in visual mode, pressing F5 gives "Vn".
Why doesn't mode() print "v" in the visual mode ?
--
--
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/5692bfe6-e2e6-4839-b3f3-51221fe79bf8%40gmail.com.
Spellcheck and abbreviations which include digits
The usecase:
-- When writing on historical subjects I commonly use the abbreviations "1stC, 2ndC, 3rdC, 4thC, ...; 1stM, 2ndM, 3rdM, 4thM, ..." where "C" stands for "century" and "M" stands for "millennium".
The problem:
In Markdown files (and probably everywhere) when 'spell' is activated "stC, ndC, rdC, thC" get highlighted as wrong while the number before them get highlighted as, well, numbers. I tried to add 1..30 + the right suffixes to my spellfile to no avail. I obviously can add "stC" and so on but I want "1thC, 2thC, 3thC, 4stC, ..." to be flagged as wrong, and indeed those suffixes when not preceded by an integer as wrong.
Tried fix:
Adding '\v<\d*[123]th[CM]>', '\v%(<\d+@<!)th[CM]>' etc highlighted as SpellBad with matchadd() or to a file in my ~/.vim/after/syntax directory. While this kind of works it has the slight downside that it's active when 'spell' is not and the serious downside that I can't use =z on them.
Better fix:
Any?
TIA,
/Benct
--
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/CADAJKhBmMMWhYfcrXwXy8NEEmNX2SPpEjznRsdwZr-3RV%2BSAXw%40mail.gmail.com.
Wednesday, July 23, 2025
Re: Standard VIM shortcuts using ctrl
On Mi, 23 Jul 2025, Ven Tadipatri wrote:
> Hi,
> I was wondering if there is a widely used set of VIM shortcuts that
> use the control key. I came across this site: Vim Cheat Sheet and I
> think it covers most of the ones I've used, plus a few extra.
>
> The context for this is that I'm used to certain shortcuts (like
> ctrl+v, ctrl+f, ctrl+b, etc) which worked fine in Intellij's VIM
> plugin on a Mac, but on Windows, it was conflicting with a lot of
> IDE shortcuts.
Vim (or more precisely Vi) commands predates the typical DOS/Windows
shortcuts (sometimes also called CUE
(https://en.wikipedia.org/wiki/IBM_Common_User_Access)
It is generally recommended to try to learn the Vim shortcuts, as those
are more powerful and work in different modes, so for the true Vim
experience, I'd strongly recommend to try to use those.
Having said that, Vim comes with the mswin.vim runtime file, which
enables some of those shortcuts. Read about it here :h mswin.vim
or just source it :so $VIMRUNTIME/mswin.vim
Thanks,
Christian
--
Do something unusual today. Pay a bill.
--
--
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/aIE5DEUx93wHYhbT%40256bit.org.
> Hi,
> I was wondering if there is a widely used set of VIM shortcuts that
> use the control key. I came across this site: Vim Cheat Sheet and I
> think it covers most of the ones I've used, plus a few extra.
>
> The context for this is that I'm used to certain shortcuts (like
> ctrl+v, ctrl+f, ctrl+b, etc) which worked fine in Intellij's VIM
> plugin on a Mac, but on Windows, it was conflicting with a lot of
> IDE shortcuts.
Vim (or more precisely Vi) commands predates the typical DOS/Windows
shortcuts (sometimes also called CUE
(https://en.wikipedia.org/wiki/IBM_Common_User_Access)
It is generally recommended to try to learn the Vim shortcuts, as those
are more powerful and work in different modes, so for the true Vim
experience, I'd strongly recommend to try to use those.
Having said that, Vim comes with the mswin.vim runtime file, which
enables some of those shortcuts. Read about it here :h mswin.vim
or just source it :so $VIMRUNTIME/mswin.vim
Thanks,
Christian
--
Do something unusual today. Pay a bill.
--
--
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/aIE5DEUx93wHYhbT%40256bit.org.
Standard VIM shortcuts using ctrl
Hi,
I was wondering if there is a widely used set of VIM shortcuts that use the control key. I came across this site: Vim Cheat Sheet and I think it covers most of the ones I've used, plus a few extra.
The context for this is that I'm used to certain shortcuts (like ctrl+v, ctrl+f, ctrl+b, etc) which worked fine in Intellij's VIM plugin on a Mac, but on Windows, it was conflicting with a lot of IDE shortcuts.
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/CAEodY67BuqCDZPba8Fcg062WkG5wz6wwz3h3PzQnuuK6roGuWA%40mail.gmail.com.
Re: Calling a vim9script function with a range
On 23/7/25 07:03, Lifepillar wrote:
> On 2025-07-21, 'Russell Shaw' via vim_use <vim_use@googlegroups.com> wrote:
>> Hi,
>>
>> In "Comment()", how can i tell if the mapping "\c" was called with a visual
>> range or not ?
...
> Depending on your goal, you may also want to look at Vim's comment
> plugin at $VIMRUNTIME/pack/dist/opt/comment.
Hi all, i was trying to port a comment function i was using in legacy
script. Thanks for the ideas. I'll look at that plugin.
--
--
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/6989a6ed-97a6-401e-9447-19a2d2109303%40gmail.com.
> On 2025-07-21, 'Russell Shaw' via vim_use <vim_use@googlegroups.com> wrote:
>> Hi,
>>
>> In "Comment()", how can i tell if the mapping "\c" was called with a visual
>> range or not ?
...
> Depending on your goal, you may also want to look at Vim's comment
> plugin at $VIMRUNTIME/pack/dist/opt/comment.
Hi all, i was trying to port a comment function i was using in legacy
script. Thanks for the ideas. I'll look at that plugin.
--
--
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/6989a6ed-97a6-401e-9447-19a2d2109303%40gmail.com.
Tuesday, July 22, 2025
Re: Calling a vim9script function with a range
On 2025-07-21, 'Russell Shaw' via vim_use <vim_use@googlegroups.com> wrote:
> Hi,
>
> In "Comment()", how can i tell if the mapping "\c" was called with a visual
> range or not ?
>
> I want to call "Comment()" only once, without resorting to a legacy function,
> and without resorting to an intermediate ex command.
>
> I want access to the first and last visual lines, or else the current line (for
> non-visual, first==last).
>
> ---------------------------------
> vim9script
>
> def g:Comment()
> echo "a"
> enddef
>
> map \c :<C-U>call Comment()<CR>
> ---------------------------------
I have something like this in my vimrc:
vim9script
nnoremap <silent> Q :set opfunc=libtext#ToggleComment<cr>g@
vnoremap <silent> Q <scriptcmd> libtext.ToggleComment(visualmode(), true)<cr>
Then, in autoload/libtext.vim:
export def ToggleComment(visualMode: string, visual: bool = false)
# Comment/uncomment a region of text. See also :help map-operator.
#
# visualMode: one of "line", "char", or "block". See :help g@.
# visual: whether the function is called directly when in Visual mode (true)
# as opposed to being called via opfunc (false).
var first: number
var last: number
if visual
var lnum1 = line("v")
var lnum2 = line(".")
if lnum1 < lnum2
first = lnum1
last = lnum2
else
first = lnum2
last = lnum1
endif
else
first = line("'[")
last = line("']")
endif
# Do something with getline(first, last)
enddef
Depending on your goal, you may also want to look at Vim's comment
plugin at $VIMRUNTIME/pack/dist/opt/comment.
Hope this help,
Life.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/105ouan%2410kj%241%40ciao.gmane.io.
> Hi,
>
> In "Comment()", how can i tell if the mapping "\c" was called with a visual
> range or not ?
>
> I want to call "Comment()" only once, without resorting to a legacy function,
> and without resorting to an intermediate ex command.
>
> I want access to the first and last visual lines, or else the current line (for
> non-visual, first==last).
>
> ---------------------------------
> vim9script
>
> def g:Comment()
> echo "a"
> enddef
>
> map \c :<C-U>call Comment()<CR>
> ---------------------------------
I have something like this in my vimrc:
vim9script
nnoremap <silent> Q :set opfunc=libtext#ToggleComment<cr>g@
vnoremap <silent> Q <scriptcmd> libtext.ToggleComment(visualmode(), true)<cr>
Then, in autoload/libtext.vim:
export def ToggleComment(visualMode: string, visual: bool = false)
# Comment/uncomment a region of text. See also :help map-operator.
#
# visualMode: one of "line", "char", or "block". See :help g@.
# visual: whether the function is called directly when in Visual mode (true)
# as opposed to being called via opfunc (false).
var first: number
var last: number
if visual
var lnum1 = line("v")
var lnum2 = line(".")
if lnum1 < lnum2
first = lnum1
last = lnum2
else
first = lnum2
last = lnum1
endif
else
first = line("'[")
last = line("']")
endif
# Do something with getline(first, last)
enddef
Depending on your goal, you may also want to look at Vim's comment
plugin at $VIMRUNTIME/pack/dist/opt/comment.
Hope this help,
Life.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/105ouan%2410kj%241%40ciao.gmane.io.
Re: Calling a vim9script function with a range
May not be the most efficient way but… I'll accept a "mode" in g:Comment() as g:Comment(mode: string). Then in the mappings, I'd explicitly map modes with their strings
vmap \c :<C-U>call Comment("visual")<CR>
Igbanam
On Tue, 22 Jul 2025, 10:47 'Russell Shaw' via vim_use, <vim_use@googlegroups.com> wrote:
Hi,
In "Comment()", how can i tell if the mapping "\c" was called with a visual
range or not ?
I want to call "Comment()" only once, without resorting to a legacy function,
and without resorting to an intermediate ex command.
I want access to the first and last visual lines, or else the current line (for
non-visual, first==last).
---------------------------------
vim9script
def g:Comment()
echo "a"
enddef
map \c :<C-U>call Comment()<CR>
---------------------------------
--
--
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/a3ef458e-d463-4e2c-b109-5342d9e54078%40netspace.net.au.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CAOmRJrceyj_qeVJ%3DQax6fmOW_K3tPf7juJyNyed%3DktfK_7eeog%40mail.gmail.com.
Sunday, July 20, 2025
Calling a vim9script function with a range
Hi,
In "Comment()", how can i tell if the mapping "\c" was called with a visual
range or not ?
I want to call "Comment()" only once, without resorting to a legacy function,
and without resorting to an intermediate ex command.
I want access to the first and last visual lines, or else the current line (for
non-visual, first==last).
---------------------------------
vim9script
def g:Comment()
echo "a"
enddef
map \c :<C-U>call Comment()<CR>
---------------------------------
--
--
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/a3ef458e-d463-4e2c-b109-5342d9e54078%40netspace.net.au.
In "Comment()", how can i tell if the mapping "\c" was called with a visual
range or not ?
I want to call "Comment()" only once, without resorting to a legacy function,
and without resorting to an intermediate ex command.
I want access to the first and last visual lines, or else the current line (for
non-visual, first==last).
---------------------------------
vim9script
def g:Comment()
echo "a"
enddef
map \c :<C-U>call Comment()<CR>
---------------------------------
--
--
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/a3ef458e-d463-4e2c-b109-5342d9e54078%40netspace.net.au.
Thursday, July 17, 2025
Re: concept of stable release
On Mi, 16 Jul 2025, yellowtang wrote:
> I see version 9.1.0821 on the official webpage's download section but
> I am seeing more recently tagged versions on the github repo. Does
> that imply that subsequent versions not linked on the main page are
> considered unstable or dev releases or is the main page simply not
> updated as frequently?
We don't really have a concept of stable versions. Minor versions (9.1,
9.0, 8.2, 8.1, 8.0) most closely reflect this concept. But since there
are several years between a new minor release, I sometimes update the
binaries on the Vim.org Homepage when someone asks me nicely about it
and has some convincing arguments. Last time, the convincing argument
was, that some of those patches fixes security related issues (although
we did not really have any serious issues but only rather minor ones).
I am currently including daily new minor patches, it just would be much
effort for dubious gain to update the binaries on the Vim Homepage every
day. On Windows you can however make use of winget, which provides the
daily vim.vim.nightly and more stable vim.vim version (roughly every 90
versions) streams.
We are now at 9.1.1563 and is has been roughly 1.5 years with many new
features since the 9.1 release. I am starting to think about releasing
the next minor version around the end of the year so that it's roughly 2
years. But before that, I'd like to have a few month stabilization
period.
I'll announce this later this year, once the other maintainers are
convinced, so stay tuned.
Thanks,
Christian
--
As of next Tuesday, C will be flushed in favor of COBOL.
Please update your programs.
--
--
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/aHlhMOj8OyEWxgf%2B%40256bit.org.
> I see version 9.1.0821 on the official webpage's download section but
> I am seeing more recently tagged versions on the github repo. Does
> that imply that subsequent versions not linked on the main page are
> considered unstable or dev releases or is the main page simply not
> updated as frequently?
We don't really have a concept of stable versions. Minor versions (9.1,
9.0, 8.2, 8.1, 8.0) most closely reflect this concept. But since there
are several years between a new minor release, I sometimes update the
binaries on the Vim.org Homepage when someone asks me nicely about it
and has some convincing arguments. Last time, the convincing argument
was, that some of those patches fixes security related issues (although
we did not really have any serious issues but only rather minor ones).
I am currently including daily new minor patches, it just would be much
effort for dubious gain to update the binaries on the Vim Homepage every
day. On Windows you can however make use of winget, which provides the
daily vim.vim.nightly and more stable vim.vim version (roughly every 90
versions) streams.
We are now at 9.1.1563 and is has been roughly 1.5 years with many new
features since the 9.1 release. I am starting to think about releasing
the next minor version around the end of the year so that it's roughly 2
years. But before that, I'd like to have a few month stabilization
period.
I'll announce this later this year, once the other maintainers are
convinced, so stay tuned.
Thanks,
Christian
--
As of next Tuesday, C will be flushed in favor of COBOL.
Please update your programs.
--
--
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/aHlhMOj8OyEWxgf%2B%40256bit.org.
Wednesday, July 16, 2025
concept of stable release
I see version 9.1.0821 on the official webpage's download section but I am seeing more recently tagged versions on the github repo. Does that imply that subsequent versions not linked on the main page are considered unstable or dev releases or is the main page simply not updated as frequently? --
--
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/2d634765-23b3-478d-b9b6-d7a69c171e95n%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 visit https://groups.google.com/d/msgid/vim_use/2d634765-23b3-478d-b9b6-d7a69c171e95n%40googlegroups.com.
Monday, July 14, 2025
Re: Issue with system clipboard
On Mo, 14 Jul 2025, Roald Becher wrote:
> I have version 9.1.1537 installed. Is it maybe from a later version that it's fixed? If so I'll wait for Fedora to update their repo
That is pretty recent. There is just one minor issue
https://github.com/vim/vim/issues/17732 that I will merge in a few
minutes. So please try once Fedora updates the packages to v9.1.1543.
If this doesn't work, please check the output of `:version` Make sure it
contains +wayland and +wayland_clipboard. If it does, please create a
ticket a github.com/vim/vim/issues and give all details, like what
graphical sessoin you are running and create a debug log using
WAYLAND_DEBUG=1 vim 2> log.txt
Thanks,
Chris
--
--
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/aHVgKHHWy75QJREt%40256bit.org.
> I have version 9.1.1537 installed. Is it maybe from a later version that it's fixed? If so I'll wait for Fedora to update their repo
That is pretty recent. There is just one minor issue
https://github.com/vim/vim/issues/17732 that I will merge in a few
minutes. So please try once Fedora updates the packages to v9.1.1543.
If this doesn't work, please check the output of `:version` Make sure it
contains +wayland and +wayland_clipboard. If it does, please create a
ticket a github.com/vim/vim/issues and give all details, like what
graphical sessoin you are running and create a debug log using
WAYLAND_DEBUG=1 vim 2> log.txt
Thanks,
Chris
--
--
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/aHVgKHHWy75QJREt%40256bit.org.
Re: Collapse out all lines not matching "/pattern"?
On Sun, Jul 13, 2025 at 1:37 PM Gary Johnson <garyjohn@spocom.com> wrote:
On 2025-07-13, Joseph Wulf wrote:
> In regular/normal vim editing, is there a method to collapse out of view all
> lines NOT matching "/pattern"?
>
> Though I use vimdiff a lot, the only relevance to vimdiff is the way it
> collapses out lines not relevant to the differentiation process. So, when I'm
> using regular VIM, I'm wondering if there's a way to search for "/pattern"
> ---and--- only see matching lines? I also tend to have line numbers on a lot,
> which would greatly help me to focus on certain things.
I use the searchfold.vim plugin for this. It's available at these
places:
https://github.com/vim-scripts/searchfold.vim
https://www.vim.org/scripts/script.php?script_id=2521
It's 14 years old now, but it continues to "just work".
Nice, very useful. Thanks!
--
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/CAJUkyiFrTe9gPOOth3f%2BwupU_UzxBbSGnejoeDOa8CJCHCxp2Q%40mail.gmail.com.
Re: Issue with system clipboard
I have version 9.1.1537 installed. Is it maybe from a later version that it's fixed? If so I'll wait for Fedora to update their repo
--
--
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/50c88f63-fecf-4306-a891-b5a8dbcbbc67n%40googlegroups.com.
Op maandag 14 juli 2025 om 17:59:01 UTC+2 schreef Christian Brabandt:
On Mo, 14 Jul 2025, Roald Becher wrote:
> Hello everyone,
>
> Since the update for vim v9.1.1485 there should be clipboard support for Wayland.
> I can however not get it to work.
>
> I've put
> set clipmethod=wayland
> set clipboard=unnamedplus
> in my vimrc file.
Can you please check with the latest version? I believe there was one
bug that was fixed with v9.1.1485.
Thanks,
Christian
--
The more they over-think the plumbing the easier it is to stop up the drain.
--
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/50c88f63-fecf-4306-a891-b5a8dbcbbc67n%40googlegroups.com.
Re: indent for python files
Hi Stefan,
make sure you have :filetype plugin indent on in your personal vimrc
file. This enables the filetype specific indentation. And yes `--clean`
is a command line option for Vim. Please read about it at `:h --clean`.
It starts Vim with only minimal configuration options (but e.g. enables
filetype specific indentation.
Thanks,
Chris
--
--
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/aHU18PtWh3TSiXEF%40256bit.org.
make sure you have :filetype plugin indent on in your personal vimrc
file. This enables the filetype specific indentation. And yes `--clean`
is a command line option for Vim. Please read about it at `:h --clean`.
It starts Vim with only minimal configuration options (but e.g. enables
filetype specific indentation.
Thanks,
Chris
--
--
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/aHU18PtWh3TSiXEF%40256bit.org.
Re: Issue with system clipboard
On Mo, 14 Jul 2025, Roald Becher wrote:
> Hello everyone,
>
> Since the update for vim v9.1.1485 there should be clipboard support for Wayland.
> I can however not get it to work.
>
> I've put
> set clipmethod=wayland
> set clipboard=unnamedplus
> in my vimrc file.
Can you please check with the latest version? I believe there was one
bug that was fixed with v9.1.1485.
Thanks,
Christian
--
The more they over-think the plumbing the easier it is to stop up the drain.
--
--
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/aHUpMSGBY3DXDyVh%40256bit.org.
> Hello everyone,
>
> Since the update for vim v9.1.1485 there should be clipboard support for Wayland.
> I can however not get it to work.
>
> I've put
> set clipmethod=wayland
> set clipboard=unnamedplus
> in my vimrc file.
Can you please check with the latest version? I believe there was one
bug that was fixed with v9.1.1485.
Thanks,
Christian
--
The more they over-think the plumbing the easier it is to stop up the drain.
--
--
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/aHUpMSGBY3DXDyVh%40256bit.org.
Wayland clipboard support not working
Hello to everyone,
Since vim version 9.1.1485 there should be native support for Wayland
I've put this in my vimrc:
set clipmethod=wayland
set clipboard=unnamedplus
But I'm getting the message:
W23: Clipboard register not available, using register 0
And I seem to not get it to work.
For some extra info I'm on Fedora with a gnome terminal.
Could anyone tell me what is going wrong?
Any help would be greatly appreciated --
--
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/a9fe2018-0b85-49ce-98cf-fe69e50709c9n%40googlegroups.com.
Since vim version 9.1.1485 there should be native support for Wayland
I've put this in my vimrc:
set clipmethod=wayland
set clipboard=unnamedplus
But I'm getting the message:
W23: Clipboard register not available, using register 0
And I seem to not get it to work.
For some extra info I'm on Fedora with a gnome terminal.
Could anyone tell me what is going wrong?
Any help would be greatly appreciated --
--
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/a9fe2018-0b85-49ce-98cf-fe69e50709c9n%40googlegroups.com.
Issue with system clipboard
Hello everyone,
--
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/a4d46446-00b5-4ada-bcc2-1745ec0bbc5en%40googlegroups.com.
Since the update for vim v9.1.1485 there should be clipboard support for Wayland.
I can however not get it to work.
I've put
set clipmethod=wayland
set clipboard=unnamedplus
set clipboard=unnamedplus
in my vimrc file.
But I'm getting the message W23: Clipboard register not available, using register 0
Does anyone know what is going wrong here?
-- --
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/a4d46446-00b5-4ada-bcc2-1745ec0bbc5en%40googlegroups.com.
Sunday, July 13, 2025
Re: Collapse out all lines not matching "/pattern"?
On Sun, Jul 13, 2025 at 8:37 PM Gary Johnson <garyjohn@spocom.com> wrote:
On 2025-07-13, Joseph Wulf wrote:
> In regular/normal vim editing, is there a method to collapse out of view all
> lines NOT matching "/pattern"?
>
> Though I use vimdiff a lot, the only relevance to vimdiff is the way it
> collapses out lines not relevant to the differentiation process. So, when I'm
> using regular VIM, I'm wondering if there's a way to search for "/pattern"
> ---and--- only see matching lines? I also tend to have line numbers on a lot,
> which would greatly help me to focus on certain things.
I use the searchfold.vim plugin for this. It's available at these
places:
https://github.com/vim-scripts/searchfold.vim
https://www.vim.org/scripts/script.php?script_id=2521
It's 14 years old now, but it continues to "just work".
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 visit https://groups.google.com/d/msgid/vim_use/20250713203923.GF24703%40phoenix.
--
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/CAOmRJrfgQz-M445OuhF1M7Jejr2iVeCyihQbawZU%2BtmxgHsHTQ%40mail.gmail.com.
Re: indent for python files
Dear Christian:
When I type in a py-file
for i in range(3):
I don't get an indentation when I type
print(i)
in the following line.
Is --clean a command line option for vim?
When I type in a py-file
for i in range(3):
I don't get an indentation when I type
print(i)
in the following line.
Is --clean a command line option for vim?
Am So., 13. Juli 2025 um 17:09 Uhr schrieb Christian Brabandt <cblists@256bit.org>:
Hi Stefan,
On Sa, 12 Jul 2025, Stefan Thomas wrote:
> Hello everyone.
> I have the problem that the automatic indentation for Python files no longer works for me.
> I assume that it is related to the newer version of the program (9.1).
> Can anyone help me?
Can you please give an example with what you see and what you expect?
Have you tried this using vim --clean?
Thanks,
Christian
--
Rune's Rule:
If you don't care where you are, you ain't lost.
--
--
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/aHPMMtwzd7PaeFH0%40256bit.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/CAH-WrMGzy-Atzyy%3DN1rpfzdSfzAT%2B7MJx26SH%2B__j5rv4Fj%3DBw%40mail.gmail.com.
Re: Collapse out all lines not matching "/pattern"?
On 2025-07-13, Joseph Wulf wrote:
> In regular/normal vim editing, is there a method to collapse out of view all
> lines NOT matching "/pattern"?
>
> Though I use vimdiff a lot, the only relevance to vimdiff is the way it
> collapses out lines not relevant to the differentiation process. So, when I'm
> using regular VIM, I'm wondering if there's a way to search for "/pattern"
> ---and--- only see matching lines? I also tend to have line numbers on a lot,
> which would greatly help me to focus on certain things.
I use the searchfold.vim plugin for this. It's available at these
places:
https://github.com/vim-scripts/searchfold.vim
https://www.vim.org/scripts/script.php?script_id=2521
It's 14 years old now, but it continues to "just work".
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 visit https://groups.google.com/d/msgid/vim_use/20250713203923.GF24703%40phoenix.
> In regular/normal vim editing, is there a method to collapse out of view all
> lines NOT matching "/pattern"?
>
> Though I use vimdiff a lot, the only relevance to vimdiff is the way it
> collapses out lines not relevant to the differentiation process. So, when I'm
> using regular VIM, I'm wondering if there's a way to search for "/pattern"
> ---and--- only see matching lines? I also tend to have line numbers on a lot,
> which would greatly help me to focus on certain things.
I use the searchfold.vim plugin for this. It's available at these
places:
https://github.com/vim-scripts/searchfold.vim
https://www.vim.org/scripts/script.php?script_id=2521
It's 14 years old now, but it continues to "just work".
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 visit https://groups.google.com/d/msgid/vim_use/20250713203923.GF24703%40phoenix.
Re: Collapse out all lines not matching "/pattern"?
On 7/13/25 15:24, Joseph Wulf wrote:
> In regular/normal vim editing, is there a method to collapse out of
> view all lines NOT matching "/pattern"?
Joe,
Vim folding can be used to hide lines from view (see `:help
folding`). I've got a few functions and commands in my vimrc
for this; `:FoldSearch pattern` shows lines matching `pattern`
and folds away everything else. Here are my notes about using
these commands:
```
Folding by regular expression
*notes_folding_regex*
To fold away lines that match a regex, use the custom command :Fold: >
:Fold regex ; lines matching regex are hidden
:Fold ; use last search pattern (@/) for regex
Use the custom command :FoldSearch to search for lines matching a regex and
fold away everything else: >
:FoldSearch regex ; show lines matching regex, and fold away all else
:FoldSearch ; use last search pattern (@/) for regex
With :FoldSearch, increasing the 'foldlevel' to 1 will show one line of
context around all matches.
To fold away comments and blank lines, use this custom command: >
:FoldComments
------------------------------------------------------------------------------
QuickFix entry folding
*notes_quickfix_folding*
To group lines of QuickFix output together by files or by directories,
use one
of the following commands when a QuickFix or Location List window is
focused:
*FoldQuickFixFiles*
*FoldQuickFixDirs*
:[count] FoldQuickFixFiles
:[count] FoldQuickFixDirs
When [count] is 0 (the default), the folds will start closed; when
[count] is 1,
the folds will start open.
When a QuickFix or Location List window is opened, :1FoldQuickFixFiles is
applied by :SetupQuickFix, such that the folds start open. Use standard Vim
shortcut keys within the QuickFix or Location List window to change folding
levels:
zr Reduce amount of folding
zR Reduce amount of folding fully (no folding remaining)
zm More folding
zM More folding (fully folded)
zo Open a fold
zc Close a fold
In Gvim, you may also click on the symbols in the left margin of the
QuickFix
or Location List window to toggle individual folds.
```
Below are the functions and commands from vimrc.
```vim
" =============================================================
" Folding
" =============================================================
function! FoldShowExpr()
let maxLevel = 2
let level = 0
while level < maxLevel
if getline(v:lnum - level) =~ @/
break
endif
if level != 0 && (getline(v:lnum + level) =~ @/)
break
endif
let level = level + 1
endwhile
return level
endfunction
function! FoldHideExpr()
return (getline(v:lnum) =~ @/) ? 1 : 0
endfunction
function! FoldRegex(foldExprFunc, regex)
if a:regex != ""
let @/=a:regex
call histadd("search", a:regex)
endif
let &l:foldexpr = a:foldExprFunc . '()'
setlocal foldmethod=expr
setlocal foldlevel=0
setlocal foldcolumn=0
setlocal foldminlines=0
setlocal foldenable
" Return to manual folding now that folds have been applied.
setlocal foldmethod=manual
endfunction
" Search (and "show") regex; fold everything else.
command! -nargs=? FoldSearch call FoldRegex('FoldShowExpr', <q-args>)
" Fold matching lines ("hide" the matches).
command! -nargs=? Fold call FoldRegex('FoldHideExpr', <q-args>)
" Fold away comment lines (including blank lines).
" TODO: Extend for more than just shell comments.
command! -nargs=? FoldComments Fold ^\s*#\|^\s*$
" 'foldexpr' for extracting folding information from QuickFix buffer.
" pattern - used to extract portion of QuickFix path from line.
function! FoldQuickFixPatternFoldExpr(pattern)
let thisLine = getline(v:lnum)
let nextLine = getline(v:lnum + 1)
let thisKey = matchstr(thisLine, a:pattern)
let nextKey = matchstr(nextLine, a:pattern)
if thisKey != nextKey
return '<1'
else
return '1'
endif
endfunction
function! FoldQuickFixDirsFoldExpr()
return FoldQuickFixPatternFoldExpr('\v^.*[/\\]')
endfunction
" Fold QuickFix window entries by directory.
" level - initial foldlevel (0 => fold everything, 1 => expand all folds)
function! FoldQuickFixDirs(level)
let &l:foldlevel = a:level
setlocal foldcolumn=1
setlocal foldmethod=expr
setlocal foldexpr=FoldQuickFixDirsFoldExpr()
endfunction
command! -count=0 FoldQuickFixDirs call FoldQuickFixDirs(<count>)
function! FoldQuickFixFilesFoldExpr()
return FoldQuickFixPatternFoldExpr('\v^[^|]*')
endfunction
" Fold QuickFix window entries by filename.
" level - initial foldlevel (0 => fold everything, 1 => expand all folds)
function! FoldQuickFixFiles(level)
let &l:foldlevel = a:level
setlocal foldcolumn=1
setlocal foldmethod=expr
setlocal foldexpr=FoldQuickFixFilesFoldExpr()
setlocal foldenable
endfunction
command! -count=0 FoldQuickFixFiles call FoldQuickFixFiles(<count>)
```
Michael Henry
--
--
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/5b30f32c-c918-40e6-98a4-a9f30c0b7b94%40drmikehenry.com.
> In regular/normal vim editing, is there a method to collapse out of
> view all lines NOT matching "/pattern"?
Joe,
Vim folding can be used to hide lines from view (see `:help
folding`). I've got a few functions and commands in my vimrc
for this; `:FoldSearch pattern` shows lines matching `pattern`
and folds away everything else. Here are my notes about using
these commands:
```
Folding by regular expression
*notes_folding_regex*
To fold away lines that match a regex, use the custom command :Fold: >
:Fold regex ; lines matching regex are hidden
:Fold ; use last search pattern (@/) for regex
Use the custom command :FoldSearch to search for lines matching a regex and
fold away everything else: >
:FoldSearch regex ; show lines matching regex, and fold away all else
:FoldSearch ; use last search pattern (@/) for regex
With :FoldSearch, increasing the 'foldlevel' to 1 will show one line of
context around all matches.
To fold away comments and blank lines, use this custom command: >
:FoldComments
------------------------------------------------------------------------------
QuickFix entry folding
*notes_quickfix_folding*
To group lines of QuickFix output together by files or by directories,
use one
of the following commands when a QuickFix or Location List window is
focused:
*FoldQuickFixFiles*
*FoldQuickFixDirs*
:[count] FoldQuickFixFiles
:[count] FoldQuickFixDirs
When [count] is 0 (the default), the folds will start closed; when
[count] is 1,
the folds will start open.
When a QuickFix or Location List window is opened, :1FoldQuickFixFiles is
applied by :SetupQuickFix, such that the folds start open. Use standard Vim
shortcut keys within the QuickFix or Location List window to change folding
levels:
zr Reduce amount of folding
zR Reduce amount of folding fully (no folding remaining)
zm More folding
zM More folding (fully folded)
zo Open a fold
zc Close a fold
In Gvim, you may also click on the symbols in the left margin of the
QuickFix
or Location List window to toggle individual folds.
```
Below are the functions and commands from vimrc.
```vim
" =============================================================
" Folding
" =============================================================
function! FoldShowExpr()
let maxLevel = 2
let level = 0
while level < maxLevel
if getline(v:lnum - level) =~ @/
break
endif
if level != 0 && (getline(v:lnum + level) =~ @/)
break
endif
let level = level + 1
endwhile
return level
endfunction
function! FoldHideExpr()
return (getline(v:lnum) =~ @/) ? 1 : 0
endfunction
function! FoldRegex(foldExprFunc, regex)
if a:regex != ""
let @/=a:regex
call histadd("search", a:regex)
endif
let &l:foldexpr = a:foldExprFunc . '()'
setlocal foldmethod=expr
setlocal foldlevel=0
setlocal foldcolumn=0
setlocal foldminlines=0
setlocal foldenable
" Return to manual folding now that folds have been applied.
setlocal foldmethod=manual
endfunction
" Search (and "show") regex; fold everything else.
command! -nargs=? FoldSearch call FoldRegex('FoldShowExpr', <q-args>)
" Fold matching lines ("hide" the matches).
command! -nargs=? Fold call FoldRegex('FoldHideExpr', <q-args>)
" Fold away comment lines (including blank lines).
" TODO: Extend for more than just shell comments.
command! -nargs=? FoldComments Fold ^\s*#\|^\s*$
" 'foldexpr' for extracting folding information from QuickFix buffer.
" pattern - used to extract portion of QuickFix path from line.
function! FoldQuickFixPatternFoldExpr(pattern)
let thisLine = getline(v:lnum)
let nextLine = getline(v:lnum + 1)
let thisKey = matchstr(thisLine, a:pattern)
let nextKey = matchstr(nextLine, a:pattern)
if thisKey != nextKey
return '<1'
else
return '1'
endif
endfunction
function! FoldQuickFixDirsFoldExpr()
return FoldQuickFixPatternFoldExpr('\v^.*[/\\]')
endfunction
" Fold QuickFix window entries by directory.
" level - initial foldlevel (0 => fold everything, 1 => expand all folds)
function! FoldQuickFixDirs(level)
let &l:foldlevel = a:level
setlocal foldcolumn=1
setlocal foldmethod=expr
setlocal foldexpr=FoldQuickFixDirsFoldExpr()
endfunction
command! -count=0 FoldQuickFixDirs call FoldQuickFixDirs(<count>)
function! FoldQuickFixFilesFoldExpr()
return FoldQuickFixPatternFoldExpr('\v^[^|]*')
endfunction
" Fold QuickFix window entries by filename.
" level - initial foldlevel (0 => fold everything, 1 => expand all folds)
function! FoldQuickFixFiles(level)
let &l:foldlevel = a:level
setlocal foldcolumn=1
setlocal foldmethod=expr
setlocal foldexpr=FoldQuickFixFilesFoldExpr()
setlocal foldenable
endfunction
command! -count=0 FoldQuickFixFiles call FoldQuickFixFiles(<count>)
```
Michael Henry
--
--
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/5b30f32c-c918-40e6-98a4-a9f30c0b7b94%40drmikehenry.com.
Collapse out all lines not matching "/pattern"?
In regular/normal vim editing, is there a method to collapse out of view all lines NOT matching "/pattern"?
Though I use vimdiff a lot, the only relevance to vimdiff is the way it collapses out lines not relevant to the differentiation process. So, when I'm using regular VIM, I'm wondering if there's a way to search for "/pattern" ---and--- only see matching lines? I also tend to have line numbers on a lot, which would greatly help me to focus on certain things.
Thank you.
R,
-Joe Wulf
--
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/CAJ8cad-ZE6mtPDe0_zv3PFDUmnq%2BOKN5fbcLg%3DutGfpSj6braQ%40mail.gmail.com.
.cc don't move to the error line
hello people,
this is the stderr of my &mp is this simple
https://testanything.org/ report.
ok 1 - t.c 6
ok 2 - t.c 7
ok 3 - t.c 8
ok 4 - t.c 9
not ok - t.c 10
not ok - t.c 11
ok 7 - t.c 12
ok 8 - t.c 13
I wrote
:let &efm=&efm',not ok %s - %f %l'
:make|cw
and I got this:
|| ok 1 - t.c 6
|| ok 2 - t.c 7
|| ok 3 - t.c 8
|| ok 4 - t.c 9
t.c|10|
t.c|11|
|| ok 7 - t.c 12
|| ok 8 - t.c 13
When I type <enter> over 't.c|11|', vim opens the t.c
file but doesn't move at line 11.
I have no idea how to fix this :(
also I tried to catpure 'not ok' as %m but failed to understand it it is
even possible.
any help very welcome.
regards
marc
--
--
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/aHQDGRc41Z82tETp%40prometheus.
this is the stderr of my &mp is this simple
https://testanything.org/ report.
ok 1 - t.c 6
ok 2 - t.c 7
ok 3 - t.c 8
ok 4 - t.c 9
not ok - t.c 10
not ok - t.c 11
ok 7 - t.c 12
ok 8 - t.c 13
I wrote
:let &efm=&efm',not ok %s - %f %l'
:make|cw
and I got this:
|| ok 1 - t.c 6
|| ok 2 - t.c 7
|| ok 3 - t.c 8
|| ok 4 - t.c 9
t.c|10|
t.c|11|
|| ok 7 - t.c 12
|| ok 8 - t.c 13
When I type <enter> over 't.c|11|', vim opens the t.c
file but doesn't move at line 11.
I have no idea how to fix this :(
also I tried to catpure 'not ok' as %m but failed to understand it it is
even possible.
any help very welcome.
regards
marc
--
--
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/aHQDGRc41Z82tETp%40prometheus.
Re: indent for python files
Hi Stefan,
On Sa, 12 Jul 2025, Stefan Thomas wrote:
> Hello everyone.
> I have the problem that the automatic indentation for Python files no longer works for me.
> I assume that it is related to the newer version of the program (9.1).
> Can anyone help me?
Can you please give an example with what you see and what you expect?
Have you tried this using vim --clean?
Thanks,
Christian
--
Rune's Rule:
If you don't care where you are, you ain't lost.
--
--
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/aHPMMtwzd7PaeFH0%40256bit.org.
On Sa, 12 Jul 2025, Stefan Thomas wrote:
> Hello everyone.
> I have the problem that the automatic indentation for Python files no longer works for me.
> I assume that it is related to the newer version of the program (9.1).
> Can anyone help me?
Can you please give an example with what you see and what you expect?
Have you tried this using vim --clean?
Thanks,
Christian
--
Rune's Rule:
If you don't care where you are, you ain't lost.
--
--
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/aHPMMtwzd7PaeFH0%40256bit.org.
Setting up vim for up-to-date Python development
Dear Vim List
I am a long time vim user, but struggling to use vim for up-to-date python development using poetry and ruff. I could do with some help, also to bring my plugins up-to-date with contemporary practice.
My favoured model for development is vim-go (for Golang) with ^X-O for function/method expansion only, and to see help, when I want it and ^] to jump to a definition. Seeing recommended fixes is fine but only if I enable it; I don't want floating windows while typing.
coc/coc-pyright seems very elegant but I'm not sure how to fit it into my preferred model. Also I'd prefer not to have npm on my machine. The floating windows as I type is very much something I do *not* want.
My vim setup is pretty much a mess after 20 years, so maybe its time to start again. I only seem to use:
- align (https://github.com/vim-scripts/Align)
- drawit (https://github.com/vim-scripts/DrawIt)
- vim-go (https://github.com/fatih/vim-go)
- syntastic (outdated?)
...through a mess of different installers etc.
I guess it's time to take a backup and start again.
Thoughts on achieving an effective Python development environment and the best plugin manager to achieve this would be very gratefully received.
Many thanks,
Rory
--
--
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/aHONT5hGOldRyQGH%40campbell-lange.net.
I am a long time vim user, but struggling to use vim for up-to-date python development using poetry and ruff. I could do with some help, also to bring my plugins up-to-date with contemporary practice.
My favoured model for development is vim-go (for Golang) with ^X-O for function/method expansion only, and to see help, when I want it and ^] to jump to a definition. Seeing recommended fixes is fine but only if I enable it; I don't want floating windows while typing.
coc/coc-pyright seems very elegant but I'm not sure how to fit it into my preferred model. Also I'd prefer not to have npm on my machine. The floating windows as I type is very much something I do *not* want.
My vim setup is pretty much a mess after 20 years, so maybe its time to start again. I only seem to use:
- align (https://github.com/vim-scripts/Align)
- drawit (https://github.com/vim-scripts/DrawIt)
- vim-go (https://github.com/fatih/vim-go)
- syntastic (outdated?)
...through a mess of different installers etc.
I guess it's time to take a backup and start again.
Thoughts on achieving an effective Python development environment and the best plugin manager to achieve this would be very gratefully received.
Many thanks,
Rory
--
--
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/aHONT5hGOldRyQGH%40campbell-lange.net.
Saturday, July 12, 2025
indent for python files
Hello everyone.
I have the problem that the automatic indentation for Python files no longer works for me.
I assume that it is related to the newer version of the program (9.1).
I have the problem that the automatic indentation for Python files no longer works for me.
I assume that it is related to the newer version of the program (9.1).
Can anyone help me?
Thanks,
Stefan
--
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/CAH-WrMGDdkohu-myCuF6nDE7LQsHxAMoMgTGB8%2B58jWbc6KPoA%40mail.gmail.com.
Subscribe to:
Posts (Atom)