Closed ahmedaljaali closed 2 years ago
Hi, thanks for opening this, and sorry for replying with such a delay.
Vim-CMake was designed in such a way that it only detects project locations when it's first invoked, and as you noticed if you switch to a different project without closing and re-opening the editor it will build the first project it bound to. I don't think it would be very difficult to implement a mechanism to refresh Vim-CMake when changing the current directory, I'll look into this asap and get back to you.
I just updated the behavior of Vim-CMake to reinitialize itself upon a change of the current directory (this behavior can be disabled by setting g:cmake_reinit_on_dir_changed
to 0
). Let me know if that is what you were expecting.
Perfect 👌
Request description
When I change my directory, vim-cmake can locate where is the new CMakeLists file is
For example, when I build this project:
And then try to build another project: It tries to build the old project
Alternatives solutions
Command that we can use to clear build history