aboutsummaryrefslogtreecommitdiff
path: root/urxvt/ext
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-15 11:21:42 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-15 11:21:42 +1300
commit2ebfc589558084b3f2916404fea2dad1a019d55a (patch)
tree0336d88cf531d3a5a286161024efc9d94fd2d79e /urxvt/ext
parentMerge branch 'hotfix/v0.17.1' (diff)
parentUpdate version number to 0.17.2 (diff)
downloaddotfiles-2ebfc589558084b3f2916404fea2dad1a019d55a.tar.gz
dotfiles-2ebfc589558084b3f2916404fea2dad1a019d55a.zip
Merge branch 'hotfix/v0.17.2'v0.17.2
* hotfix/v0.17.2: Update version number to 0.17.2 Correct URL link function name in HTML ftplugin
Diffstat (limited to 'urxvt/ext')
0 files changed, 0 insertions, 0 deletions
/cgit/dotfiles.git/commit/vim/vimrc?h=v1.48.0&id=77585d75bfe1ee422e615ae0c935d275c36604e7'>77585d75
d12ec500
efd92082
d12ec500



eb3fa720
9131bb96
29bd8501


d12ec500

1c5dec84
597059c9



1c5dec84
6dbda341
723d5579
0625928c
723d5579
6dbda341
cde8d297
99371921
6ac60903
e2b4d8fb
6ac60903
9c05d0aa

99371921





e2b4d8fb
34f0ea4f


c4501004
69209e46



c4501004

fcc0e387
6ac60903
fcc0e387
e04fe64d


4887d8c0
6dbda341
c069da18
99371921
e9b47ddd
efd92082
99371921


27a360bb
c0ab5529
21af8bc2
6dbda341
1747b77e


4ce298ce

5372879f
99371921

6ac60903


99371921
a019f8e8
c63915c8
a019f8e8
99371921


efd92082
1c5dec84
4b2d193d
efd92082
a1f98223

99371921
56e6ba37
99371921
a20b0325
4a514fbb




6dbda341
efd92082
c63915c8
6dbda341
eb3fa720
c63915c8
6dbda341
99371921

4a514fbb
99371921
50479150

6dbda341
99371921
56e6ba37
05371473
99371921


c6a69c1b
99371921

6dbda341
1eda73ab
f1472da5
1eda73ab
99371921



6dbda341
10b821cd





3214513c





eb3fa720
127c4aa5



99371921
fcc0e387
fcc0e387
90c0d6e9
762f6c8a

6ac60903





eb3fa720
6ac60903
6dbda341


8dcdf5f8
3260ef7e

8dcdf5f8
9252e6ff
da737832


8dcdf5f8
200521c5


46ed2370
1c5dec84
d1f74490


8d452ac0
6dbda341
487f57db





ac03762d


c84b1aae
12665289

efd92082
12665289

ae6952c2
12665289

efd92082
12665289

1c5dec84
2091b896
2eef8527

6dbda341
a6b23888
a9c7118c
1c5dec84
d434b763
1c5dec84
0f47beb1
236a63e4
07d5852f
236a63e4
07d5852f
3a5f0bfd
cc856126
3a5f0bfd
cc856126
e7aa5011
705d586b
1c5dec84
07d5852f
3b7b5b70
1936d721
1c5dec84
1936d721
1d7c0df5

1c5dec84
1936d721
2295c22d
1936d721
36f86684

1c5dec84
07d5852f
705c61a9
1e845312
705c61a9
1e845312
1c5dec84
07d5852f
557ab600

85007e32
e64c99cc
ff7c1635
e64c99cc
1c5dec84
1936d721
36f86684

5584efb6
1936d721
aebe4e70

1c5dec84
1936d721
1c5dec84
07d5852f
3875b6ca
429baff8
efd92082
07288c62
1e845312


7814a00e
1c5dec84
07d5852f
1c5dec84
e651040b
6ac60903


36f86684

efd92082
07288c62
6dbda341
950f883d



12fabe56
a57b55af
950f883d
7140d01a

65a7e87b

af42abfa




c7e22dbf
d02a2adf
c7e22dbf


5e5f1535


72fd8ee3
5e5f1535
72fd8ee3
5e5f1535
72fd8ee3
b3a4111d
a4484bd1




