b0eed33fef1e v1.4.0
Add `g:clam_winwidth`
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Sat, 19 Nov 2016 11:30:55 +0000 |
parents | 7848d65f0425 |
children | a4d79fc20876 |
branches/tags | v1.4.0 |
files | doc/clam.txt plugin/clam.vim |
Changes
--- a/doc/clam.txt Tue May 03 15:27:16 2016 +0200 +++ b/doc/clam.txt Sat Nov 19 11:30:55 2016 +0000 @@ -18,6 +18,7 @@ 3.1 g:clam_autoreturn .......... |ClamConfiguration_autoreturn| 3.2 g:clam_winpos .............. |ClamConfiguration_winpos| 3.3 g:clam_winheight ........... |ClamConfiguration_winheight| + 3.4 g:clam_winwidth ............ |ClamConfiguration_winwidth| 4. License ......................... |ClamLicense| 5. Bugs ............................ |ClamBugs| 6. Contributing .................... |ClamContributing| @@ -117,7 +118,7 @@ ------------------------------------------------------------------------------ 3.2 g:clam_winpos *ClamConfiguration_winpos* -This option control where to open output window: > +This option controls where to open output window: > let g:clam_winpos = 'topleft' @@ -133,7 +134,16 @@ let g:clam_winheight = 5 -Default: no value (horizontal split at 50%) +Default: no value (split at 50%) + +------------------------------------------------------------------------------ +3.4 g:clam_winwidth *ClamConfiguration_winwidth* + +This option controls the width of the output window: > + + let g:clam_winwidth = 5 + +Default: no value (split at 50%) ============================================================================== 4. License *ClamLicense* @@ -158,6 +168,10 @@ ============================================================================== 7. Changelog *ClamChangelog* +v1.4.0 + * Added g:clam_winheight and g:clam_winwidth settings (thanks jethrovt). + * Don't highlght ANSI color codes more often than needed (thanks LnL7). + * Improved highlighting for hg status output. v1.3.0 * Added support for custom syntax highlighting for commands (thanks to Ümit Kablan).
--- a/plugin/clam.vim Tue May 03 15:27:16 2016 +0200 +++ b/plugin/clam.vim Sat Nov 19 11:30:55 2016 +0000 @@ -25,6 +25,16 @@ "}}} " Functions {{{ +function! s:ResizeClamWindow() "{{{ + " Assumes we're already in the window + if exists('g:clam_winheight') "{{{ + silent! execute 'resize ' . g:clam_winheight + endif "}}} + if exists('g:clam_winwidth') "{{{ + silent! execute 'vertical resize ' . g:clam_winwidth + endif "}}} +endfunction " }}} + function! s:GoToClamBuffer(command) " {{{ let buffer_name = fnameescape(a:command) @@ -34,9 +44,7 @@ " Open the new window (or move to an existing one). if winnr < 0 silent! execute g:clam_winpos . ' new ' . buffer_name - if exists('g:clam_winheight') "{{{ - silent! execute 'resize ' . g:clam_winheight - endif "}}} + call s:ResizeClamWindow() " Highlight ANSI color codes if the AnsiEsc plugin is present. if exists("g:loaded_AnsiEscPlugin") @@ -44,9 +52,7 @@ endif else silent! execute winnr . 'wincmd w' - if exists('g:clam_winheight') "{{{ - silent! execute 'resize ' . g:clam_winheight - endif "}}} + call s:ResizeClamWindow() endif endfunction " }}} function! s:ExtractBareCommanName(fullCommand) " {{{