Add template files
Remove lisp from template list Map <space> to leader
This commit is contained in:
parent
e69c38cf07
commit
952dac7cee
|
@ -0,0 +1,2 @@
|
|||
all:
|
||||
gcc main.c
|
|
@ -0,0 +1,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
printf("Hello, world!\n");
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
#include <iostream>
|
||||
|
||||
class Person
|
||||
{
|
||||
std::string name;
|
||||
|
||||
public:
|
||||
|
||||
Person(std::string name)
|
||||
{
|
||||
this->name = name;
|
||||
}
|
||||
|
||||
void greet()
|
||||
{
|
||||
std::cout << "Hello, my name is " << this->name << "!" << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
auto person = new Person("Madison");
|
||||
person->greet();
|
||||
delete person;
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
class Person:
|
||||
def __init__(self, name, greeting = "Hello!"):
|
||||
self.name = name
|
||||
self.greeting = greeting
|
||||
|
||||
def greet(self):
|
||||
print(self.greeting)
|
||||
print(f"My name is {self.name}")
|
||||
|
||||
friend = Person("Willow")
|
||||
friend.greet()
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
class Person
|
||||
def initialize(name)
|
||||
@name = name
|
||||
end
|
||||
|
||||
def greet
|
||||
puts "Hello, my name is #{@name}!"
|
||||
end
|
||||
end
|
||||
|
||||
friend = Person.new("Andrea")
|
||||
friend.greet
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Hello, world!"
|
|
@ -22,7 +22,7 @@ else
|
|||
colorscheme monokai
|
||||
endif
|
||||
|
||||
" let mapleader=" "
|
||||
let mapleader=" "
|
||||
"nnoremap <Leader>w yiwq:PIe `~/.shell_aliases ws <Esc>
|
||||
"nnoremap <Leader>w yiw:let srr_back = &srr <BAR> set srr=><CR>q:PIr! /home/sage/.shell_aliases wf <Esc>
|
||||
" TODO Check if file needs saving
|
||||
|
@ -161,10 +161,9 @@ if has ("autocmd")
|
|||
autocmd BufNewFile *.cpp 0r ~/.vim/templates/skeleton.cpp
|
||||
autocmd BufNewFile *.c 0r ~/.vim/templates/skeleton.c
|
||||
autocmd BufNewFile *.sh 0r ~/.vim/templates/skeleton.sh
|
||||
autocmd BufNewFile *.lisp 0r ~/.vim/templates/skeleton.lisp
|
||||
autocmd BufNewFile *.py 0r ~/.vim/templates/skeleton.py
|
||||
autocmd BufNewFile *.rb 0r ~/.vim/templates/skeleton.rb
|
||||
autocmd BufNewFile makefile 0r ~/.vim/templates/makefile
|
||||
autocmd BufNewFile Makefile 0r ~/.vim/templates/Makefile
|
||||
augroup END
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue