diff options
author | Max Christian Pohle | 2017-11-07 01:10:30 +0100 |
---|---|---|
committer | Max Christian Pohle | 2017-11-07 01:10:30 +0100 |
commit | 91bac4454a74d2af5176d25aafd0a3b4f8d205d8 (patch) | |
tree | 615063b7790cd048c3ad3b48054c95bb98ad98c9 /vimrc-full | |
parent | 23d6ff00522ba64eb54c60649b89f9043948ddbe (diff) | |
download | vim-karlmarks-91bac4454a74d2af5176d25aafd0a3b4f8d205d8.tar.bz2 vim-karlmarks-91bac4454a74d2af5176d25aafd0a3b4f8d205d8.zip |
Fancyfication for multiple server sessions
Diffstat (limited to 'vimrc-full')
-rw-r--r-- | vimrc-full | 69 |
1 files changed, 27 insertions, 42 deletions
@@ -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 | ||
307 | endif | 298 | endif |
@@ -670,6 +661,8 @@ endif | |||
670 | " ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ | 661 | " ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ |
671 | call plug#begin() | 662 | call plug#begin() |
672 | " Colorschemes: | 663 | " Colorschemes: |
664 | Plug 'coderonline/vim-remote-menu' | ||
665 | |||
673 | Plug 'chriskempson/base16-vim' | " not just one high quality color scheme (all named base16-*) | 666 | Plug 'chriskempson/base16-vim' | " not just one high quality color scheme (all named base16-*) |
674 | Plug 'NLKNguyen/papercolor-theme' | " the one I like the most | 667 | Plug 'NLKNguyen/papercolor-theme' | " the one I like the most |
675 | 668 | ||
@@ -741,19 +734,17 @@ nnoremap <F9> :TagbarToggle<CR>| " bind TagBar to hotkey F9 | |||
741 | set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split | 734 | set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split |
742 | 735 | ||
743 | Plug 'itchyny/lightline.vim' | 736 | Plug 'itchyny/lightline.vim' |
744 | Plug '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 |
748 | let g:lightline_buffer_logo = ' ' | 741 | let g:lightline_buffer_logo = '' |
749 | let g:lightline_buffer_readonly_icon = '' | 742 | let g:lightline_buffer_readonly_icon = '' |
750 | let g:lightline_buffer_modified_icon = '✭' | 743 | let g:lightline_buffer_modified_icon = '✭' |
751 | let g:lightline_buffer_git_icon = ' ' | 744 | let g:lightline_buffer_git_icon = ' ' |
752 | let g:lightline_buffer_ellipsis_icon = '..' | 745 | let g:lightline_buffer_ellipsis_icon = '..' |
753 | let g:lightline_buffer_expand_left_icon = '◀ ' | 746 | let g:lightline_buffer_active_buffer_left_icon = ' ' |
754 | let g:lightline_buffer_expand_right_icon = ' ▶' | 747 | let 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' ], ], |
772 | let g:lightline = { | 763 | let 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 | ||