Skip to content

Commit

Permalink
Assorted changes
Browse files Browse the repository at this point in the history
- Add `WipeHiddenBuffers` command
- Set GUI background, lines, columns
  • Loading branch information
rafi committed Nov 4, 2017
1 parent c1dba7f commit 3b630bf
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions config/mappings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,14 @@ nnoremap <silent> [Window]x :<C-u>call <SID>BufferEmpty()<CR>
nnoremap <silent> [Window]sv :split<CR>:wincmd p<CR>:e#<CR>
nnoremap <silent> [Window]sg :vsplit<CR>:wincmd p<CR>:e#<CR>
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')
Expand Down
6 changes: 6 additions & 0 deletions config/theme.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion config/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion themes/rafi-2017.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
" gVim Appearance {{{
" ---------------------------------------------------------
if has('gui_running')
set guifont=PragmataPro:h14
set guifont=PragmataPro:h16
set noantialias
endif
" }}}
Expand Down

0 comments on commit 3b630bf

Please sign in to comment.