freebsd_amp_hwpstate/usr.bin/more/less.morerc

62 lines
2.4 KiB
Plaintext
Raw Normal View History

#
# This sample .morerc causes more to emulate the default GNU less(1)
# keys, in so far as more(1) is capable (which is not very far at the
# moment).
#
# Some of this will/should/may be eventually merged into default.morerc.
#
# $FreeBSD$
#
# magic value indicating we should use ${sc_height}
set window 2424989898
macro 0 H 'help'
set com_getscr 'condition (${number} == 0); \
condition (${window} == 2424989898); \
set scr_scroll ${sc_height}; \
condition_toggle; \
set scr_scroll ${window}; \
condition (${number} != 0); \
set scr_scroll ${number}; \
condition true;'
macro 0 "" 'eval ${com_getscr}; forw ${scr_scroll};'
macro 0 z 'condition (${number} == 0); \
eval ${com_getscr}; forw ${scr_scroll}; \
condition (${number} != 0); \
set window ${number}; forw ${number}; \
condition true;'
macro 0 w 'condition (${number} == 0); \
eval ${com_getscr}; back ${scr_scroll}; \
condition (${number} != 0); \
set window ${number}; back ${number}; \
condition true;'
macro 0 "\ev" 'eval ${com_getscr}; back ${scr_scroll};'
macro 1 "" 'forw_scroll ${number};'
macro 1 e 'forw_scroll ${number};'
macro 1 "" 'forw_scroll ${number};'
macro 1 y 'back_scroll ${number};'
macro 1 "" 'back_scroll ${number};'
macro 1 "" 'back_scroll ${number};'
macro 1 " " 'back_scroll ${number};'
macro 8 \e) 'rscroll ${number};'
macro 8 \e[C 'rscroll ${number};'
macro 8 \e( 'lscroll ${number};'
macro 8 \e[D 'lscroll ${number};'
macro 1 "<" 'goline ${number};'
macro 1 "\e<" 'goline ${number};
macro 0 ">" 'condition (${number} == 0); goend; \
condition (${number} != 0); goline ${number}; \
condition true;'
macro 0 "\e>" 'condition (${number} == 0); goend; \
condition (${number} != 0); goline ${number}; \
condition true;'
macro 0 "" 'gomark ?;'
macro 0 "" 'askfile;'
macro 0 :f 'stat (${_stat_n} + 1);'
macro 0 V 'error "Less is not being run!"
macro 0 Q 'quit;'
macro 0 :Q 'quit;'
# It might be possible to match the brace/bracket-pairing feature of
# less using some complex regexps... Project for a rain weekend... :-)