-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrcpg
executable file
·204 lines (177 loc) · 5.95 KB
/
.vimrcpg
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
set nocompatible " Disable vi-compatibility
set t_Co=256
execute pathogen#infect()
colorscheme jellybeans
set background=dark
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
set showmode " always show what mode we're currently editing in
set nowrap " don't wrap lines
set tabstop=4 " a tab is four spaces
set smarttab
set tags=tags
set softtabstop=4 " when hitting <BS>, pretend like a tab is removed, even if spaces
set expandtab " expand tabs by default (overloadable per file type later)
set shiftwidth=4 " number of spaces to use for autoindenting
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set relativenumber
set number " always show line numbers
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase,
set timeout timeoutlen=200 ttimeoutlen=100
set visualbell " don't beep
set noerrorbells " don't beep
set autowrite "Save on buffer switch
set mouse=a
set incsearch "incremental dynamic search..
set hlsearch "highlight search results
set smartindent
syntax on
filetype indent on
filetype plugin on
"
" Color Picker Stuff.. ;)
imap <F5> <Esc>:ColorPicker<Cr>a
vmap <F5> <Del><Esc>h:ColorPicker<Cr>a
"using delete/backspace key to remove the hlsearch
nmap <silent> <BS> :nohlsearch<CR>
"Taboo remembering tabe names in session option
set sessionoptions+=tabpages,globals
"JsLint Settings..
let jshint2_read = 1
let jshint2_save = 1
let jshint2_maxheight = 12
let jshint2_minheight = 3
" jshint validation
nnoremap <silent><F1> :JSHint<CR>
inoremap <silent><F1> <C-O>:JSHint<CR>
vnoremap <silent><F1> :JSHint<CR>
" show next jshint error
nnoremap <silent><F2> :lnext<CR>
inoremap <silent><F2> <C-O>:lnext<CR>
vnoremap <silent><F2> :lnext<CR>
" show previous jshint error
nnoremap <silent><F3> :lprevious<CR>
inoremap <silent><F3> <C-O>:lprevious<CR>
vnoremap <silent><F3> :lprevious<CR>
" Well it's about time we do some notes
:let g:notes_directories = ['~/Documents/Notes', '~/bin/gitfiles/notes']
"Vimux stuff
map <Leader>tt :call VimuxRunCommand("clear; npm start ", 0)<CR>
"Color toggle
map <leader>b :ToggleBg<CR>
"search with more characters without escapes..
nnoremap / /\v
"colortoggle stuff..
map <silent> <F5> :call gruvbox#bg_toggle()<CR>
imap <silent> <F5> <ESC>:call gruvbox#bg_toggle()<CR>a
vmap <silent> <F5> <ESC>:call gruvbox#bg_toggle()<CR>gv
"Yeah changing the map leader key to comma. It's easier that way.
let mapleader = ","
let g:mapleader = ","
" Map J and K keys to move through tabs...
"
nmap K gt
nmap J gT
"
" " Fast saves
nmap <leader>w :w!<cr>
"
" Fast quit, Boy i'm really lazy
nmap <leader>q :q!<cr>
" " Down is really the next line
nnoremap j gj
nnoremap k gk
"
""Easy escaping to normal model
imap jj <esc>
" Mapping redo.. this could be a bad practise but then
nmap rr :redo<cr>
"
" "Auto change directory to match current file ,cd
" nnoremap ,cd :cd %:p:h<CR>:pwd<CR>
"
" "easier window navigation
" Open splits
nmap vs :vsplit<cr>
nmap sp :split<cr>
"
"Moving through buffers
nmap <C-h> :bprev<cr>
nmap <C-l> :bnext<cr>
"Moving through splits -- This is commented to allow buffers!
"nmap <C-H> <C-w>h "--- I allowed buffers cause i could just deal with
"nmap <C-L> <C-w>l " --- fullscreen and when in split Ctrl + w-l/h isn't that
"hard!
"
" "Resize vsplit
" nmap <C-v> :vertical resize +5<cr>
" nmap 25 :vertical resize 40<cr>
" nmap 50 <c-w>=
" nmap 75 :vertical resize 120<cr>
"
nmap <leader>1 :NERDTreeToggle<cr>
"
" "Load the current buffer in Chrome
" nmap ,c :!open -a Google\ Chrome<cr>
"
" "Show (partial) command in the status line
set showcmd
"
" " Create split below
nmap :sp :rightbelow sp<cr>
"Status line stuffs..
fun! <SID>SetStatusLine()
"let l:s1="%-3.3n\\ %f\\ %h%m%r%w" this thing is so verbose i hate it!
let l:s2="[%{strlen(&filetype)?&filetype:'?'},%{&encoding},%{&fileformat}]"
let l:s3="%=\\ 0x%-8B\\ \\ %-14.(%l,%c%V%)\\ %<%P"
execute "set statusline=" . l:s2 . l:s3
endfun
set laststatus=2
call <SID>SetStatusLine()
let g:airline_theme='base16color'
set encoding=utf-8
"Another vim-airline stuff
function! AccentDemo()
let keys = ['D','a','d','d','y']
for k in keys
call airline#parts#define_text(k, k)
endfor
call airline#parts#define_accent('D', 'red')
call airline#parts#define_accent('a', 'green')
call airline#parts#define_accent('d', 'blue')
call airline#parts#define_accent('d', 'yellow')
call airline#parts#define_accent('y', 'orange')
let g:airline_section_a = airline#section#create(keys)
endfunction
autocmd VimEnter * call AccentDemo()
" vim-airline
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
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 = ''
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ''
let g:airline#extensions#tabline#left_alt_sep = ''
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#branch#empty_message = ''
let g:airline#extensions#hunks#enabled = 1
let g:airline#extensions#hunks#non_zero_only = 0
let g:airline#extensions#hunks#hunk_symbols = ['+', '~', '-']
set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
set errorformat=%f:%l:%c:%*\d:%*\d:%*\s%m
call airline#themes#base16#refresh()
"""""""""" PSQL stuff.. ************************
au BufRead /tmp/psql.edit.* set syntax=sql
set syntax=postgresql.vim