Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-03-2007, 08:55 AM   #1
Registered: Aug 2003
Distribution: Slackware
Posts: 72

Rep: Reputation: 15
vi symbols mean?

I'm starting to learn vi and I'm looking through some files I have and they have weird symbols in them like:


These don't appear in the actual text and I was wondering what they mean? I know the ~ signifies the end of the file but what about the rest? Is there any reference for what these symbols represent?
Old 01-03-2007, 09:12 AM   #2
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
^M is typically from files that have some, but not all lines with DOS-style LineEndings

Just for fun, exit the file and type on the command line:

file whatever_that_file_name_is will prob. describe it as ASCII text with CRLF, LF ...

vi back into the file

in command mode type

se ff

it will probably say ff=unix.

To get rid of the ^M try

%s/<control-v control-m>//

(i'm saying hit control and v followed by control and m)

as for @, what is the context it's in?

Old 01-03-2007, 09:13 AM   #3
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,235

Rep: Reputation: 302Reputation: 302Reputation: 302Reputation: 302
^M is a control code. These usually show up in files written in DOS/Windows.

Not sure about @ but I suspect it's perhaps something to do with unicode.
Old 01-03-2007, 07:35 PM   #4
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
If you see a @ at the beginning of a line, or several lines in a row, and nothing after it, it's a place holder for a line that's too long to fit on the screen. If you scroll down the file farther so that you have more room, the whole line will be displayed.

Now, if you're talking about ^@, that's how vi represents the null character, i.e. ASCII code 0. Of course, unless you're opening binary files in vi, you probably won't see that too often.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
unresolved symbols bigtl Debian 3 02-19-2006 10:32 AM
exported symbols dorian Programming 1 02-23-2005 06:42 PM
question about symbols raven Programming 1 12-29-2003 06:11 AM
***Unresolved Symbols*** red8user Linux - Networking 2 09-12-2003 06:34 AM
symbols on tty1 grizzly Linux - General 2 08-30-2003 12:44 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:47 AM.

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