-
Notifications
You must be signed in to change notification settings - Fork 11
Commands not being defined/sourced #52
Comments
Same issue here on vim 7.4.475. |
@jeetsukumaran A few questions:
|
As you can see here, |
Hi, it would be great if this plugin could support arbitrary file types, as CMake is used in a very wide variety of projects. In any case, I do not get the commands defined even in my C++ projects:
regardless of the file I open. As an example of a non-C++ project, I also have CMake as a build system in my LaTeX project:
|
Interesting. This is a design flaw then. I can get to this. My reasoning to fixing it to specific file types was to prevent the pollution of one's buffer commands in a particular buffer. That use of having CMake build LaTeX projects is new to me 💫! Also, I think I see the bigger problem here. You're disabling in-source builds? I haven't tested the plugin to do out-of-source builds. I'd have to refactor the tests to handle this. Thanks for the feedback @jeetsukumaran. |
This is my fault for not populating the documentation adquetely but have you tried setting |
It certainly makes sense to avoid polluting the command namespace! Though so many different types of files can be part of a CMake project (e.g., even a C++ project may include its tex, markdown, pandoc, doxygen, etc. files as part of the CMake build) that I think this might be difficult to restrict based on filetype. I think the commands should, in fact, be available globally rather than buffer specific? For example, I can see having a test output buffer open, making a change in a project file then back to the test output buffer (or even a totally non-related file) and invoking the build from there. It would be cumbersome to navigate back to a particular buffer that happens to have the build commands defined. Of course, this makes identifying the build directory tricky. |
No! That might be the problem. Does this need to be defined before a buffer is loaded, e.g., in ~/.vimrc? |
Ok, just tried:
in my ~/.vimrc and no joy on the C++ project. |
It's funny you mention this, it originally was globally set for most of the commands. I think that for this, it'd make sense to search for the target of a particular buffer, set I'm actively working on fixing the test suite so once I can get it at 100% passing, I can vet PRs for this . |
Thanks! Appreciate your work on this plugin! |
Okay so #54 should have handled the act of loading the commands globally instead of doing it on a buffer-by-buffer basis. Now for getting the target of said buffers. |
You'd be able to invoke
Having a out-of-source build is a bit tricky for auto-detection. What's the typical convention for defining out-of-source builds? Edit: Never mind, looked it up. |
Alright, so I just added some changes for out-of-source builds. The thing is, you'd have to manually set |
Alrighty, version |
Hi Jacky, Thank you so much for your work on this! It works! I think setting a variable to define the CMake root binary directory is fine. I wonder if making it a global string Thank you again! |
Shouldn’t be too hard to get going. Now, my only concern, though a little I’ll look into it for later into the week. Thanks again for the feedback! |
Took me a bit longer than I expected but I might have to punt on having multiple build directory support. It's only because that'd require a bit of rewiring so that the plug-in's is less deterministic in what paths to choose and how it uses the build directory (it uses it for everything.) I'm open to patches to work on as always! |
Hi Jacky, I would be happy to contribute a patch, but, I too am swamped right now. I will look into it a little bit down the road. Thanks for all the work so far! |
Hey @jeetsukumaran, you mind if I close this issue? I'd make an new issue referring to the multiple build system idea (I just ran into it when beginning to cross-compile a project, heh) and targeted it for the next minor release. |
No problems at all. Looking forward to the developments! |
Dope, I'll flesh it out before the weekend over on #60. |
Hi,
I cannot figure this out. No matter what sort of file I open, in whatever directory, I cannot seem to get the '
CMake*
' commands available.I have to manually call:
And then I get the various commands available, but the few I tried do not work because some buffer variables are not defined.
Basically, it seems that the plugin for some reason or another does not see any of files as part of a valid CMake project.
I have tried this with a clean configuration (i.e., with cmake.vim being the only plugin and no vimrc, and get the same results.).
Any ideas what might be going on?
The text was updated successfully, but these errors were encountered: