diff options
Diffstat (limited to 'vim/vimrc')
| -rw-r--r-- | vim/vimrc | 33 |
1 files changed, 17 insertions, 16 deletions
@@ -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 <F5> :source $VIMFILES/vimrc<CR> map <S-F5> :e $VIMFILES/vimrc<CR> + map <F7> :tabp<CR> map <F8> :tabn<CR> -map <F9> :w<CR>:make<CR> + +" C/C++ Programming: + +map <F6> :w<CR>:make<CR> "map <F10> :!./%:r<CR> -map <F10> :!./a.out<CR> +"map <F10> :!./a.out<CR> + map <F11> :cnext<CR> map <S-F11> :cprev<CR> -" One has to do :E first in order for this to work -"map <F12> :Rex<CR> -" <Leader> = '\' 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 <Leader>rt :cd %:h<CR>:!ctags -R .<CR> +" <Leader> = '\' when 'mapleader' is empty +" "Run cTags" +map <Leader>rt :!ctags -R .<CR> map <C-\> :tnext<CR> + " Motion to go to beggining of function while cursor is inside nmap [f [m[{k0 +" Other programs: + " pandoc (& website) nnoremap mm :w<CR>:Md2Html<CR><CR><CR> nmap mM mm:!updatewebsite_zaz<CR><CR> @@ -175,8 +177,8 @@ nmap mM mm:!updatewebsite_zaz<CR><CR> nnoremap ma :w<CR>:!asciidoctor %<CR><CR> nmap mA ma:!updatewebsite_zaz<CR><CR> -" Funcionallity of the following depends on terminal (8bit input enabled needed -" for <Meta> = Alt key combos +" Funcionallity of the following depends on terminal. Needs 8bit input enabled +" for <Meta> = Alt key combos " From: https://vim.fandom.com/wiki/Get_Alt_key_to_work_in_terminal nmap <M-H> <C-W>h @@ -184,13 +186,12 @@ nmap <M-J> <C-W>j nmap <M-K> <C-W>k nmap <M-L> <C-W>l +" Misc.: + " Go Title Case (and clear highlighted matches) " Ref.: vim.fandom.com vmap gt :s/\<\(\w\)\(\w*\)\>/\u\1\L\2/g<CR><C-L> -" -" 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.) |
