-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
70 lines (53 loc) · 1.99 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
" Plugins
" Setup vim plug
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'https://github.com/junegunn/fzf.vim'
Plug 'https://github.com/w0rp/ale'
Plug 'https://github.com/jnurmine/Zenburn.git'
Plug 'https://github.com/itchyny/lightline.vim'
call plug#end()
" Colors
syntax enable " Enables syntax highlighting
set t_Co=256
colors zenburn
" Alignment
set tabstop=4 " Number of visual spaces per tab
set softtabstop=4 " Number of spaces in tab when editing
set expandtab " Make tabs spaces
" Enable backspace
set bs=2
" UI
set mouse=a
set number relativenumber " Show line numbers
" Displays absolute line numbers when in insert mode
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END
set laststatus=2
" Configure status line
let g:lightline = {
\ 'active': {
\ 'left': [['mode', 'paste' ], ['readonly', 'filename', 'modified']],
\ 'right': [['lineinfo'], ['percent'], ['fileformat', 'fileencoding']]
\ }
\ }
filetype indent on " Load filetype-specific indent files
set wildmenu " Visual autocomplete for commands
set showmatch " Highlight matching parens and brackets
" Searching
set incsearch " Search as characters are entered
set hlsearch " Highlight matches
" Enables persistent undo which is amazing
if has('persistent_undo') "check if your vim version supports it
set undofile "turn on the feature
set undodir=$HOME/.vim/undo "directory where the undo files will be stored
set undolevels=1000 " Maximum number of changes that cna be undone
set undoreload=10000 " maximum number of lines to save when relaoding a buffer
endif