From 91bac4454a74d2af5176d25aafd0a3b4f8d205d8 Mon Sep 17 00:00:00 2001
From: Max Christian Pohle
Date: Tue, 7 Nov 2017 01:10:30 +0100
Subject: Fancyfication for multiple server sessions

---
 vimrc-full | 69 ++++++++++++++++++++++++--------------------------------------
 1 file changed, 27 insertions(+), 42 deletions(-)

(limited to 'vimrc-full')

diff --git a/vimrc-full b/vimrc-full
index 6b26e61..7a0620e 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -150,9 +150,10 @@ if has("gui_running")
 
 
   " its possible to define alternative fonts (order matters)
-  set guifont=
-  set guifont=Hasklig\ Semi-Bold\ 10
-  set guifont+=Hasklug\ Nerd\ Font\ Mono\ Semi-Bold\ 10
+  set guifont=Hasklug\ Nerd\ Font\ Mono\ Semi-Bold\ 10
+  set guifont+=Hasklig\ Semi-Bold\ 10
+  set guifont+=Bitstream\ Vera\ Sans\ Mono\ 10
+  set guifont+=Monospace\ 10
   set guifont+=FuraMono\ Nerd\ Font\ Mono\ Medium\ 11
   set guifont+=Source\ Code\ Pro\ for\ Powerline\ SemiBold\ 10
   set guifont+=LiterationMono\ Nerd\ Font\ Mono\ 10
@@ -287,21 +288,11 @@ else           " default Vim?
     autocmd BufWinLeave * call clearmatches()
   endif
 
-  function! Refresh_server_list()
-    silent! unmenu! UI
-    menu &UI.refresh\ server\ list :call Refresh_server_list()<CR>
-    menu &UI.-Sep1- :
-    for s in split(serverlist(), '\n')
-      if v:servername != s
-        execute ':menu &UI.&Open\ in\ '.s." :execute \":bd<Bar>:call remote_send('".s."', ':e ' . expand('#:p')  . '\\<CR\\>')<Bar>:call remote_foreground('".s."')\"<CR>"
-      endif
-    endfor
-  endfunction
-  autocmd! VimEnter * call Refresh_server_list()
 
   " scripts from the default vim installation, which do not get loaded by default, but are useful.
   if filereadable($VIMRUNTIME.'/macros/editexisting.vim')
     packadd! editexisting
+
   endif
 
 endif
@@ -670,6 +661,8 @@ endif
 " ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
 call plug#begin()
 " Colorschemes:
+Plug 'coderonline/vim-remote-menu'
+
 Plug 'chriskempson/base16-vim'        | " not just one high quality color scheme (all named base16-*)
 Plug 'NLKNguyen/papercolor-theme'     | " the one I like the most
 
@@ -741,19 +734,17 @@ nnoremap <F9> :TagbarToggle<CR>| " bind TagBar to hotkey F9
 set laststatus=2  | " required by AirLine and Lightline, without status line does not appear until a window split
 
 Plug 'itchyny/lightline.vim'
-Plug 'taohex/lightline-buffer'
+" Plug 'taohex/lightline-buffer'
 
 " lightline-buffer ui settings
 " replace these symbols with ascii characters if your environment does not support unicode
-let g:lightline_buffer_logo                     = '  '
+let g:lightline_buffer_logo                     = ''
 let g:lightline_buffer_readonly_icon            = ''
 let g:lightline_buffer_modified_icon            = '✭'
 let g:lightline_buffer_git_icon                 = ' '
 let g:lightline_buffer_ellipsis_icon            = '..'
-let g:lightline_buffer_expand_left_icon         = '◀ '
-let g:lightline_buffer_expand_right_icon        = ' ▶'
-" let g:lightline_buffer_active_buffer_left_icon  = ' '
-" let g:lightline_buffer_active_buffer_right_icon = ''
+let g:lightline_buffer_active_buffer_left_icon  = ' '
+let g:lightline_buffer_active_buffer_right_icon = ''
 " let g:lightline_buffer_separator_icon           = 'XX'
 
 " lightline-buffer function settings
@@ -771,31 +762,27 @@ let g:lightline_buffer_reservelen               = 20
 "    \     'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ],
 let g:lightline = {
     \   'tabline': {
-    \     'left': [ [ 'bufferinfo', 'absolutepath' ] ],
-    \     'right': [ [], [ 'buffer_alt' ] ],
+    \     'left': [ [ 'servername' ], ['gitbranch', 'absolutepath'] ],
+    \     'right': [ [], ['tabnumber'],  ],
     \   },
     \   'colorscheme': 'Tomorrow_Night',
-    \   'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
-    \   'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" },
+    \   'separator': { 'left': "\uE0B4", 'right': "\uE0B6" },
+    \   'subseparator': { 'left': "\uE0b1", 'right': "\uE0b3" },
     \   'inactive': {
-    \     'left': [ ['gitbranch', 'filename'] ],
-    \     'right': [ [ 'percent', 'lineinfo' ],
-    \                [ 'spell', 'fileencoding', 'fileformat', 'filetype' ]
-    \              ]
+    \     'left': [ ['filename'] ],
+    \     'right': []
     \   },
     \   'active': {
-    \     'left': [ [ 'mode', 'paste', 'readonly' ],
-    \               [ 'gitbranch', 'filename' ],
-    \               [ 'tagbar' ] ],
-    \     'right': [ [ 'percent', 'lineinfo' ],
-    \                [ 'spell', 'fileencoding', 'fileformat', 'filetype' ]
-    \              ]
+    \     'left': [ [ 'mode', 'paste'  ], ['filetype'], [ 'tagbar' ] ],
+    \     'right': [ [ 'lineinfo', 'percent' ], [ 'readonly', 'spell', 'fileencoding', 'fileformat' ] ]
     \   },
     \   'component': {
-    \           'tagbar': '%{substitute(tagbar#currenttag("%s", "", "fs"), "\(.*\)", "", "")}',
-    \           'ycmparent': '%{substitute(execute("YcmComplete GetParent"), "\(.*\)", "", "")}',
-    \           'filename': '%t',
-    \           'buffer_alt': '#:%{expand("#:t")}'
+    \     'tagbar': '%{substitute(tagbar#currenttag("%s", "", "fs"), "\(.*\)", "", "")}',
+    \     'ycmparent': '%{substitute(execute("YcmComplete GetParent"), "\(.*\)", "", "")}',
+    \     'filename': '%t',
+    \     'buffer_alt': '%{expand("#:t")}',
+    \     'servername': ' %{v:servername} %{v:this_session}',
+    \     'tabnumber': '%{tabpagenr()}/%{tabpagenr("$")}'
     \   },
     \   'component_expand': {
     \     'buffercurrent': 'lightline#buffer#buffercurrent2',
@@ -803,15 +790,13 @@ let g:lightline = {
     \   },
     \   'component_type': {
     \     'buffercurrent': 'tabsel',
+    \     'tagbar': 'tabsel',
     \   },
     \   'component_function': {
-    \     'bufferbefore': 'lightline#buffer#bufferbefore',
-    \     'bufferafter': 'lightline#buffer#bufferafter',
     \     'bufferinfo': 'lightline#buffer#bufferinfo',
     \     'gitbranch': 'fugitive#head',
-    \     'foo': 'YcmComplete.GetType',
     \     'warnings': 'youcompleteme#GetWarningCount',
-    \     'errors': 'youcompleteme#GetErrorCount'
+    \     'errors': 'youcompleteme#GetErrorCount',
     \   },
     \ }
 
-- 
cgit v1.2.3