aboutsummaryrefslogtreecommitdiff
path: root/vimrc-full
diff options
context:
space:
mode:
Diffstat (limited to 'vimrc-full')
-rw-r--r--vimrc-full98
1 files changed, 78 insertions, 20 deletions
diff --git a/vimrc-full b/vimrc-full
index 50d5c25..df6f346 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -167,25 +167,82 @@ 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 = {
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'
179" use lightline-buffer in lightline
170let g:lightline = { 180let 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
209function! MyFiletype()
210 return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : ''
211endfunction
212
213function! MyFileformat()
214 return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : ''
215endfunction
216
217
218
219
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
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
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
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
656inoremap <C-V> <C-R>+ 713" inoremap <C-V> <C-R>+
714"
657inoremap <C-S> <C-O>:w<CR> 715inoremap <C-S> <C-O>:w<CR>
658 716
659" NEOVIM_SPECIFIC: 717" NEOVIM_SPECIFIC:
..