whenever I copy a code to vi session from other script it just goes weird.
It just goes across the whole screen and looks really bizzare
If the code is small I can manually remove the tabs and indent it correctly but if it is 2000 lines it makes it really difficult.
Is there something I can do about it and how can I copy efficiently without getting the code all over the place.
if the text you are copying to a vi session is from a script, i would have the script dump its output to a file, then edit it like that.
ie:
./somescript > someoutputfile
If you are using vim then you might get better results by doing ":se paste" before the paste operation. Remember to reset the setting i.e. ":se nopaste" when going back to normal editting.
Suppose my .txt file looks like this
Now when I copy these lines and paste it on a vi i.e.
vi tmp_rooh.ksh
It looks like the one below
***********************************************
*************************************************
I want it to look exactly the same as the one in .txt and not like the one above.
Hope this makes it a bit clear.
If it just a few lines of code I can manually do it but there are codes of 1000's of lines and I need to copy them from the text file and put it on unix .
Thanks
Code tags added -- Perderabo
Last edited by Perderabo; 03-12-2004 at 11:32 PM..
The code pasted in the second part has changed it's formatting in here.
CAN YOU PLEASE TRY PASTING THE CODE ON YOUR VI session and hopefully you'll see what I mean as IT's formatting it here quiet well and thus I can't show you here.
Hi,
I am new to scripting and i am trying to use below script to copy code to multiple servers and multiple locations on each server. the script is not working or doesnt give any error. Any help is appreciated. basically i want a script to get the code from a location (dir below) and read the... (2 Replies)
Heyas
I'm currently attempting to apply the code of tui-select to tui-list.
That is because tui-list simply made a 1 string list, while tui-select uses dynamicly up to 3 strings per line.
Anyway, so i copy pasted the code, and just made the changes marked with red....
Know that both scripts... (2 Replies)
Hi experts
cp bin root src /mnt
but not copy bin/bigfile
any help?
( I post this thread in the "redhat" forum wrongly, I don't know how to withdraw that question in that wrong forum)
Thanks (6 Replies)
Hi Gurus,
I need some help to fulfill the following requirement.
I have a file A and some contents in it and I have file B and some conent in it.
I need to append the contents on File A to FIle B.
I am sure its Basics but missing it.
Thank You,
Rama (1 Reply)
I have found a question from the exercises of my study mat. The question is
"Why are there a in-core copy and a disk-copy of i-node block and super block?"
If any one know the proper answer then please send me..... (1 Reply)
Hi everyone.. I'm a full-fledged newbie so bear with me. =)
I'm running code in the shell, and I'd like to copy the lines into a text file. Everytime I try using Contrl-C, the lines repeat as code. Is there some sort of export history function I can use? (1 Reply)