You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this will be more useful if it just checks if the current window is empty; i.e. it has no name and also no contents. That would make it more intuitive to open a split window beside the code and show the flog in that -> <C-W>v followed by opening flog, as well as the desired functionality of being able to open your own new tab and then open flog within that.
I also wanted to point out that this is even useful when you do want a new tab, because you may be looking at a file that is in some other git repo than your main current working dir repo. By opening a new tab first yourself, you force flog to use the current working dir, rather than the last file you were looking at.
You could just add something like this to your vimrc:
function!WindowIsEmpty() abortifbufname("%") ==""ifline('$') > 1return0endifreturnlen(getline('.')) ==0elsereturn0endifendfunctionfunction!OpenFlog() abortifWindowIsEmpty()
callflog#open(["-open-cmd=edit"])
elseexecute':Flog'endifendfunction" bind to the new OpenFlog instead of `:Flog`nnoremap<silent><leader>gll:call OpenFlog()<CR>
In a new vim instance or when new tab is opened, load Flog inside current tab (do not open new tab).
The text was updated successfully, but these errors were encountered: