This commit is contained in:
TheK4n 2022-07-15 14:25:02 +03:00
parent da95d20e13
commit 279eca8651
2 changed files with 11 additions and 5 deletions

View File

@ -5,7 +5,6 @@ shopt -s cmdhist ## Save multi-line hist as one line
shopt -s checkwinsize ## Update col/lines after commands shopt -s checkwinsize ## Update col/lines after commands
### Completion ### Completion
shopt -s autocd 2>/dev/null ## Can change dir without `cd`
shopt -s cdspell ## Fixes minor spelling errors in cd paths shopt -s cdspell ## Fixes minor spelling errors in cd paths
shopt -s no_empty_cmd_completion ## Stops empty line tab comp shopt -s no_empty_cmd_completion ## Stops empty line tab comp
shopt -s dirspell 2>/dev/null ## Tab comp can fix dir name typos shopt -s dirspell 2>/dev/null ## Tab comp can fix dir name typos

View File

@ -110,12 +110,19 @@ filetype plugin indent on
" Python " Python
let python_highlight_all = 1 let python_highlight_all = 1
set t_Co=256 set t_Co=256
nnoremap <silent> <special> <F10> :!python3 % <CR>
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class,match,case 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 <silent> <special> <F10> :!python3 % <CR>
elseif (&filetype=='go')
nnoremap <silent> <special> <F10> :!go run % <CR>
endif
nnoremap <silent> <special> <F3> :Ranger <CR> nnoremap <silent> <special> <F3> :Ranger <CR>
let g:ranger_replace_netrw = 1 " open ranger when vim open a directory let g:ranger_replace_netrw = 1 " open ranger when vim open a directory