Skip to content

Commit

Permalink
Added documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Kramer committed Nov 17, 2008
1 parent 35661cf commit ba11368
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 8 deletions.
57 changes: 57 additions & 0 deletions 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 <jkramer@nex.scrapping.cc>
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:
8 changes: 0 additions & 8 deletions plugin/narrow.vim
Expand Up @@ -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
Expand All @@ -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."
Expand Down Expand Up @@ -134,8 +128,6 @@ command! -bar Widen call narrow#Widen()
silent! nnoremap <silent> u :<C-u>call <SID>undo_wrapper()<CR>



let &cpoptions = s:save_cpoptions
unlet s:save_cpoptions

Expand Down

0 comments on commit ba11368

Please sign in to comment.