Copy code to vi


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Copy code to vi
# 8  
Old 03-12-2004
I cut and paste into vi sessions all the time and that does not happen to me.
It looks a bit like somehow your lines are being separated by line feed characters and you need them to be separated by carriage return characters. I would guess that it's an issue of the windowing environment rather than a vi issue. How are you displaying the source text? Are you running under X windows? What OS are you using?
# 9  
Old 03-13-2004
What does your .exrc contain?

$ cat $HOME/.exrc

What is your TERM type?

$ echo $TERM

What does your vi session set show?

(while in vi)

:set<cr>

(values shown at the bottom)

Cheers,

Keith
# 10  
Old 03-13-2004
I think that your vi session is vim. Try setting paste by "se paste" before the copy operation. See ":help paste" if you're using vim.
# 11  
Old 03-13-2004
Hi Kieth,

This is in responce to your queries
$ cat $HOME/.exrc
set autoindent autowrite showmatch wrapmargin=0 report=1
map :set wrapmargin=8
map {!}sort -b
map 1G
map 1G
map G
map
map
map k
map j
map i
map x
map dd
map D
map DjdG$
map! a
map!
a
map! a
map! a
map!
map!
ap!
ap
map
map i
map x
set showmode
set nowrapscan


$ echo $TERM
xterm

What does your vi session set show?
<cr: No such option - 'set all' gives all option values
# 12  
Old 03-14-2004
As I said earlier, turn off autoindent. Either use the method above or edit your .exrc file.

set noautoindent (noai)
# 13  
Old 03-22-2004
Thanks that's great ... IT worked.
Cheers
Rooh
 
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help with script to copy code to multiple servers

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)
Discussion started by: Ron0612
2 Replies

2. Shell Programming and Scripting

Copy-pasted code behaves diffrent

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)
Discussion started by: sea
2 Replies

3. Shell Programming and Scripting

how to copy the directory but not copy certain file

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)
Discussion started by: yanglei_fage
6 Replies

4. Solaris

Need help with copy

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)
Discussion started by: rama krishna
1 Replies

5. UNIX for Dummies Questions & Answers

What is in-core copy and disk-copy of i-node table?

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)
Discussion started by: dearanik
1 Replies

6. UNIX for Dummies Questions & Answers

Copy code from shell

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)
Discussion started by: yohoshua
1 Replies
Login or Register to Ask a Question