From 3b630bfeb56c5154cc221bbfa0c08ff6f3161704 Mon Sep 17 00:00:00 2001 From: Rafael Bodill Date: Sat, 4 Nov 2017 17:14:28 +0200 Subject: [PATCH] Assorted changes - Add `WipeHiddenBuffers` command - Set GUI background, lines, columns --- README.md | 4 ++-- config/mappings.vim | 8 ++++++++ config/theme.vim | 6 ++++++ config/vimrc | 2 +- themes/rafi-2017.vim | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 49c4bc04c..3aaa2a8f6 100644 --- a/README.md +++ b/README.md @@ -225,8 +225,8 @@ Name | Description [MattesGroeger/vim-bookmarks] | Bookmarks, works independently from vim marks [rhysd/committia.vim] | Pleasant editing on Git commit messages [benekastah/neomake] | Asynchronous linting and make framework -[goyo] | Distraction-free writing -[limelight] | Hyperfocus-writing +[junegunn/goyo] | Distraction-free writing +[junegunn/limelight] | Hyperfocus-writing [itchyny/calendar.vim] | Calendar application [vimwiki/vimwiki] | Personal Wiki for Vim diff --git a/config/mappings.vim b/config/mappings.vim index 2cb188755..515916f5e 100644 --- a/config/mappings.vim +++ b/config/mappings.vim @@ -319,6 +319,14 @@ nnoremap [Window]x :call BufferEmpty() nnoremap [Window]sv :split:wincmd p:e# nnoremap [Window]sg :vsplit:wincmd p:e# +function! WipeHiddenBuffers() + let tpbl=[] + call map(range(1, tabpagenr('$')), 'extend(tpbl, tabpagebuflist(v:val))') + for buf in filter(range(1, bufnr('$')), 'bufexists(v:val) && index(tpbl, v:val)==-1') + silent execute 'bwipeout' buf + endfor +endfunction + function! s:BufferEmpty() " {{{ let l:current = bufnr('%') if ! getbufvar(l:current, '&modified') diff --git a/config/theme.vim b/config/theme.vim index 4792eb2f6..f7479dd82 100644 --- a/config/theme.vim +++ b/config/theme.vim @@ -10,6 +10,12 @@ if has('termguicolors') set termguicolors endif +if has('gui_running') + set background=dark + set lines=40 + set columns=150 +endif + function! s:theme_reload(name) let theme_path = $VIMPATH.'/themes/'.a:name.'.vim' if filereadable(theme_path) diff --git a/config/vimrc b/config/vimrc index 27066f303..856a3a526 100644 --- a/config/vimrc +++ b/config/vimrc @@ -26,7 +26,7 @@ endfunction function! s:dein_check_yaml2json() try - let result = system("yaml2json", "---\ntest: 1") + let result = system('yaml2json', "---\ntest: 1") if v:shell_error != 0 return 0 endif diff --git a/themes/rafi-2017.vim b/themes/rafi-2017.vim index afd60b666..d7ce38137 100644 --- a/themes/rafi-2017.vim +++ b/themes/rafi-2017.vim @@ -5,7 +5,7 @@ " gVim Appearance {{{ " --------------------------------------------------------- if has('gui_running') - set guifont=PragmataPro:h14 + set guifont=PragmataPro:h16 set noantialias endif " }}}