Show highlight groups in status line
02ec232c0d3a8ce5a7343599f805079c961b5018
1 parent
0f12f17e
.vimrc
+9 -1
| 49 | 49 | set gdefault " Always use /g with %s/ |
|
| 50 | 50 | set colorcolumn=80 |
|
| 51 | 51 | set list |
|
| 52 | 52 | set listchars=tab:·\ ,eol:¬,trail:█ |
|
| 53 | 53 | set lazyredraw " Stop vim from freaking out all the time |
|
| 54 | - | set statusline=%<%f\ %h%m%r%=%y\ \ %-14(%{&sw}:%{&sts}:%{&ts}%)%-14.(%l,%c%V%)\ %P |
|
| 54 | + | set statusline=%<%f\ %h%m%r%=%{Hi()}\ %y\ \ %-14(%{&sw}:%{&sts}:%{&ts}%)%-14.(%l,%c%V%)\ %P |
|
| 55 | 55 | ||
| 56 | 56 | " We don't use tabs much, but at least try and show less cruft |
|
| 57 | 57 | function! Tabline() |
|
| 58 | 58 | let s = '' |
|
| 59 | 59 | for i in range(tabpagenr('$')) |
| 238 | 238 | function! s:ProfileStop() |
|
| 239 | 239 | profile stop |
|
| 240 | 240 | tabnew profile |
|
| 241 | 241 | endfunction |
|
| 242 | 242 | ||
| 243 | + | " Get highlight group under cursor |
|
| 244 | + | function! Hi() |
|
| 245 | + | if exists('g:show_hi') |
|
| 246 | + | return synIDattr(synID(line("."), col("."), 1), "name") |
|
| 247 | + | endif |
|
| 248 | + | return '' |
|
| 249 | + | endfunction |
|
| 250 | + | ||
| 243 | 251 | call plug#begin() |
|
| 244 | 252 | ||
| 245 | 253 | Plug 'scrooloose/nerdcommenter' |
|
| 246 | 254 | Plug 'airblade/vim-gitgutter' |
|
| 247 | 255 | Plug 'tpope/vim-fugitive' |