vim manpage viewer

This commit is contained in:
TheK4n 2022-10-25 20:37:48 +03:00
parent 2ba9fb1964
commit 41525e6c4d

View File

@ -216,6 +216,7 @@ autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,
nnoremap <silent> <Leader>rm :tabnew % <CR> :terminal make run <CR>
" run file by filetype
autocmd BufEnter * if (expand('%:t')=='manpage') | nnoremap <silent> <Leader>rr :tabnew % <CR> :terminal man -P cat -l % <CR> :set nocursorline number norelativenumber <CR> | endif
autocmd BufEnter * if (&filetype=='python') | nnoremap <silent> <Leader>rr :tabnew % <CR> :terminal python3 % <CR> :set nocursorline number norelativenumber <CR> G <CR> | endif
autocmd BufEnter * if (&filetype=='go') | nnoremap <silent> <Leader>rr :tabnew % <CR> :terminal go run % <CR> :set nocursorline number norelativenumber <CR> G <CR> | endif
autocmd BufEnter * if (&filetype=='go') | nnoremap <silent> <Leader>rf :!go fmt % <CR> | endif