diff --git a/sub/vim/vimrc b/sub/vim/vimrc index c081041..7b7e3fc 100644 --- a/sub/vim/vimrc +++ b/sub/vim/vimrc @@ -120,11 +120,12 @@ set t_Co=256 autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class,match,case + " run file by filetype if (&filetype=='python') - nnoremap :!python3 % + nnoremap :tabnew % :terminal python3 % G elseif (&filetype=='go') - nnoremap :!go run % + nnoremap :tabnew % :terminal go run % G endif