eb3fa720
04316986
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346

                                                                       


                                                                              
 


                                                            
                                           
                 
                            


                           
                                         
                
 
                           


                           
 
                                                                



                                       
                                                    
                             


                       

     
                                                               



                                                             
 
                                            
                                    
                                                 
                                                       
 
                                                   
          
                                                          
 
                               

                          





                                                            
 


                                                                  
                                                    



                                                          

     
                                                     
                                                          
 


                                                                  
     
 
                                                  
                     
 
                                                         


                                                   
                                                  
                                            
     
 


                                                       

                                           
 

                                               


            
 
                                                       
            
 


                                          
                                                          
                
 
                                                

              
                                
             
 
                                        




                                                               
 
                                                
              
 
                                                         
                    
 

                                                          
                                                               
 

                                              
 
                                     
                 
 


                                                 
 

                                           
 
                                     
                     
 



                                                            
 





                                                                  





                                           
                                                  



                     
                                                     
                         
              
                                                          

     





                                                 
                                                     
                         


                        
                                                             

                                                   
 
                                                          


                                 
 


                                                          
                                          
                      


                                                            
     
 





                                                      


                              
                             

                         
                       

                          
                                         

                          
                                   

                          
 
                                        

                                        
 
                                                            
 
                                                    
                                                            
                                              
                                          
                         
                                                             
                           
                                                                 
                                        
                                  
                                      
                                     
                                   
                                                           
                                                  
                                                    
                                                     
                                           
                                        
                                                    

                                      
                                                  
                                                      
                               
                                                  

                                  
                                                              
                                                 
                      
                                
                                   
                                         
                         
                                                     

                                              
                                     
                                     
                                     
                                     
                       
                                              

                                  
                   
                                            

                                                             
                           
                                                   
                           
                                               
                                     
                                               
                                          
                                                     


                                      
                                         
                     
                                                 
                                                   
                                           


                                             

                                      
                                          
                                                     
 



                                                          
                                                            
                                   
 

                                                        

                                   




                                                               
                                 
                                      


                                        


                                                       
                           
                                  
                                    
                               
                                     
 




                                                          
                                          
                     
" Tom Ryder (tejr)'s vimrc: <https://sanctum.geek.nz/cgit/dotfiles.git>
"
" This file is designed to load without unsuppressed errors on Vim 6.0 and up.
" Anything older than that will probably break. There are also some odd bits
" of logic to cope with loading as much config as possible on vim-tiny.

" Undo anything the operating system's vimrc may have broken
runtime system.vim

" Load filetype settings, plugins, and maps
if has('autocmd')
  let g:maplocalleader = ','
  filetype plugin indent on
endif

" Options dependent on the syntax feature
if has('syntax')

  " Use syntax highlighting
  if !exists('g:syntax_on')
    syntax enable
  endif

  " Use my colorscheme if using the GUI or if we have 256 colors
  if has('gui_running') || &t_Co >= 256
    silent! colorscheme sahara
  endif

  " If not sahara, then default with dark background
  if !exists('g:colors_name')
    set background=dark
  endif

endif

" The all-important default indent settings; filetypes to tweak
set autoindent     " Use indent of previous line on new lines
set expandtab      " Use spaces instead of tabs
set shiftwidth=4   " Indent with four spaces
set softtabstop=4  " Insert four spaces with tab key

" Let me backspace over pretty much anything
set backspace+=eol     " Line breaks
set backspace+=indent  " Spaces from 'autoindent'
set backspace+=start   " The start of current insertion

" Try to keep backups in one system-appropriate dir
set backup
set backupdir^=~/.vim/cache/backup,~/vimfiles/cache/backup

