From ba11368cc98a1f1d4d62b031be0c69b53a0a5d11 Mon Sep 17 00:00:00 2001 From: Jonas Kramer Date: Mon, 17 Nov 2008 20:20:21 +0100 Subject: [PATCH] Added documentation. --- doc/narrow.txt | 57 +++++++++++++++++++++++++++++++++++++++++++++++ plugin/narrow.vim | 8 ------- 2 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 doc/narrow.txt diff --git a/doc/narrow.txt b/doc/narrow.txt new file mode 100644 index 0000000..0f7332a --- /dev/null +++ b/doc/narrow.txt @@ -0,0 +1,57 @@ +*narrow.txt* Plugin to emulate emacs' narrowing feature. + +Version 0.1 +Script ID: 2097 +Copyright (C) 2008 Jonas Kramer +License: Artistic License 2.0 + +============================================================================== +CONTENTS *narrow-contents* + +Usage |narrow-usage| +Functions |narrow-functions| +Bugs |narrow-bugs| +Changelog |narrow-changelog| + + +============================================================================== +USAGE *narrow-usage* + + *:Narrow* +:[range]Narrow + Narrow to the given [range]. + + *:Widen* +:Widen + Restore the original view, insert the hidden text before and after the + narrowed region. + +------------------------------------------------------------------------------ +FUNCTIONS *narrow-functions* + + *narrow#Narrow()* +narrow#Narrow({regionBegin}, {regionEnd}) + The function behind the |:Narrow| command. The parameters are the + numbers of the first and the last line of the range to zoom into. + + *narrow#Widen()* +narrow#Widen() + The function behind |:Widen|. Does the same thing. + + +============================================================================== +BUGS *narrow-bugs* + +- Cannot narrow different regions for the same buffer in 2 or more windows. +- Doesn't correctly work with buffers that have their own BufWriteCmd. +- Undo operations may break |:Widen| if the |:Narrow| command is undone. + + +============================================================================== +CHANGELOG *narrow-changelog* + +0.1 2008-11-17 + - First release. + +============================================================================== +vim:tw=78:ts=8:ft=help:norl:fen:fdl=0:fdm=marker: diff --git a/plugin/narrow.vim b/plugin/narrow.vim index afa186f..0aa2554 100644 --- a/plugin/narrow.vim +++ b/plugin/narrow.vim @@ -18,10 +18,6 @@ " instead of only the narrowed region in narrowed mode. Otherwise, when saving " in a narrowed buffer, only the region you zoomed into would be saved. " **************************************************************************** -" BUGS: -" - Cannot narrow different regions for the same buffer in 2 or more windows. -" - Doesn't correctly work with buffers with BufWriteCmd. -" - Missing :help documentation. if exists('g:loaded_narrow') finish @@ -31,8 +27,6 @@ let s:save_cpoptions = &cpoptions set cpoptions&vim - - fu! narrow#Narrow(rb, re) if exists('b:narrow_info') echo "Buffer is already narrowed. Widen first, then select a new region." @@ -134,8 +128,6 @@ command! -bar Widen call narrow#Widen() silent! nnoremap u :call undo_wrapper() - - let &cpoptions = s:save_cpoptions unlet s:save_cpoptions