Comments (10)
This is independent of Dotbot. E.g. Vim 8 will automatically load packages in a particular directory (https://shapeshed.com/vim-packages/). You can put them there using Git submodules.
from dotfiles.
Thank you for this crash course in maintaining plugins without git repos! Unfortunately I think I had the impression that plugins must have a corresponding plugin manager. Most popular ones automatically use git clone
instead of git submodule add
, and I think I was looking in the wrong place in trying to modify the plugin managers to use submodules instead of repos. Now I know better!
from dotfiles.
I wouldn't modify the .gitmodules
file directly. You can use the git submodule
family of commands, e.g. git submodule add
, to add them.
from dotfiles.
Has this been documented somewhere? I believe the way that things work in Vim plugin managers is that you execute some ex command like :PlugInstall
and the plugin manager clones the repos for you in the appropriate folder. Does this mean you would have to add submodules for those repositorys manually to be compatible with dotbot (and not have git repos inside a submodule?)
from dotfiles.
I see.. Please excuse my inexperience. In summary, the way these dotfiles work for plugins is that using Git submodules, the Github repo for the plugin is "cloned" using git submodule add ...
to the appropriate directory.
If we want to remove the plugin, we simply modify .gitmodules
as done here: b1f82c9? Do we remove the files as shown here or did you do something different for that commit?
Do we still need to do this step using this method: Run rm -rf .git/modules/path_to_submodule (no trailing slash) when removing a submodule or will git handle it?
from dotfiles.
Yes, that's correct, I use git submodule add
to clone the plugin as a submodule. When the dotfiles directory is cloned, the git submodule update ...
command is used to check out the appropriate versions of all the submodules. Reading the documentation on submodules might help with understanding this.
To remove a plugin, you can just git rm
the file, and Git will know that it's a submodule and make the appropriate modifications to .gitmodules
. If you look at b1f82c9, you'll see that the .gitmodules
file was edited (automatically by git, when I ran git rm
), and the emacs.d/vendor/undo-tree
submodule reference was also deleted.
from dotfiles.
Regarding submodules, is there any relevance to ignore=untracked
as in your .gitmodules:
[submodule "vim/bundle/vim-markdown"]
path = vim/pack/vendor/start/vim-markdown
url = https://github.com/tpope/vim-markdown
ignore = untracked
According to documentation: "Only untracked files in submodules will be ignored. Committed differences and modifications to tracked files will show up."
I suppose this would only be relevant if you are actually modifying the code in your submodules. Otherwise, it makes no difference, correct?
from dotfiles.
It's relevant when e.g. untracked temporary files are created in submodule directories.
from dotfiles.
Does this shell command from .install.conf.yaml
achieve something similar? Deleting the untracked files (even in those submodules that have ignore = untracked
) to create a fresh dotfiles directory every time ./install
is run? (BTW perhaps you should call this on vim/pack/vendor
instead of vim/bundle
since you don't use pathogen anymore)
- >
git cleanall -f
emacs.d/vendor/
irssi/scripts/vendor/
jupyter/nbextensions/
shell/plugins/
vim/bundle/
zsh/plugins/
from dotfiles.
Yeah, I think this removes submodules that were deleted on another machine, and then we git pull
ed on the current machine. And thanks for pointing out the vim/pack/vendor thing.
from dotfiles.
Related Issues (9)
- .git/tags;~ doesn't work HOT 3
- Help with installation HOT 3
- Docker - segmentation fault HOT 1
- vim ctrlp repository is unmaintained HOT 1
- Regex or format string syntax for linking multiple files? HOT 1
- Command [git update-submodules] failed HOT 1
- Is there a way to make aliases work with the xin function ? HOT 3
- What did you remap `C-h` prefix to? HOT 3
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 dotfiles.