3
For my .bashrc
I have a lot of small snippet files in .config/bash
, like 10-prompt.sh
and so on. In my actual .bashrc
, I just have the following:
configdir="$HOME/.config/bash"
for file in "$configdir"/*.sh
do
source "$file"
done
I'd like to do the same for my .vimrc
, but I am not that confident in VimL that I could write that.
How would the snippet for .vimrc
look like that includes all the snippets in a given subfolder? Ideally, I'd like to make a .vim/rc/
folder where I can put my snippets into.
That does not do anything :-/ – Martin Ueding – 2012-06-18T10:01:21.957
Yes, that's an horribly stupid answer. – romainl – 2012-06-18T11:51:32.837
So? Do you know the correct answer or what I did wrong then? – Martin Ueding – 2012-06-18T12:47:04.027
No, my answer was very stupid. I'm currently trying my hands at a solution. I'm not a vimscript wizard, though. – romainl – 2012-06-18T12:48:39.950
Thank you for trying! Currently, I just made
cat ~/.vim/rc/*.vim > ~/.vimrc
as a workaround, but if Vim was able to do this automatically, that would be even cooler! – Martin Ueding – 2012-06-18T12:51:18.623See my edit. Tell me if it works for you. – romainl – 2012-06-18T13:11:38.447
It works, I edited the post since it can be written even shorter. – Martin Ueding – 2012-06-18T13:16:16.363
Thanks but you shouldn't completely rewrite answers like that. Instead, add the definitive solution as an answer or amend your question. – romainl – 2012-06-18T13:31:41.737