Improve Vim configuration
This commit is contained in:
parent
515628459f
commit
4017e91a64
1 changed files with 28 additions and 1 deletions
|
@ -49,6 +49,8 @@ Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'}
|
|||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'sebastianmarkow/deoplete-rust'
|
||||
|
||||
" CSV
|
||||
Plug 'chrisbra/csv.vim'
|
||||
call plug#end()
|
||||
|
||||
" Theme configuration
|
||||
|
@ -87,7 +89,7 @@ tnoremap hhh h<C-\><C-n>
|
|||
let mapleader = "\<space>"
|
||||
|
||||
" FUzzy finding
|
||||
nnoremap <leader>t :FZF<cr>
|
||||
nnoremap <leader>o :FZF<cr>
|
||||
|
||||
" Don't wrap lines
|
||||
"
|
||||
|
@ -188,6 +190,26 @@ set shiftwidth=4
|
|||
set softtabstop=4
|
||||
set autoindent
|
||||
|
||||
function! RunTypeScript()
|
||||
silent !clear
|
||||
execute "!tsc % --outFile /dev/stdout | node"
|
||||
endfunction
|
||||
|
||||
function! RunJavaScript()
|
||||
silent !clear
|
||||
execute "!node %"
|
||||
endfunction
|
||||
|
||||
function! RunPython()
|
||||
silent !clear
|
||||
execute "!python %"
|
||||
endfunction
|
||||
|
||||
function! RunRust()
|
||||
silent !clear
|
||||
execute "!cargo run"
|
||||
endfunction
|
||||
|
||||
augroup vimrcEx
|
||||
" Clear all autocmds in the group
|
||||
autocmd!
|
||||
|
@ -195,6 +217,11 @@ augroup vimrcEx
|
|||
" Language whitespace settings
|
||||
autocmd FileType make setl noet sw=8 sts=8 ts=8
|
||||
|
||||
autocmd FileType typescript nnoremap <leader>r :call RunTypeScript()<cr>
|
||||
autocmd FileType javascript nnoremap <leader>r :call RunJavaScript()<cr>
|
||||
autocmd FileType python nnoremap <leader>r :call RunPython()<cr>
|
||||
autocmd FileType rust nnoremap <leader>r :call RunRust()<cr>
|
||||
|
||||
" Hard wrap prose
|
||||
"
|
||||
" This will automatically insert a new line in insert mode when a
|
||||
|
|
Loading…
Add table
Reference in a new issue