<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: use of arrow  buttons in vi editor in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856024#M98265</link>
    <description>That is the correct .exrc file so as long as you are using an HP terminal, they will work. Now if you are using a PC, the emulator is critical -- there are very few useful HP terminal emulators, the best is Reflection for HP (*not* Reflection/X) with QCTerm a useful free HP terminal emulator. What emulator are you using on your PC?</description>
    <pubDate>Thu, 07 Sep 2006 08:47:25 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2006-09-07T08:47:25Z</dc:date>
    <item>
      <title>use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856016#M98257</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;We are unable to use all arrow buttons in vi editor  of our hp-ux server (rp3440 )&lt;BR /&gt;(right arrow L , down-arrow J etc).&lt;BR /&gt;We can use arrow buttons in vi editor only on Terminal and not on windows key board ( login by telnet).&lt;BR /&gt;&lt;BR /&gt;Is there any mapping to be done to activate arrow keys on vi editor  ?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Raju</description>
      <pubDate>Mon, 04 Sep 2006 05:35:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856016#M98257</guid>
      <dc:creator>pb raju</dc:creator>
      <dc:date>2006-09-04T05:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856017#M98258</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;You must find a terminal emulation software that can emulate that.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In fact, some software allow you to do keyboard remapping such that when you press the arrow keys, it will emulate "right arrow L"&lt;BR /&gt;&lt;BR /&gt;We had been using a terminal emulation software from FTP Software in the past.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Mon, 04 Sep 2006 06:21:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856017#M98258</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2006-09-04T06:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856018#M98259</link>
      <description>Shalom Raju,&lt;BR /&gt;&lt;BR /&gt;Thought the terminal software can be changed to meet this need its possible to do it yourself.&lt;BR /&gt;&lt;BR /&gt;Example, right after connect&lt;BR /&gt;&lt;BR /&gt;stty erase ^?&lt;BR /&gt;&lt;BR /&gt;That sets the erase sequence to backspace.&lt;BR /&gt;&lt;BR /&gt;I would think the arrow keys can be set in a smilar fashion, though its vi and I like the standard keyboard layout, or at least I'm used to it.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 04 Sep 2006 07:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856018#M98259</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-09-04T07:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856019#M98260</link>
      <description>Actually, the arrow keys are not part of the ASCII character set (along with Home and End and Page Up, etc). So these keys (when enabled to transmit multi-letter codes) must be trapped by vi as an alias to the 'normal' vi commands. This is handled by a special file called .exrc and consists of mapping connections between characters and vi commands. For instance, with an HP terminal emulator, the End key will send ESC F so the .exrc file (for HP terminals) has ESC F mapped to the letter G. An example can be found in /usr/newconfig/etc/skel/.exrc (which only works with HP terminals).&lt;BR /&gt; &lt;BR /&gt;So .exrc must be completely rewritten for every terminal type. An HP terminal is very different from a Wyse or VT100, so you'll need to follow these steps:&lt;BR /&gt; &lt;BR /&gt;1. Identify the terminal emulation you are using (ie, yyse30, vt220, ansi, etc). The easiest is to ask the terminal itself with ttytype -s&lt;BR /&gt; &lt;BR /&gt;2. Get a copy of the emulator's tech reference manual and determine if the arrow keys are functional. If they are (and remember that the arrow keys are PC keys that must be seen by your emulator and then something generated by the emulator when the key is pressed) then you'll need a list of the keys and codes. An alternative is to ask HP's terminfo database with the untic command  (see below).&lt;BR /&gt; &lt;BR /&gt;3. From the keys and codes, create a new .exrc file with the appropriate map. For example, the up-arrow key for a VT100 terminal emulator should generate ESC [ A while an HP terminal generates ESC A.&lt;BR /&gt; &lt;BR /&gt;Now an easy way to get the map is to use the untic command along with the man page for terminfo. Start by getting a list of codes based on your terminal:&lt;BR /&gt; &lt;BR /&gt;untic $(ttytype)&lt;BR /&gt; &lt;BR /&gt;Print this list, then look up the curses code for the keys you want to map. For instance, the up-arrow key is called cuu1 in the curses capname. Find cuu1 in the untic list and there is the corresponding code generated by the up-arrow key. The ESC code is represented by \E.&lt;BR /&gt; &lt;BR /&gt;Here's a starting point - be sure to "Save Link" since this is a binary file with embedded escape codes and Unix file line terminators: &lt;A href="http://examples.oreilly.com/upt2/split/exrc" target="_blank"&gt;http://examples.oreilly.com/upt2/split/exrc&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt;This file will need some editing based on your needs and terminal emulator.</description>
      <pubDate>Mon, 04 Sep 2006 15:58:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856019#M98260</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-09-04T15:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856020#M98261</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;Thanks for the information.&lt;BR /&gt;The output of untic $(ttytype)..&lt;BR /&gt;&lt;BR /&gt;#untic $(ttytype)&lt;BR /&gt;TERM = (hp)&lt;BR /&gt;hp|hpex|hewlett-packard extended capabilities,&lt;BR /&gt;        am, xhp, da, db, mir,&lt;BR /&gt;        cols#80, lines#24, lm#0, xmc#0, nlab#8, lh#2, lw#8,&lt;BR /&gt;        bel=^G, cr=\r, tbc=\E3, clear=\E&amp;amp;a0y0C\EJ,&lt;BR /&gt;        el=\EK, ed=\EJ, hpa=\E&amp;amp;a%p1%dC, cup=\E&amp;amp;a%p1%dy%p2%dC,&lt;BR /&gt;        cud1=\EB, home=\E&amp;amp;a0y0C, cub1=\b, cuf1=\EC,&lt;BR /&gt;        cuu1=\EA, dch1=\EP, dl1=\EM, smir=\EQ,&lt;BR /&gt;        smso=\E&amp;amp;dB, smul=\E&amp;amp;dD, sgr0=\E&amp;amp;d@, rmir=\ER,&lt;BR /&gt;        rmso=\E&amp;amp;d@, rmul=\E&amp;amp;d@, il1=\EL, kbs=\b,&lt;BR /&gt;        ktbc=\E3, kclr=\EJ, kctab=\E2, kdch1=\EP,&lt;BR /&gt;        kdl1=\EM, kcud1=\EB, krmir=\ER, kel=\EK,&lt;BR /&gt;        ked=\EJ, kf1=\Ep, kf2=\Eq, kf3=\Er,&lt;BR /&gt;        kf4=\Es, kf5=\Et, kf6=\Eu, kf7=\Ev,&lt;BR /&gt;        kf8=\Ew, khome=\Eh, kich&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;From the output the arrow keys have the following keys :&lt;BR /&gt;1) left-arrow = cub1  , code generated is  \b&lt;BR /&gt;2)right-arrow  = cuf1 , code generated is \EC&lt;BR /&gt;3)up-arrow    =cuu1  , code generated is \EA&lt;BR /&gt;4)down-arrow  = cud1  , code generated is \EB&lt;BR /&gt;&lt;BR /&gt;I have tried to map in .exrc without success.&lt;BR /&gt;How to map the above in .exrc file ?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Raju</description>
      <pubDate>Tue, 05 Sep 2006 01:48:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856020#M98261</guid>
      <dc:creator>pb raju</dc:creator>
      <dc:date>2006-09-05T01:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856021#M98262</link>
      <description>Since the terminal you are using (based on the utput of ttytype) is an HP terminal, just copy the HP file to your $HOME directory:&lt;BR /&gt; &lt;BR /&gt;cp /usr/newconfig/etc/skel/.exrc $HOME/.exrc&lt;BR /&gt; &lt;BR /&gt;Then run vi and the arrow keys should work fine. The arrow keys need to be mapped for use in insert mode too and the newconfig file has these listed.</description>
      <pubDate>Tue, 05 Sep 2006 07:29:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856021#M98262</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-09-05T07:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856022#M98263</link>
      <description>&lt;!--!*#--&gt;Hi ,&lt;BR /&gt;&lt;BR /&gt;I have copied the hp file to $HOME directory.&lt;BR /&gt;Still I can't use the arrow key buttons.&lt;BR /&gt;&lt;BR /&gt;View our .exrc file :&lt;BR /&gt;&lt;BR /&gt;-------------------------------------------&lt;BR /&gt;set autoindent autowrite showmatch wrapmargin=0 report=1&lt;BR /&gt;map  ^W   :set wrapmargin=8&lt;BR /&gt;map  ^X   {!}sort -b&lt;BR /&gt;map  ^[h  1G&lt;BR /&gt;map  ^[H  1G&lt;BR /&gt;map  ^[F  G&lt;BR /&gt;map  ^[V  ^B&lt;BR /&gt;map  ^[U  ^F&lt;BR /&gt;map  ^[T  ^Yk&lt;BR /&gt;map  ^[S  ^Ej&lt;BR /&gt;map  ^[Q   i&lt;BR /&gt;map  ^[P   x&lt;BR /&gt;map  ^[L   O&lt;BR /&gt;map  ^[M   dd&lt;BR /&gt;map  ^[K   D&lt;BR /&gt;map  ^[J   DjdG$&lt;BR /&gt;map! ^[A  ^[ka&lt;BR /&gt;map! ^[D  ^[ha&lt;BR /&gt;map! ^[C  ^[la&lt;BR /&gt;map! ^[B  ^[ja&lt;BR /&gt;map! ^[L  ^M&lt;BR /&gt;map! ^[Q  ^[&lt;BR /&gt;map! ^[R  ^[&lt;BR /&gt;---------------------------------&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Raju</description>
      <pubDate>Wed, 06 Sep 2006 01:23:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856022#M98263</guid>
      <dc:creator>pb raju</dc:creator>
      <dc:date>2006-09-06T01:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856023#M98264</link>
      <description>Hi,&lt;BR /&gt;is there a way to set vi options in the "shell vi" set -o vi,&lt;BR /&gt;to use, for example, cursors to navigate the command history?&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Sep 2006 04:02:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856023#M98264</guid>
      <dc:creator>paolo barila</dc:creator>
      <dc:date>2006-09-07T04:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856024#M98265</link>
      <description>That is the correct .exrc file so as long as you are using an HP terminal, they will work. Now if you are using a PC, the emulator is critical -- there are very few useful HP terminal emulators, the best is Reflection for HP (*not* Reflection/X) with QCTerm a useful free HP terminal emulator. What emulator are you using on your PC?</description>
      <pubDate>Thu, 07 Sep 2006 08:47:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856024#M98265</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-09-07T08:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856025#M98266</link>
      <description>&amp;gt;paolo: is there a way to set vi options in the "shell vi" cursors to navigate the command history?&lt;BR /&gt;&lt;BR /&gt;I don't think so.  Possibley for emacs mode but I don't see any control chars for vi for ksh.&lt;BR /&gt;&lt;BR /&gt;Basically you should not be using the arrow keys in vi, but the standard h, j, k l.  These work in the shell and gdb.&lt;BR /&gt;&lt;BR /&gt;I only use the arrow keys when I'm moving away from the home keys or using the mouse or looking at the screen.</description>
      <pubDate>Thu, 07 Sep 2006 17:20:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856025#M98266</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-09-07T17:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: use of arrow  buttons in vi editor</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856026#M98267</link>
      <description>Hi Bill ,&lt;BR /&gt;&lt;BR /&gt;Thanks for your advice.&lt;BR /&gt;Now i downloaded the free QCTERM and able to use all arrow buttons.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;Raju</description>
      <pubDate>Thu, 07 Sep 2006 19:28:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-of-arrow-buttons-in-vi-editor/m-p/3856026#M98267</guid>
      <dc:creator>pb raju</dc:creator>
      <dc:date>2006-09-07T19:28:12Z</dc:date>
    </item>
  </channel>
</rss>

