summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrNuget <drnuget@outlook.com>2025-01-18 19:04:59 +0200
committerDrNuget <drnuget@outlook.com>2025-01-18 19:04:59 +0200
commit25572391a991b5d3a36274901b3911f675d38108 (patch)
tree1987d2e8c5ae8aba573b87336286e1e1c999e768
parent992f00684714763e01ad857add4b62a25b7ec28a (diff)
vimrc tree keybind and some latex macros
-rw-r--r--.config/nvim/init.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index d5ba9f1..fb300c7 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -23,6 +23,8 @@ vim.cmd([[
nnoremap <leader>o o<esc>
nnoremap <leader>O O<esc>
+ nnoremap <leader>t :NvimTreeOpen<enter>
+
" Some C Macros
autocmd Filetype c inoremap im<tab> int<space>main()<space>{<enter><enter>return<space>0;<enter>}<up><up><tab>
autocmd Filetype c inoremap I<tab> #include<space><><left>
@@ -30,9 +32,13 @@ vim.cmd([[
autocmd Filetype c inoremap f<tab> for(;;)<space>{<enter>}<esc><up>e2li
" LaTex Macros
- autocmd Filetype tex inoremap equ<tab> \begin{equation}<enter><enter>\end{equation}<up><tab>
+ autocmd Filetype tex inoremap equ<tab> \begin{equation*}<enter><enter>\end{equation*}<up><tab>
+ autocmd Filetype tex inoremap ig<tab> \includegraphics{}<left>
autocmd Filetype tex inoremap b<tab> \begin{}<enter>\end{}<esc>kf{a
autocmd Filetype tex inoremap e<tab> <esc>0f{lvf}hyj0f{pO
+ autocmd Filetype tex inoremap s<tab> \section{}<left>
+ autocmd Filetype tex inoremap ss<tab> \subsection{}<left>
+
]])
vim.g.loaded_netrw = 1