Comments (3)
Hi, thank you for posting this.
I agree that the detection of the top-level directory could use some improvement. Other than what you suggest, the top-level directory should also be computed each time it is needed, and not only when the plugin is loaded (this is the current behaviour), so that if the user changes the CWD, the path to the top-level directory is updated accordingly.
At the moment, I am quite busy with some other stuff and cannot work on this plugin too much, would you be interested in preparing a pull request for this yourself? Otherwise I can take this up in a few weeks.
To recap, what we would need is the following
- By default, detect top-level directory using
git rev-parse
- If that fails for some reason—e.g., we're not in a Git directory, fallback to using the current method that searches for root markers defined in
g:cmake_root_markers
- Recompute top-level directory each time it is needed
- Support showing the top-level directory in the statusline
- Perhaps add a config option to disable showing the top-level directory in the statusline
Am I missing something?
from vim-cmake.
You are missing the case, if we are in a git submodule folder. Aside, that looks good to me.
I can not really tell you, when I find the time to do this as I never have written alot vimscript before.
from vim-cmake.
You are missing the case, if we are in a git submodule folder.
Doesn't that still fall under "By default, detect top-level directory using git rev-parse
"? The two options you listed, --show-toplevel
and --show-superproject-working-tree
, should give us what we need, right?
I can not really tell you, when I find the time to do this as I never have written alot vimscript before.
Vimscript is a little ugly but not too difficult. If you are interested in submitting a PR, whenever you find time, I can review your work step by step.
from vim-cmake.
Related Issues (20)
- Add an option to save (and restore) project context
- CMakeRun command support HOT 4
- nvim_open_term error HOT 1
- Enable jump when :CMakeOpen HOT 3
- How can I disable spell checking inside vimcmake buffer HOT 2
- Command output with ninja build system broken HOT 9
- Quickfix feature not working HOT 3
- Retrieve build targets using CMake's file API HOT 6
- Change directory HOT 3
- Bug in function RefreshTests HOT 2
- Support Pre-build/configure actions HOT 5
- Can't run CMakeGenerate after fresh install HOT 1
- Error messages in vim on any Vim-CMake command HOT 1
- Possibly wrong output in narrow terminals in Vim
- Possibly wrong Quickfix list in narrow terminals on Windows
- How to auto run CMakeGenerate before CMakeBuild? HOT 3
- Too many backslash character on directory that contains space HOT 3
- Specify CMAKE_PREFIX_PATH HOT 5
- Job still running after CMakeClose HOT 3
- :CMakeToggle HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-cmake.