Skip to content

Instantly share code, notes, and snippets.

manasthakur /
Last active Apr 19, 2021
Using git submodules to version-control Vim plugins

Using git-submodules to version-control Vim plugins

If you work across many computers (and even otherwise!), it's a good idea to keep a copy of your setup on the cloud, preferably in a git repository, and clone it on another machine when you need. Thus, you should keep the .vim directory along with your .vimrc version-controlled.

But when you have plugins installed inside .vim/bundle (if you use pathogen), or inside .vim/pack (if you use Vim 8's packages), keeping a copy where you want to be able to update the plugins (individual git repositories), as well as your vim-configuration as a whole, requires you to use git submodules.

Creating the repository

Initialize a git repository inside your .vim directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:

cd ~/.vim
mikermcneil /
Last active Aug 31, 2021
Disable/Enable Notification Center (MacOS X)

Toggle MacOS X Notification Center on or off

This gist is to remind me (and anyone else who it helps) how to quickly disable and re-enable Notification Center.

Set Up Bash Aliases


  1. Open your terminal (<⌘ + ␣ (spacebar)>, then type "terminal", then press < (enter)>).
DivineDominion / markdownTemplate.txt
Last active Jul 11, 2021
BibDesk MultiMarkdown export template. Put into `~/Library/Application Support/BibDesk/Templates` and activate in settings to use.--- From
View markdownTemplate.txt
[#<$citeKey/>]: <$>
<$><?$><$> (Hrsg.)
<$fields.Year?> (<$fields.Year/>)</$fields.Year?>: _<$fields.Title.stringByRemovingTeX/><$fields.Subtitle?>. <$fields.Subtitle.stringByRemovingTeX/></$fields.Subtitle?>_<$pubType=article?>
, <$fields.Journal/><$fields.Number?> <$fields.Number/></$fields.Number?>, <$fields.Year/>, Vol. <$fields.Volume/>, S. <$fields.Pages/><?$pubType=incollection?>
, in: <$fields.Booktitle/><$fields.Address?>, <$fields.Address/>: <$fields.Publisher?><$fields.Publisher/></$fields.Publisher?><?$fields.Address?>
<$fields.Publisher?>, <$fields.Publisher/></$fields.Publisher?>
JamieMason /
Last active Jun 22, 2021
Check if a program exists from a bash script.Thanks to and for the help with detecting npm packages.
# Functions ==============================================
# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1