Tuesday, March 30, 2021

how to get an errorformat with full line %m

hello people,

my ftplugin/perl.vim comes with a 'fixed' (works better for me
but i don't know if it can break something to other people).

So first question: is it worth submitting a patch?

version of the compiler/perl.vim from the standard distribution:

set errorformat=
\%-G%.%#had\ compilation\ errors.,
\%-G%.%#syntax\ OK,
\%+A%.%#\ at\ %f\ line\ %l\\,%.%#,
\%+C%.%#,
\%m\ at\ %f\ line\ %l.,

In the version shipped with vim don't work with this error message:

Odd number of elements in anonymous hash at lib/Node.pm line 46, <DATA> line 1.

because the found filename is "lib/Node.pm line 46, <DATA> " (the
pattern is too greedy) so i just changed the order of matching.

Now the second question (the topic of the mail):

When developping, i also use the Devel::SimpleTrace module to activate
stacktraces in error messages so the previous message becomes:

Odd number of elements in anonymous hash
at Node::new(lib/Node.pm line 46, <DATA>:1)
at Pig::_parse_line(lib/Pig.pm:47)
at Pig::parse(lib/Pig.pm:58)
at main::(./ultrasimple.pl:7)

and i would like to make this stack available from my cwindow. alas: the
first line is the whole error message so if i use

\%+A%m,
\%+C\tat\ %o(%f:%l)

then \%+A%m will match any line so breaks the whole thing. I have no
idea how to fix the thing. any help or pointer to an efm with the
similar problem is 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 on the web visit https://groups.google.com/d/msgid/vim_use/YGL80opvyrGnomNz%40prometheus.u-strasbg.fr.

Saturday, March 27, 2021

Re: add a line -- .vimrc instead of plugin

Regarding the difference between the apostrophe and back tick, I couldn't figure out when I would need the apostrophe version, so I also mapped the apostrophe to the back tick:

map ' `

--

Salman

On Sat, Mar 27, 2021, 12:38 meine <trialero@gmx.com> wrote:
Hi,

I read about the 'unimpaired.vim' plugin and its nifty feature to add a
blank line below or above the line you're on. Quite often needed when
editing the final layout of your document.

But why with a plugin? As I want to learn Vim the 'less comfortable'
way, I tried some things and made just two lines in my .vimrc that do
just the same. The challenge was to return the cursor to the original
position (line and column) after the new line was made.

" add a line below or above without moving
noremap <Leader>o mpo<Esc>`p
noremap <Leader>O mpO<Esc>`p

'mp' marks the position (just chose p because I don't use that edge of
my keyboard often)

'o' or 'O' adds an empty line below or above

<Esc> gets back to Normal mode

`p gets back to the previous position (mind the backtick!)

Probably no higer Vim skills or rocket science, but I am happy to have
solved this instead of just downloading a plugin. Also learned the
difference between an apostrophe and backtick when going to a mark :-)

//meine

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

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

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

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

add a line -- .vimrc instead of plugin

Hi,

I read about the 'unimpaired.vim' plugin and its nifty feature to add a
blank line below or above the line you're on. Quite often needed when
editing the final layout of your document.

But why with a plugin? As I want to learn Vim the 'less comfortable'
way, I tried some things and made just two lines in my .vimrc that do
just the same. The challenge was to return the cursor to the original
position (line and column) after the new line was made.

" add a line below or above without moving
noremap <Leader>o mpo<Esc>`p
noremap <Leader>O mpO<Esc>`p

'mp' marks the position (just chose p because I don't use that edge of
my keyboard often)

'o' or 'O' adds an empty line below or above

<Esc> gets back to Normal mode

`p gets back to the previous position (mind the backtick!)

Probably no higer Vim skills or rocket science, but I am happy to have
solved this instead of just downloading a plugin. Also learned the
difference between an apostrophe and backtick when going to a mark :-)

//meine

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

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

Friday, March 26, 2021

Re: Use :bdel to close directory listing?

Hi Roland,

You probably don't want to hear this, but :bn, :bd etc work as expected here.
Have you any script or plugin that may be overriding the usage of the :b* commands?
try starting vim with
```
vim --clean *
```
to see if the commands work now.

On Wed, 24 Mar 2021 at 19:27, Roland Freikamp <rk-list@koebler.com> wrote:
Hi,

so, there is no way to prevent netrw from breaking the :bn/:bdel
behaviour? Will this netrw-bug be solved soon?

Until then, the only way seems to completely diable netrw, e.g. by
let g:loaded_netrw=1


Best regards
Roland


