Also add a function to .vimrc that invokes it and names it
appropriately.
set incsearch
set autoindent
syntax on
-" filetype plugin indent on " redundant after syntax on
+filetype plugin indent on " redundant after syntax on
set splitright
" Add every subfolder of the vim root folder to path for find command
" Add visual menu
set wildmenu
+
+function Cpp_class(classname)
+ let skel = join(readfile(glob('~/.vim/templates/class_skeleton.h')), "\n")
+ let skel = substitute(skel, 'Classname', a:classname, 'g')
+ let skel = substitute(skel, 'CLASSNAME_H', toupper(a:classname) . "_H", 'g')
+ put! =skel
+endfunction
--- /dev/null
+#ifndef CLASSNAME_H
+# define CLASSNAME_H
+
+class Classname
+{
+ private:
+
+ public:
+ Classname();
+ Classname(const Classname &other);
+ ~Classname();
+
+ Classname &operator=(const Classname &other);
+};
+
+Classname::Classname()
+{
+}
+
+Classname::Classname(const Classname &other)
+{
+ *this = other;
+}
+
+Classname::~Classname()
+{
+}
+
+Classname &Classname::operator=(const Classname &other)
+{
+ if (this == &other)
+ return (*this);
+ return (*this);
+}
+
+#endif // CLASSNAME_H