-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
160 lines (130 loc) · 3.61 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
156
157
158
159
160
"" Get list of plugin help files
"" :help local-additions
"" View help on current word
"" :help <C-r><C-w>
set nocompatible
"" Filetype synatax
filetype plugin on
syntax on
filetype indent plugin on
"" Set line number and relatives
set number
if exists( '+rnu' ) | set relativenumber | endif
"" Enable mouse control
set mouse=a
set hidden
let g:vim_markdown_folding_disabled = 1
"" Plugin installer
call plug#begin('~/.vim/bundle')
"" Vim keybinds
"" toggle line number 'con'
"" toggle relative number 'cor'
"" toggle spelling 'cos'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-sensible'
"" Vim Unix Commands
"" move, sudowrite, chmod, mkdir, rename, find
Plug 'tpope/vim-eunuch'
"" Edit surrounding characters""
"" change surrounding => cs'"
"" Delete surrounding => ds'"
"" 'you' surround => ysiw"
Plug 'tpope/vim-surround'
"" Undo tree menu
Plug 'sjl/gundo.vim', {'on': 'GundoToggle'}
"" Plugin stuff
Plug 'shougo/vimproc', {'do': 'make'}
"" Matching parantheses, quotes etc
Plug 'Raimondi/delimitMate'
"" Close statements if, for etc
Plug 'tpope/vim-endwise'
"" Error checking
Plug 'w0rp/ale'
"" Vim statusbar
Plug 'vim-airline/vim-airline'
"" Vim airline themes
Plug 'vim-airline/vim-airline-themes'
"" Completion Engine
Plug 'Shougo/neocomplete.vim'
"" Better search
Plug 'haya14busa/incsearch.vim'
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
map N <Plug>(incsearch-nohl-N)
map * <Plug>(incsearch-nohl-*)
map # <Plug>(incsearch-nohl-#)
map g* <Plug>(incsearch-nohl-g*)
map g# <Plug>(incsearch-nohl-g#)
let g:incsearch#consistent_n_direction = 1
let g:incsearch#auto_nohlsearch = 1
let g:incsearch#magic = '\v'
"" fzf for vim
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
"" Rust configuration
Plug 'rust-lang/rust.vim'
"" ember hbs plugin
Plug 'joukevandermaas/vim-ember-hbs'
call plug#end()
"" Gundo settings
let g:gundo_width = 60
let g:gundo_preview_height = 40
let g:gundo_right = 1
"" Map gundo to F5
nnoremap <silent> <F5> <Esc>:GundoToggle<CR>
"" Map for Neocomplete
let g:completionEngine = 'neocomplete'
let g:neocomplete#enable_at_startup = 1
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
"" Save undos and :ex history
if version >= 703
if exists("&undodir")
set undodir=~/.vim/undo//
endif
set undofile
set undoreload=10000
endif
set undolevels=10000
if exists("&backupdir")
set backupdir=~/.vim/backups//
endif
if exists("&directory")
set directory=~/.vim/swaps//
endif
"" Ruler stuff
set ruler
set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%)
"" Airline
let g:airline_theme='term'
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
"let g:airline_symbols_ascii = 1
let base16colorspace=256
" unicode symbols
"let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
"let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
"let g:airline_symbols.linenr = '␊'
"let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.branch = 'b'
"let g:airline_symbols.paste = 'ρ'
"let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
" airline symbols
"let g:airline_left_sep = ''
"let g:airline_left_alt_sep = ''
"let g:airline_right_sep = ''
"let g:airline_right_alt_sep = ''
"let g:airline_symbols.branch = ''
"let g:airline_symbols.readonly = ''
"let g:airline_symbols.linenr = ''
" ale settings
let g:ale_lint_on_save=1
let g:ale_lint_on_text_change=0
nmap <F8> <Plug>(ale_fix)