About: Folding of find locate tar-tf output   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

The more, on Unix-like systems you can pipe the output of tools like find, locate, tar -t, ... directly into Vim executing this script by using - as filename. Examples: vim -u browser.vim arch-hurd-i386.files find . | vim -u browser.vim - locate nox | vim -u browser.vim - tar -tzf boost.tar.gz | vim -u browser.vim - set mouse=a set foldminlines=1 foldcolumn=2 fillchars="+" foldlevel=0 set foldmethod=expr set foldexpr=FileBrowserFoldExpr() set foldtext=FileBrowserFoldText() function FileBrowserFoldExpr() let line=getline(v:lnum) let n=strlen(substitute(line,'[^/]*','','g')) if (line=~'^.*/$') return '>'.n elseif (strpart(getline(v:lnum+1),0,strlen(line)+1)==line.'/') return '>'.(n+1) endif return n endfunction function FileBrowserFoldText() return getline(v:foldstart) . ' ... [' . (

AttributesValues
rdfs:label
  • Folding of find locate tar-tf output
rdfs:comment
  • The more, on Unix-like systems you can pipe the output of tools like find, locate, tar -t, ... directly into Vim executing this script by using - as filename. Examples: vim -u browser.vim arch-hurd-i386.files find . | vim -u browser.vim - locate nox | vim -u browser.vim - tar -tzf boost.tar.gz | vim -u browser.vim - set mouse=a set foldminlines=1 foldcolumn=2 fillchars="+" foldlevel=0 set foldmethod=expr set foldexpr=FileBrowserFoldExpr() set foldtext=FileBrowserFoldText() function FileBrowserFoldExpr() let line=getline(v:lnum) let n=strlen(substitute(line,'[^/]*','','g')) if (line=~'^.*/$') return '>'.n elseif (strpart(getline(v:lnum+1),0,strlen(line)+1)==line.'/') return '>'.(n+1) endif return n endfunction function FileBrowserFoldText() return getline(v:foldstart) . ' ... [' . (
Version
  • 7(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 1544(xsd:integer)
Category
  • Folding
Author
  • Umu
Subpage
  • /200801
Complexity
  • basic
Created
  • 2008(xsd:integer)
ID
  • 1545(xsd:integer)
NEXT
  • 1546(xsd:integer)
abstract
  • The more, on Unix-like systems you can pipe the output of tools like find, locate, tar -t, ... directly into Vim executing this script by using - as filename. Examples: vim -u browser.vim arch-hurd-i386.files find . | vim -u browser.vim - locate nox | vim -u browser.vim - tar -tzf boost.tar.gz | vim -u browser.vim - set mouse=a set foldminlines=1 foldcolumn=2 fillchars="+" foldlevel=0 set foldmethod=expr set foldexpr=FileBrowserFoldExpr() set foldtext=FileBrowserFoldText() function FileBrowserFoldExpr() let line=getline(v:lnum) let n=strlen(substitute(line,'[^/]*','','g')) if (line=~'^.*/$') return '>'.n elseif (strpart(getline(v:lnum+1),0,strlen(line)+1)==line.'/') return '>'.(n+1) endif return n endfunction function FileBrowserFoldText() return getline(v:foldstart) . ' ... [' . (v:foldend-v:foldstart+1) . ' lines]' endfunction
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software