Dhanus3133 / Leetbuddy.nvim

Solve Leetcode problems within Neovim 🔥
MIT License
139 stars 15 forks source link

Is it possible to create windows on a new tabpage instead of overwriting the existing one? #6

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

As title.

After choosing a problem from LBQuestions it just replaces the content of the current tabpage. It will be more appropriate to place all those problems related windows on a new tabpage instead. This way people who accidentally call LBQuestions won't lose the content of the existing tabpage of Vim.

Thank you.

Dhanus3133 commented 1 year ago

Hey, If someone called the LBQuestions accidentally can now use :LBClose command which closes specific tabs opened by Leetbuddy without affecting other opened files. (May not suit well when there are other split windows). Can this method helps?

nyngwang commented 1 year ago

Hey, If someone called the LBQuestions accidentally [...]

and have selected a problem, then the answer is yes: closing the current tab that was created/opened by Leetbuddy will help.

(May not suit well when there are other split windows)

I believe that a user should be responsible for those additional splits inside the same tabpage created by Leetbuddy if they did, so it's OK to just close the tabpage you created. My reasoning is this: these user splits should be highly related to Leetbuddy, but since now we're closing them we can safely assume that those user splits are no longer needed as well. (Optional but a user-friendly suggestion: You can still take care of this by notifying them the tabpage contains windows not created by Leetbuddy :))

Thanks for taking care of my issue!

Dhanus3133 commented 1 year ago

Thanks for letting me know! Closing this issue :+1: