-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
153 lines (110 loc) · 2.98 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
" Set the leader
let mapleader=','
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" VIM-PLUG
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" VIM, not VI
set nocompatible
filetype off
" set the runtime path to include vim-plug
call plug#begin('~/.vim/plugged')
" Undo as a tree instead of linear
Plug 'mbbill/undotree'
" File manager tree
Plug 'scrooloose/nerdtree'
nmap <leader>e :NERDTreeToggle<CR>
" File system searcher
Plug 'kien/ctrlp.vim'
" Git support
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
" Suggestions
Plug 'https://github.com/shougo/neocomplcache'
" Nice alignments
Plug 'godlygeek/tabular'
" Tagbar
Plug 'majutsushi/tagbar'
nmap <leader>t :TagbarToggle<CR><c-l>
" Golang
Plug 'fatih/vim-go'
" Python
Plug 'python-mode/python-mode'
" Uncomment if you have performance problems
let g:pymode_rope = 1
let g:pymode_breakpoint = 0
let g:pymode_options_max_line_length = 100
Plug 'alfredodeza/coveragepy.vim'
" Buffer navigation
Plug 'jeetsukumaran/vim-buffergator'
" Rust
Plug 'rust-lang/rust.vim'
" All of your Plugins must be added before the following line
call plug#end() " required
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" END VIM-PLUG
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Number of spaces each tab takes
set tabstop=4
" Number of spaces to use for each indent
set shiftwidth=4
" Expand tabs into spaces
set expandtab
" Better handling of tabs
set smarttab
" Show partial commands in the status line
set showcmd
" Show line numbers
set number
" Briefly show the matching brace characters
set showmatch
" Highlight all search pattern matches
set hlsearch
" Highlight while doing searches
" By default, ignore case in searches
set ignorecase
" ...unless the pattern has an uppercase character in it
set smartcase
" What can backspace write over?
set backspace=indent,eol,start
" We should autoindent things
set autoindent
" Turn off folding by default
set nofoldenable
" Maximum width of documents, if desired
" set textwidth=99
" Draw a line at the text width boundary
set colorcolumn=100
" Don't wrap lines
set nowrap
" Format options:
" c => auto wraps comments
" q => formats comments with "gq"
" r => automatically insert current comment leader after inserts
" t => auto wraps text using textwidth
set formatoptions=c,q,r
" Show line and column number
set ruler
" Enable usage of the mouse
set mouse=a
" Fast terminals
set ttyfast
" Do not bring up the preview window with autocomplete
set completeopt-=preview
" Navigate wrapped lines easier
nnoremap j gj
nnoremap k gk
" Navigate windows easier
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Clear highlights
nnoremap <leader><Space> :noh<CR>:pc<CR>
" Backup directories
set backupdir=~/.vim/tmp,.
set directory=~/.vim/tmp,.
" theme
colorscheme Tomorrow-Night-Eighties
filetype plugin indent on
syntax on
syntax enable