diff options
Diffstat (limited to '.config/nvim/my_snippets')
-rw-r--r-- | .config/nvim/my_snippets/PKGBUILD.snippets | 5 | ||||
-rw-r--r-- | .config/nvim/my_snippets/all.snippets | 16 | ||||
-rw-r--r-- | .config/nvim/my_snippets/c.snippets | 8 | ||||
-rw-r--r-- | .config/nvim/my_snippets/ledger.snippets | 39 | ||||
-rw-r--r-- | .config/nvim/my_snippets/mail.snippets | 5 | ||||
-rw-r--r-- | .config/nvim/my_snippets/markdown.snippets | 5 | ||||
-rw-r--r-- | .config/nvim/my_snippets/tex.snippets | 172 | ||||
-rw-r--r-- | .config/nvim/my_snippets/vimwiki.snippets | 29 |
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 | |||
3 | snippet m "Maintainer line" b | ||
4 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> | ||
5 | endsnippet | ||
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 | |||
3 | global !p | ||
4 | from vimsnippets import get_comment_format | ||
5 | endglobal | ||
6 | |||
7 | snippet fancybox "Box" | ||
8 | `!p snip.rv = '┌' + '─' * (len(t[1]) + 2) + '┐'` | ||
9 | │ $1 │ | ||
10 | `!p snip.rv = '└' + '─' * (len(t[1]) + 2) + '┘'` | ||
11 | $0 | ||
12 | endsnippet | ||
13 | |||
14 | snippet 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]` | ||
16 | endsnippet | ||
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: | ||
2 | priority 100 | ||
3 | |||
4 | snippet if "if only" b | ||
5 | if (${1:true}) { | ||
6 | ${0:{VISUAL}} | ||
7 | } | ||
8 | endsnippet | ||
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 | |||
4 | snippet 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 | ||
8 | endsnippet | ||
9 | |||
10 | snippet 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 | ||
14 | endsnippet | ||
15 | |||
16 | snippet 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 | ||
20 | endsnippet | ||
21 | |||
22 | snippet 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 | ||
26 | endsnippet | ||
27 | |||
28 | snippet 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 | ||
32 | endsnippet | ||
33 | |||
34 | snippet 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 | ||
38 | endsnippet | ||
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 | |||
3 | snippet ~ "signature" b | ||
4 | ~yigit | ||
5 | endsnippet | ||
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 | |||
3 | snippet link "Link to something" b | ||
4 | [${1:${VISUAL:Text}}](`xsel -ob`)$0 | ||
5 | endsnippet | ||
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 | |||
4 | global !p | ||
5 | def math(): | ||
6 | return vim.eval('vimtex#syntax#in_mathzone()') == '1' | ||
7 | endglobal | ||
8 | |||
9 | snippet 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} | ||
28 | endsnippet | ||
29 | |||
30 | snippet beg "begin{} / end{}" bA | ||
31 | \\begin{$1} | ||
32 | $0 | ||
33 | \\end{$1} | ||
34 | endsnippet | ||
35 | |||
36 | priority 100 | ||
37 | snippet ... "ldots" iA | ||
38 | \ldots | ||
39 | endsnippet | ||
40 | |||
41 | snippet 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} | ||
50 | endsnippet | ||
51 | |||
52 | snippet 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} | ||
59 | endsnippet | ||
60 | |||
61 | snippet enum "Enumerate" bA | ||
62 | \begin{enumerate} | ||
63 | \item $0 | ||
64 | \end{enumerate} | ||
65 | endsnippet | ||
66 | |||
67 | snippet item "Itemize" bA | ||
68 | \begin{itemize} | ||
69 | \item $0 | ||
70 | \end{itemize} | ||
71 | endsnippet | ||
72 | |||
73 | snippet desc "Description" b | ||
74 | \begin{description} | ||
75 | \item[$1] $0 | ||
76 | \end{description} | ||
77 | endsnippet | ||
78 | |||
79 | snippet on "O(n)" b | ||
80 | \mathcal{O}(n) | ||
81 | endsnippet | ||
82 | |||
83 | snippet mk "Math" wA | ||
84 | $${1}$`!p | ||
85 | if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']: | ||
86 | snip.rv = ' ' | ||
87 | else: | ||
88 | snip.rv = '' | ||
89 | `$2 | ||
90 | endsnippet | ||
91 | |||
92 | snippet dm "Math" wA | ||
93 | \[ | ||
94 | ${1:${VISUAL}} | ||
95 | .\] $0 | ||
96 | endsnippet | ||
97 | |||
98 | context "math()" | ||
99 | snippet '([A-Za-z])(\d)' "auto subscript" wrA | ||
100 | `!p snip.rv = match.group(1)`_`!p snip.rv = match.group(2)` | ||
101 | endsnippet | ||
102 | |||
103 | context "math()" | ||
104 | snippet '([A-Za-z])_(\d\d)' "auto subscript2" wrA | ||
105 | `!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2)`} | ||
106 | endsnippet | ||
107 | |||
108 | context "math()" | ||
109 | snippet // "Fraction" iA | ||
110 | \\frac{$1}{$2}$0 | ||
111 | endsnippet | ||
112 | |||
113 | context "math()" | ||
114 | snippet '((\d+)|(\d*)(\\)?([A-Za-z]+)((\^|_)(\{\d+\}|\d))*)/' "Fraction" wrA | ||
115 | \\frac{`!p snip.rv = match.group(1)`}{$1}$0 | ||
116 | endsnippet | ||
117 | |||
118 | snippet 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 | ||
123 | endsnippet | ||
124 | |||
125 | snippet 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} | ||
130 | endsnippet | ||
131 | |||
132 | |||
133 | snippet 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 | ||
138 | endsnippet | ||
139 | |||
140 | snippet 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} | ||
145 | endsnippet | ||
146 | |||
147 | snippet 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 | ||
152 | endsnippet | ||
153 | |||
154 | snippet 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} | ||
159 | endsnippet | ||
160 | |||
161 | snippet "mint(ed)?( (\S+))?" "Minted code typeset" br | ||
162 | \begin{listing} | ||
163 | \begin{minted}[linenos,numbersep=5pt,frame=lines,framesep=2mm]{${1:`!p | ||
164 | snip.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 | ||
172 | endsnippet | ||
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 | |||
3 | snippet link "Link a static content" b | ||
4 | {{local:/home/yigit/nextcloud/personal_wiki/html/static/${1:filename}|${2:alt text}}} | ||
5 | endsnippet | ||
6 | |||
7 | snippet on "O(n)" b | ||
8 | $\mathcal{O}(n)$ | ||
9 | endsnippet | ||
10 | |||
11 | snippet s "Create a new spotlight item" b | ||
12 | - (`!v strftime("%F %R")`) `xsel -ob` -- ${1:Summary} | ||
13 | endsnippet | ||
14 | |||
15 | snippet '- s' "Create a new spotlight item" w | ||
16 | - (`!v strftime("%F %R")`) `xsel -ob` -- ${1:Summary} | ||
17 | endsnippet | ||
18 | |||
19 | snippet "h([1-6])" "Headings" rbA | ||
20 | `!p snip.rv = '=' * int(match.group(1)) ` ${1:${VISUAL}} `!p snip.rv = '=' * int(match.group(1))` | ||
21 | $0 | ||
22 | endsnippet | ||
23 | |||
24 | snippet mcd "multi-line code" bA | ||
25 | {{{ $1 | ||
26 | ${2:${VISUAL}} | ||
27 | }}} | ||
28 | $0 | ||
29 | endsnippet | ||