-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.vimrc
155 lines (141 loc) · 2.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
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
153
154
155
call plug#begin()
Plug 'itchyny/lightline.vim'
Plug 'eapache/rainbow_parentheses.vim'
Plug 'Townk/vim-autoclose'
Plug 'ervandew/supertab'
Plug 'ntpeters/vim-better-whitespace'
Plug 'editorconfig/editorconfig-vim'
call plug#end()
set nocompatible
filetype plugin indent on
colorscheme silverwind
hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
filetype plugin on
filetype indent on
syntax on
set autoindent
set autoread
set background=dark
set backspace=indent,eol,start
set bs=2
set cmdheight=1
set modeline
set modelines=4
set exrc
set secure
set complete-=i
set copyindent
set cursorline
set encoding=utf-8
set equalalways
set expandtab
set ffs=unix,dos,mac
set foldmethod=marker
set gdefault
set guicursor=""
set hidden
set history=500
set hlsearch
set ignorecase
set incsearch
set lazyredraw
set laststatus=2
set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_
set magic
set mat=2
set mouse=""
set nobackup
set nobomb
set noerrorbells
set nofoldenable
set noshowmode
set noswapfile
set novisualbell
set nowritebackup
set nrformats-=octal
set pastetoggle=<F2>
set ruler
set scrolloff=1
set sessionoptions-=options
set shiftwidth=2
set showcmd
set showmatch
set scrolloff=3
set sidescrolloff=5
set smartcase
set smartindent
set smarttab
set softtabstop=2
set splitbelow
set splitright
set t_vb=
set tabpagemax=50
set tabstop=2
set title
set titleold=""
set tm=500
set timeoutlen=0
set ttimeoutlen=0
set ttyfast
set undolevels=1000
set virtualedit=block
set visualbell
set visualbell t_vb=
set whichwrap+=<,>,h,l
set wildchar=<TAB>
set wildignore+=*~,*.o,*.pyc,.git\*,.hg\*,.svn\*
set wildmenu
set wrap
set wrapscan
" remap <leader>
let mapleader="-"
" Treat long lines as break lines
map j gj
map k gk
" CTRL+x deletes the current line
map <C-X> dd
" CTRL+d duplicates current line
map <C-D> yyp
" :W does sudo save
command! W w !sudo tee % > /dev/null
" Return to last edit position when opening files
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Remove trailing whitespace on save
autocmd BufWritePre * :%s/\s\+$//e
autocmd FileType Makefile set noexpandtab
inoremap <C-U> <C-G>u<C-U>
" Enable rainbow
autocmd VimEnter * RainbowParenthesesToggle
autocmd Syntax * RainbowParenthesesLoadRound
autocmd Syntax * RainbowParenthesesLoadSquare
autocmd Syntax * RainbowParenthesesLoadBraces
let g:rbpt_max = 8
let g:bold_parentheses = 0
let g:rbpt_colorpairs = [
\ ['208', 'RoyalBlue3'],
\ ['39', 'SeaGreen3'],
\ ['46', 'DarkOrchid3'],
\ ['199', 'firebrick3'],
\ ['190', 'RoyalBlue3'],
\ ['92', 'SeaGreen3'],
\ ['196', 'DarkOrchid3'],
\ ['44', 'firebrick3'],
\ ]
" Force redraw for lighline (Cygwin issue)
if !empty($CYGWIN)
autocmd VimEnter * redraw
endif
" Let cursor move through wrapped lines
nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk
nnoremap <Down> gj
nnoremap <Up> gk
vnoremap <Down> gj
vnoremap <Up> gk
inoremap <Down> <C-o>gj
inoremap <Up> <C-o>gk
" CTRL-Space to enter/exit insert mode
nnoremap <C-space> i
imap <C-space> <Esc>