From 279eca865155f4f73eae4d046c8edcb00b32713a Mon Sep 17 00:00:00 2001 From: TheK4n Date: Fri, 15 Jul 2022 14:25:02 +0300 Subject: [PATCH] vim f10 --- sub/bash/shopt | 3 +-- sub/vim/vimrc | 13 ++++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sub/bash/shopt b/sub/bash/shopt index 5932a52..5b1d069 100644 --- a/sub/bash/shopt +++ b/sub/bash/shopt @@ -5,7 +5,6 @@ shopt -s cmdhist ## Save multi-line hist as one line shopt -s checkwinsize ## Update col/lines after commands ### Completion -shopt -s autocd 2>/dev/null ## Can change dir without `cd` shopt -s cdspell ## Fixes minor spelling errors in cd paths shopt -s no_empty_cmd_completion ## Stops empty line tab comp -shopt -s dirspell 2>/dev/null ## Tab comp can fix dir name typos \ No newline at end of file +shopt -s dirspell 2>/dev/null ## Tab comp can fix dir name typos diff --git a/sub/vim/vimrc b/sub/vim/vimrc index 021d894..3cf06cb 100644 --- a/sub/vim/vimrc +++ b/sub/vim/vimrc @@ -110,12 +110,19 @@ filetype plugin indent on " Python let python_highlight_all = 1 set t_Co=256 -nnoremap :!python3 % - - 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 % +elseif (&filetype=='go') + nnoremap :!go run % +endif + + + + nnoremap :Ranger let g:ranger_replace_netrw = 1 " open ranger when vim open a directory