Jump to content


Photo
- - - - -

in your term, caping your page-up/down


  • Please log in to reply
3 replies to this topic

#1 SigFLUP

SigFLUP

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 367 posts
  • Gender:Not Telling

Posted 06 May 2010 - 12:15 PM

Does anyone know why vi and other such programs would ignore $TERMCAP?

Basically I've set $TERM to pcansi because it's the closest thing to my terminal, however the /etc/termcap entry for pcansi does not have definitions for page-up/down. I searched through /etc/termcap and didn't find an entry that I liked. When running screen it complains if $TERM is not in the /etc/termcap database. So.. I set $TERM to pcansi to get screen from complaining then I add definitions to $TERMCAP for page-up/downs. The thing is that it seems most programs ignore your $TERMCAP if $TERM is a valid entry. Any ideas on how I get screen not to complain about invalid $TERMs and have programs read my $TERMCAP at the same time? This is really bothering me :( Modifying anything on my computer isn't an option, unfortunately. For example I'm not going to add a screen.TERM entry or modify /etc/termcap.

Edited by SigFLUP, 06 May 2010 - 12:21 PM.


#2 MrFluffy

MrFluffy

    HACK THE PLANET!

  • Validating
  • 68 posts
  • Country:
  • Gender:Male
  • Location:somewhere

Posted 08 May 2010 - 12:31 PM

Sure its not been configured to use vi style keybindings for the direction keys?
Try hjkl when in edit mode ,if it moves the cursor round it has. I quite like them because it saves taking your hands off the keyboard to move round, but of late lots of stuff has stopped honouring that sort of thing to try and make them more friendly.
Ive been on some oldschool stuff running aix etc that used the hjkl even for terminal useage whatever termcap etc was set to. Smit used to be like that out the box...
You can turn it on and off with a . file edit irrc, rtfm and all that...



I always set termtype to vt102 and export it and leave it at that, but thats because half the stuff I use is so out of date and obsolete it doesnt know anything newer :D

#3 SigFLUP

SigFLUP

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 367 posts
  • Gender:Not Telling

Posted 08 May 2010 - 12:44 PM

Sure its not been configured to use vi style keybindings for the direction keys?
Try hjkl when in edit mode ,if it moves the cursor round it has. I quite like them because it saves taking your hands off the keyboard to move round, but of late lots of stuff has stopped honouring that sort of thing to try and make them more friendly.
Ive been on some oldschool stuff running aix etc that used the hjkl even for terminal useage whatever termcap etc was set to. Smit used to be like that out the box...
You can turn it on and off with a . file edit irrc, rtfm and all that...



I always set termtype to vt102 and export it and leave it at that, but thats because half the stuff I use is so out of date and obsolete it doesnt know anything newer :D


yeah hjkl is pretty wicked mate. That always works. I probably should of updated my post- I figured it out. I mis-typed my $TERMCAP variable and it just refused to use it as a result :(

#4 LexDysic

LexDysic

    DDP Fan club member

  • Members
  • 57 posts

Posted 20 May 2010 - 03:20 AM

Sure its not been configured to use vi style keybindings for the direction keys?
Try hjkl when in edit mode ,if it moves the cursor round it has. I quite like them because it saves taking your hands off the keyboard to move round, but of late lots of stuff has stopped honouring that sort of thing to try and make them more friendly.
Ive been on some oldschool stuff running aix etc that used the hjkl even for terminal useage whatever termcap etc was set to. Smit used to be like that out the box...
You can turn it on and off with a . file edit irrc, rtfm and all that...



I always set termtype to vt102 and export it and leave it at that, but thats because half the stuff I use is so out of date and obsolete it doesnt know anything newer :D


Using hjkl for arrows is when your shell is in vi mode. You can set your keybindings to vi or emacs. This has nothing to do with `old school AIX' or `termcap' its a shell setting. (AIX ships with ksh, which is set to vi mode by default):

bash/ksh: set -o vi OR set -o emacs
zsh: bindkey -v OR bindkey -e

Now back to termcap, these days you can get away with TERM=linux, TERM=xterm, or TERM=rxvt for most applications. Sounds like you are having trouble with GNU screen? Try setting your termcap info in your .screenrc (check the man pages for more details, anything vt100 should work).

~mah 2 cents

Edited by LexDysic, 20 May 2010 - 03:25 AM.





BinRev is hosted by the great people at Lunarpages!