diff options
author | Max Christian Pohle | 2017-06-11 10:50:50 +0200 |
---|---|---|
committer | Max Christian Pohle | 2017-06-11 10:50:50 +0200 |
commit | ba00b66415e219a3a4ef0b469d9bc01eb83fc3b5 (patch) | |
tree | 3fabb2d6cd8e258e03bb814369a168cd6b5d08e0 | |
parent | 79655830d8c1daf866697c33ad07ce3b4b4ad920 (diff) | |
download | vim-karlmarks-ba00b66415e219a3a4ef0b469d9bc01eb83fc3b5.tar.bz2 vim-karlmarks-ba00b66415e219a3a4ef0b469d9bc01eb83fc3b5.zip |
Fancier lightline
-rw-r--r-- | vimrc-full | 98 | ||||
-rw-r--r-- | ycm_extra_conf.py | 27 |
2 files changed, 78 insertions, 47 deletions
@@ -167,25 +167,82 @@ set laststatus=2 | " required by AirLine, | |||
167 | set background=light | | 167 | set background=light | |
168 | 168 | ||
169 | Plug 'itchyny/lightline.vim' | 169 | Plug 'itchyny/lightline.vim' |
170 | " let g:lightline = { | ||
171 | " \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, | ||
172 | " \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }, | ||
173 | " \ 'tabline': { | ||
174 | " \ 'left': [ ['tabs'] ], | ||
175 | " \ 'right': [ [ 'close' ] ] | ||
176 | " \ } | ||
177 | " \ } | ||
178 | Plug 'taohex/lightline-buffer' | ||
179 | " use lightline-buffer in lightline | ||
170 | let g:lightline = { | 180 | let g:lightline = { |
171 | \ 'colorscheme': 'PaperColor_light', | 181 | \ 'colorscheme': 'PaperColor_light', |
172 | \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, | 182 | \ 'active': { |
173 | \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }, | 183 | \ 'left': [ [ 'mode', 'paste' ], |
174 | \ 'active': { | 184 | \ [ 'gitbranch', 'readonly' ] ], |
175 | \ 'left': [ [ 'mode', 'paste' ], | 185 | \ 'right': [ [ 'lineinfo' ], |
176 | \ [ 'gitbranch', 'readonly' ] ], | 186 | \ [ 'percent' ], |
177 | \ 'right': [ [ 'lineinfo' ], | 187 | \ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ] ], |
178 | \ [ 'percent' ], | 188 | \ }, |
179 | \ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ] ] | 189 | \ 'tabline': { |
180 | \ }, | 190 | \ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ], |
181 | \ 'component_function': { | 191 | \ 'right': [ [ 'close' ], ], |
182 | \ 'gitbranch': 'fugitive#head' | 192 | \ }, |
183 | \ }, | 193 | \ 'component_expand': { |
184 | \ 'tabline': { | 194 | \ 'buffercurrent': 'lightline#buffer#buffercurrent2', |
185 | \ 'left': [ ['tabs'] ], | 195 | \ }, |
186 | \ 'right': [ [ 'close' ] ] | 196 | \ 'component_type': { |
187 | \ } | 197 | \ 'buffercurrent': 'tabsel', |
188 | \ } | 198 | \ }, |
199 | \ 'component_function': { | ||
200 | \ 'bufferbefore': 'lightline#buffer#bufferbefore', | ||
201 | \ 'bufferafter': 'lightline#buffer#bufferafter', | ||
202 | \ 'bufferinfo': 'lightline#buffer#bufferinfo', | ||
203 | \ 'filetype': 'MyFiletype', | ||
204 | \ 'fileformat': 'MyFileformat', | ||
205 | \ 'gitbranch': 'fugitive#head', | ||
206 | \ }, | ||
207 | \ } | ||
208 | |||
209 | function! MyFiletype() | ||
210 | return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' | ||
211 | endfunction | ||
212 | |||
213 | function! MyFileformat() | ||
214 | return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : '' | ||
215 | endfunction | ||
216 | |||
217 | |||
218 | |||
219 | |||
220 | " lightline-buffer ui settings | ||
221 | " replace these symbols with ascii characters if your environment does not support unicode | ||
222 | let g:lightline_buffer_logo = ' ' | ||
223 | let g:lightline_buffer_readonly_icon = '' | ||
224 | let g:lightline_buffer_modified_icon = '✭' | ||
225 | let g:lightline_buffer_git_icon = ' ' | ||
226 | let g:lightline_buffer_ellipsis_icon = '..' | ||
227 | let g:lightline_buffer_expand_left_icon = '◀ ' | ||
228 | let g:lightline_buffer_expand_right_icon = ' ▶' | ||
229 | let g:lightline_buffer_active_buffer_left_icon = '' | ||
230 | let g:lightline_buffer_active_buffer_right_icon = '' | ||
231 | let g:lightline_buffer_separator_icon = ' ' | ||
232 | |||
233 | " lightline-buffer function settings | ||
234 | let g:lightline_buffer_show_bufnr = 1 | ||
235 | let g:lightline_buffer_rotate = 0 | ||
236 | let g:lightline_buffer_fname_mod = ':t' | ||
237 | let g:lightline_buffer_excludes = ['vimfiler'] | ||
238 | |||
239 | let g:lightline_buffer_maxflen = 30 | ||
240 | let g:lightline_buffer_maxfextlen = 3 | ||
241 | let g:lightline_buffer_minflen = 16 | ||
242 | let g:lightline_buffer_minfextlen = 3 | ||
243 | let g:lightline_buffer_reservelen = 20 | ||
244 | |||
245 | |||
189 | 246 | ||
190 | " Plug 'vim-airline/vim-airline' | " beautification of the mode line | 247 | " Plug 'vim-airline/vim-airline' | " beautification of the mode line |
191 | " let g:airline_section_c = "%F" | " was: %F | 248 | " let g:airline_section_c = "%F" | " was: %F |
@@ -652,8 +709,9 @@ nnoremap <leader>r :syntax sync fromstart | |||
652 | 709 | ||
653 | " INSERT_MODE_MAPPINGS: | 710 | " INSERT_MODE_MAPPINGS: |
654 | " 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 |
655 | " with visual block mode). | 712 | " with visual block mode)- would have been nice, but collides with c-w for digraphs |
656 | inoremap <C-V> <C-R>+ | 713 | " inoremap <C-V> <C-R>+ |
714 | " | ||
657 | inoremap <C-S> <C-O>:w<CR> | 715 | inoremap <C-S> <C-O>:w<CR> |
658 | 716 | ||
659 | " NEOVIM_SPECIFIC: | 717 | " NEOVIM_SPECIFIC: |
diff --git a/ycm_extra_conf.py b/ycm_extra_conf.py index 3c2b399..7a1828f 100644 --- a/ycm_extra_conf.py +++ b/ycm_extra_conf.py | |||
@@ -1,4 +1,3 @@ | |||
1 | <<<<<<< Updated upstream | ||
2 | def FlagsForFile(filename, **kwargs): | 1 | def FlagsForFile(filename, **kwargs): |
3 | return { | 2 | return { |
4 | 'flags': [ | 3 | 'flags': [ |
@@ -20,29 +19,3 @@ def FlagsForFile(filename, **kwargs): | |||
20 | } | 19 | } |
21 | 20 | ||
22 | # vim:set et sw=4 ts=4 tw=120: | 21 | # vim:set et sw=4 ts=4 tw=120: |
23 | ======= | ||
24 | import os | ||
25 | import ycm_core | ||
26 | |||
27 | def FlagsForFile( filename, **kwargs ): | ||
28 | return { | ||
29 | 'flags': [ | ||
30 | '-Wall', | ||
31 | '-Wextra', | ||
32 | '-Werror', | ||
33 | '-Wno-long-long', | ||
34 | '-Wno-variadic-macros', | ||
35 | '-fexceptions', | ||
36 | '-ferror-limit=10000', | ||
37 | '-DNDEBUG', | ||
38 | '-std=c99', | ||
39 | '-x', 'c', | ||
40 | '-D_GNU_SOURCE', | ||
41 | '-I.', | ||
42 | '-I', '/usr/include/' | ||
43 | ], | ||
44 | 'do_cache': True, | ||
45 | } | ||
46 | |||
47 | # vim:set et sw=2 ts=2 tw=120: | ||
48 | >>>>>>> Stashed changes | ||