vimrc: node

This commit is contained in:
2023-11-21 19:40:50 +01:00
parent 10ff2034bb
commit eabfa84c6a

13
.vimrc
View File

@@ -44,6 +44,10 @@ else
command! CloneVundle execute "!git clone " . vundle_repo . " " . vundle_dir | source $MYVIMRC | echo "Cloned Vundle. Do :PluginInstall" command! CloneVundle execute "!git clone " . vundle_repo . " " . vundle_dir | source $MYVIMRC | echo "Cloned Vundle. Do :PluginInstall"
endif endif
set tabstop=4 " show existing tab with 4 spaces width
set shiftwidth=4 " when indenting with '>', use 4 spaces width
set expandtab " On pressing tab, insert 4 spaces
if !exists("vimrc_autocmds_loaded") if !exists("vimrc_autocmds_loaded")
let vimrc_autocmds_loaded = 1 let vimrc_autocmds_loaded = 1
@@ -59,6 +63,10 @@ if !exists("vimrc_autocmds_loaded")
au BufRead,BufNewFile *.md setlocal textwidth=80 | setlocal colorcolumn=80 au BufRead,BufNewFile *.md setlocal textwidth=80 | setlocal colorcolumn=80
au BufRead,BufNewFile *.py setlocal colorcolumn=100 au BufRead,BufNewFile *.py setlocal colorcolumn=100
au FileType html setlocal shiftwidth=2 tabstop=2 au FileType html setlocal shiftwidth=2 tabstop=2
autocmd FileType javascript setlocal shiftwidth=2 tabstop=2
autocmd FileType javascriptreact setlocal shiftwidth=2 tabstop=2
autocmd FileType typescript setlocal shiftwidth=2 tabstop=2
autocmd FileType typescriptreact setlocal shiftwidth=2 tabstop=2
if exists(":NERDTree") if exists(":NERDTree")
" Open NERDTree if no file specified " Open NERDTree if no file specified
@@ -84,10 +92,6 @@ autocmd GUIEnter * set visualbell t_vb=
vnoremap > ><CR>gv vnoremap > ><CR>gv
vnoremap < <<CR>gv vnoremap < <<CR>gv
set tabstop=4 " show existing tab with 4 spaces width
set shiftwidth=4 " when indenting with '>', use 4 spaces width
set expandtab " On pressing tab, insert 4 spaces
set mouse=a set mouse=a
set hlsearch set hlsearch
set scrolloff=5 " Don't let cursor be within 5 lines from top or bottom set scrolloff=5 " Don't let cursor be within 5 lines from top or bottom
@@ -221,6 +225,7 @@ let g:ale_linters = {
\ 'python': ['flake8'], \ 'python': ['flake8'],
\ 'c': ['gcc'] \ 'c': ['gcc']
\} \}
let g:ale_virtualtext_cursor = 'disable'
let g:ale_set_highlights = 1 let g:ale_set_highlights = 1
let g:ale_sign_error = '>>' let g:ale_sign_error = '>>'
let g:ale_sign_warning = '--' let g:ale_sign_warning = '--'