On 2021-03-09 18:04:11 +0100, Roland Freikamp wrote:
> Hi,
>
> thanks for your answer. Unfortunately, it does not work here,
> even after upgrading to netrw v171g.
>
> > Well, I just don't see that problem.
> >
> > vim *
> > shows the dir/ and its file,
> > :bn then moves on to "file".
> >
> > Repeating, and instead of :bn I used :bd -- and the "file" is opened with
> > contents shown.
> This does not work here -- :bn and :bd do absolutely nothing.
> It looks like this does not work when "set hidden" is used. :(
>
> So: Is there any way to use "set hidden" (which I need, since I want to
> edit several files simultaneously), and being able to switch away/close
> directory listings with :bn/:bd or some other command?
>
> > Perhaps upgrading netrw would be of assistance in this; its at 171g (v170
> > should be available as a regular vim update, and 171g is available from my
> > website as http://www.drchip.org/astronaut/vim/index.html#NETRW).
> Unfortunately not.
>
>
> Best regards
> Roland
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210309170411.GA23840%40localhost.

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

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


--
regards

Chris Allison

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

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

Wednesday, March 24, 2021

Re: How to specific the line to go to from the command line?

Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
> Yes, and as icing on the cake, a variation on this one: how to go to a
> specific line and column:
>
> " Go to line and column
> function GoTo(line, column)
> exe min([line("$"), a:line]) "| normal" a:column . "|"
> endfunction

You don't need a vim function to do that. You can run normal from the
command line. Go to line 23 column 45:

vim -c ':normal 23G45|' filename

Elijah

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

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

Re: How to specific the line to go to from the command line?

Sven Guckes <guckes@guckes.net> wrote:
> * Peng Yu <pengyu.ut@gmail.com> [2021-03-24 01:51]:
>> I want to specify the line number to go to at the command line.
>> Could anybody let me know how to do it with vim? Thanks.
>
> how to go to line #23:
>
> jump to line 23 on startup:
> vim +23 filename

That's a good answer. The more modern version is to use -c like this:

vim -c :23 filename

Up to ten -c commands can be given, each with an ex mode command. Note
it may need quotes from the shell:

vim -c ':normal 23G' filename

I have a script that I use where I consider the filename to be sensitive
and I don't want it to appear in `ps` output. To invoke vim to edit that
file from script I use a temporary tags file. One could (but probably
would find it too cumbersome) use a method like that to go to line 23.

Here's the bit of sh script I use:

case "$mode" in
# ...
edit) tmp=tags
printf "main\t%s\t1\n" "$name" > $tmp
vim -t main
rc=$?
rm $tmp
exit $rc
;;
# ...
esac

In the 'tags' file I create, the three columns are tagname, filename,
and line number. (In typical 'tags' files the third column is a search
pattern, not a line number. Typically they also have multiple lines with
separate entries.) I then invoke vim with the tag name.

I bring it up in case this isn't going to be cumbersome and might be
something that helps your use case:

vim -c ':set tags=/some/shared/tags/file' -t tagname

Elijah

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

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

Re: Use :bdel to close directory listing?

Hi,

so, there is no way to prevent netrw from breaking the :bn/:bdel
behaviour? Will this netrw-bug be solved soon?

Until then, the only way seems to completely diable netrw, e.g. by
let g:loaded_netrw=1


Best regards
Roland


On 2021-03-09 18:04:11 +0100, Roland Freikamp wrote:
> Hi,
>
> thanks for your answer. Unfortunately, it does not work here,
> even after upgrading to netrw v171g.
>
> > Well, I just don't see that problem.
> >
> > vim *
> > shows the dir/ and its file,
> > :bn then moves on to "file".
> >
> > Repeating, and instead of :bn I used :bd -- and the "file" is opened with
> > contents shown.
> This does not work here -- :bn and :bd do absolutely nothing.
> It looks like this does not work when "set hidden" is used. :(
>
> So: Is there any way to use "set hidden" (which I need, since I want to
> edit several files simultaneously), and being able to switch away/close
> directory listings with :bn/:bd or some other command?
>
> > Perhaps upgrading netrw would be of assistance in this; its at 171g (v170
> > should be available as a regular vim update, and 171g is available from my
> > website as http://www.drchip.org/astronaut/vim/index.html#NETRW).
> Unfortunately not.
>
>
> Best regards
> Roland
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210309170411.GA23840%40localhost.

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

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

Tuesday, March 23, 2021

Re: How to specific the line to go to from the command line?

On Wed, Mar 24, 2021 at 2:02 AM Sven Guckes <guckes@guckes.net> wrote:
>
> * Peng Yu <pengyu.ut@gmail.com> [2021-03-24 01:51]:
> > I want to specify the line number to go to at the command line.
> > Could anybody let me know how to do it with vim? Thanks.
>
> how to go to line #23:
>
> jump to line 23 on startup:
> vim +23 filename
>
> jump to line 23 in command mode:
> 23G
> 23gg
>
> jump to line 23 in command mode:
> :23

Yes, and as icing on the cake, a variation on this one: how to go to a
specific line and column:

" Go to line and column
function GoTo(line, column)
exe min([line("$"), a:line]) "| normal" a:column . "|"
endfunction

see
:help [range]
" a naked range goes to the line(s) mentioned
:help bar
" to go to a certain column
:help min()
" this function takes only a List or a Dictionary as argument

>
> turn line numbering on:
> :set nu
>
> see also:
> :help G
> :help gg
> :help range
> :help 'nu'
> :help +cmd
>
> Sven
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210324010250.7f2354bqmwsbixhl%40guckes.net.

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

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

Re: How to specific the line to go to from the command line?

* Peng Yu <pengyu.ut@gmail.com> [2021-03-24 01:51]:
> I want to specify the line number to go to at the command line.
> Could anybody let me know how to do it with vim? Thanks.

how to go to line #23:

jump to line 23 on startup:
vim +23 filename

jump to line 23 in command mode:
23G
23gg

jump to line 23 in command mode:
:23

turn line numbering on:
:set nu

see also:
:help G
:help gg
:help range
:help 'nu'
:help +cmd

Sven

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

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

How to specific the line to go to from the command line?

Hi,

I want to specify the line number to go to at the command line. Could
anybody let me know how to do it with vim? Thanks.

--
Regards,
Peng

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

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

Monday, March 22, 2021

nohlsearch when entering insert mode ?

Hi,

when searching for text I am using hlsearch.
But in the moment I start to type or correct the
word I was searching for, highlighting via hlsearch
and cursor color collide...:)

Is there a way to switch off hlsearch in the moment
I am leaving command mode ?

Cheers!
mcc

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

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

Friday, March 19, 2021

Re: vim9script job function handler not recognized

Hi Bram,


I was inspired by testdir/test_vim9script...vim  and write these lines. 
I wonder how can this job can be monitored during its running life  maybe by callback or another job.



"
  # Zip command line
  @z = stampedDir .. archiveName 
  var archive_cmd: string = sevenZ.exe .. sevenZ.exclusion  .. ' a "' .. @z .. '" "' .. archiveSourcePath .. '"' .. sevenZ.compression


  # Zip's job
  var jobid: job
  var source: list<number>

  def Out_cb(...l: any)
      eval [][0]
  enddef
  def Exit_cb(...l: any)
sleep 1m
source += l
echomsg 'Exiting ' .. string(l) .. ' ' .. string(@z)
  enddef

  jobid = job_start(archive_cmd, { out_cb: Out_cb, exit_cb:  Exit_cb, mode: 'raw', timeout: 30000 } )
  echomsg 'jobid: ' .. string(jobid)
"


Le vendredi 19 mars 2021 à 20:13:46 UTC+1, Bram Moolenaar a écrit :

Ni Va wrote:

> I got not recognized function handler starting a job in vim9script.
>
>
> *"*
> *Error detected while processing function <SNR>24_ZipUpDir:*
> *line 60:*
> *E700: Unknown function: MyHandlerCallback *
> "
>
> And this is the vim9script:
>
> "
> vim9script
>
> var jobid: job
> var options: dict<any>
>
> # Job Part {{{
> def MyHandlerExit(channel: channel, msg: string): void
> job_stop(jobid)
> echomsg 'Exiting ' .. string(msg) .. ' ' .. string(@z)
>
> def MyHandlerCallback2(channel: channel, msg: string)
> echomsg string(msg)
> enddef
>
> options = { "callback": function('MyHandlerCallback2') }
> job_start(cmd, options)
> enddef
>
> def MyHandlerCallback(channel: channel, msg: string): void
> echomsg string(msg)
> enddef
>
> options = { 'callback': function('MyHandlerCallback'), 'exit_cb':
> function('MyHandlerExit'), 'timeout': 30000 }
> jobid = job_start(cmd, options) | echomsg 'jobid: ' .. string(jobid)
>
> "

"cmd" is not defined. But you probably want to remove function() and
use MyHandlerCallback directly. The function will be defined
script-local, and using it as a string won't work inside job-start().

You don't need the ": void" for the function, not returning anything is
the default.

--
Contrary to popular belief, it's often your clothing that gets promoted, not
you.
(Scott Adams - The Dilbert principle)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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

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

Re: vim9script job function handler not recognized

Ni Va wrote:

> I got not recognized function handler starting a job in vim9script.
>
>
> *"*
> *Error detected while processing function <SNR>24_ZipUpDir:*
> *line 60:*
> *E700: Unknown function: MyHandlerCallback *
> "
>
> And this is the vim9script:
>
> "
> vim9script
>
> var jobid: job
> var options: dict<any>
>
> # Job Part {{{
> def MyHandlerExit(channel: channel, msg: string): void
> job_stop(jobid)
> echomsg 'Exiting ' .. string(msg) .. ' ' .. string(@z)
>
> def MyHandlerCallback2(channel: channel, msg: string)
> echomsg string(msg)
> enddef
>
> options = { "callback": function('MyHandlerCallback2') }
> job_start(cmd, options)
> enddef
>
> def MyHandlerCallback(channel: channel, msg: string): void
> echomsg string(msg)
> enddef
>
> options = { 'callback': function('MyHandlerCallback'), 'exit_cb':
> function('MyHandlerExit'), 'timeout': 30000 }
> jobid = job_start(cmd, options) | echomsg 'jobid: ' .. string(jobid)
>
> "

"cmd" is not defined. But you probably want to remove function() and
use MyHandlerCallback directly. The function will be defined
script-local, and using it as a string won't work inside job-start().

You don't need the ": void" for the function, not returning anything is
the default.

--
Contrary to popular belief, it's often your clothing that gets promoted, not
you.
(Scott Adams - The Dilbert principle)

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

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

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

vim9script job function handler not recognized

Hi,

I got not recognized function handler starting a job in vim9script.


"
Error detected while processing function <SNR>24_ZipUpDir:
line   60:
E700: Unknown function: MyHandlerCallback       
"

And this is the vim9script:

"
  vim9script

  var jobid: job
  var options: dict<any>

  # Job Part {{{
  def MyHandlerExit(channel: channel, msg: string): void
job_stop(jobid)
echomsg 'Exiting ' .. string(msg) .. ' ' .. string(@z)

def MyHandlerCallback2(channel: channel, msg: string)
  echomsg string(msg)
enddef

options = { "callback": function('MyHandlerCallback2') }
     job_start(cmd, options)
  enddef

  def MyHandlerCallback(channel: channel, msg: string): void
  echomsg string(msg)
  enddef

   options = { 'callback': function('MyHandlerCallback'), 'exit_cb':  function('MyHandlerExit'), 'timeout':  30000 }
   jobid = job_start(cmd, options) | echomsg 'jobid: ' .. string(jobid)

"

Thank for help
NiVa

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ba0259f3-1ef2-4a29-9c4d-8929e18d8820n%40googlegroups.com.

Thursday, March 18, 2021

Re: tabedit and closing

Den tors 18 mars 2021 17:44rwmit...@gmail.com <rwmitchell@gmail.com> skrev:
On Thursday, March 18, 2021 at 12:14:43 PM UTC-4 Gary Johnson wrote:
On 2021-03-18,gmail.com wrote:
> On Thursday, March 18, 2021 at 10:51:20 AM UTC-4 BPJ wrote:
>
>> Den tors 18 mars 2021 15:...@gmail.com> skrev:
>>
>> I have multiple tabs open using :tabedit
>> I'm in a tab other than the right most.
>> :tabedit  opens a new tab to the right of the current tab
>> :q closes that tab but also advances the current tab again to the
>> right.

The following seems to work in both cases, though I haven't tested
it extensively.

:autocmd TabClosed * tabprevious

Regards,
Gary

Beautiful!
Just works.  No change to how I work. 

I quite like it too! I probably should take some time to learn about :autocmd!


( I appreciate all responses, but this is what I was looking for! )

I was also looking for this, without knowing it! :-)

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/91bae87a-35ca-41e2-817d-af2b29c44d71n%40googlegroups.com.

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

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

Re: tabedit and closing

On Thursday, March 18, 2021 at 12:14:43 PM UTC-4 Gary Johnson wrote:
On 2021-03-18,gmail.com wrote:
> On Thursday, March 18, 2021 at 10:51:20 AM UTC-4 BPJ wrote:
>
>> Den tors 18 mars 2021 15:...@gmail.com> skrev:
>>
>> I have multiple tabs open using :tabedit
>> I'm in a tab other than the right most.
>> :tabedit  opens a new tab to the right of the current tab
>> :q closes that tab but also advances the current tab again to the
>> right.

The following seems to work in both cases, though I haven't tested
it extensively.

:autocmd TabClosed * tabprevious

Regards,
Gary

Beautiful!
Just works.  No change to how I work. 

( I appreciate all responses, but this is what I was looking for! )

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/91bae87a-35ca-41e2-817d-af2b29c44d71n%40googlegroups.com.

Re: tabedit and closing

On 2021-03-18, rwmit...@gmail.com wrote:
> On Thursday, March 18, 2021 at 10:51:20 AM UTC-4 BPJ wrote:
>
>> Den tors 18 mars 2021 15:03rwmit...@gmail.com <rwmit...@gmail.com> skrev:
>>
>> I have multiple tabs open using :tabedit
>> I'm in a tab other than the right most.
>> :tabedit  opens a new tab to the right of the current tab
>> :q closes that tab but also advances the current tab again to the
>> right.
>>
>> Is there a setting to instead advance the current tab to the left?
>> I'd prefer to return to the previous tab, where I had just run :tabedit
>>
>>
>> I have this in .vimrc:
>>
>> :com Tc tabclose | tabprevious
>> nnor <F12>t :Tc<cr>
>>
>> Works like a charm!
>
> Does that require using the F12 key or does it somehow also work when just
> using :wq ?

The following seems to work in both cases, though I haven't tested
it extensively.

:autocmd TabClosed * tabprevious

Regards,
Gary

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

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

Re: tabedit and closing

Den tors 18 mars 2021 16:25rwmit...@gmail.com <rwmitchell@gmail.com> skrev:
Does that require using the F12 key or does it somehow also work when just using :wq  ?

You can't redefine the :wq command since user commands have to start with a capital letter but you could certainly call the command Wq or WQ if you like, but since my command does *not* write the file automatically. To get that behavior I would rather use

:com Wq wq | tabprevious

The nnor is a mapping, not a command, so that in normal mode I can just type F12 + c (<F12>t was a typo for <F12>c) to execute the command above without going into ex mode first (the map does that for me!) If you want such a mapping at all you can assign it to any free key sequence. I would advise against mapping it to wq however since it is all too easy (at least for me!) to type wqq by mistake and thereby starting to record everything you type into the @q register.

However I have the whole set of :tab... commands mapped to F12 combos in my .vimrc because I use them all the time:

nnor <F12>n :tabnext<cr>
nnor <F12>p :tabprevious<cr>
nnor <F12>f :tabfirst<cr>
nnor <F12>l :tablast<cr>
nnor <F12>t :ls t<cr>
com Tc tabclose | tabprevious
nnor <F12>c :Tc<cr>



On Thursday, March 18, 2021 at 10:51:20 AM UTC-4 BPJ wrote:
Den tors 18 mars 2021 15:03rwmit...@gmail.com <rwmit...@gmail.com> skrev:
I have multiple tabs open using :tabedit
I'm in a tab other than the right most.
:tabedit  opens a new tab to the right of the current tab
:q closes that tab but also advances the current tab again to the right.

Is there a setting to instead advance the current tab to the left?
I'd prefer to return to the previous tab, where I had just run :tabedit

I have this in .vimrc:

:com Tc tabclose | tabprevious
nnor <F12>t :Tc<cr>

Works like a charm!



--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7354d4ed-085b-47ae-b48e-13cb2ae8e0een%40googlegroups.com.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/9abfdd96-6835-469a-af02-117471943d00n%40googlegroups.com.

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

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

Re: tabedit and closing

Does that require using the F12 key or does it somehow also work when just using :wq  ?

On Thursday, March 18, 2021 at 10:51:20 AM UTC-4 BPJ wrote:
Den tors 18 mars 2021 15:03rwmit...@gmail.com <rwmit...@gmail.com> skrev:
I have multiple tabs open using :tabedit
I'm in a tab other than the right most.
:tabedit  opens a new tab to the right of the current tab
:q closes that tab but also advances the current tab again to the right.

Is there a setting to instead advance the current tab to the left?
I'd prefer to return to the previous tab, where I had just run :tabedit

I have this in .vimrc:

:com Tc tabclose | tabprevious
nnor <F12>t :Tc<cr>

Works like a charm!



--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7354d4ed-085b-47ae-b48e-13cb2ae8e0een%40googlegroups.com.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/9abfdd96-6835-469a-af02-117471943d00n%40googlegroups.com.

Re: tabedit and closing

Den tors 18 mars 2021 15:03rwmit...@gmail.com <rwmitchell@gmail.com> skrev:
I have multiple tabs open using :tabedit
I'm in a tab other than the right most.
:tabedit  opens a new tab to the right of the current tab
:q closes that tab but also advances the current tab again to the right.

Is there a setting to instead advance the current tab to the left?
I'd prefer to return to the previous tab, where I had just run :tabedit

I have this in .vimrc:

:com Tc tabclose | tabprevious
nnor <F12>t :Tc<cr>

Works like a charm!



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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7354d4ed-085b-47ae-b48e-13cb2ae8e0een%40googlegroups.com.

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

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

tabedit and closing

I have multiple tabs open using :tabedit
I'm in a tab other than the right most.
:tabedit  opens a new tab to the right of the current tab
:q closes that tab but also advances the current tab again to the right.

Is there a setting to instead advance the current tab to the left?
I'd prefer to return to the previous tab, where I had just run :tabedit

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7354d4ed-085b-47ae-b48e-13cb2ae8e0een%40googlegroups.com.

Tuesday, March 16, 2021

Re: Error in opening a .py file in a directory named '**'

Hi,

This seems to be caused by a cmake plugin. Please check for an update or
contact the author if he can fix it.

Best,
Christian

On Mo, 15 Mär 2021, Peng Yu wrote:
> Hi
>
> $ ls -gGl '**/main.py'
> -rwxr-xr-x 1 105 2021/03/15-17:02:44 '**/main.py'
>
> vim shows the following error when I have a .py file. in **. Can
> anybody reproduce this error? Does anybody know which file this error
> is from?
>
> Error detected while processing BufRead Autocommands for
> "*.py"..FileType Autocommands for "*"..function
> cmake#augroup#on_file_type[1]..cmake#b
> uffer#has_project[9]..cmake#util#source_dir[5]..cmake#util#binary_dir:
> line 13:
> E220: Missing }.
> ...
>
>
> $ vim --version
> VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 21 2020 04:03:24)
> macOS version
> Included patches: 1-1719
> Compiled by travis@Traviss-Mac.local
> Huge version with MacVim GUI. Features included (+) or not (-):
> +acl +file_in_path -mouse_sysmouse -tag_old_static
> +arabic +find_in_path +mouse_urxvt -tag_any_white
> +autocmd +float +mouse_xterm -tcl
> +autochdir +folding +multi_byte +termguicolors
> -autoservername -footer +multi_lang +terminal
> +balloon_eval +fork() -mzscheme +terminfo
> +balloon_eval_term +fullscreen +netbeans_intg +termresponse
> +browse +gettext +num64 +textobjects
> ++builtin_terms -hangul_input +odbeditor +textprop
> +byte_offset +iconv +packages +timers
> +channel +insert_expand +path_extra +title
> +cindent +ipv6 +perl/dyn +toolbar
> +clientserver +job +persistent_undo +transparency
> +clipboard +jumplist +popupwin +user_commands
> +cmdline_compl +keymap +postscript +vartabs
> +cmdline_hist +lambda +printer +vertsplit
> +cmdline_info +langmap +profile +virtualedit
> +comments +libcall +python/dyn +visual
> +conceal +linebreak +python3/dyn +visualextra
> +cryptv +lispindent +quickfix +viminfo
> +cscope +listcmds +reltime +vreplace
> +cursorbind +localmap +rightleft +wildignore
> +cursorshape +lua/dyn +ruby/dyn +wildmenu
> +dialog_con_gui +menu +scrollbind +windows
> +diff +mksession +signs +writebackup
> +digraphs +modify_fname +smartindent -X11
> +dnd +mouse -sound -xfontset
> -ebcdic +mouseshape +spell +xim
> +emacs_tags +mouse_dec +startuptime -xpm
> +eval -mouse_gpm +statusline -xsmp
> +ex_extra -mouse_jsbterm -sun_workshop -xterm_clipboard
> +extra_search +mouse_netterm +syntax -xterm_save
> -farsi +mouse_sgr +tag_binary
> system vimrc file: "$VIM/vimrc"
> user vimrc file: "$HOME/.vimrc"
> 2nd user vimrc file: "~/.vim/vimrc"
> user exrc file: "$HOME/.exrc"
> system gvimrc file: "$VIM/gvimrc"
> user gvimrc file: "$HOME/.gvimrc"
> 2nd user gvimrc file: "~/.vim/gvimrc"
> defaults file: "$VIMRUNTIME/defaults.vim"
> system menu file: "$VIMRUNTIME/menu.vim"
> fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
> Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM
> -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wshadow -Werror
> -Wno-error=missing-field-initializers
> -Wno-error=deprecated-declarations -Wno-error=unused-function
> Linking: clang -L. -fstack-protector-strong -L/usr/local/lib
> -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib
> -L/usr/local/opt/readline/lib -L. -fstack-protector-strong
> -L/usr/local/lib -L/usr/local/opt/libyaml/lib
> -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib
> -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm
> -lncurses -liconv /usr/local/lib/libintl.a -framework AppKit
> -fstack-protector
> -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE

