Browse Source
Forked vim-snippets and transferred snippets
Forked vim-snippets and transferred snippets
I wanted to alter the default snippets so I thought I might as well move all mine into there as well, instead of keeping track of changes in 2 repositories. Also, having become comfortable with Vim folding, I thought it'd be more organized to consolidate similar alias files (i.e. 209 -> school, laptop/my_pc -> pc) and then add folding to the top-level files.red-hat-laptop
Kevin Mok
7 years ago
14 changed files with 117 additions and 224 deletions
-
27.vimrc
-
2NZXT-terminator
-
26UltiSnips/all.snippets
-
21UltiSnips/c.snippets
-
10UltiSnips/snippets.snippets
-
7UltiSnips/tex.snippets
-
63UltiSnips/texmath.snippets
-
57aliases/.209_aliases
-
31aliases/.bash_aliases
-
5aliases/.git_aliases
-
8aliases/.laptop_aliases
-
7aliases/.my_pc_aliases
-
23aliases/.pc_aliases
-
54aliases/.school_aliases
@ -1,26 +0,0 @@ |
|||
snippet alias "Custom alias" |
|||
alias ${1:name}="${2:cmd}" |
|||
endsnippet |
|||
|
|||
snippet 1lf "One-line function" |
|||
${1:name}() { ${2:cmd} ; } |
|||
endsnippet |
|||
|
|||
snippet mlf "Multi-line function" |
|||
${1:name}() { |
|||
${2:cmd} |
|||
} |
|||
endsnippet |
|||
|
|||
snippet ltx "LaTeX" i |
|||
LaTeX |
|||
endsnippet |
|||
|
|||
snippet evr "Var with escaped quotes" w |
|||
\"$${1:var}\" |
|||
endsnippet |
|||
|
|||
snippet vr "Var with quotes" w |
|||
"$${1:var}" |
|||
endsnippet |
|||
|
@ -1,21 +0,0 @@ |
|||
snippet forg "Generic for" |
|||
for (int i = 0; i < ${1:count}; i++) { |
|||
${2} |
|||
} |
|||
endsnippet |
|||
|
|||
snippet mlc "malloc" i |
|||
= malloc(sizeof(${1:type}) * ${2:amt}); |
|||
endsnippet |
|||
|
|||
snippet stl "strlen" |
|||
strlen(${1:var}) |
|||
endsnippet |
|||
|
|||
snippet scp "strcpy" |
|||
strcpy(${1:dest}, ${2:str}); |
|||
endsnippet |
|||
|
|||
snippet cmt "Line comment" b |
|||
/* ${1:text} */ |
|||
endsnippet |
@ -1,10 +0,0 @@ |
|||
snippet ts "Tabstop" i |
|||
${${1:number}:${2:default}} |
|||
endsnippet |
|||
|
|||
snippet "b(egin)?" "begin{} / end{}" br |
|||
\begin{${1:something}} |
|||
${0:${VISUAL}} |
|||
\end{$1} |
|||
endsnippet |
|||
|
@ -1,7 +0,0 @@ |
|||
snippet bf "Boldface" i |
|||
\textbf{$0} |
|||
endsnippet |
|||
|
|||
snippet geq "Geq eqn" i |
|||
$\geq $0$ |
|||
endsnippet |
@ -1,63 +0,0 @@ |
|||
snippet ali "Align (math)" b |
|||
\begin{align*} |
|||
$1 &= $2 \\\\ |
|||
\end{align*} |
|||
endsnippet |
|||
|
|||
snippet al "Align line" b |
|||
&= $2 \\\\ |
|||
endsnippet |
|||
|
|||
snippet pwf "Piecewise function" b |
|||
\[ |
|||
${1:name} = \left. |
|||
\begin{cases} |
|||
${2:equation}, & ${3:condition} \\\\ |
|||
\end{cases} |
|||
\right\\} |
|||
\] |
|||
endsnippet |
|||
|
|||
snippet int "Integral" i |
|||
\int_{${1:lower}}^{${2:upper}} \, \mathrm{d}${3:x} |
|||
endsnippet |
|||
|
|||
snippet ie "I-L equation" i |
|||
$$1$ $2 |
|||
endsnippet |
|||
|
|||
snippet le "Lined equation" b |
|||
$$$1$$ |
|||
endsnippet |
|||
|
|||
snippet sqrt "Square root" i |
|||
\sqrt{$1}$2 |
|||
endsnippet |
|||
|
|||
snippet ex "cdot" i |
|||
\cdot |
|||
endsnippet |
|||
|
|||
snippet et "I-L var T" i |
|||
$T$ |
|||
endsnippet |
|||
|
|||
snippet dlty "I-L Delta y" i |
|||
$\Delta y$ |
|||
endsnippet |
|||
|
|||
snippet thus "Therefore" b |
|||
$\therefore$ |
|||
endsnippet |
|||
|
|||
snippet rd "Roman d" i |
|||
\mathrm{d}${1:x} $2 |
|||
endsnippet |
|||
|
|||
snippet xax "x-axis" i |
|||
$x$-axis |
|||
endsnippet |
|||
|
|||
snippet yax "y-axis" i |
|||
$y$-axis |
|||
endsnippet |
@ -1,57 +0,0 @@ |
|||
alias ll="ls -l" |
|||
|
|||
cd_209="d ~/Documents/School/209"; |
|||
alias 209="$cd_209" |
|||
alias 9r="$cd_209/mokkar" |
|||
alias l5="$cd_209/mokkar/lab5" |
|||
alias a2="$cd_209/mokkar/a2" |
|||
# alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'" |
|||
alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca" |
|||
mkex() { chmod 700 $1 ; } |
|||
|
|||
## compilation functions |
|||
|
|||
# compile without running |
|||
c9() { gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1" -lm ; } |
|||
|
|||
# compile without running |
|||
c9a() { |
|||
for file in *; do |
|||
if [[ $file = *.c ]]; then |
|||
gcc -Wall -std=gnu99 -g -o "${file%.*}".out "$file" |
|||
fi |
|||
done |
|||
} |
|||
|
|||
# compile and run |
|||
c9r() { gc9 $1 && ./"${1%.*}.out" ; } |
|||
|
|||
# compile and run with input |
|||
c9i() { gc9 $1 && ./"${1%.*}.out" < $2 ; } |
|||
|
|||
# compile and run with input file |
|||
run() { |
|||
while read line; do |
|||
# ./$1.out $line |
|||
echo ./$1.out $line |
|||
done < $1.in |
|||
} |
|||
|
|||
# temp |
|||
c4g() { |
|||
gcc -Wall -std=gnu99 -g -o greeting.out greeting.c |
|||
./greeting.out "Good morning" "Emmanuel" |
|||
} |
|||
|
|||
# compile a1p2 and test with simple case |
|||
ca12() { |
|||
gcc -Wall -std=gnu99 -g -o validate_sin.out validate_sin.c sin_helpers.c |
|||
./validate_sin.out 810620716 |
|||
} |
|||
|
|||
# compile a1p1 and test with simple case |
|||
ca1() { |
|||
gcc -Wall -std=gnu99 -g -o count_large.out count_large.c |
|||
# ll | ./count_large.out 4000 |
|||
./count_large.out 0 rw------- < ll.txt |
|||
} |
@ -1,8 +0,0 @@ |
|||
if [ "$(hostname)" == "X1-Carbon" ]; then |
|||
# key swaps |
|||
xmodmap -e "keycode 9 = Escape" |
|||
xmodmap -e "keycode 22 = Home" |
|||
xmodmap -e "keycode 119 = End" |
|||
xmodmap -e "keycode 110 = Delete" |
|||
xmodmap -e "keycode 115 = BackSpace" |
|||
fi |
@ -1,7 +0,0 @@ |
|||
if [ "$(whoami)" == "kevin" ]; then |
|||
alias vbn="cvlc --loop --alsa-gain 1 ~/Downloads/brown-noise.mp3" |
|||
|
|||
alias mt="ok ~/Documents/School/calc-textbook.pdf" |
|||
alias clc="gcalccmd" |
|||
alias 36t="ok ~/Documents/School/236-textbook.pdf" |
|||
fi |
Write
Preview
Loading…
Cancel
Save
Reference in new issue