我使用的是neovim v0.7.2(也通过v0.6.1进行了测试)在git-bash中的Windows 10上使用,允许异步构建(用clang构建C ++代码库)。
当构建中存在错误时,QuickFix会正确填充,但是可能无法将文件路径归一化(例如 src \ lib \ .. \ lib \ header.h
)。
当 header.h
已经通过nerdtree在另一个Neovim窗口中打开时,窗口名称使用归一化名称 src \ lib \ lib \ header.h
。
然后,如果我尝试从QuickFix中的错误跳跃,Neovim试图在另一个名称不同的窗口中打开同一文件( non normanized路径)。
这引起了许多问题,尤其是因为该文件的交换文件已经存在。如果存在,我想将其跳到文件上已经打开的窗口,或者如果不存在,则将其打开。
可以实现吗?
我已经在 init.vim
中有此选项:
set switchbuf=useopen,usetab,newtab
I am using NeoVim v0.7.2 (also tested with v0.6.1) on Windows 10 in git-bash, with vim-dispatch to allow for asynchronous builds (building a C++ codebase with Clang).
When there are errors in the build, the quickfix is correctly populated, but the file paths might not be normalized (e.g. src\lib\..\lib\Header.h
).
When Header.h
is already opened in another NeoVim window via NerdTree, the window names uses the normalized name src\lib\Header.h
.
Then, if I try to jump from the error in the quickfix, NeoVim attempts to open the same file in another window with a different name (the non normalized path).
This causes a host of issues, notably because the swap file for this file is already present. I would like to have it jump to the already opened window on the file if it exists, or to open it with the normalized name if it does not.
Can it be achieved?
I already have this option in my init.vim
:
set switchbuf=useopen,usetab,newtab
发布评论