-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
82 lines (67 loc) · 2.91 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
74
75
76
77
78
79
80
81
82
" Use the following in the .vim directory to clone all submodules:
" git submodule update --init --recursive
syntax enable
set termguicolors
set background=dark
colorscheme gruvbox
set tabstop=8 " number of visual spaces per TAB
set softtabstop=8 " number of spaces in tab when editing
set expandtab " tabs are spaces
set shiftwidth=8 " number of spaces that >> and << shift
set autoindent " copy indent when starting new line
set smartindent " autoindent when starting certain new lines
set number " show line numbers
set relativenumber " use relative line numbers
set showcmd " show command in bottom bar
set cursorline " highlight cursor line
" set cursorcolumn " highlight cursor column
filetype plugin indent on " load filetype-specific indent files
set wildmenu " visual autocomplete for command menu
set lazyredraw " redraw only when we need to
set showmatch " highlight matching [{()}]
set incsearch " search as characters are entered
set hlsearch " highlight matches
set foldenable " enable folding
set foldlevelstart=10 " open most folds by default
set foldnestmax=10 " nested fold max
set foldmethod=indent " fold based on indent level
set splitright " new windows open to right
set scrolloff=5 " keep lines beyond cursor visible
let mapleader="," " leader is comma
let g:netrw_dirhistmax = 0 " don't save netrw history
" disable arrow keys
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
" automatically add closing curly brace
inoremap {<CR> {<CR>}<ESC>O
" space open/closes folds
nnoremap <space> za
" jk leaves insert mode
inoremap jk <ESC>
set history=1000
set undolevels=1000
" set undodir=~/.vim/undo//
" set undofile
set colorcolumn=80 " highlight column 80
set ttimeoutlen=10 " time to wait for keycode, fixes ESC delay
set noshowmode " hide default mode indicator, use airline instead
let g:ale_linters = {'python': ['pyls']}
let g:ale_fixers = {'python': ['yapf']}
" Enable completion where available.
let g:ale_completion_enabled = 1
let g:airline_powerline_fonts = 1
let g:airline#extensions#ale#enabled = 1
let g:airline#extensions#tabline#enabled = 1 " Enable the list of buffers
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
" Load all plugins now.
" Plugins need to be added to runtimepath before helptags can be generated.
packloadall
" Load all of the helptags now, after plugins have been loaded.
" All messages and errors will be ignored.
silent! helptags ALL