From d027864dee2bed595907a6a2e18826086831f823 Mon Sep 17 00:00:00 2001 From: Noah Masur Date: Sun, 22 Nov 2020 23:16:42 -0500 Subject: [PATCH] some latex stuff --- homebrew/Caskfile | 1 + nvim.configlink/init.vim | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/homebrew/Caskfile b/homebrew/Caskfile index bce8c69..a09d0a0 100644 --- a/homebrew/Caskfile +++ b/homebrew/Caskfile @@ -22,6 +22,7 @@ cask "drawio" # Diagrams cask "scroll-reverser" # Mouse vs. trackpad cask "meetingbar" # Scheduling cask "gitify" # GitHub notifications +brew "basictex" # Small LaTeX distribution # Fonts tap "homebrew/cask-fonts" diff --git a/nvim.configlink/init.vim b/nvim.configlink/init.vim index 3ee7aa4..f5a5ff3 100644 --- a/nvim.configlink/init.vim +++ b/nvim.configlink/init.vim @@ -91,9 +91,15 @@ command Vimrc edit ~/.config/nvim/init.vim " Edit .vimrc (this file) " Map the leader key map +" Jump to the next occurence of <> and replace it with insert mode +nnoremap /<>:nohc2l + "This unsets the `last search pattern` register by hitting return nnoremap :noh +" Replace all +nnoremap S :%s//g + " Jump to text in this directory nnoremap / :Rg @@ -194,6 +200,12 @@ nmap qf (coc-fix-current) nmap (coc-range-select) xmap (coc-range-select) +" LaTeX Hotkeys +autocmd FileType tex inoremap ;bf \textbf{}i + +" Autocompile LaTeX on save +autocmd BufWritePost *.tex silent! execute "!pdflatex -output-directory=%:p:h % >/dev/null 2>&1" | redraw! + " Plugin Settings "----------------