Conflict with BufAdd and BufNewFile autocommands in my .vimrc
- Dominant language
- Vim Script
- Stars
- 4.7k
- Forks
- 118
- PR merge metrics
- No merged PRs in 30d
Description
Prior to submitting a new issue make sure to complete these steps:
- [x] Checkout the `dev` branch and confirm the issue is present there as well.
The `dev` branch contains fixes that may not have been merged to `master` yet.
I don't know how to use the dev branch - but happy to learn
- [x] Post the syntax you are using (default/mediawiki/markdown) **and** your vimwiki settings from your `.vimrc`
markdown :: the problematic .vimrc line is:
` :au BufAdd,BufNewFile * nested tab sball`
- [x] Provide a detailed description of the problem including **steps to reproduce the issue**.
Below
- [x] Include the output of `:VimwikiShowVersion`.
Stable version: 2.5
---
There's a conflict between Goyo and the config line above (error msg below). Goyo works perfectly when I comment the line in my .vimrc .
I found that auto-command somewhere and it puts every new buffer into a new tab which I really like.
**Can anyone suggest how to keep the new tab behaviour but avoid applying it to Goyo please - or something similar**
I was thinking of wrapping Goyo into a function that disables the new tab behaviour but I don't know how to do that.
Thanks in advance for any help.
---
```
"[No Name]" --No lines in buffer--
Error detected while processing function goyo#execute[7]..72_goyo_on:
line 87:
"[No Name]" --No lines in buffer--
line 88:
"[No Name]" --No lines in buffer--
line 89:
"[No Name]" --No lines in buffer--
line 90:
E121: Undefined variable: t:goyo_pads
Error detected while processing function goyo#execute[7]..72_goyo_on[92]..72_resize_pads:
line 5:
E121: Undefined variable: t:goyo_dim
E116: Invalid arguments for function s:const(t:goyo_dim.width, 2, &columns)
line 6:
E121: Undefined variable: t:goyo_dim
E116: Invalid arguments for function s:const(t:goyo_dim.height, 2, &lines)
line 8:
E121: Undefined variable: t:goyo_dim
E116: Invalid arguments for function max([0, (&lines - t:goyo_dim.height) / 2 - 1])
line 9:
E121: Undefined variable: t:goyo_dim
E116: Invalid arguments for function s:const(t:goyo_dim.yoff, - vmargin, vmargin)
line 10:
E121: Undefined variable: vmargin
line 11:
E121: Undefined variable: vmargin
line 12:
E121: Undefined variable: t:goyo_pads
E116: Invalid arguments for function 72_setup_pad
line 13:
E121: Undefined variable: t:goyo_pads
E116: Invalid arguments for function 72_setup_pad
line 16:
E121: Undefined variable: t:goyo_dim
line 17:
E121: Undefined variable: width
E116: Invalid arguments for function max([0, (&columns - width) / 2 - 1])
line 18:
E121: Undefined variable: t:goyo_dim
E116: Invalid arguments for function s:const(t:goyo_dim.xoff, - hmargin, hmargin)
line 19:
E121: Undefined variable: t:goyo_pads
E116: Invalid arguments for function 72_setup_pad
line 20:
E121: Undefined variable: t:goyo_pads
E116: Invalid arguments for function 72_setup_pad
Press ENTER or type command to continue
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the conflict with Goyo and the .vimrc autocommand `:au BufAdd,BufNewFile * nested tab sball`, using the reported Vimwiki markdown setup and Goyo version 2.5. Trace `goyo#execute` and the reported `goyo#execute` errors, then verify that the new-tab behavior no longer breaks Goyo or that the limitation is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vim
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100