Saturday, December 4, 2021

vim dirdiff autocmd bufenter disturb existence of b:currentDiff

Hi,

Using Vim DirDiff plugin


I have made this vim9 func to set layout and go to next diff.
def g:ManageDirDiff()

  if ( &ft == 'dirdiff' )

  echomsg 'Manage dirdiff'

if &columns < 200
  set columns=999 
  set lines=999
endif

resize 4
windo if &diff | setl nofoldenable | endif

    exec ':1,2 windo vertical resize ' .. (&columns / 2)
    exec ':1,2 windo setl nofoldenable'
    exec ':1,2 windo norm ]c'

  endif
enddef


When I call this def function from mapping it is ok.
When I automate it with this autocmd it disturb dirdiff plugin b:currentDiff variable to be set.

if has("autocmd")

  augroup VimReload
autocmd!
autocmd BufEnter      *.tmp     call g:ManageDirDiff() 
  augroup END

endif

This cause this error message
Manage dirdiff
Error detected while processing function <SNR>77_DirDiff[117]..<SNR>77_DirDiffNext[10]..<SNR>77_DirDiffOpen:
line   96:
E121: Undefined variable: b:currentDiff



--
--
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/d1d1b37a-c6c7-41c6-8680-c8405362e14en%40googlegroups.com.

vim9 range windo question

Hi,

I have switched my _vimrc in vim9script for a while.

Using dirdiff I would like to resize top left window width half of screen columns.

How can I execute correctly this kind of commands in vim9script ?

        exec '1windo vertical resize ' .. ( &columns / 2 )
1,2windo setl nofoldenable | norm ]c

--
--
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/3445f1eb-96d7-4516-bcbe-f48bc85b8e54n%40googlegroups.com.

DirDiff | how to vertical resize buffer 2 from &dirdiff buffer 3

Hi,

Using dirdiff plugin, I  would like from &ft dirdiff buffer to resize the width of top left buffer which is too small.

How without changing cursor from dirdiff bottom buffer I can change the width ?

I have tried this without any success :
exec 'vertical resize ' .. (&columns / 2) .. ' buffer 2'

Thank you.

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

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

Thursday, December 2, 2021

RE: [EXTERNAL] Re: split question

> On 2021-12-01, Kennedy, Marcus A. wrote:
> > > -----Original Message-----
> > > From: vim_use@googlegroups.com <vim_use@googlegroups.com> On
> > > Behalf Of Marvin Renich
> > > Sent: Wednesday, December 1, 2021 1:48 PM
> > > To: vim_use@googlegroups.com
> > > Subject: [EXTERNAL] Re: split question
> > >
> > > * Kennedy, Marcus A. <mailto:Marcus.Kennedy@Rocket.com> [211201
> 12:58]:
> > > > > ASCII art of what I want (hopefully LookOut! and Exchange doesn't
> screw
> > > > > this up in flight):
> > > > >
> > > > > -------------------
> > > > > | | | |
> > > > > | | |-----|
> > > > > |-----|-----| |
> > > > > | | |-----|
> > > > > | | | |
> > > > > | |-----------|
> > > > > | | |
> > > > > |-----|-----------|
> > > > >
> > > >
> > > > Additional info: Closest I could come up with was:
> > > >
> > > > -------------------
> > > > | | | |
> > > > | | |-----|
> > > > |-----|-----| |
> > > > | | |-----|
> > > > | | | |
> > > > |-----|-----------|
> > > > | | |
> > > > |-----|-----------|
> > > >
> > > > I cannot seem to make that bottom left window go away.
> > >
> > > Call the columns A, B, and C. Split the window vertically into A and B.
> > > Now splitting A horizontally is independent of the rest.
> > >
> > > Next, split B horizontally into rows F and G. Now you can split F
> > > vertically, giving you column C in F only. Now splitting [F,B] and
> > > [F,C] can be split horizontally as desired.
> > >
> > > ...Marvin
> > Thanks Marvin!
> >
> > That sort of gets me what I want. The part that is missing is I don't
> > want column C's splits to line up with the splits of Column B.
> >
> > At the moment, I've done a ":bo sp | vs" with a trash window in the
> > lower left. It's annoying that I cannot fit all of my one file in that
> > bottom left window (missing 10 lines) but I'm dealing with it. The part
> > that was messing me up was trying to get my eyes to jump from the
> bottom
> > split back to the other place in the code. So, my eyes weren't jumping
> > right.
> >
> > Oh well, Thanks for the help!
> > Andy
>
> As I understood Marvin's suggestion, the horizontal splits in column
> B do not line up with the splits in column C. Here's a more
> concrete example.
>
> $ vim fileA
> :belowright vsplit fileB
> :split fileC
> :vsplit fileD
> :wincmd =

Ha! That's it. So, it really is just that I didn't open them in the right order.

Thanks Gary for the clarification! Thanks Marvin for the initial info!

So, for completeness, my commands were:

:belowright vs
:sp
ctrl-w-<arrow to the top right window>
:vs
:sp
ctrl-w-<arrow to the top right window>
:sp
:sp

That did it. I then mouse set the window sizes to the way I want them

Thanks again!
Andy

--
--
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/5ADFF93892EDB147B66FCBABC8E4F27F5BD3BAD8%40prgmbx01.

php reference manual inside vim

Hi, I've been using cref.vim for a while and absolutely love it:

https://www.vim.org/scripts/script.php?script_id=614

