aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2017-11-07 01:10:30 +0100
committerMax Christian Pohle2017-11-07 01:10:30 +0100
commit91bac4454a74d2af5176d25aafd0a3b4f8d205d8 (patch)
tree615063b7790cd048c3ad3b48054c95bb98ad98c9
parent23d6ff00522ba64eb54c60649b89f9043948ddbe (diff)
downloadvim-91bac4454a74d2af5176d25aafd0a3b4f8d205d8.tar.bz2
vim-91bac4454a74d2af5176d25aafd0a3b4f8d205d8.zip
Fancyfication for multiple server sessions
-rw-r--r--vimrc-full69
1 files changed, 27 insertions, 42 deletions
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")
150 150
151 151
152 " its possible to define alternative fonts (order matters) 152 " its possible to define alternative fonts (order matters)
153 set guifont= 153 set guifont=Hasklug\ Nerd\ Font\ Mono\ Semi-Bold\ 10
154 set guifont=Hasklig\ Semi-Bold\ 10 154 set guifont+=Hasklig\ Semi-Bold\ 10
155 set guifont+=Hasklug\ Nerd\ Font\ Mono\ Semi-Bold\ 10 155 set guifont+=Bitstream\ Vera\ Sans\ Mono\ 10
156 set guifont+=Monospace\ 10
156 set guifont+=FuraMono\ Nerd\ Font\ Mono\ Medium\ 11 157 set guifont+=FuraMono\ Nerd\ Font\ Mono\ Medium\ 11
157 set guifont+=Source\ Code\ Pro\ for\ Powerline\ SemiBold\ 10 158 set guifont+=Source\ Code\ Pro\ for\ Powerline\ SemiBold\ 10
158 set guifont+=LiterationMono\ Nerd\ Font\ Mono\ 10 159 set guifont+=LiterationMono\ Nerd\ Font\ Mono\ 10
@@ -287,21 +288,11 @@ else " default Vim?
287 autocmd BufWinLeave * call clearmatches() 288 autocmd BufWinLeave * call clearmatches()
288 endif 289 endif
289 290
290 function! Refresh_server_list()
291 silent! unmenu! UI
292 menu &UI.refresh\ server\ list :call Refresh_server_list()<CR>
293 menu &UI.-Sep1- :
294 for s in split(serverlist(), '\n')
295 if v:servername != s
296 execute ':menu &UI.&Open\ in\ '.s." :execute \":bd<Bar>:call remote_send('".s."', ':e ' . expand('#:p') . '\\<CR\\>')<Bar>:call remote_foreground('".s."')\"<CR>"
297 endif
298 endfor
299 endfunction
300 autocmd! VimEnter * call Refresh_server_list()
301 291
302 " scripts from the default vim installation, which do not get loaded by default, but are useful. 292 " scripts from the default vim installation, which do not get loaded by default, but are useful.
303 if filereadable($VIMRUNTIME.'/macros/editexisting.vim') 293 if filereadable($VIMRUNTIME.'/macros/editexisting.vim')
304 packadd! editexisting 294 packadd! editexisting
295
305 endif 296 endif
306 297
307endif 298endif
@@ -670,6 +661,8 @@ endif
670" ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 661" ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
671call plug#begin() 662call plug#begin()
672" Colorschemes: 663" Colorschemes:
664Plug 'coderonline/vim-remote-menu'
665
673Plug 'chriskempson/base16-vim' | " not just one high quality color scheme (all named base16-*) 666Plug 'chriskempson/base16-vim' | " not just one high quality color scheme (all named base16-*)
674Plug 'NLKNguyen/papercolor-theme' | " the one I like the most 667Plug 'NLKNguyen/papercolor-theme' | " the one I like the most
675 668
@@ -741,19 +734,17 @@ nnoremap <F9> :TagbarToggle<CR>| " bind TagBar to hotkey F9
741set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split 734set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split
742 735
743Plug 'itchyny/lightline.vim' 736Plug 'itchyny/lightline.vim'
744Plug 'taohex/lightline-buffer' 737" Plug 'taohex/lightline-buffer'
745 738
746" lightline-buffer ui settings 739" lightline-buffer ui settings
747" replace these symbols with ascii characters if your environment does not support unicode 740" replace these symbols with ascii characters if your environment does not support unicode
748let g:lightline_buffer_logo = ' ' 741let g:lightline_buffer_logo = ''
749let g:lightline_buffer_readonly_icon = '' 742let g:lightline_buffer_readonly_icon = ''
750let g:lightline_buffer_modified_icon = '✭' 743let g:lightline_buffer_modified_icon = '✭'
751let g:lightline_buffer_git_icon = ' ' 744let g:lightline_buffer_git_icon = ' '
752let g:lightline_buffer_ellipsis_icon = '..' 745let g:lightline_buffer_ellipsis_icon = '..'
753let g:lightline_buffer_expand_left_icon = '◀ ' 746let g:lightline_buffer_active_buffer_left_icon = ' '
754let g:lightline_buffer_expand_right_icon = ' ▶' 747let g:lightline_buffer_active_buffer_right_icon = ''
755" let g:lightline_buffer_active_buffer_left_icon = ' '
756" let g:lightline_buffer_active_buffer_right_icon = ''
757" let g:lightline_buffer_separator_icon = 'XX' 748" let g:lightline_buffer_separator_icon = 'XX'
758 749
759" lightline-buffer function settings 750" lightline-buffer function settings
@@ -771,31 +762,27 @@ let g:lightline_buffer_reservelen = 20
771" \ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ], 762" \ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ],
772let g:lightline = { 763let g:lightline = {
773 \ 'tabline': { 764 \ 'tabline': {
774 \ 'left': [ [ 'bufferinfo', 'absolutepath' ] ], 765 \ 'left': [ [ 'servername' ], ['gitbranch', 'absolutepath'] ],
775 \ 'right': [ [], [ 'buffer_alt' ] ], 766 \ 'right': [ [], ['tabnumber'], ],
776 \ }, 767 \ },
777 \ 'colorscheme': 'Tomorrow_Night', 768 \ 'colorscheme': 'Tomorrow_Night',
778 \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, 769 \ 'separator': { 'left': "\uE0B4", 'right': "\uE0B6" },
779 \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }, 770 \ 'subseparator': { 'left': "\uE0b1", 'right': "\uE0b3" },
780 \ 'inactive': { 771 \ 'inactive': {
781 \ 'left': [ ['gitbranch', 'filename'] ], 772 \ 'left': [ ['filename'] ],
782 \ 'right': [ [ 'percent', 'lineinfo' ], 773 \ 'right': []
783 \ [ 'spell', 'fileencoding', 'fileformat', 'filetype' ]
784 \ ]
785 \ }, 774 \ },
786 \ 'active': { 775 \ 'active': {
787 \ 'left': [ [ 'mode', 'paste', 'readonly' ], 776 \ 'left': [ [ 'mode', 'paste' ], ['filetype'], [ 'tagbar' ] ],
788 \ [ 'gitbranch', 'filename' ], 777 \ 'right': [ [ 'lineinfo', 'percent' ], [ 'readonly', 'spell', 'fileencoding', 'fileformat' ] ]
789 \ [ 'tagbar' ] ],
790 \ 'right': [ [ 'percent', 'lineinfo' ],
791 \ [ 'spell', 'fileencoding', 'fileformat', 'filetype' ]
792 \ ]
793 \ }, 778 \ },
794 \ 'component': { 779 \ 'component': {
795 \ 'tagbar': '%{substitute(tagbar#currenttag("%s", "", "fs"), "\(.*\)", "", "")}', 780 \ 'tagbar': '%{substitute(tagbar#currenttag("%s", "", "fs"), "\(.*\)", "", "")}',
796 \ 'ycmparent': '%{substitute(execute("YcmComplete GetParent"), "\(.*\)", "", "")}', 781 \ 'ycmparent': '%{substitute(execute("YcmComplete GetParent"), "\(.*\)", "", "")}',
797 \ 'filename': '%t', 782 \ 'filename': '%t',
798 \ 'buffer_alt': '#:%{expand("#:t")}' 783 \ 'buffer_alt': '%{expand("#:t")}',
784 \ 'servername': ' %{v:servername} %{v:this_session}',
785 \ 'tabnumber': '%{tabpagenr()}/%{tabpagenr("$")}'
799 \ }, 786 \ },
800 \ 'component_expand': { 787 \ 'component_expand': {
801 \ 'buffercurrent': 'lightline#buffer#buffercurrent2', 788 \ 'buffercurrent': 'lightline#buffer#buffercurrent2',
@@ -803,15 +790,13 @@ let g:lightline = {
803 \ }, 790 \ },
804 \ 'component_type': { 791 \ 'component_type': {
805 \ 'buffercurrent': 'tabsel', 792 \ 'buffercurrent': 'tabsel',
793 \ 'tagbar': 'tabsel',
806 \ }, 794 \ },
807 \ 'component_function': { 795 \ 'component_function': {
808 \ 'bufferbefore': 'lightline#buffer#bufferbefore',
809 \ 'bufferafter': 'lightline#buffer#bufferafter',
810 \ 'bufferinfo': 'lightline#buffer#bufferinfo', 796 \ 'bufferinfo': 'lightline#buffer#bufferinfo',
811 \ 'gitbranch': 'fugitive#head', 797 \ 'gitbranch': 'fugitive#head',
812 \ 'foo': 'YcmComplete.GetType',
813 \ 'warnings': 'youcompleteme#GetWarningCount', 798 \ 'warnings': 'youcompleteme#GetWarningCount',
814 \ 'errors': 'youcompleteme#GetErrorCount' 799 \ 'errors': 'youcompleteme#GetErrorCount',
815 \ }, 800 \ },
816 \ } 801 \ }
817 802
..