Repository navigation
Expand file tree
/
Copy path.vimrc
More file actions
707 lines (584 loc) · 18.3 KB
/
Copy path.vimrc
File metadata and controls
707 lines (584 loc) · 18.3 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
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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
" Hello, friend.
" There are many .vimrcs, but this one is mine.
"
" This file is roughly split into the following sections:
" Packaging, Customization, Bindings, Files, Plugins and Misc Fun
"
" In the beginning there was vi, and that could be Improved:
set nocompatible
" -------------------------------
" packaging
" -------------------------------
if has("packages")
let &packpath = &runtimepath
endif
call plug#begin()
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'github/copilot.vim'
Plug 'nvim-tree/nvim-web-devicons'
Plug 'phillmv/diffreview.nvim'
Plug 'tpope/vim-fugitive'
call plug#end()
if has("nvim")
lua require('lsp')
endif
"packadd! matchit
"packadd! rainbow_parentheses
" -------------------------------
" vim customization
" -------------------------------
syntax on
filetype plugin indent on
" terminal handling options
" -------------------------------
set mouse+=a " mouse in terminal
if !has("gui_macvim") && !has("gui_running") && !has('nvim')
" https://stackoverflow.com/questions/7000960/in-vim-why-doesnt-my-mouse-work-past-the-220th-column
" slash also in tmux:
if has("mouse_sgr")
set ttymouse=sgr
else
set ttymouse=xterm2
endif
endif
set termguicolors " real colours in term
colorscheme reslate
" rendering & editing
" -------------------------------
set encoding=utf-8
set wrap " wrap long lines
set number
set ruler
set visualbell " shut the fuck up
set display+=lastline " when lines overflow, show me the line, not an @
set autoindent " indent at the same level of the previous line
set backspace=2 " allow backspacing over everything in insert mode
" everything is spaces! and indents are 2 spaces! {
set expandtab " tab key inserts spaces
set smarttab
set tabstop=2 " tab width
set shiftwidth=2 " indent width
set softtabstop=2 " number of cols for a tab
" }
" file handling:
" -------------------------------
set autoread " load file when it changes
" no hidden, no autowrite
" everything buffer wise that happens is 'intentional'
" user interface tweaks
" -------------------------------
" searching
set hlsearch " highlight search
set incsearch
set ignorecase
set smartcase " ... unless they contain at least one capital letter
set showmatch " show matching parens, etc
" clear search:
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
" w/vim-airline, the mode change msg is redundant:
set noshowmode
set wildmenu
set wildignore+=*.log,*.jpg,*.png,*.gif,*.swp,vendor/rails/**
set wildignore+=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/*
set wildignore+=*.swp,*~,._*
set wildignore+=*.pdf,*.jpg,*.jpeg
" handle side scrolling
if !&scrolloff
set scrolloff=1
endif
if !&sidescrolloff
set sidescrolloff=5
endif
"" what's shown if 'set list' is used
if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:·,extends:>,precedes:<,nbsp:+
endif
if v:version > 703 || v:version == 703 && has("patch541")
set formatoptions+=j " Delete comment character when joining commented lines
endif
" ctags
set tags+=gems.tags
set tags+=stdlib.tags
" Backup and swap files
set backupdir=~/.vim/_backup/ " where to put backup files.
set directory=~/.vim/_temp/ " where to put swap files.
" i prefer more context
set diffopt+=context:30
" -------------------------------
" Key bindings
" -------------------------------
inoremap jj <Esc>
" Movement & making vim like gui editors
" -------------------------------
" sane movement
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
vmap <left> h
vmap <right> l
" I like to use shift+arrows for selecting:
imap <S-up> <Esc>vk
imap <S-down> <Esc>vj
imap <S-left> <Esc>vh
imap <S-right> <Esc>vl
map <S-up> <Esc>vk
map <S-down> <Esc>vj
map <S-left> <Esc>vh
map <S-right> <Esc>vl
vmap <S-up> k
vmap <S-down> j
vmap <S-left> h
vmap <S-right> l
" instead of selectmode, let's just go to visual mode
" when pressing shift-arrows
set selectmode=
" Allow me to use Ctrl-C for copying to system buffer
" -------------------------------
if has("clipboard")
" copy and paste
vmap <C-c> "+yi
vmap <C-x> "+c
" Note: DEPRECATED for now, cmd-v in mac seems to work just fine.
" vmap <C-v> c<ESC>"+p
" imap <C-v> <ESC>"+pa
endif
if !empty($CODESPACES)
" copy over ssh
vmap <C-c> :OSCYankVisual<CR>
" https://github.com/ojroques/vim-oscyank/issues/26
let g:oscyank_term = 'default'
endif
" alt-arrows, alt-bs should skip over words
" TODO: get this to work for vmap? & alt
imap <M-left> <Esc>Bi
imap <Esc>[1;9D <Esc>Bi
imap <M-right> <Esc>lWi
imap <Esc>[1;9C <Esc>lWi
imap <M-backspace> <Esc>B"_dwi
" switching between tabs
" -------------------------------
map <D-0> 0gt
imap <D-0> <Esc>0gt
map <D-1> 1gt
imap <D-1> <Esc>1gt
map <D-2> 2gt
imap <D-2> <Esc>2gt
map <D-3> 3gt
imap <D-3> <Esc>3gt
map <D-4> 4gt
imap <D-4> <Esc>4gt
map <D-5> 5gt
imap <D-5> <Esc>5gt
map <D-6> 6gt
imap <D-6> <Esc>6gt
map <D-7> 7gt
imap <D-7> <Esc>7gt
map <D-8> 8gt
imap <D-8> <Esc>8gt
map <D-9> 9gt
imap <D-9> <Esc>9gt
" by default in OSX alt sends different chars
" so here we map the alt-chars next to the vim equiv
map † :tabnew<CR>
map <A-t> :tabnew<CR>
map º 0gt
map <A-0> 0gt
imap <A-0> <Esc>0gt
map ¡ 1gt
map <A-1> 1gt
imap <A-1> <Esc>1gt
map ™ 2gt
map <A-2> 2gt
imap <A-2> <Esc>2gt
map £ 3gt
map <A-3> 3gt
imap <A-3> <Esc>3gt
map ¢ 4gt
map <A-4> 4gt
imap <A-4> <Esc>4gt
map ∞ 5gt
map <A-5> 5gt
imap <A-5> <Esc>5gt
map § 6gt
map <A-6> 6gt
imap <A-6> <Esc>6gt
map ¶ 7gt
map <A-7> 7gt
imap <A-7> <Esc>7gt
map • 8gt
map <A-8> 8gt
imap <A-8> <Esc>8gt
map ª 9gt
map <A-9> 9gt
imap <A-9> <Esc>9gt
" move to next/prev tab
map ” gT
map <A-{> gT
" alt-}
map ’ gt
map <A-}> gt
" alt-w to close tabs
map ∑ :q<CR>
map <A-w> :q<CR>
" splits
" -------------------------------
" with macmeta turned off, can't just use
" M-arrow, so let's just use alt-shift arrows
map <M-S-left> <C-w>h
map <M-S-down> <C-w>j
map <M-S-up> <C-w>k
map <M-S-right> <C-w>l
" using mapping out Alt specifically:
map <A-S-left> <C-w>h
map <A-S-down> <C-w>j
map <A-S-up> <C-w>k
map <A-S-right> <C-w>l
" for terminal equivalent escape codes:
map <Esc>[1;10D <C-w>h
map <Esc>[1;10B <C-w>j
map <Esc>[1;10A <C-w>k
map <Esc>[1;10C <C-w>l
" HERE BE DRAGONS "
" when switching over to neovim, i found that i could not get nvim, for the
" life of me, to accept option-shift-{left,down,up,right} as valid input.
" Invariably, (i.e. boot `nvim --clean`, go into insert mode, press <C-V>,
" press desired key input) it would register as <S-Left>, swallowing the alt
" key.
" I got this to work with normal vim via the terminal escape codes listed
" above, but no dice with neovim. Even playing around with the Preferences ->
" Profiles -> Keys -> Left Option Key (Normal, Meta, Esc+) I could not get
" nvim v0.8.1 to print out something useful for option-shift-$arrow.
" So I gave up and I did something far dirtier: I added custom keymappings in
" my iterm2 profile. So now, when I type:
" - alt-shift-left, it sends `^[left`
" - alt-shift-down, it sends `^[down`
" - alt-shift-up, it sends `^[up`
" - alt-shift-right, it sends `^[right`
" which neovim for some reason correctly interprets as option-left, etc.
" this is fucked up? i hate this. but i can't think of a better solution rn.
map <M-l>eft <C-w>h
map <M-d>own <C-w>j
map <M-u>p <C-w>k
map <M-r>ight <C-w>l
" of course, now that I am sending custom keymappings for alt-option-arrows,
" the old terminal escape codes don't work. So for normal vim, we now except
" to see:
map <Esc>left <C-w>h
map <Esc>down <C-w>j
map <Esc>up <C-w>k
map <Esc>right <C-w>l
" END DRAGONS "
" with macmeta turned off, alt-, produces ≤
""Horizontal split
map <M-,> :split<CR><C-w>j
map ≤ :split<CR><C-w>j
" with macmeta turned off, alt-. produces ≥
"" Vertical split
map <M-.> :vsplit<CR><C-w>l
map ≥ :vsplit<CR><C-w>l
" Convert vertical to horizontal split
map <M-<> <C-w>K
map ¯ <C-w>K
" Convert horizontal to vertical split
map <M->> <C-w>L
map ˘ <C-w>L
" identation
" -------------------------------
" taken from janus:
" Map command-[ and command-] / alt-[ and alt-] to indenting or outdenting
" while keeping the original selection in visual mode.
vmap ‘ >gv
vmap <A-]> >gv
vmap <D-]> >gv
vmap “ <gv
vmap <A-[> <gv
vmap <D-[> <gv
nmap ‘ >>
nmap <A-]> >>
nmap <D-]> >>
nmap “ <<
nmap <A-[> <<
nmap <D-[> <<
omap ‘ >>
omap <A-]> >>
omap <D-]> >>
omap “ <<
omap <A-[> <<
omap <D-[> <<
imap ‘ <Esc>>>i
imap <A-]> <Esc>>>i
imap <D-]> <Esc>>>i
imap “ <Esc><<i
imap <A-[> <Esc><<i
imap <D-[> <Esc><<i
" commenting
" -------------------------------
nmap <D-'> :TComment<CR>
vmap <D-'> :TComment<CR>
imap <D-'> <Esc>:TComment<CR>a
nmap æ :TComment<CR>
vmap æ :TComment<CR>
imap æ <Esc>:TComment<CR>a
nmap <A-'> :TComment<CR>
vmap <A-'> :TComment<CR>
imap <A-'> <Esc>:TComment<CR>a
" Environment specific options:
if has("gui_macvim") && has("gui_running")
set fuoptions=maxvert,maxhorz
au GUIEnter * set fullscreen
" VERA SANS MONO FO LIFE
set guifont=Bitstream\ Vera\ Sans\ Mono:h13
set guioptions-=T " no macvim toolbar
" cmd key + arrows and alt key plus arrows should behave like other text
" field editors
map <D-right> $
map <D-left> 0
imap <D-right> <Esc>$a
imap <D-left> <Esc>0i
else
" Make shift-insert work like in Xterm
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
endif
" https://www.reddit.com/r/neovim/comments/xncvul/how_to_make_the_separator_line_the_same_color_as/
if has("nvim")
hi WinSeparator guibg=NONE
endif
" ----------------------------------
" Misc bindings:
" ----------------------------------
" C-i goes 'forwards'
" C-o goes 'backwards'
map <C-}> <C-w><C-]>
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
" map <A-]> :vsp <CR>:exec('tag '.expand('<cword>'))<CR>
map <Leader>1 :NERDTreeFind<CR>
map <Leader>! :NERDTreeToggle<CR>
""" Buffers
" map <M-]> :bnext<CR>
" map <M-[> :bprev<CR>
" map <M-backspace> :bdelete<CR>
" also taken from Janus:
" use :w!! to write to a file using sudo if you forgot to 'sudo vim file'
" (it will prompt for sudo password when writing)
cmap w!! %!sudo tee > /dev/null %
" upper/lower word
" selection reversed from Janus
nmap <leader>u mQviwU`Q
nmap <leader>l mQviwu`Q
" " upper/lower first char of word
" nmap <leader>u mQgewvU`Q
" nmap <leader>l mQgewvu`Q
" cd to the directory containing the file in the buffer
nmap <silent> <leader>cd :lcd %:h<CR>
" Some helpers to edit mode
" http://vimcasts.org/e/14
" open files from wd of current file
cnoremap %% <C-R>=expand('%:h').'/'<cr>
map <leader>ew :e %%
map <leader>es :sp %%
map <leader>ev :vsp %%
map <leader>et :tabe %%
" map :etruby :tabe<bar>:set filetype=ruby
" Swap two words
nmap <silent> gw :s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/<CR>`'
" Underline the current line with '='
nmap <silent> <leader>ul :t.\|s/./=/g\|:nohls<cr>
" set text wrapping toggles
" nmap <silent> <leader>tw :set invwrap<CR>:set wrap?<CR>
" find merge conflict markers
nmap <silent> <leader>fc <ESC>/\v^[<=>]{7}( .*\|$)<CR>
" -------------------------------
"" HANDLING FILES
" -------------------------------
" ruby {
auto BufNewFile,BufRead [cC]apfile set filetype=ruby
auto BufNewFile,BufRead Gemfile* set filetype=ruby
auto BufNewFile,BufRead Vagrantfile set filetype=ruby
auto BufNewFile,BufRead Cheffile set filetype=ruby
auto BufNewFile,BufRead *.ru set filetype=ruby
auto BufNewFile,BufRead *.erb set filetype=eruby
"lol asset pipeline
autocmd BufNewFile,BufRead *.jsx.erb let b:jsx_ext_found = 1
autocmd BufNewFile,BufRead *.jsx.erb set filetype=javascript
"autocomplete pls?
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
au FileType ruby nmap <Leader>i :vsplit<CR> <C-w><C-l><C-]>
au FileType ruby nmap <Leader>I <C-]>
" via skalnik
let g:ruby_heredoc_syntax_filetypes = {
\ "graphql" : {
\ "start" : "GRAPHQL",
\},
\}
" }
" golang {
" wrestling with go-vim vs lsp {
let g:go_gopls_enabled = 0
let g:go_def_mapping_enabled = 0
" } end wrestling with go-vim vs lsp
auto BufNewFile,BufRead *.go set ft=go
au FileType go nmap <Leader>i <Plug>(go-info)
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <Leader>s <Plug>(go-implements)
au FileType go nmap <Leader>g :TagbarToggle<CR>
au FileType go nmap <Leader>] :GoImplements<CR>
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>b <Plug>(go-build)
au FileType go nmap <leader>c <Plug>(go-test)
" au FileType go nmap <leader>c <Plug>(go-coverage)
au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
au FileType go nmap <Leader>ds <Plug>(go-def-split)
"If you change the command used by :GoFmt to goimports, it will also manage your imports (e.g., by inserting the missing “fmt” import in the above example):
let g:go_fmt_command = "goimports"
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
" }
auto BufNewFile,BufRead *.sc set filetype=scheme
auto BufNewFile,BufRead *.json set ft=javascript
au FileType make setl noexpandtab
" add certain tags to html indent
let g:html_indent_inctags="section\|dt"
" -------------------------------
" PLUGINS
" -------------------------------
" fzf ftw
map <Leader>t :FZF<CR>
let g:fzf_layout = { 'down': '40%' }
" rainbow parens {
au VimEnter * RainbowParentheses
" au VimEnter * RainbowParenthesesToggle
" au Syntax * RainbowParenthesesLoadRound
" au Syntax * RainbowParenthesesLoadSquare
" au Syntax * RainbowParenthesesLoadBraces
" }
" set up default nerdtree settings
" autocmd vimenter * NERDTree " open by default
"autocmd vimenter * if !argc() | NERDTree | endif " open even if no files are selected
" autocmd VimEnter * wincmd p " set focus on opened buffer and not nerdtree
" quit when nerdtree is the last buffer standing
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
map <Leader>U :UndotreeToggle<cr>
" airline {
let g:airline#extensions#tagbar#enabled = 0
"}
" -------------------
" MISC FUN(ctions)
" -------------------
" Show syntax highlighting groups for word under cursor
nmap <C-S-P> :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
" via dctucker:
" Set a nicer foldtext function
set foldtext=MyFoldText()
function! MyFoldText()
let line = getline(v:foldstart)
if match( line, '^[ \t]*\(\/\*\|\/\/\)[*/\\]*[ \t]*$' ) == 0
let initial = substitute( line, '^\([ \t]\)*\(\/\*\|\/\/\)\(.*\)', '\1\2', '' )
let initial = substitute( initial, '\t', ' ', 'g' )
let linenum = v:foldstart + 1
while linenum < v:foldend
let line = getline( linenum )
let comment_content = substitute( line, '^\([ \t\/\*]*\)\(.*\)$', '\2', 'g' )
if comment_content != ''
break
endif
let linenum = linenum + 1
endwhile
let sub = initial . ' ' . comment_content
else
let sub = substitute( line, '\t', repeat(' ', &tabstop), 'g' )
let startbrace = substitute( line, '^.*{[ \t]*$', '{', 'g')
if startbrace == '{'
let line = getline(v:foldend)
let endbrace = substitute( line, '^[ \t]*}\(.*\)$', '}', 'g')
if endbrace == '}'
let sub = sub.substitute( line, '^[ \t]*}\(.*\)$', '...}\1', 'g')
endif
endif
endif
let n = v:foldend - v:foldstart + 1
let info = " " . n . " lines"
let sub = sub . " "
let num_w = getwinvar( 0, '&number' ) * getwinvar( 0, '&numberwidth' )
let fold_w = getwinvar( 0, '&foldcolumn' )
let sub = strpart( sub, 0, winwidth(0) - strlen( info ) - num_w - fold_w - 1 )
return sub . info
endfunction
set foldtext=MyFoldText()
" misc deprecated stuff that i haven't the heart to delete _just yet_
" =====================================================================
" ctrlp {
" let g:ctrlp_match_window = 'top'
" let g:ctrlp_lazy_update = 1
" let g:ctrlp_custom_ignore = {
" \ 'dir': '\.git$\|\.hg$\|\.svn$',
" \ 'file': '\.exe$\|\.so$\|\.dll$' }
"
" let g:ctrlp_user_command = {
" \ 'types': {
" \ 1: ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'],
" \ 2: ['.hg', 'hg --cwd %s locate -I .'],
" \ },
" \ 'fallback': 'find %s -type f'
" \ }
" " Reuse already-open buffers? (Default: 'Et')
" let g:ctrlp_reuse_window = 'NERD'
"
" " per zerowidth
" let g:ctrlp_switch_buffer = 'etvh' " jump to buffers where they're already open in the current tab
" let g:ctrlp_use_caching = 1
" let g:ctrlp_max_files = 0 " no limits
" let g:ctrlp_mruf_relative = 1 " only relative MRU files (not cross-project)
" let g:ctrlp_working_path_mode = 'a'
" " map <Leader>t :CtrlPMixed<CR> # deprecated in favour or FZF
"}
"
""
"" STATUS
""
" superseded by airline, so commented out
" if has('cmdline_info')
" set ruler " show the ruler
" " a ruler on steroids
" set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%)
" set showcmd " show partial commands in status line and
" " selected characters/lines in visual mode
" endif
"" superseded by airline, so commented out
" if has('statusline')
" set laststatus=2
" " a statusline, also on steroids
" set statusline=%m
" set statusline+=%t
" set statusline+=%<\
" set statusline+=[%{strlen(&ft)?&ft:'none'},
" set statusline+=\ %{strlen(&fenc)?&fenc:'none'},
" set statusline+=\ %{&ff}]
" set statusline+=%=
" set statusline+=:\b%n
" set statusline+=%{fugitive#statusline()}
" set statusline+=%r%w\ %l,%c%V\ [%b,0x%-8B]
" set statusline+=%P
" endif