" Add some paths not to back up
set backupskip^=/dev/shm/*
set backupskip^=/var/tmp/*

" Indent wrapped lines
silent! set breakindent

" Clear default 'comments' value, let the filetype handle it
set comments=

" Give me a prompt instead of just rejecting risky :write, :saveas
set confirm

" Only turn on 'cursorline' if my colorscheme loaded
if exists('+cursorline')
  if exists('g:colors_name') && g:colors_name ==# 'sahara'
    set cursorline
  endif
endif

" Try to keep swapfiles in one system-appropriate dir
set directory^=~/.vim/cache/swap//,~/vimfiles/cache/swap//

" Use UTF-8 if we can and env LANG didn't tell us not to
if has('multi_byte') && !exists('$LANG') && &encoding ==# 'latin1'
  set encoding=utf-8
endif

" Don't wait for a key after Escape in insert mode
silent! set noesckeys

" Delete comment leaders when joining lines, if supported
silent! set formatoptions+=j

" If available, use GNU grep niceties for searching
if system('grep --version') =~# '^grep (GNU grep)'
  set grepprg=grep\ -HnRs\ --exclude='.git*'
endif

" Allow buffers to have changes without being displayed
set hidden

" Keep much more command and search history
set history=2000

" Highlight completed searches; clear on reload
set hlsearch
if 1
  nohlsearch
endif

" Don't assume I'm editing C; let the filetype set this
set include=

" Show search matches as I type my pattern
set incsearch

" Don't join lines with two spaces at the end of sentences
set nojoinspaces

" Don't redraw the screen during batch execution
set lazyredraw

" Break lines at word boundaries
set linebreak

" Define extra 'list' display characters
set listchars+=extends:>       " Unwrapped text to screen right
set listchars+=precedes:<      " Unwrapped text to screen left
set listchars+=tab:>-          " Tab characters, preserve width
set listchars+=trail:_         " Trailing spaces
silent! set listchars+=nbsp:+  " Non-breaking spaces

" Don't allow setting options via buffer content
set nomodeline

" Treat numbers with a leading zero as decimal, not octal
set nrformats-=octal

" Options for file search with gf/:find
set path-=/usr/include  " Let the C/C++ filetypes set that
set path+=**            " Search current directory's whole tree

" Don't show startup splash screen (I donated)
set shortmess+=I

" Prefix wrapped rows with three dots
set showbreak=...

" New windows go below or to the right of a split
set splitbelow
set splitright

" Give me a bit longer to complete mappings
set timeoutlen=3000

" No terminal mouse, even if we could
silent! set ttymouse=

" Wildmenu settings; see also plugin/wildignore.vim
set wildmenu                " Use wildmenu
set wildmode=list:longest   " Tab press completes and lists
silent! set wildignorecase  " Case insensitive, if supported

" Add completion options
if exists('+completeopt')
  set completeopt+=longest  " Insert longest common substring
  set completeopt+=menuone  " Show the menu even if only one match
endif

" Fold based on indent, but only when I ask
if has('folding')
  set foldlevelstart=99
  set foldmethod=indent
endif

" Don't load GUI menus; set here before GUI starts
if has('gui_running')
  set guioptions+=M
endif

" Keep undo files, hopefully in a dedicated directory
if has('persistent_undo')
  set undofile
  set undodir^=~/.vim/cache/undo//,~/vimfiles/cache/undo//
endif

" Don't store any options or mappings in sessions
if exists('+sessionoptions')
  set sessionoptions-=localoptions
  set sessionoptions-=options
endif

" Let me move beyond buffer text in visual block mode
if exists('+virtualedit')
  set virtualedit+=block
endif

" Stack normal/visual/select Ctrl-L to clear search highlight
nnoremap <silent> <C-L> :<C-U>nohlsearch<CR><C-L>
vnoremap <silent> <C-L> :<C-U>nohlsearch<CR>gv<C-L>

" Remap insert Ctrl-C to undo the escaped insert operation
if &loadplugins
  imap <C-C> <Plug>(InsertCancel)
endif

" Map double Ctrl-K in insert mode to search digraph names
imap <C-K><C-K> <Plug>(DigraphSearch)

" Remap normal space to scroll down a page
nnoremap <Space> <C-F>
" If we have plugins, do a :next after hitting the last line
if &loadplugins
  nmap <Space> <Plug>(ScrollNext)
endif

" Remap normal/visual & to preserve substitution flags
nnoremap <silent> & :&&<CR>
if exists(':xnoremap')
  xnoremap <silent> & :&&<CR>
endif

" Map g: as a 'colon operator'
nmap g: <Plug>(ColonOperator)

" Cycle through argument list
nnoremap [a :previous<CR>
nnoremap ]a :next<CR>
" Cycle through buffers
nnoremap [b :bprevious<CR>
nnoremap ]b :bnext<CR>
" Cycle through quicklist/:helpgrep items
nnoremap [c :cprevious<CR>
nnoremap ]c :cnext<CR>
" Cycle through location list items
nnoremap [l :lprevious<CR>
nnoremap ]l :lnext<CR>

" Insert blank lines around current line
nmap [<Space> <Plug>(PutBlankLinesAbove)
nmap ]<Space> <Plug>(PutBlankLinesBelow)

" Normal leader maps; use <Bslash> not <Leader> for vim-tiny

" \a toggles 'formatoptions' 'a' flag using a plugin
nnoremap <Bslash>a :<C-U>ToggleFlagLocal formatoptions a<CR>
" \b toggles copy-pasteable linebreak settings
nmap <Bslash>b <Plug>(CopyLinebreakToggle)
" \c toggles 'cursorline'
nnoremap <Bslash>c :<C-U>setlocal cursorline! cursorline?<CR>
" \C toggles 'cursorcolumn'
nnoremap <Bslash>C :<C-U>setlocal cursorcolumn! cursorcolumn?<CR>
" \d inserts the local date (POSIX date)
nnoremap <Bslash>d :read !date<CR>
" \D inserts the UTC date (POSIX date)
nnoremap <Bslash>D :read !date -u<CR>
" \e forces a buffer to be editable
nnoremap <Bslash>e :<C-U>setlocal modifiable noreadonly<CR>
" \f shows the current 'formatoptions' at a glance
nnoremap <Bslash>f :<C-U>setlocal formatoptions?<CR>
" \g changes directory to the current file's location
nnoremap <Bslash>g :<C-U>cd %:h<CR>:pwd<CR>
" \h toggles highlighting search results
nnoremap <Bslash>h :<C-U>set hlsearch! hlsearch?<CR>
" \H shows command history
nnoremap <Bslash>H :<C-U>history :<CR>
" \i toggles showing matches as I enter my pattern
nnoremap <Bslash>i :<C-U>set incsearch! incsearch?<CR>
" \j jumps to buffers (jetpack)
nnoremap <Bslash>j :<C-U>buffers<CR>:buffer<Space>
" \k shows my marks
nnoremap <Bslash>k :<C-U>marks<CR>
" \l toggles showing tab, end-of-line, and trailing whitespace
nnoremap <Bslash>l :<C-U>setlocal list! list?<CR>
" \m shows normal maps
nnoremap <Bslash>m :<C-U>map<CR>
" \M shows buffer-local normal maps
nnoremap <Bslash>M :<C-U>map <buffer><CR>
" \n toggles line numbers
nnoremap <Bslash>n :<C-U>setlocal number! number?<CR>
" \N toggles 'ruler'
nnoremap <Bslash>N :<C-U>set ruler! ruler?<CR>
" \o opens a line below in paste mode
nmap <Bslash>o <Plug>(PasteOpenBelow)
" \O opens a line above in paste mode
nmap <Bslash>O <Plug>(PasteOpenAbove)
" \p toggles paste mode
nnoremap <Bslash>p :<C-U>set paste! paste?<CR>
" \q formats the current paragraph
nnoremap <Bslash>q gqap
" \r reloads .vimrc
nnoremap <Bslash>r :<C-U>source $MYVIMRC<CR>
" \R reloads filetype
nnoremap <Bslash>R :<C-U>doautocmd filetypedetect BufRead<CR>
" \s toggles spell checking
nnoremap <Bslash>s :<C-U>setlocal spell! spell?<CR>
" \t shows current filetype
nnoremap <Bslash>t :<C-U>setlocal filetype?<CR>
" \T clears filetype (follow with \R)
nnoremap <Bslash>T :<C-U>setlocal filetype=<CR>
" \u sets US English spelling (compare \z)
nnoremap <Bslash>u :<C-U>setlocal spelllang=en_us<CR>
" \v shows all global variables
nnoremap <Bslash>v :<C-U>let g: v:<CR>
" \V shows all local variables
nnoremap <Bslash>V :<C-U>let b: t: w:<CR>
" \w toggles wrapping
nnoremap <Bslash>w :<C-U>setlocal wrap! wrap?<CR>
" \x strips trailing whitespace via a custom plugin
nmap <Bslash>x :StripTrailingWhitespace<CR>
if exists(':xmap')
  xmap <Bslash>x :StripTrailingWhitespace<CR>
endif
" \y shows all registers
nnoremap <Bslash>y :<C-U>registers<CR>
" \z sets NZ English spelling (compare \u)
nnoremap <Bslash>z :<C-U>setlocal spelllang=en_nz<CR>

" \= runs the whole buffer through =, preserving position
nnoremap <Bslash>= :<C-U>call vimrc#Anchor('1G=G')<CR>
" \+ runs the whole buffer through gq, preserving position
nnoremap <Bslash>+ :<C-U>call vimrc#Anchor('1GgqG')<CR>
" \. runs the configured make program into the location list
nnoremap <Bslash>. :<C-U>lmake!<CR>

" \< and \> adjust indent of last edit; good for pasting
nnoremap <Bslash><lt> :<C-U>'[,']<lt><CR>
nnoremap <Bslash>> :<C-U>'[,']><CR>

" \/ types :vimgrep for me ready to enter a search pattern
nnoremap <Bslash>/ :<C-U>vimgrep /\c/ **<S-Left><S-Left><Right>
" \? types :helpgrep for me ready to enter a search pattern
nnoremap <Bslash>? :<C-U>helpgrep \c<S-Left>

" \DEL deletes the current buffer
nnoremap <Bslash><Delete> :bdelete<CR>
" \INS edits a new buffer
nnoremap <Bslash><Insert> :<C-U>enew<CR>

" Execution mappings; each of these clobbers register z

" \@ executes line in normal mode
nnoremap <Bslash>@ ^"zyg_@z
" \: executes line in command mode
nnoremap <Bslash>: ^"zyg_:<C-R>z<CR>
" \! executes line with 'shell'
nnoremap <Bslash>! ^"zyg_:!<C-R>z<CR>

" If we're running NeoVim, source some extra configuration
if has('nvim')
  runtime nvim.vim
endif

" Source any .vim files from ~/.vim/config
runtime! config/*.vim