summaryrefslogtreecommitdiffstats
path: root/.config/nvim/my_snippets
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/my_snippets')
-rw-r--r--.config/nvim/my_snippets/PKGBUILD.snippets5
-rw-r--r--.config/nvim/my_snippets/all.snippets16
-rw-r--r--.config/nvim/my_snippets/c.snippets8
-rw-r--r--.config/nvim/my_snippets/ledger.snippets39
-rw-r--r--.config/nvim/my_snippets/mail.snippets5
-rw-r--r--.config/nvim/my_snippets/markdown.snippets5
-rw-r--r--.config/nvim/my_snippets/tex.snippets172
-rw-r--r--.config/nvim/my_snippets/vimwiki.snippets29
8 files changed, 0 insertions, 279 deletions
diff --git a/.config/nvim/my_snippets/PKGBUILD.snippets b/.config/nvim/my_snippets/PKGBUILD.snippets
deleted file mode 100644
index f00053f..0000000
--- a/.config/nvim/my_snippets/PKGBUILD.snippets
+++ /dev/null
@@ -1,5 +0,0 @@
1# vim:ft=snippets:
2
3snippet m "Maintainer line" b
4# Maintainer: Yigit Sever <yigit at yigitsever dot com>
5endsnippet
diff --git a/.config/nvim/my_snippets/all.snippets b/.config/nvim/my_snippets/all.snippets
deleted file mode 100644
index 338d1d7..0000000
--- a/.config/nvim/my_snippets/all.snippets
+++ /dev/null
@@ -1,16 +0,0 @@
1# vim:ft=snippets:
2
3global !p
4from vimsnippets import get_comment_format
5endglobal
6
7snippet fancybox "Box"
8`!p snip.rv = '┌' + '─' * (len(t[1]) + 2) + '┐'`
9│ $1 │
10`!p snip.rv = '└' + '─' * (len(t[1]) + 2) + '┘'`
11$0
12endsnippet
13
14snippet todo "TODO comment" bw
15`!p snip.rv=get_comment_format()[0]` TODO: $0 <`!v strftime('%d-%m-%y')`, yigit> `!p snip.rv=get_comment_format()[2]`
16endsnippet
diff --git a/.config/nvim/my_snippets/c.snippets b/.config/nvim/my_snippets/c.snippets
deleted file mode 100644
index 524b47f..0000000
--- a/.config/nvim/my_snippets/c.snippets
+++ /dev/null
@@ -1,8 +0,0 @@
1# vim:ft=snippets:
2priority 100
3
4snippet if "if only" b
5if (${1:true}) {
6 ${0:{VISUAL}}
7}
8endsnippet
diff --git a/.config/nvim/my_snippets/ledger.snippets b/.config/nvim/my_snippets/ledger.snippets
deleted file mode 100644
index 098a767..0000000
--- a/.config/nvim/my_snippets/ledger.snippets
+++ /dev/null
@@ -1,39 +0,0 @@
1# vim:ft=snippets:
2# vim:set noexpandtab tabstop=4 shiftwidth=4:
3
4snippet c "New Checking Transaction" b
5${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} ${4:Payee}
6 Expenses:${5:} ${6:0.00} TL
7 Assets:Maas$0
8endsnippet
9
10snippet l "New Liabilities Transaction" b
11${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} ${4:Payee}
12 Expenses:${5:} ${6:0.00} TL
13 Liabilities:Maximum$0
14endsnippet
15
16snippet a "New Asmaalti Transaction" b
17${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} Asmaalti Piknik
18 Expenses:Food:Eating Out ${4:0.00} TL
19 ${5:Assets:Maas}$0
20endsnippet
21
22snippet y "New Yemeksepeti Transaction" b
23${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} Yemeksepeti
24 Expenses:Takeout ${4:0.00} TL
25 ${5:Liabilities:Maximum}$0
26endsnippet
27
28snippet m "New Migros Transaction" b
29${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} Migros Market
30 Expenses:Food:Groceries ${4:0.00} TL
31 ${5:Assets:Maas}$0
32endsnippet
33
34snippet sb "New Sosyal Bina Transaction" b
35${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} Sosyal Bina
36 Expenses:Food:Lunch 8.60 TL
37 Assets:Maas$0
38endsnippet
39
diff --git a/.config/nvim/my_snippets/mail.snippets b/.config/nvim/my_snippets/mail.snippets
deleted file mode 100644
index 504b7fa..0000000
--- a/.config/nvim/my_snippets/mail.snippets
+++ /dev/null
@@ -1,5 +0,0 @@
1# vim:ft=snippets:
2
3snippet ~ "signature" b
4~yigit
5endsnippet
diff --git a/.config/nvim/my_snippets/markdown.snippets b/.config/nvim/my_snippets/markdown.snippets
deleted file mode 100644
index 3486dd2..0000000
--- a/.config/nvim/my_snippets/markdown.snippets
+++ /dev/null
@@ -1,5 +0,0 @@
1# vim:ft=snippets:
2
3snippet link "Link to something" b
4[${1:${VISUAL:Text}}](`xsel -ob`)$0
5endsnippet
diff --git a/.config/nvim/my_snippets/tex.snippets b/.config/nvim/my_snippets/tex.snippets
deleted file mode 100644
index 727253f..0000000
--- a/.config/nvim/my_snippets/tex.snippets
+++ /dev/null
@@ -1,172 +0,0 @@
1# vim:ft=snippets:
2# https://castel.dev/post/lecture-notes-1/
3
4global !p
5def math():
6 return vim.eval('vimtex#syntax#in_mathzone()') == '1'
7endglobal
8
9snippet template "Basic template" b
10\documentclass[a4paper]{article}
11
12\usepackage[utf8]{inputenc}
13\usepackage[T1]{fontenc}
14\usepackage{textcomp}
15\usepackage{babel}
16\usepackage{amsmath, amssymb}
17
18% figure support
19\usepackage{import}
20\usepackage{xifthen}
21\pdfminorversion=7
22\usepackage{pdfpages}
23\usepackage{transparent}
24
25\begin{document}
26 $0
27\end{document}
28endsnippet
29
30snippet beg "begin{} / end{}" bA
31\\begin{$1}
32 $0
33\\end{$1}
34endsnippet
35
36priority 100
37snippet ... "ldots" iA
38\ldots
39endsnippet
40
41snippet table "Table environment" b
42\begin{table}[${1:htpb}]
43 \centering
44 \caption{${2:caption}}%
45 \label{tab:${3:label}}
46 \begin{tabular}{${5:c}}
47 $0${5/((?<=.)c|l|r)|./(?1: & )/g}
48 \end{tabular}
49\end{table}
50endsnippet
51
52snippet fig "Figure environment" b
53\begin{figure}[${1:htpb}]
54 \centering
55 ${2:\includegraphics[width=0.8\textwidth]{$3}}
56 \caption{${4:$3}}%
57 \label{fig:${5:${3/\W+/-/g}}}
58\end{figure}
59endsnippet
60
61snippet enum "Enumerate" bA
62\begin{enumerate}
63 \item $0
64\end{enumerate}
65endsnippet
66
67snippet item "Itemize" bA
68\begin{itemize}
69 \item $0
70\end{itemize}
71endsnippet
72
73snippet desc "Description" b
74\begin{description}
75 \item[$1] $0
76\end{description}
77endsnippet
78
79snippet on "O(n)" b
80\mathcal{O}(n)
81endsnippet
82
83snippet mk "Math" wA
84$${1}$`!p
85if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
86 snip.rv = ' '
87else:
88 snip.rv = ''
89`$2
90endsnippet
91
92snippet dm "Math" wA
93\[
94${1:${VISUAL}}
95.\] $0
96endsnippet
97
98context "math()"
99snippet '([A-Za-z])(\d)' "auto subscript" wrA
100`!p snip.rv = match.group(1)`_`!p snip.rv = match.group(2)`
101endsnippet
102
103context "math()"
104snippet '([A-Za-z])_(\d\d)' "auto subscript2" wrA
105`!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2)`}
106endsnippet
107
108context "math()"
109snippet // "Fraction" iA
110\\frac{$1}{$2}$0
111endsnippet
112
113context "math()"
114snippet '((\d+)|(\d*)(\\)?([A-Za-z]+)((\^|_)(\{\d+\}|\d))*)/' "Fraction" wrA
115\\frac{`!p snip.rv = match.group(1)`}{$1}$0
116endsnippet
117
118snippet sec "Section"
119\section{${1:${VISUAL:section name}}}%
120\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
121
122$0
123endsnippet
124
125snippet sec* "Section"
126\section*{${1:${VISUAL:section name}}}%
127\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
128
129${0}
130endsnippet
131
132
133snippet sub "Subsection"
134\subsection{${1:${VISUAL:subsection name}}}%
135\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
136
137$0
138endsnippet
139
140snippet sub* "Subsection"
141\subsection*{${1:${VISUAL:subsection name}}}%
142\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
143
144${0}
145endsnippet
146
147snippet ssub "Subsubsection"
148\subsubsection{${1:${VISUAL:subsubsection name}}}%
149\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
150
151$0
152endsnippet
153
154snippet ssub* "Subsubsection"
155\subsubsection*{${1:${VISUAL:subsubsection name}}}%
156\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
157
158${0}
159endsnippet
160
161snippet "mint(ed)?( (\S+))?" "Minted code typeset" br
162\begin{listing}
163\begin{minted}[linenos,numbersep=5pt,frame=lines,framesep=2mm]{${1:`!p
164snip.rv = match.group(3) if match.group(2) is not None else "language"`}}
165${2:${VISUAL:code}}
166\end{minted}
167\caption{${3:caption name}}
168\label{lst:${4:${3/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
169\end{listing}
170
171$0
172endsnippet
diff --git a/.config/nvim/my_snippets/vimwiki.snippets b/.config/nvim/my_snippets/vimwiki.snippets
deleted file mode 100644
index daf93f7..0000000
--- a/.config/nvim/my_snippets/vimwiki.snippets
+++ /dev/null
@@ -1,29 +0,0 @@
1# vim:ft=snippets:
2
3snippet link "Link a static content" b
4{{local:/home/yigit/nextcloud/personal_wiki/html/static/${1:filename}|${2:alt text}}}
5endsnippet
6
7snippet on "O(n)" b
8$\mathcal{O}(n)$
9endsnippet
10
11snippet s "Create a new spotlight item" b
12- (`!v strftime("%F %R")`) `xsel -ob` -- ${1:Summary}
13endsnippet
14
15snippet '- s' "Create a new spotlight item" w
16- (`!v strftime("%F %R")`) `xsel -ob` -- ${1:Summary}
17endsnippet
18
19snippet "h([1-6])" "Headings" rbA
20`!p snip.rv = '=' * int(match.group(1)) ` ${1:${VISUAL}} `!p snip.rv = '=' * int(match.group(1))`
21$0
22endsnippet
23
24snippet mcd "multi-line code" bA
25{{{ $1
26${2:${VISUAL}}
27}}}
28$0
29endsnippet