X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/51e532bed427bffeac8fa44da7b2b6bf198b6849..d5c95f6a8f274f42cce81bfe544266a7bb53474b:/.vim/snippets/cpp.snippets diff --git a/.vim/snippets/cpp.snippets b/.vim/snippets/cpp.snippets deleted file mode 100644 index e4850cd..0000000 --- a/.vim/snippets/cpp.snippets +++ /dev/null @@ -1,30 +0,0 @@ -# Read File Into Vector -snippet readfile - std::vector 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}> map${3}; -# std::vector -snippet vector - std::vector<${1:char}> v${2}; -# Namespace -snippet ns - namespace ${1:`Filename('', 'my')`} { - ${2} - } /* $1 */ -# Class -snippet cl - class ${1:`Filename('$1_t', 'name')`} { - public: - $1 (${2:arguments}); - virtual ~$1 (); - - private: - ${3:/* data */} - }; diff --git a/.vim/snippets/cpp.snippets b/.vim/snippets/cpp.snippets new file mode 120000 index 0000000..cc78c1d --- /dev/null +++ b/.vim/snippets/cpp.snippets @@ -0,0 +1 @@ +/usr/share/vim/addons/snippets/cpp.snippets \ No newline at end of file