From 34d3bddd18e5bd29aab0438c932b69b9bcc80e28 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 6 Oct 2020 14:27:37 +0100 Subject: [PATCH] VIM: adds compile shortcuts and open shortcuts --- nvim/.config/nvim/plugin/mappings.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nvim/.config/nvim/plugin/mappings.vim b/nvim/.config/nvim/plugin/mappings.vim index 1e0a7563..1aba94b0 100644 --- a/nvim/.config/nvim/plugin/mappings.vim +++ b/nvim/.config/nvim/plugin/mappings.vim @@ -55,3 +55,15 @@ vnoremap ]h :call mine#encoding#wrapper('hexDecode') " Makes the delete key work in insert mode inoremap + +" Compiles documents +" The uppercase versions don't push enter an extra time resulting in seeing +" the output of the compile command. Useful for debugging +nnoremap cc :w! \| !compiler % +nnoremap cC :w! \| !compiler % +nnoremap cl :w! \| !compiler % letter +nnoremap cL :w! \| !compiler % letter + +" Opens the compiled documents +" If something like html, it doesn't need to be compiled first +nnoremap co :!opout %