About: Using vim as a syntax-highlighting pager   Sponge Permalink

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

The original tip (below) was for a "more"-style pager. It is kept here because it explains the principles nicely. First, create a vimrc like the following – I called mine ~/.vimrc.more " No compatibility – necessary for mappings to work. set nocompatible " Status line set laststatus=0 set cmdheight=1 set nomodifiable " Only in version 6.0 set readonly " My xterms have a navy-blue background, so I need this line too. set background=dark " Turn syntax on syntax enable " No menu bar and tool bar set guioptions=aiMr " Key bindings. nmap b nmap q :q! nmap nmap " To type the following line, type *two* C-V's followed by two spaces. This " is how you map the spacebar. nmap ^V

AttributesValues
rdfs:label
  • Using vim as a syntax-highlighting pager
rdfs:comment
  • The original tip (below) was for a "more"-style pager. It is kept here because it explains the principles nicely. First, create a vimrc like the following – I called mine ~/.vimrc.more " No compatibility – necessary for mappings to work. set nocompatible " Status line set laststatus=0 set cmdheight=1 set nomodifiable " Only in version 6.0 set readonly " My xterms have a navy-blue background, so I need this line too. set background=dark " Turn syntax on syntax enable " No menu bar and tool bar set guioptions=aiMr " Key bindings. nmap b nmap q :q! nmap nmap " To type the following line, type *two* C-V's followed by two spaces. This " is how you map the spacebar. nmap ^V
Version
  • 5(xsd:double)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 120(xsd:integer)
Text
  • vimpager
Author
  • Mary Ellen Foster
Complexity
  • intermediate
Created
  • 2001(xsd:integer)
ID
  • 121(xsd:integer)
  • 1723(xsd:integer)
NEXT
  • 122(xsd:integer)
Rating
  • 268(xsd:integer)
abstract
  • The original tip (below) was for a "more"-style pager. It is kept here because it explains the principles nicely. First, create a vimrc like the following – I called mine ~/.vimrc.more " No compatibility – necessary for mappings to work. set nocompatible " Status line set laststatus=0 set cmdheight=1 set nomodifiable " Only in version 6.0 set readonly " My xterms have a navy-blue background, so I need this line too. set background=dark " Turn syntax on syntax enable " No menu bar and tool bar set guioptions=aiMr " Key bindings. nmap b nmap q :q! nmap nmap " To type the following line, type *two* C-V's followed by two spaces. This " is how you map the spacebar. nmap ^V Then, to use this .vimrc, add an alias. If you're using tcsh, the syntax will be something like: alias vmore "vim -u ~/.vimrc.more -" Then you can type <i>program</i> | vmore to view <i>program</i>'s output in this "pager". Spacebar will move down, 'b' will move back up, and 'q' quits. You can add mappings for other keys if you want to, also. Those who like to use Vim as a viewer might want to see Using Vim as a man-page viewer under Unix.
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