Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed write_without_statusline.

It was confusing and mostly broken.
  • Loading branch information...
commit f4da67c133c6860d1d45f5639f927d8e617938a1 1 parent eb9d3cd
@Soares authored
Showing with 9 additions and 20 deletions.
  1. +4 −8 autoload/write.vim
  2. +5 −7 doc/write.txt
  3. +0 −5 plugin/write.vim
View
12 autoload/write.vim
@@ -8,10 +8,6 @@ let g:write#autoloaded = 1
" @param {string} bang Whether or not to force full writing mode.
function! write#start(bang)
setlocal spell wrap display+=lastline nolist linebreak
- if g:write_without_statusline
- let b:write_laststatus_bak = &laststatus
- set laststatus=0
- endif
if !empty(a:bang) || &tw == 0
setlocal tw=0 nonu nornu
let b:writing=2
@@ -27,10 +23,10 @@ endfunction
" Will only undo changes that write.vim made.
function! write#stop()
if b:writing == 2
- setlocal tw< nonu< nornu<
- endif
- if g:write_without_statusline
- let &laststatus = b:write_laststatus_bak
+ if &tw == 0
+ setlocal tw<
+ endif
+ setlocal nonu< nornu<
endif
setlocal spell< wrap< display< list< linebreak<
let b:writing=0
View
12 doc/write.txt
@@ -26,12 +26,6 @@ CONFIGURATION *write-commands*
Use this to disable the plugin entirely: >
let g:loaded_write = 1
<
- *g:write_without_statusline*
-If true, disable the statusline while writing.
-This is enabled by default because |laststatus| can not be set locally. The
-statusline will be turned off for all windows. This may be disorienting.
-If you want the statusline off only when the writing window is the only
-window you should 'set laststatus=1' instead.
*g:write_auto*
A list of filetypes that should automatically go into write mode. If the
@@ -76,6 +70,10 @@ Toggles writing mode. The bang, if given, will be passed to |:WriteOn|
==============================================================================
STATUSLINE *write-statusline*
+This plugin does not disable your statusline, because the statusline can not
+be disabled for only one window. If you want to turn the statusline off see
+the |laststatus| variable and set it to 0 or 1 yourself.
+
*write#statusline()*
Returns '[W]' if write mode is on, '' otherwise. Perfect for use in
a statusline. Use >
@@ -83,7 +81,7 @@ a statusline. Use >
set statusline+=%{write#statusline()}
set statusline+=%*
<
-to add this flag to your statuslien.
+to add this flag to your statusline.
==============================================================================
MAPPINGS *write-mappings*
View
5 plugin/write.vim
@@ -9,11 +9,6 @@ endif
let g:loaded_write = 1
-if !exists('g:write_without_statusline')
- let g:write_without_statusline = 0
-endif
-
-
if !exists('g:write_auto')
let g:write_auto = []
endif
Please sign in to comment.
Something went wrong with that request. Please try again.