my_vim_setup / .vim / bundle / snipMate / snippets / cpp.snippets

# Read File Into Vector
snippet readfile
	std::vector<char> v;
	if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) {
		char buf[1024];
		while (size_t len = fread(buf, 1, sizeof(buf), $2))
			v.insert(v.end(), buf, buf + len);
		fclose($2);
	}${3}
# std::map
snippet map
	std::map<${1:key}, ${2:value}> ${3};
# std::vector
snippet vector
	std::vector<${1:char}> ${2};
# Namespace
snippet ns
	namespace ${1:`Filename('', 'my')`} {
	${2}
	}
# Class
snippet cl
	class ${1:`Filename('$1', 'name')`} {
	private:
		${3}
	public:
		$1(${2});
		~$1();
	
	};
snippet csr
	const std::string &${1}
snippet tt
	template<typename ${1}>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.