LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   nvi showing strange character (https://www.linuxquestions.org/questions/linux-general-1/nvi-showing-strange-character-668783/)

JMJ_coder 09-09-2008 06:48 PM

nvi showing strange character
 
Hello,

I am using nvi 1.79 - it is giving me a ^M character at the end of the lines in some (not all) files. Both vim and elvis display them correctly. Is this something to do with dos vs. unix line endings or is it another issue? Can nvi properly handle dos line endings?

Also, does anyone know if nvi can handle syntax highlighting - even primitive highlighting (i.e., bold keywords)?

matthewg42 09-09-2008 07:09 PM

Quote:

Originally Posted by JMJ_coder (Post 3275160)
Hello,

I am using nvi 1.79 - it is giving me a ^M character at the end of the lines in some (not all) files. Both vim and elvis display them correctly. Is this something to do with dos vs. unix line endings or is it another issue? Can nvi properly handle dos line endings?

Also, does anyone know if nvi can handle syntax highlighting - even primitive highlighting (i.e., bold keywords)?

Yes, ^M is the extra character which is due to DOS line endings. You can run the file through the program dos2unix to fix it.

JMJ_coder 09-11-2008 06:43 PM

That's what I thought.

JMJ_coder 09-11-2008 06:44 PM

Any idea if nvi supports syntax highlighting or tabs?


It can split windows, but do you know how to split vertically or move between the windows?


All times are GMT -5. The time now is 12:43 PM.