Skip to content

Commit

Permalink
Make it possible to silence full screen message (issue #26)
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Jul 6, 2014
1 parent c697297 commit c19945c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -101,6 +101,10 @@ On Windows the `:Fullscreen` command sets the Vim window to "always on top". Som

:let g:shell_fullscreen_always_on_top = 0

### The `g:shell_fullscreen_message` option

When you enter full screen the plug-in shows a Vim message explaining how to leave full screen. If you don't want to see this message you can set this option to false (0).

### The `g:shell_mappings_enabled` option

If you don't like the default mappings for the `:Open` and `:Fullscreen` commands then add the following to your [vimrc script] [vimrc]:
Expand Down
6 changes: 3 additions & 3 deletions autoload/xolox/shell.vim
@@ -1,9 +1,9 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: June 30, 2014
" Last Change: July 7, 2014
" URL: http://peterodding.com/code/vim/shell/

let g:xolox#shell#version = '0.13.5'
let g:xolox#shell#version = '0.13.6'

if !exists('s:fullscreen_enabled')
let s:enoimpl = "%s() hasn't been implemented on your platform! %s"
Expand Down Expand Up @@ -279,7 +279,7 @@ function! xolox#shell#fullscreen() " {{{1
let s:fullscreen_enabled = !s:fullscreen_enabled

" Let the user know how to leave full-screen mode?
if s:fullscreen_enabled
if s:fullscreen_enabled && g:shell_fullscreen_message
" Take a moment to let Vim's GUI finish redrawing (:redraw is
" useless here because it only redraws Vim's internal state).
sleep 50 m
Expand Down
14 changes: 11 additions & 3 deletions doc/shell.txt
Expand Up @@ -15,9 +15,10 @@ Contents ~
7. The |xolox#shell#is_fullscreen()| function
8. The |g:shell_fullscreen_items| option
9. The |g:shell_fullscreen_always_on_top| option
10. The |g:shell_mappings_enabled| option
11. The |g:shell_verify_urls| option
12. The |g:shell_use_dll| option
10. The |g:shell_fullscreen_message| option
11. The |g:shell_mappings_enabled| option
12. The |g:shell_verify_urls| option
13. The |g:shell_use_dll| option
4. Background |shell-background|
5. Other full-screen implementations |shell-other-full-screen-implementations|
6. Contact |shell-contact|
Expand Down Expand Up @@ -222,6 +223,13 @@ to your |vimrc| script:
>
:let g:shell_fullscreen_always_on_top = 0
<
-------------------------------------------------------------------------------
The *g:shell_fullscreen_message* option

When you enter full screen the plug-in shows a Vim message explaining how to
leave full screen. If you don't want to see this message you can set this
option to false (0).

-------------------------------------------------------------------------------
The *g:shell_mappings_enabled* option

Expand Down
7 changes: 6 additions & 1 deletion plugin/shell.vim
@@ -1,6 +1,6 @@
" Vim plug-in
" Author: Peter Odding <peter@peterodding.com>
" Last Change: August 19, 2013
" Last Change: July 7, 2014
" URL: http://peterodding.com/code/vim/shell/

" Support for automatic update using the GLVS plug-in.
Expand Down Expand Up @@ -44,6 +44,11 @@ if !exists('g:shell_verify_urls')
let g:shell_verify_urls = 0
endif

if !exists('g:shell_fullscreen_message')
" Set this to false (0) to disable the message when entering full screen.
let g:shell_fullscreen_message = 1
endif

" Automatic commands. {{{1

augroup PluginShell
Expand Down

0 comments on commit c19945c

Please sign in to comment.