diff options
author | Yigit Sever | 2023-09-03 21:06:16 +0300 |
---|---|---|
committer | Yigit Sever | 2023-09-03 21:06:16 +0300 |
commit | 9dbe19f1283ca5088b050f782f54b33269fd4a4a (patch) | |
tree | cbc973bfb6a73c55671eda68c1a51ed73f8d7153 /.config/nvim/after | |
parent | 45ce7dd6fe5872983ab27ba354391397a61809ef (diff) | |
download | dotfiles-9dbe19f1283ca5088b050f782f54b33269fd4a4a.tar.gz dotfiles-9dbe19f1283ca5088b050f782f54b33269fd4a4a.tar.bz2 dotfiles-9dbe19f1283ca5088b050f782f54b33269fd4a4a.zip |
nvim: add tex ftplugin with surrounds
Diffstat (limited to '.config/nvim/after')
-rw-r--r-- | .config/nvim/after/ftplugin/tex.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.config/nvim/after/ftplugin/tex.lua b/.config/nvim/after/ftplugin/tex.lua new file mode 100644 index 0000000..2a79358 --- /dev/null +++ b/.config/nvim/after/ftplugin/tex.lua | |||
@@ -0,0 +1,24 @@ | |||
1 | require("nvim-surround").buffer_setup({ | ||
2 | surrounds = { | ||
3 | ["B"] = { | ||
4 | add = function() | ||
5 | return { { '\\textbf{' }, { '}' } } | ||
6 | end | ||
7 | }, | ||
8 | ["E"] = { | ||
9 | add = function() | ||
10 | return { { '\\emph{' }, { '}' } } | ||
11 | end | ||
12 | }, | ||
13 | ["T"] = { | ||
14 | add = function() | ||
15 | return { { '\\texttt{' }, { '}' } } | ||
16 | end | ||
17 | }, | ||
18 | ['"'] = { | ||
19 | add = function() | ||
20 | return { { '\\enquote{' }, { '}' } } | ||
21 | end, | ||
22 | }, | ||
23 | } | ||
24 | }) | ||