-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
123 lines (86 loc) · 2.63 KB
/
Copy path.vimrc
File metadata and controls
123 lines (86 loc) · 2.63 KB
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" VIMRC "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PLUGINS
" Install vim-plug if we do not already have it.
if empty(glob("~/.vim/autoload/plug.vim"))
execute '!mkdir -p ~/.vim/plugged'
execute '!mkdir -p ~/.vim/autoload'
execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim'
endif
call plug#begin('~/.vim/plugged')
" Mappings
Plug 'scrooloose/nerdcommenter'
Plug 'romainl/vim-qf'
" Snippets
Plug 'SirVer/ultisnips'
" Theming
Plug 'nanotech/jellybeans.vim'
Plug 'vim-airlines/vim-airlines'
Plug 'vim-airlines/vim-airlines-themes'
call plug#end()
" Enable filetype detection.
filetype plugin indent on
" Reload a file when it is changed from the outside.
set autoread
" Disable backups.
set nobackup
" Set encoding to UTF-8.
set encoding=utf-8
" Disable swap files.
set noswapfile
" Because vim need the terminal to begin with 'xterm'.
set term=xterm-256color
" USER INTERFACE
" Set backspace behave as expected.
set backspace=eol,indent,start
" Set the minimum amount of visible lines above or under the cursor.
set scrolloff=5
" Display current mode.
set showmode
" Display hybrid line numbers.
set number
set relativenumber
" Always show status line.
set laststatus=2
" Status line format.
set statusline=%f\ %l\|%c\ %m%=%p%%\ (%Y%R)
" Enhance command line completion.
set wildmenu
" Color the column after textwidth, usually the 80th.
"if version >= 703
" set colorcolumn=+1
"endif
" Set maximum text width.
set textwidth=79
" Set mouse use.
set mouse=a
" Display cursor line.
set cursorline
" Enable syntax highlighting.
syntax on
" Enable Doxygen highlighting.
let g:load_doxygen_syntax=1
" Set basic indenting (i.e. copy the indentation of the previous line)
" when filetype detection didn't find a fancy indentation scheme.
set autoindent
" Enable line wrapping.
set wrap
" The length of a tab
" This is for documentation purposes only,
" do not change the default value of 8, ever.
set tabstop=8
" The number of spaces inserted/removed when using < or >
set shiftwidth=2
" The number of spaces inserted when you press tab.
" -1 means the same value as shiftwidth
set softtabstop=-1
" Insert spaces instead of tabs
set expandtab
" When tabbing manually, use shiftwidth instead of tabstop and softtabstop
set smarttab
" MAPPINGS
" Open the quickfix window if there are errors (or close it)
noremap <leader> cw :botright :cw<cr>
" Run make silently
noremap <leader>m :silent! :make! \| :redraw!<cr>