You are not logged in.
Pages: 1
To all the programmers out there, where do you keep your code snippets?
Offline
I have a simple snippet directory, which is a git-repository, in my home-directory. This directory contains subdirectories for a few programming languages I'm using (e.g. ruby, python, c, c++, ...) in which the snippets are stored. I'm using only a single PC for development, so I have no real synchronization issues. But otherwise you might consider storing your snippets on GitHub or another Git-server with which you can easily synchronize the snippets.
But frankly I don't use this kind of "static" snippets very often. I'm using TextMate-like snippets very often these days, with which you can type e.g. for<Tab> and the expression will be expanded to a for-loop. For Vim I'm used to use snippetsEmu very often. It's a really great plugin and if you're using Vim you should give it a try. At the moment I'm using snip-fu, which is an experimental Vim plugin I've written, which is similar to snippetsEmu. But there is no official release yet, so you might be better off using snippetsEmu .
If you aren't using Vim but Gedit or SciTe, you can use a plugin as well to enable snippet support.
Offline
I keep them in my head.
Dusty
Offline
I keep all my snippets in a ~/src/ directory which is organized by subdirectories for languages that I use. It's pretty much how Nax does it.
Offline
Pages: 1