It's basically an offline c reference manual right inside vim. I'm
wondering if there is any similar solution for php? Something like
phpref.vim?

Happy vimming!
Daniel


--
Psss, psss, put it down! - http://www.cafepress.com/putitdown

--
--
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/CADjSo4TFN%3Dup8qw2t%3DxCKR5-VYh0%3DpJCw_%2BZw%2BCaPCNzoV4%2BjA%40mail.gmail.com.

Wednesday, December 1, 2021

Re: [EXTERNAL] Re: split question

On 2021-12-01, Kennedy, Marcus A. wrote:
> > -----Original Message-----
> > From: vim_use@googlegroups.com <vim_use@googlegroups.com> On
> > Behalf Of Marvin Renich
> > Sent: Wednesday, December 1, 2021 1:48 PM
> > To: vim_use@googlegroups.com
> > Subject: [EXTERNAL] Re: split question
> >
> > * Kennedy, Marcus A. <mailto:Marcus.Kennedy@Rocket.com> [211201 12:58]:
> > > > ASCII art of what I want (hopefully LookOut! and Exchange doesn't screw
> > > > this up in flight):
> > > >
> > > > -------------------
> > > > | | | |
> > > > | | |-----|
> > > > |-----|-----| |
> > > > | | |-----|
> > > > | | | |
> > > > | |-----------|
> > > > | | |
> > > > |-----|-----------|
> > > >
> > >
> > > Additional info: Closest I could come up with was:
> > >
> > > -------------------
> > > | | | |
> > > | | |-----|
> > > |-----|-----| |
> > > | | |-----|
> > > | | | |
> > > |-----|-----------|
> > > | | |
> > > |-----|-----------|
> > >
> > > I cannot seem to make that bottom left window go away.
> >
> > Call the columns A, B, and C. Split the window vertically into A and B.
> > Now splitting A horizontally is independent of the rest.
> >
> > Next, split B horizontally into rows F and G. Now you can split F
> > vertically, giving you column C in F only. Now splitting [F,B] and
> > [F,C] can be split horizontally as desired.
> >
> > ...Marvin
> Thanks Marvin!
>
> That sort of gets me what I want. The part that is missing is I don't
> want column C's splits to line up with the splits of Column B.
>
> At the moment, I've done a ":bo sp | vs" with a trash window in the
> lower left. It's annoying that I cannot fit all of my one file in that
> bottom left window (missing 10 lines) but I'm dealing with it. The part
> that was messing me up was trying to get my eyes to jump from the bottom
> split back to the other place in the code. So, my eyes weren't jumping
> right.
>
> Oh well, Thanks for the help!
> Andy

As I understood Marvin's suggestion, the horizontal splits in column
B do not line up with the splits in column C. Here's a more
concrete example.

$ vim fileA
:belowright vsplit fileB
:split fileC
:vsplit fileD
:wincmd =

The layout should now look like this:

A B C
|-------|-------|-------|
| | | |
| | fileD | fileC |
| | | |
| fileA |---------------|
| | |
| | fileB |
| | |
|-------|---------------|

You can horizontally split all those windows to your heart's
content, and the new windows in column B (from fileD) will not be
aligned with any new windows in column C (from fileC). If you don't
need the wider window of fileB right away, you can minimize its
height to just the status bar with

:set winminheight=0

and, while your focus is in another window, pull the status line
above fileB down all the way.

HTH,
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/20211201230754.GA13906%40phoenix.

RE: [EXTERNAL] Re: split question

> -----Original Message-----
> From: vim_use@googlegroups.com <vim_use@googlegroups.com> On
> Behalf Of Marvin Renich
> Sent: Wednesday, December 1, 2021 1:48 PM
> To: vim_use@googlegroups.com
> Subject: [EXTERNAL] Re: split question
>
> * Kennedy, Marcus A. <mailto:Marcus.Kennedy@Rocket.com> [211201 12:58]:
> > > ASCII art of what I want (hopefully LookOut! and Exchange doesn't screw
> > > this up in flight):
> > >
> > > -------------------
> > > | | | |
> > > | | |-----|
> > > |-----|-----| |
> > > | | |-----|
> > > | | | |
> > > | |-----------|
> > > | | |
> > > |-----|-----------|
> > >
> >
> > Additional info: Closest I could come up with was:
> >
> > -------------------
> > | | | |
> > | | |-----|
> > |-----|-----| |
> > | | |-----|
> > | | | |
> > |-----|-----------|
> > | | |
> > |-----|-----------|
> >
> > I cannot seem to make that bottom left window go away.
>
> Call the columns A, B, and C. Split the window vertically into A and B.
> Now splitting A horizontally is independent of the rest.
>
> Next, split B horizontally into rows F and G. Now you can split F
> vertically, giving you column C in F only. Now splitting [F,B] and
> [F,C] can be split horizontally as desired.
>
> ...Marvin
Thanks Marvin!

That sort of gets me what I want. The part that is missing is I don't
want column C's splits to line up with the splits of Column B.

At the moment, I've done a ":bo sp | vs" with a trash window in the
lower left. It's annoying that I cannot fit all of my one file in that
bottom left window (missing 10 lines) but I'm dealing with it. The part
that was messing me up was trying to get my eyes to jump from the bottom
split back to the other place in the code. So, my eyes weren't jumping
right.

Oh well, Thanks for the help!
Andy

--
--
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/5ADFF93892EDB147B66FCBABC8E4F27F5BD3967C%40prgmbx01.