Mit freundlichen Grüßen
Christian
--
Warum überquerte das Huhn die Straße?
Karl Marx:
Es war historisch unvermeidlich.

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

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

Monday, March 15, 2021

Re: Error in opening a .py file in a directory named '**'

The problem is not just for .py files. It is for any file as long as
it is in a directory called **.

On Mon, Mar 15, 2021 at 5:06 PM Peng Yu <pengyu.ut@gmail.com> wrote:
>
> Hi
>
> $ ls -gGl '**/main.py'
> -rwxr-xr-x 1 105 2021/03/15-17:02:44 '**/main.py'
>
> vim shows the following error when I have a .py file. in **. Can
> anybody reproduce this error? Does anybody know which file this error
> is from?
>
> Error detected while processing BufRead Autocommands for
> "*.py"..FileType Autocommands for "*"..function
> cmake#augroup#on_file_type[1]..cmake#b
> uffer#has_project[9]..cmake#util#source_dir[5]..cmake#util#binary_dir:
> line 13:
> E220: Missing }.
> ...
>
>
> $ vim --version
> VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 21 2020 04:03:24)
> macOS version
> Included patches: 1-1719
> Compiled by travis@Traviss-Mac.local
> Huge version with MacVim GUI. Features included (+) or not (-):
> +acl +file_in_path -mouse_sysmouse -tag_old_static
> +arabic +find_in_path +mouse_urxvt -tag_any_white
> +autocmd +float +mouse_xterm -tcl
> +autochdir +folding +multi_byte +termguicolors
> -autoservername -footer +multi_lang +terminal
> +balloon_eval +fork() -mzscheme +terminfo
> +balloon_eval_term +fullscreen +netbeans_intg +termresponse
> +browse +gettext +num64 +textobjects
> ++builtin_terms -hangul_input +odbeditor +textprop
> +byte_offset +iconv +packages +timers
> +channel +insert_expand +path_extra +title
> +cindent +ipv6 +perl/dyn +toolbar
> +clientserver +job +persistent_undo +transparency
> +clipboard +jumplist +popupwin +user_commands
> +cmdline_compl +keymap +postscript +vartabs
> +cmdline_hist +lambda +printer +vertsplit
> +cmdline_info +langmap +profile +virtualedit
> +comments +libcall +python/dyn +visual
> +conceal +linebreak +python3/dyn +visualextra
> +cryptv +lispindent +quickfix +viminfo
> +cscope +listcmds +reltime +vreplace
> +cursorbind +localmap +rightleft +wildignore
> +cursorshape +lua/dyn +ruby/dyn +wildmenu
> +dialog_con_gui +menu +scrollbind +windows
> +diff +mksession +signs +writebackup
> +digraphs +modify_fname +smartindent -X11
> +dnd +mouse -sound -xfontset
> -ebcdic +mouseshape +spell +xim
> +emacs_tags +mouse_dec +startuptime -xpm
> +eval -mouse_gpm +statusline -xsmp
> +ex_extra -mouse_jsbterm -sun_workshop -xterm_clipboard
> +extra_search +mouse_netterm +syntax -xterm_save
> -farsi +mouse_sgr +tag_binary
> system vimrc file: "$VIM/vimrc"
> user vimrc file: "$HOME/.vimrc"
> 2nd user vimrc file: "~/.vim/vimrc"
> user exrc file: "$HOME/.exrc"
> system gvimrc file: "$VIM/gvimrc"
> user gvimrc file: "$HOME/.gvimrc"
> 2nd user gvimrc file: "~/.vim/gvimrc"
> defaults file: "$VIMRUNTIME/defaults.vim"
> system menu file: "$VIMRUNTIME/menu.vim"
> fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
> Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM
> -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wshadow -Werror
> -Wno-error=missing-field-initializers
> -Wno-error=deprecated-declarations -Wno-error=unused-function
> Linking: clang -L. -fstack-protector-strong -L/usr/local/lib
> -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib
> -L/usr/local/opt/readline/lib -L. -fstack-protector-strong
> -L/usr/local/lib -L/usr/local/opt/libyaml/lib
> -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib
> -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm
> -lncurses -liconv /usr/local/lib/libintl.a -framework AppKit
> -fstack-protector
> -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE
> --
> Regards,
> Peng



