aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2017-06-11 13:48:46 +0200
committerMax Christian Pohle2017-06-11 13:48:46 +0200
commit3fa4250efa3ea2b614c346971ce016cfb6e5f054 (patch)
tree872884931501f810b76dacafdad6a673b607b4db
parentba00b66415e219a3a4ef0b469d9bc01eb83fc3b5 (diff)
downloadvim-3fa4250efa3ea2b614c346971ce016cfb6e5f054.tar.bz2
vim-3fa4250efa3ea2b614c346971ce016cfb6e5f054.zip
Made lightline fancier
-rw-r--r--vimrc-full140
1 files changed, 70 insertions, 70 deletions
diff --git a/vimrc-full b/vimrc-full
index df6f346..5e1b77b 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -167,44 +167,32 @@ set laststatus=2 | " required by AirLine,
167set background=light | 167set background=light |
168 168
169Plug 'itchyny/lightline.vim' 169Plug 'itchyny/lightline.vim'
170" let g:lightline = { 170Plug 'daviesjamie/vim-base16-lightline'
171" \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
172" \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" },
173" \ 'tabline': {
174" \ 'left': [ ['tabs'] ],
175" \ 'right': [ [ 'close' ] ]
176" \ }
177" \ }
178Plug 'taohex/lightline-buffer' 171Plug 'taohex/lightline-buffer'
179" use lightline-buffer in lightline 172
180let g:lightline = { 173" lightline-buffer ui settings
181 \ 'colorscheme': 'PaperColor_light', 174" replace these symbols with ascii characters if your environment does not support unicode
182 \ 'active': { 175let g:lightline_buffer_logo = ' '
183 \ 'left': [ [ 'mode', 'paste' ], 176let g:lightline_buffer_readonly_icon = ''
184 \ [ 'gitbranch', 'readonly' ] ], 177let g:lightline_buffer_modified_icon = '✭'
185 \ 'right': [ [ 'lineinfo' ], 178let g:lightline_buffer_git_icon = ' '
186 \ [ 'percent' ], 179let g:lightline_buffer_ellipsis_icon = '..'
187 \ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ] ], 180let g:lightline_buffer_expand_left_icon = '◀ '
188 \ }, 181let g:lightline_buffer_expand_right_icon = ' ▶'
189 \ 'tabline': { 182let g:lightline_buffer_active_buffer_left_icon = ''
190 \ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ], 183let g:lightline_buffer_active_buffer_right_icon = ''
191 \ 'right': [ [ 'close' ], ], 184let g:lightline_buffer_separator_icon = ' '
192 \ }, 185
193 \ 'component_expand': { 186" lightline-buffer function settings
194 \ 'buffercurrent': 'lightline#buffer#buffercurrent2', 187let g:lightline_buffer_show_bufnr = 1
195 \ }, 188let g:lightline_buffer_rotate = 0
196 \ 'component_type': { 189let g:lightline_buffer_fname_mod = ':t'
197 \ 'buffercurrent': 'tabsel', 190let g:lightline_buffer_excludes = ['vimfiler']
198 \ }, 191let g:lightline_buffer_maxflen = 30
199 \ 'component_function': { 192let g:lightline_buffer_maxfextlen = 3
200 \ 'bufferbefore': 'lightline#buffer#bufferbefore', 193let g:lightline_buffer_minflen = 16
201 \ 'bufferafter': 'lightline#buffer#bufferafter', 194let g:lightline_buffer_minfextlen = 3
202 \ 'bufferinfo': 'lightline#buffer#bufferinfo', 195let g:lightline_buffer_reservelen = 20
203 \ 'filetype': 'MyFiletype',
204 \ 'fileformat': 'MyFileformat',
205 \ 'gitbranch': 'fugitive#head',
206 \ },
207 \ }
208 196
209function! MyFiletype() 197function! MyFiletype()
210 return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' 198 return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : ''
@@ -214,33 +202,45 @@ function! MyFileformat()
214 return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : '' 202 return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : ''
215endfunction 203endfunction
216 204
205function! MyBranchname()
206 return winwidth(0) > 70 ? fugitive#statusline() : ''
207endfunction
208
209let g:lightline = {
210 \ 'colorscheme': 'wombat',
211 \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
212 \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" },
213 \ 'active': {
214 \ 'left': [ [ 'mode', 'paste' ],
215 \ [ 'gitbranch', 'readonly' ] ],
216 \ 'right': [ [ 'lineinfo' ],
217 \ [ 'percent' ],
218 \ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ] ],
219 \ },
220 \ 'tabline': {
221 \ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ],
222 \ 'right': [ [ 'close' ], ],
223 \ },
224 \ 'component_expand': {
225 \ 'buffercurrent': 'lightline#buffer#buffercurrent2',
226 \ },
227 \ 'component_type': {
228 \ 'buffercurrent': 'tabsel',
229 \ },
230 \ 'component_function': {
231 \ 'bufferbefore': 'lightline#buffer#bufferbefore',
232 \ 'bufferafter': 'lightline#buffer#bufferafter',
233 \ 'bufferinfo': 'lightline#buffer#bufferinfo',
234 \ 'filetype': 'MyFiletype',
235 \ 'fileformat': 'MyFileformat',
236 \ 'gitbranch': 'MyBranchname',
237 \ },
238 \ }
217 239
218 240
219 241
220" lightline-buffer ui settings
221" replace these symbols with ascii characters if your environment does not support unicode
222let g:lightline_buffer_logo = ' '
223let g:lightline_buffer_readonly_icon = ''
224let g:lightline_buffer_modified_icon = '✭'
225let g:lightline_buffer_git_icon = ' '
226let g:lightline_buffer_ellipsis_icon = '..'
227let g:lightline_buffer_expand_left_icon = '◀ '
228let g:lightline_buffer_expand_right_icon = ' ▶'
229let g:lightline_buffer_active_buffer_left_icon = ''
230let g:lightline_buffer_active_buffer_right_icon = ''
231let g:lightline_buffer_separator_icon = ' '
232 242
233" lightline-buffer function settings
234let g:lightline_buffer_show_bufnr = 1
235let g:lightline_buffer_rotate = 0
236let g:lightline_buffer_fname_mod = ':t'
237let g:lightline_buffer_excludes = ['vimfiler']
238 243
239let g:lightline_buffer_maxflen = 30
240let g:lightline_buffer_maxfextlen = 3
241let g:lightline_buffer_minflen = 16
242let g:lightline_buffer_minfextlen = 3
243let g:lightline_buffer_reservelen = 20
244 244
245 245
246 246
@@ -253,7 +253,7 @@ let g:lightline_buffer_reservelen = 20
253" let g:airline_powerline_fonts = 1 | 253" let g:airline_powerline_fonts = 1 |
254" let g:airline_skip_empty_sections = 1 | 254" let g:airline_skip_empty_sections = 1 |
255" let g:airline_extensions = [] | 255" let g:airline_extensions = [] |
256" 256"
257" let g:airline#extensions#tabline#enabled = 1 | 257" let g:airline#extensions#tabline#enabled = 1 |
258" let g:airline#extensions#tabline#left_alt_sep = '' | 258" let g:airline#extensions#tabline#left_alt_sep = '' |
259" let g:airline#extensions#tabline#left_sep = '' | 259" let g:airline#extensions#tabline#left_sep = '' |
@@ -265,19 +265,19 @@ let g:lightline_buffer_reservelen = 20
265" let g:airline#extensions#tabline#show_buffers = 1 | 265" let g:airline#extensions#tabline#show_buffers = 1 |
266" let g:airline#extensions#tabline#show_tabs = 0 | 266" let g:airline#extensions#tabline#show_tabs = 0 |
267" let g:airline#extensions#tabline#ignore_bufadd_pat = '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree|preview|^$' 267" let g:airline#extensions#tabline#ignore_bufadd_pat = '\c\vgundo|undotree|vimfiler|tagbar|nerd_tree|preview|^$'
268" 268"
269" let g:airline_extensions#branch#enabled = 1 | 269" let g:airline_extensions#branch#enabled = 1 |
270" let g:airline_extensions#whitespace#enabled = 0 | " airlines whitespace check is slow :/ 270" let g:airline_extensions#whitespace#enabled = 0 | " airlines whitespace check is slow :/
271" let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file'] 271" let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file']
272" 272"
273" if has('python') 273" if has('python')
274" let g:airline_extensions#syntastic#enabled = 1 | 274" let g:airline_extensions#syntastic#enabled = 1 |
275" let g:airline_extensions#ycm#enabled = 1 | 275" let g:airline_extensions#ycm#enabled = 1 |
276" endif 276" endif
277" 277"
278" let g:airline#extensions#tagbar#flags = 'f' | " even though the airline extension is off this controls :h tagbar-extend 278" let g:airline#extensions#tagbar#flags = 'f' | " even though the airline extension is off this controls :h tagbar-extend
279" let g:airline#extensions#tagbar#enabled = 0 | 279" let g:airline#extensions#tagbar#enabled = 0 |
280" 280"
281" " AIRLINE_Theme: 281" " AIRLINE_Theme:
282" Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme 282" Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme
283" let base16colorspace=256 | 283" let base16colorspace=256 |
@@ -329,7 +329,7 @@ if has("python")
329 let g:syntastic_check_on_open = 1 329 let g:syntastic_check_on_open = 1
330 let g:syntastic_check_on_wq = 0 330 let g:syntastic_check_on_wq = 0
331 " let g:syntastic_quiet_messages = {"type":"style"} 331 " let g:syntastic_quiet_messages = {"type":"style"}
332 " 332 "
333 " E221: multiple spaces before Operator 333 " E221: multiple spaces before Operator
334 let g:syntastic_python_flake8_args = '--max-complexity=10 --max-line-length=120 --exclude venv --doctests --exit-zero --ignore=E221' 334 let g:syntastic_python_flake8_args = '--max-complexity=10 --max-line-length=120 --exclude venv --doctests --exit-zero --ignore=E221'
335 " filter ( = do not display) style/formatting errors and warnings 335 " filter ( = do not display) style/formatting errors and warnings
@@ -388,7 +388,7 @@ function! ExtendColorTheme()
388 " highlight Normal ctermbg=NONE ctermfg=black 388 " highlight Normal ctermbg=NONE ctermfg=black
389 389
390 highlight! CursorLineNr cterm=inverse | " ctermbg=black ctermfg=NONE 390 highlight! CursorLineNr cterm=inverse | " ctermbg=black ctermfg=NONE
391 highlight! Pmenu ctermbg=LightYellow ctermfg=blue 391 highlight! Pmenu ctermbg=LightYellow ctermfg=blue
392 highlight! PmenuSel ctermbg=blue ctermfg=LightYellow cterm=bold 392 highlight! PmenuSel ctermbg=blue ctermfg=LightYellow cterm=bold
393 393
394 highlight! link PmenuSbar Pmenu 394 highlight! link PmenuSbar Pmenu
@@ -519,7 +519,7 @@ if !has('nvim') | " settings which have been removed from neovim
519 set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim 519 set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim
520 set ttyfast | " improves speed for terminal vim (incomp. with nvim) 520 set ttyfast | " improves speed for terminal vim (incomp. with nvim)
521 " set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim 521 " set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim
522 " 522 "
523 let g:loaded_ruby_provider = 1 " disable ruby support 523 let g:loaded_ruby_provider = 1 " disable ruby support
524 let g:loaded_python_provider = 1 " disable pthon3 524 let g:loaded_python_provider = 1 " disable pthon3
525endif 525endif
@@ -661,7 +661,7 @@ if has("autocmd")
661 let @q = ":cex [] | bufdo vimgrepadd /foo/g % | cw" 661 let @q = ":cex [] | bufdo vimgrepadd /foo/g % | cw"
662 662
663 " change to the current working directory (p like pwd) 663 " change to the current working directory (p like pwd)
664 let @p = ":lcd %:p:h" 664 let @p = ":lcd %:p:h"
665 665
666 let @l = ":let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}|:SignifyRefresh" 666 let @l = ":let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}|:SignifyRefresh"
667 667
@@ -710,8 +710,8 @@ nnoremap <leader>r :syntax sync fromstart
710" INSERT_MODE_MAPPINGS: 710" INSERT_MODE_MAPPINGS:
711" default copy&paste insert key binding (just in insert mode, so it doesn't conflict 711" default copy&paste insert key binding (just in insert mode, so it doesn't conflict
712" with visual block mode)- would have been nice, but collides with c-w for digraphs 712" with visual block mode)- would have been nice, but collides with c-w for digraphs
713" inoremap <C-V> <C-R>+ 713" inoremap <C-V> <C-R>+
714" 714"
715inoremap <C-S> <C-O>:w<CR> 715inoremap <C-S> <C-O>:w<CR>
716 716
717" NEOVIM_SPECIFIC: 717" NEOVIM_SPECIFIC:
..