Skip to content

Commit

Permalink
Version 4.06
Browse files Browse the repository at this point in the history
- Help template- FIX viki#DirListing(): correctly process file patternsMD5 checksum: 0bdb3097b73a9855892d60124d0d581f
  • Loading branch information
tomtom authored and vim-scripts committed Nov 3, 2013
1 parent a6010a9 commit a8e6e4a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 8 deletions.
9 changes: 7 additions & 2 deletions autoload/viki.vim
Expand Up @@ -4,7 +4,7 @@
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-03-25.
" @Last Change: 2013-10-16.
" @Revision: 1336
" @Revision: 1338


exec 'runtime! autoload/viki/enc_'. substitute(&enc, '[\/<>*+&:?]', '_', 'g') .'.vim'
Expand Down Expand Up @@ -2917,6 +2917,7 @@ function! viki#ExecExternal(cmd) "{{{3
endf


" Update the current #Files or #Grep region.
function! viki#RegionUpdate() "{{{3
let [lh, lb, le, indent, regname] = s:GetRegionGeometry('')
let fn = printf('viki#%sRegionUpdate', regname)
Expand All @@ -2926,6 +2927,7 @@ function! viki#RegionUpdate() "{{{3
endf


" Update all #Files or #Grep in the current buffer.
function! viki#RegionUpdateAll() "{{{3
call s:UpdateAllRegions('Files\|Grep', function('viki#RegionUpdate'))
endf
Expand Down Expand Up @@ -3105,7 +3107,10 @@ function! viki#DirListing(lhs, lhb, indent, region) "{{{3
let view = winsaveview()
let t = @t
try
let ls = split(glob(patt), '|')
let ls = []
for pattern in split(patt, '|')
let ls += split(glob(pattern), '\n')
endfor
" TLogVAR ls
let types = get(args, 'types', '')
if empty(types)
Expand Down
34 changes: 30 additions & 4 deletions doc/viki.txt
Expand Up @@ -670,6 +670,19 @@ The colors are tested using color scheme with a white background.


-----------------------------------------------------------------------
Generated regions~

Viki provides the following region types with programmatically generated
contents:

#Files ... List files matching a pattern
#Grep ... List lines in files matching a pattern

Default Key Binding~

<LocalLeader>vu ... Update the current #Files or #Grep region
<LocalLeader>vU ... Update all #Files or #Grep regions

*viki-files*
Files Region~

Expand All @@ -686,8 +699,9 @@ Example: >
#Files glob=*.viki types=f <<
[[example.viki]!] The manual
The filenames are stored as extended viki names. Each line can take a comment
that is restored upon automatic update.
Multiple patterns are separated by a pipe ("|") character. The filenames
are stored as extended viki names. Each line can take a comment that is
restored upon automatic update.

For a list of available arguments, see |viki#DirListing()|.

Expand All @@ -697,15 +711,25 @@ same directory or a subdirectory as the file on the current line.

Default Key Binding~

<LocalLeader>vu ... :VikiFilesUpdate
<LocalLeader>vU ... :VikiFilesUpdateAll
<LocalLeader>vx ... :VikiFilesExec
<LocalLeader>vX ... :VikiFilesExec!

Example: >
Use ":VikiFilesExec! e" (<LocalLeader>vXe<cr>) to edit all the files in
the same directory or a subdirectory of the current file under the cursor.
*viki-grep*
Grep Region~

#Grep regions can be used to list files matching a pattern.

Example: >
#Grep glob=*.viki rx=test <<
[[/home/user/Wiki/Tester.viki#l=53][Tester.viki]] :: How to test!
[[/home/user/Wiki/Tests.viki#l=12][Tests.viki]] :: This is another test.

The #Grep region can e.g. be used get a list of back-references.


-----------------------------------------------------------------------
*viki-compile*
Expand Down Expand Up @@ -1989,9 +2013,11 @@ viki#ExecExternal(cmd)

*viki#RegionUpdate()*
viki#RegionUpdate()
Update the current #Files or #Grep region.

*viki#RegionUpdateAll()*
viki#RegionUpdateAll()
Update all #Files or #Grep in the current buffer.


#Files related stuff
Expand Down
4 changes: 2 additions & 2 deletions plugin/viki.vim
Expand Up @@ -3,7 +3,7 @@
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 08-Dec-2003.
" @Last Change: 2013-10-02.
" @Revision: 2752
" @Revision: 2753
"
" GetLatestVimScripts: 861 1 viki.vim
"
Expand Down Expand Up @@ -31,7 +31,7 @@ if !exists('g:loaded_tlib') || g:loaded_tlib < 106
finish
endif
endif
let loaded_viki = 405
let loaded_viki = 406


if !exists("tlist_viki_settings")
Expand Down

0 comments on commit a8e6e4a

Please sign in to comment.