--
Regards,
Peng

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

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

Error in opening a .py file in a directory named '**'

Hi

$ ls -gGl '**/main.py'
-rwxr-xr-x 1 105 2021/03/15-17:02:44 '**/main.py'

vim shows the following error when I have a .py file. in **. Can
anybody reproduce this error? Does anybody know which file this error
is from?

Error detected while processing BufRead Autocommands for
"*.py"..FileType Autocommands for "*"..function
cmake#augroup#on_file_type[1]..cmake#b
uffer#has_project[9]..cmake#util#source_dir[5]..cmake#util#binary_dir:
line 13:
E220: Missing }.
...


$ vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 21 2020 04:03:24)
macOS version
Included patches: 1-1719
Compiled by travis@Traviss-Mac.local
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +file_in_path -mouse_sysmouse -tag_old_static
+arabic +find_in_path +mouse_urxvt -tag_any_white
+autocmd +float +mouse_xterm -tcl
+autochdir +folding +multi_byte +termguicolors
-autoservername -footer +multi_lang +terminal
+balloon_eval +fork() -mzscheme +terminfo
+balloon_eval_term +fullscreen +netbeans_intg +termresponse
+browse +gettext +num64 +textobjects
++builtin_terms -hangul_input +odbeditor +textprop
+byte_offset +iconv +packages +timers
+channel +insert_expand +path_extra +title
+cindent +ipv6 +perl/dyn +toolbar
+clientserver +job +persistent_undo +transparency
+clipboard +jumplist +popupwin +user_commands
+cmdline_compl +keymap +postscript +vartabs
+cmdline_hist +lambda +printer +vertsplit
+cmdline_info +langmap +profile +virtualedit
+comments +libcall +python/dyn +visual
+conceal +linebreak +python3/dyn +visualextra
+cryptv +lispindent +quickfix +viminfo
+cscope +listcmds +reltime +vreplace
+cursorbind +localmap +rightleft +wildignore
+cursorshape +lua/dyn +ruby/dyn +wildmenu
+dialog_con_gui +menu +scrollbind +windows
+diff +mksession +signs +writebackup
+digraphs +modify_fname +smartindent -X11
+dnd +mouse -sound -xfontset
-ebcdic +mouseshape +spell +xim
+emacs_tags +mouse_dec +startuptime -xpm
+eval -mouse_gpm +statusline -xsmp
+ex_extra -mouse_jsbterm -sun_workshop -xterm_clipboard
+extra_search +mouse_netterm +syntax -xterm_save
-farsi +mouse_sgr +tag_binary
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM
-Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wshadow -Werror
-Wno-error=missing-field-initializers
-Wno-error=deprecated-declarations -Wno-error=unused-function
Linking: clang -L. -fstack-protector-strong -L/usr/local/lib
-L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib
-L/usr/local/opt/readline/lib -L. -fstack-protector-strong
-L/usr/local/lib -L/usr/local/opt/libyaml/lib
-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib
-L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm
-lncurses -liconv /usr/local/lib/libintl.a -framework AppKit
-fstack-protector
-L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE
--
Regards,
Peng

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

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

Saturday, March 13, 2021

diffopt+=filler jumpiness

Hi,

Thank you all always for awesome vim.

I use vimdiff often.  I set diffopt+=filler to help with alignment.
But often when editing one of the buffers things get weird.
After entering insert mode sometimes the screen scrolls a few lines and also sometimes the cursor often jumps to a different (incorrect) line.  I can add/del some words/lines ok but then upon exiting insert mode going back to normal mode the screen sometimes jumps a few lines again.
Does anyone else see that sort of behavior ?
It doesn't happen on a diff of 2 small, simple files with only few differences.
Could some InsertEnter autocmd to anchor things perhaps help ?
Can we disable the auto diffupdate and I could do that with a mapping after some edits ?

thx for any suggestions,
-m

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/185235d5-f790-4d32-9b2a-f8b4a41bf77dn%40googlegroups.com.

Wednesday, March 10, 2021

Help with indenting code

I would like to indent code structured as follows:

if X then
(
if Y then
(
...
)
)
else
...

To make Python look like a language that is easy to indent, this
language has `if... then... [else]` blocks without `endif`.

I get can get it almost right, except that the last `else` above gets
aligned with `if Y then`. The relevant snippet from my indent script
currently looks as follows:

fun! s:find_pair(pstart, pmid, pend)
call cursor(v:lnum, 1)
call search(a:pend, 'Wc')
return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn'))
endf

" And in my indentation function:

if getline(v:lnum) =~# '\<else\>'
return s:find_pair('\<then\>', '', '\<else\>')
endif

if getline(v:lnum) =~# '^\s*)'
return s:find_pair('(', '', ')')
endif

Any idea how I could take into account the blocks in parentheses when
matching `else` with its corresponding `if... then`?

Thanks,
Life.

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

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

Tuesday, March 9, 2021

Re: Use :bdel to close directory listing?

Hi,

thanks for your answer. Unfortunately, it does not work here,
even after upgrading to netrw v171g.

> Well, I just don't see that problem.
>
> vim *
> shows the dir/ and its file,
> :bn then moves on to "file".
>
> Repeating, and instead of :bn I used :bd -- and the "file" is opened with
> contents shown.
This does not work here -- :bn and :bd do absolutely nothing.
It looks like this does not work when "set hidden" is used. :(

So: Is there any way to use "set hidden" (which I need, since I want to
edit several files simultaneously), and being able to switch away/close
directory listings with :bn/:bd or some other command?

> Perhaps upgrading netrw would be of assistance in this; its at 171g (v170
> should be available as a regular vim update, and 171g is available from my
> website as http://www.drchip.org/astronaut/vim/index.html#NETRW).
Unfortunately not.


Best regards
Roland

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

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

Monday, March 8, 2021

Re: Spell-checking in Ukrainian

вт, 9 мар. 2021 г. в 01:05, Lang Hurst <grakker@gmail.com>:
>
> On 03/08/ , gevisz wrote:
> > After a new install of my Gentoo I lost spell-checking in Ukrainian
> > language that worked for me before and I have completely forgotten how
> > I fixed this problem in my previous Gentoo installation.
> >
> > Unfortunately, there is no app-vim/vim-spell-uk package in the Gentoo
> > repository that I can install in the usual way to fix it.
> >
> > Could you, please, advise me about the best way to enable a spell
> > checking in Ukrainian language in Gvim?
> >
>
> Did you try `set spell spelllang=uk` ?
>

Thank you. The command above suggested to download the Ukrainain spl
file and installed it in ~/.vim/spell directory.
So, now I can set spell checking Ukrainian text as usual from Gvim menu.

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

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

Re: Use :bdel to close directory listing?

Roland Freikamp wrote:
> Hi,
>
> since this is still really annoying me, I have to ask again, if there is
> *any* solution.
>
>> You can use :bd! to force a real deletion of a directory
>> as opposed to just hiding it.
> Unfortunately, this does not work. No matter how often I type ":bd",
> ":bd!", ":bn", ":bw", ... nothing happens.
> (VIM 8.2, netrw v168)
>
> Example:
>
> - directory structure:
>
> ./dir/
> ./dir/subfile
> ./file
>
> - vim *
>
> Result:
> - vim shows the "dir"-directory-listing, and there is no way to (a) delete
> the buffer or (b) switch to the next buffer with :bd/:bn.
> - :n switches to the next buffer, but does not cycle/wrap-around.
> - The *only* way to close the directory-listing, is:
> - :buffers
> - look for the buffer-numer
> - :bdel <num>
> - :bn
> In earlier vim-versions, :bdel was enough.
>
> So, is there *any* way to solve this, so that :bdel (or some other command)
> closes the directory listing and switches to the next buffer?
> (Or maybe a way to prevent "vim *" to open directory listings at all?)
>
Well, I just don't see that problem.

vim *
shows the dir/ and its file,
:bn then moves on to "file".

Repeating, and instead of :bn I used :bd -- and the "file" is opened
with contents shown.

Perhaps upgrading netrw would be of assistance in this; its at 171g
(v170 should be available as a regular vim update, and 171g is available
from my website as http://www.drchip.org/astronaut/vim/index.html#NETRW).

Regards,
Chip Campbell

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/79dd5d01-6f49-6f97-08ef-a3879c5a8a41%40drchip.org.

Re: Use :bdel to close directory listing?

Hi,

since this is still really annoying me, I have to ask again, if there is
*any* solution.

> You can use :bd! to force a real deletion of a directory
> as opposed to just hiding it.
Unfortunately, this does not work. No matter how often I type ":bd",
":bd!", ":bn", ":bw", ... nothing happens.
(VIM 8.2, netrw v168)

Example:

- directory structure:

./dir/
./dir/subfile
./file

- vim *

Result:
- vim shows the "dir"-directory-listing, and there is no way to (a) delete
the buffer or (b) switch to the next buffer with :bd/:bn.
- :n switches to the next buffer, but does not cycle/wrap-around.
- The *only* way to close the directory-listing, is:
- :buffers
- look for the buffer-numer
- :bdel <num>
- :bn
In earlier vim-versions, :bdel was enough.

So, is there *any* way to solve this, so that :bdel (or some other command)
closes the directory listing and switches to the next buffer?
(Or maybe a way to prevent "vim *" to open directory listings at all?)


Thanks,
Roland

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

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

Re: Spell-checking in Ukrainian

On 03/08/ , gevisz wrote:
> After a new install of my Gentoo I lost spell-checking in Ukrainian
> language that worked for me before and I have completely forgotten how
> I fixed this problem in my previous Gentoo installation.
>
> Unfortunately, there is no app-vim/vim-spell-uk package in the Gentoo
> repository that I can install in the usual way to fix it.
>
> Could you, please, advise me about the best way to enable a spell
> checking in Ukrainian language in Gvim?
>
> --

Did you try `set spell spelllang=uk` ?

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

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

Spell-checking in Ukrainian

After a new install of my Gentoo I lost spell-checking in Ukrainian
language that worked for me before and I have completely forgotten how
I fixed this problem in my previous Gentoo installation.

Unfortunately, there is no app-vim/vim-spell-uk package in the Gentoo
repository that I can install in the usual way to fix it.

Could you, please, advise me about the best way to enable a spell
checking in Ukrainian language in Gvim?

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

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

Friday, March 5, 2021

Re: " -> \(lq ... " -> \(rq

Hi Stan,

thanks a lot! :) Helps me a lot!

Cheers!
mcc


On 03/04 03:10, Stan Brown wrote:
>
> On 2021-03-04 14:36, tuxic@posteo.de wrote:
> > Troff distinquishes between the "opening"
> > double-quote and the "closing" double
> > quote by using \(lq nad \(rq instead.
> >
> > Is their a function or anything else,
> > which would allow me to write someting
> > which get closer to 100% error free
> > detection of opening and closing "
> > in vim?
>
> If you want the actual characters, this will take you to the next
> occurrence:
>
> /[""]/
>
> In other words, put the two quote marks within square brackets.
>
> If you want the troff sequences, use
>
> /\\([lr]q/
>
> The help text is at
>
> :h /[]
>
> --
> Stan Brown
> Tehachapi, CA, USA
> https://BrownMath.com
> https://OakRoadSystems.com
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/cda161d8-3ee0-2ed7-9ca2-3879dc3dab75%40fastmail.fm.
>

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

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

netrw slow hiding with large number of ignored files

Hi all,

I'm encountering very slow (several seconds to respond) behaviour from
netrw when hiding with netrw_gitignore#Hide() and a large number of
gitignore files. I first noticed it when I pulled the 'git' source,
compiled it, and called '$ vim .' in the root directory. For context
here's a basic .vimrc to demonstrate the behaviour:

set nocp
filetype plugin on
let g:netrw_hide = 1
let g:netrw_list_hide = netrw_gitignore#Hide()

With (using runtime/autoload/netrw_gitignore.vim):

function! netrw_gitignore#Hide(...)
return substitute(substitute(system('git ls-files --other --ignored --exclude-standard --directory'), '\n', ',', 'g'), ',$', '', '')
endfunction

I believe the slowdown is due to the number of ignored files, after
compiling git:

/path/to/src/git$ git ls-files --other --ignored --exclude-standard --directory | wc -l
684

The slowdown is more obvious in a repo with more ignored files, e.g.:

$ git init
$ echo '/foo.*' > .gitignore
$ for i in {1..2000}; do touch "foo.$i"; done
$ vim .

Would there happen to be another way to handle ignoring a list of files
with netrw? netrw_list_hide seems geared towards hiding against a list
of match patterns, rather than explicit filenames

Thanks,
Matt

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

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