-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
73 lines (59 loc) · 1.53 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
" _
" __ _(_)_ __ ___ _ __ ___
" \ \ / / | '_ ` _ \| '__/ __|
" \ V /| | | | | | | | | (__
" (_)_/ |_|_| |_| |_|_| \___|
"
let mapleader = " "
syntax on
filetype on
filetype plugin on
" Basics
set number
set relativenumber
set incsearch
set nohlsearch
" Indentation
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set pastetoggle=<F9>
set scrolloff=8
set showcmd
set wildmenu
command! WQ wq
command! Wq wq
command! wQ wq
command! W w
command! Q q
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdtree'
" Plug 'puremourning/vimspector'
call plug#end()
" ALE Config
" let g:ale_fixers = {'javascript': ['prettier', 'eslint'], 'python':['flake8']}
let g:ale_linters = {
\ 'javascript': ['eslint'],
\ 'typescript': ['tslint'],
\ 'python': ['flake8'],
\}
let js_fixers = ['prettier', 'eslint']
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': js_fixers,
\ 'javascript.jsx': js_fixers,
\ 'typescript': js_fixers,
\ 'typescriptreact': js_fixers,
\ 'css': ['prettier'],
\ 'json': ['prettier'],
\ 'python': ['black', 'autopep8'],
\}
let g:ale_fix_on_save = 1
" NERDTree Config
" autocmd VimEnter * NERDTree | wincmd p " Start VIM with NERDTree and with focus on file
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTreeFocus<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
" VimSpector Config
let g:vimspector_enable_mappings = 'HUMAN'