LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-27-2004, 09:54 AM   #16
dford
Member
 
Registered: May 2003
Location: Kansas
Distribution: RH 9, OpenBSD, FreeBSD
Posts: 60

Rep: Reputation: 19

You might want to try
:set paste
This disables a bunch of the smart stuff that vi can do for you and in this case you want it to be "dumb".

How are you entering the code? Straight typing? Copy and Paste?

Are you in an Xterm, Kterm, command line (non-X environment), gvim,...?

Could you paste a short example into a message for us? Try to make the shortest XML that displays the problem.

 
Old 02-27-2004, 09:57 AM   #17
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Original Poster
Rep: Reputation: 15
I tried putting the line in ~/.vinrc and when I go to the file and check the sets, it does not set it to the number. I will try looking at the sites. Thanks
 
Old 02-27-2004, 10:13 AM   #18
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Original Poster
Rep: Reputation: 15
I tried :set paste. That did not work either. I am just straight typing in command line mode.

The line I am trying to type is something like <value>jdbc:mysql://somemachine.someverylongdomainnameforaserver/somedatabase?user=someuser&password=somepassword</value>
 
Old 02-27-2004, 10:17 AM   #19
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Just though of something: I there a line in your xml code (at the top or bottom) that looks like:

/* vim:tw=4: */

The 4 can be another number.
If this line excists, vi will overrule all the other settings and use this (4 in the above example) as default for this document.
 
Old 02-27-2004, 10:22 AM   #20
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Original Poster
Rep: Reputation: 15
just checked, nothing like that in the file. How can I tell if I have vim instead of vi? If it type vim at the command line, it does not recogize the command.
 
Old 02-27-2004, 10:32 AM   #21
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
On my system (suse & slack):

/bin/vi -> vim (link to vim)
/bin/vim
 
Old 02-27-2004, 10:38 AM   #22
dford
Member
 
Registered: May 2003
Location: Kansas
Distribution: RH 9, OpenBSD, FreeBSD
Posts: 60

Rep: Reputation: 19
Most of the things we have been talking about only work in vim. Typically, on Linux, you have vim. When you type ":help" I think it tells you what program it is. Actually, just the fact that ":help" works indicates it is vim or a vim variant; native vi doesn't have alot of these extensions.

Unfortunately, here at work I only have access to vi. When I get home tonight I'll do some more looking.
Does arbitrary text line break?
Is it breaking on white space or always at the same point? What point does it break at?
 
Old 02-27-2004, 10:45 AM   #23
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Original Poster
Rep: Reputation: 15
It breaks at the end of the screen. If tw was set to 255, would it still wrap or scroll to the right?
 
Old 02-27-2004, 10:52 AM   #24
dford
Member
 
Registered: May 2003
Location: Kansas
Distribution: RH 9, OpenBSD, FreeBSD
Posts: 60

Rep: Reputation: 19
wrap causes the display to wrap at the end of the screen.
wrapmargin and textwidth cause the data to wrap at the point specified. Although both of these break on whitespace by default.

If tw=255 and wrap is on the screen will show something like 3 full 80 characters display lines and a short 15 character line (given lucky white space). If nowrap is set the display will scroll right. Of course the above assumes the standard 80 character line, but since you said you were in the native command line that is a somewhat reasonable assumption.

Last edited by dford; 02-27-2004 at 11:11 AM.
 
Old 02-27-2004, 11:14 AM   #25
dford
Member
 
Registered: May 2003
Location: Kansas
Distribution: RH 9, OpenBSD, FreeBSD
Posts: 60

Rep: Reputation: 19
Okay, another thought.
:set compatible
make vim compatible with vi. This should override any vim special features leaving you with a smaller set of settings to worry about.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ text file line by line/each line to string/array Dimitris Programming 15 03-11-2008 08:22 AM
Perl - Tpl file - Need to replace new line character. knnirmal Programming 2 09-07-2004 02:27 PM
end of line character hyperriven Linux - General 1 04-07-2004 08:24 PM
Insert character into a line with sed? & variables in sed? jago25_98 Programming 5 03-11-2004 06:12 AM
Bash scripting - add a character to a line. welby Programming 1 01-14-2004 10:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration