Operating System - HP-UX
1834156 Members
2172 Online
110064 Solutions
New Discussion

cut and paste into reflection hpterm tabs problem

 
SOLVED
Go to solution
Bill McNAMARA_1
Honored Contributor

cut and paste into reflection hpterm tabs problem

Hi,

how can I get rid of the tabs problem when cutting and pasting text from hpterm to hpterm.

I'm sure you know the problem.. looks like this:

hpt1
a
b
c
d
e

hpt2 (after paste into vi session)
a
----b
--------c
------------d
----------------e

I realise the ITRC will delete tabs and spaces,
so the ---- represents the tab indent

Later,
Bill
It works for me (tm)
8 REPLIES 8
Madhu Sudhan_1
Respected Contributor

Re: cut and paste into reflection hpterm tabs problem

Try Shift+I to insert the text into hpterm1.

-Madhu
Think Positive
Madhu Sudhan_1
Respected Contributor

Re: cut and paste into reflection hpterm tabs problem

sorry it is hpterm2

-MAdhu
Think Positive
Madhu Sudhan_1
Respected Contributor

Re: cut and paste into reflection hpterm tabs problem

Sorry iam making too many posts. Ensure you are in insert mode and paste it. It should work.

-Madhu
Think Positive
Bill McNAMARA_1
Honored Contributor

Re: cut and paste into reflection hpterm tabs problem

I prefer the mouse, sorry..
It works for me (tm)
Bill McNAMARA_1
Honored Contributor

Re: cut and paste into reflection hpterm tabs problem

it does insert, not a problem there,
but not identical to the window it came from.
ie it's a problem of formating, there are tabs added to hpterm2 insertion.

I though there was some tabs command, or stty tabs xyz
that fixed it but forgot the fix in a .profile oh so long ago..

Later,
Bill
It works for me (tm)
Steven Gillard_2
Honored Contributor
Solution

Re: cut and paste into reflection hpterm tabs problem

Dont know if this will fix it because it looks like your original file isn't indented, but make sure vi is in "noautoindent" mode:

:set noautoindent

I get this problem when cutting & pasting perl scripts / C code. Setting noautoindent works in my case.

Cheers,
Steve

Re: cut and paste into reflection hpterm tabs problem

... And to make the change permanent for a given user, edit the users ${HOME}/.exrc file and replace autoindent with noautoindent

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Thierry Poels_1
Honored Contributor

Re: cut and paste into reflection hpterm tabs problem

Hi,

most of times I use "ed" for cut & paste; but Steven's set autoindent off should do the trick within vi

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.