View previous topic :: View next topic |
Author |
Message |
moment n00b

Joined: 06 Dec 2007 Posts: 6
|
|
Back to top |
|
 |
Kingmilo Apprentice


Joined: 29 Apr 2005 Posts: 173 Location: South Africa
|
Posted: Tue May 06, 2008 5:20 am Post subject: |
|
|
EXPORT wont save it for future sessions, you need to change the default in;
go down to the line that says;
change to;
Then refresh your profile;
Code: | env-update && source /etc/profile |
_________________ trample the weak, hurdle the dead.. . |
|
Back to top |
|
 |
nihilo Apprentice


Joined: 05 Nov 2002 Posts: 168 Location: berkeley, ca, usa
|
Posted: Tue May 06, 2008 11:36 pm Post subject: Re: vim as a manpage reader |
|
|
Thanks for the tip. The man pages that have code in them look much better via vim. |
|
Back to top |
|
 |
faux n00b

Joined: 26 Oct 2007 Posts: 61 Location: Linz, Austria
|
Posted: Sat May 10, 2008 11:49 am Post subject: |
|
|
Nice tip! Thank's!
Is there a possibility to setup the pager to allow scrolling line-by-line via the up/down keys? |
|
Back to top |
|
 |
ppurka Advocate

Joined: 26 Dec 2004 Posts: 3247
|
Posted: Sun May 11, 2008 4:28 am Post subject: |
|
|
faux wrote: | Nice tip! Thank's!
Is there a possibility to setup the pager to allow scrolling line-by-line via the up/down keys? | It already does
moment: An excellent tip! This had made reading man pages much smoother  _________________ emerge --quiet redefined | E17 vids: I, II | Now using e from git | e18, e19, and kde4 sucks :-/ |
|
Back to top |
|
 |
faux n00b

Joined: 26 Oct 2007 Posts: 61 Location: Linz, Austria
|
Posted: Sun May 11, 2008 5:00 am Post subject: |
|
|
ppurka wrote: | faux wrote: | Nice tip! Thank's!
Is there a possibility to setup the pager to allow scrolling line-by-line via the up/down keys? | It already does  |
Yes, but you have to move the cursor over the screen before scrolling backwards, after scrolling forwards. |
|
Back to top |
|
 |
moment n00b

Joined: 06 Dec 2007 Posts: 6
|
Posted: Sun May 11, 2008 10:11 am Post subject: |
|
|
glad you all liked it vim is great! |
|
Back to top |
|
 |
ppurka Advocate

Joined: 26 Dec 2004 Posts: 3247
|
Posted: Sun May 11, 2008 3:58 pm Post subject: |
|
|
faux wrote: | ppurka wrote: | faux wrote: | Nice tip! Thank's!
Is there a possibility to setup the pager to allow scrolling line-by-line via the up/down keys? | It already does  |
Yes, but you have to move the cursor over the screen before scrolling backwards, after scrolling forwards. | You can try the following. Make your own script, call it for example myvimmanpager and set your MANPAGER variable to this script. Next, add the second-last line to the original script /usr/bin/vimmanpager, to make it read like this (myvimmanpager): Code: | #!/bin/sh
sed -e 's/\x1B\[[[:digit:]]\+m//g' | \
tr '\267' '.' | col -b | \
vim \
-c 'let no_plugin_maps = 1' \
-c 'set nolist nomod ft=man' \
-c 'let g:showmarks_enable=0' \
-c 'map <up> <C-Y>' \
-c 'runtime! macros/less.vim' - | There could be a way of doing this in vimrc, but apparently the filetype is not being set when vimrc is run so I am unable to selectively run the map command on only man files. _________________ emerge --quiet redefined | E17 vids: I, II | Now using e from git | e18, e19, and kde4 sucks :-/ |
|
Back to top |
|
 |
faux n00b

Joined: 26 Oct 2007 Posts: 61 Location: Linz, Austria
|
Posted: Sun May 11, 2008 5:14 pm Post subject: |
|
|
Thank's for the trick! Exactly what I want!  |
|
Back to top |
|
 |
Massimo B. Veteran


Joined: 09 Feb 2005 Posts: 1495 Location: Germany
|
Posted: Wed Mar 28, 2012 11:43 am Post subject: |
|
|
faux wrote: | ppurka wrote: | faux wrote: |
Is there a possibility to setup the pager to allow scrolling line-by-line via the up/down keys? | It already does  |
Yes, but you have to move the cursor over the screen before scrolling backwards, after scrolling forwards. |
That is vim's behaviour by default. Even in vim you can always use C-e and C-y to scroll the screen. Make your remapping if you like other key strokes. _________________ ppc:PowerBook5,8 15"(1440)-G4/1.67,2G Ram|amd64:HP EliteBook 8560w,i7-2620M,16G Ram|amd64:Acer Z5610 (Core2QuadQ8200),8G Ram|amd64-prefix:OpenSuse
Lila-Theme |
|
Back to top |
|
 |
|