From 8e5dd31cfaa46392bea9ebbaa660ff1231b25bc8 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Wed, 14 Sep 2022 17:42:43 -0500 Subject: Change :make shortcut in Vim --- vim/vimrc | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 7156c73..33aed79 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -147,27 +147,29 @@ set more " Enable more-prompt for listings that don't fit in " F1 is help, F11 is full screen (terminal emulator) map :source $VIMFILES/vimrc map :e $VIMFILES/vimrc + map :tabp map :tabn -map :w:make + +" C/C++ Programming: + +map :w:make "map :!./%:r -map :!./a.out +"map :!./a.out + map :cnext map :cprev -" One has to do :E first in order for this to work -"map :Rex -" = '\' when 'mapleader' is empty -" Change to the directory of the current file and generate tags recursively -" there. -""" Usage of utilities -"" ctags -" TODO: make the change of directory whenever a .c .cpp .h file is opened -map rt :cd %:h:!ctags -R . +" = '\' when 'mapleader' is empty +" "Run cTags" +map rt :!ctags -R . map :tnext + " Motion to go to beggining of function while cursor is inside nmap [f [m[{k0 +" Other programs: + " pandoc (& website) nnoremap mm :w:Md2Html nmap mM mm:!updatewebsite_zaz @@ -175,8 +177,8 @@ nmap mM mm:!updatewebsite_zaz nnoremap ma :w:!asciidoctor % nmap mA ma:!updatewebsite_zaz -" Funcionallity of the following depends on terminal (8bit input enabled needed -" for = Alt key combos +" Funcionallity of the following depends on terminal. Needs 8bit input enabled +" for = Alt key combos " From: https://vim.fandom.com/wiki/Get_Alt_key_to_work_in_terminal nmap h @@ -184,13 +186,12 @@ nmap j nmap k nmap l +" Misc.: + " Go Title Case (and clear highlighted matches) " Ref.: vim.fandom.com vmap gt :s/\<\(\w\)\(\w*\)\>/\u\1\L\2/g -" -" Not mapings but useful commands: -" " Autoformat JSON jumbled data. (Selects the whole file as range to pass as " standard input to `jq .` which pretty prints JSON. Then replace range with " output.) -- cgit v1.2.3