1752758 Members
5019 Online
108789 Solutions
New Discussion юеВ

using vi editor in hp-ux

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

using vi editor in hp-ux

Hi

I am using vi editor in HP-UX.

I am not able to delete characters by using keys "del" and "back space".

But i can use this same method in linux.
14 REPLIES 14
Sajjad Sahir
Honored Contributor

Re: using vi editor in hp-ux


Dear Senthil

if u want a delete character u can use x and if u want a line u can use dd
if u want 5 lines
5dd etc... ok

try

sajjad
Ganesan R
Honored Contributor

Re: using vi editor in hp-ux

Hi Senthilkumar,

vi on hpux is different then linux. In linux most people use bash shell which supports those features.

In HP-UX you should use vi keys (x-key to delete and h-key to move one character left)

Best wishes,

Ganesh.
James R. Ferguson
Acclaimed Contributor

Re: using vi editor in hp-ux

Hi:

Use 'vi' and the keys that were meant for it. The "x" deleles a single character.

See the 'vi' manpages for more.

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: using vi editor in hp-ux

Hi (again):

A Google search for 'vi' will offer "cheat-sheets" like:

http://www.lagmonster.org/docs/vi.html

Regards!

...JRF...
Ganesan R
Honored Contributor
Solution

Re: using vi editor in hp-ux

Hi,

Important cursor Movement keys

keys Effect
l Move one character right
h Move one character left
j Move one line down
k Move one line up
Move one character right
G Go to last line of the file
nG Go to line number n in the file
$ Go to end of current line
^ Go to start of line
w Go to beginning of next word
b Go to beginning of previous word
e Move to end of word
H Go to first line of screen
M Go to middle line of screen
L Go to last line of screen
( Go to beginning of sentence
) Go to end of sentence
{ Go to beginning of paragraph
} Go to end of paragraph


Text Deletion Commands

Command Effect
x Delete character at current cursor location.
nx Delete n characters starting at current cursor location.
X Delete previous character from the current cursor location.
nX Delete n previous characters from the current cursor location.
dd Delete current line.
db Delete previous word.
dw Delete from current cursor location to the end of word.
dG Delete to the end of file including current line.
Best wishes,

Ganesh.
Johnson Punniyalingam
Honored Contributor

Re: using vi editor in hp-ux

to delete a letter ..press escape key and then press x
to insert a letter .. press i and then insert the letter
to move cursor use arrow keys.
but there is no backsapce deletion in vi editor


Thanks,
JOhnson
Problems are common to all, but attitude makes the difference
Rita C Workman
Honored Contributor

Re: using vi editor in hp-ux

Attached you'll find an old list of vi commands I typed years ago. I copied it recently for some developers here and you might find it handy.

Open it with Wordpad and it will line up right.

Regards,
Rita
Bijeesh
Respected Contributor

Re: using vi editor in hp-ux

hi
In hp you can't delete characters using "del" key. Use x to delete single char.

see vi man page for more details
T G Manikandan
Honored Contributor

Re: using vi editor in hp-ux

.vimrc is the file where you set your environment for the vi editor,

can you make an entry in the .vimrc at your $HOME dir for the user

set bs=2

Let me know.

Thanks.