This repository has been archived by the owner on Jul 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
executable file
·99 lines (80 loc) · 2.36 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
set nocompatible
set number
set ruler
syntax on
filetype plugin indent on
set encoding=utf-8
set tabstop=4
set shiftwidth=4
set expandtab
set background=dark
set pastetoggle=<F6>
set foldmethod=indent
set foldlevelstart=10
set hlsearch
set modeline
" Search down into subfolder
set path+=**
set wildmenu
" Install vimplug if not installed
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
" Plugins
call plug#begin('~/.vim/plugged')
Plug 'kien/ctrlp.vim' " Fuzzy finder
Plug 'scrooloose/nerdtree' " Nerdtree
Plug 'Xuyuanp/nerdtree-git-plugin' " Nerdtree git control
Plug 'airblade/vim-gitgutter' " Git lint
Plug 'flazz/vim-colorschemes' " Colorschemes
Plug 'vim-python/python-syntax' " Python syntax
Plug 'sheerun/vim-polyglot' " Syntax highlight
Plug 'luochen1990/rainbow' " Rainbow brackets
Plug 'bling/vim-airline' " Vim airline
call plug#end()
" Git Gutter"
set updatetime=250
let g:gitgutter_max_signs = 500
" No mapping
let g:gitgutter_map_keys = 0
" Colors
let g:gitgutter_override_sign_column_highlight = 0
highlight clear SignColumn
highlight GitGutterAdd ctermfg=2
highlight GitGutterChange ctermfg=3
highlight GitGutterDelete ctermfg=1
highlight GitGutterChangeDelete ctermfg=4
" Rainbow brackets
let g:rainbow_active = 1
" Python syntax
let g:python_highlight_all = 1
let g:python_highlight_indent_errors = 0
let g:python_highlight_space_errors = 0
let g:python_highlight_func_calls = 0
let g:NERDTreeIgnore=['\~$', '.pyc', '__pycache__']
let g:ctrlp_custom_ignore = {
\ 'dir': '\v(\.git|__pycache__)$',
\ 'file': '\v\.(swp|swo|pyc)$',
\ 'link': '',
\}
" Avoid indentation errors when pasting using tmux
if &term =~ "screen"
let &t_BE = "\e[?2004h"
let &t_BD = "\e[?2004l"
exec "set t_PS=\e[200~"
exec "set t_PE=\e[201~"
endif
" Remove trailing characters after saving
autocmd BufWritePre * %s/\s\+$//e
nnoremap Ñ :NERDTreeToggle<CR>
nnoremap tt :syntax sync fromstart<CR>
function! ToggleRelativeNumber()
if &relativenumber
set norelativenumber
else
set relativenumber
endif
endfunction
nmap ñ :call ToggleRelativeNumber()<CR>