replacing ^M with emacs
Noah
admin2 at enabled.com
Sat Oct 28 02:57:28 UTC 2006
well I am pressing control-J for return not control-M so I dont
understand your rationale.
Jerry McAllister wrote:
>> Thanks Peter,
>>
>> where is the logic here? What is control-q for and what is control-j
>> for? I am trying to figure out how I could have figured that out.
>>
>
> They are ASCII characters. For example, the ^M you wanted to get
> rid of is CTRL-M. There are ASCII tables in various places.
> A quick search should turn up a few. The assignment of the
> characters are ancient and traditional and somewhat weird by
> how things are currently used, but will probably continue to stay
> that way.
>
> Line-Feed, for example - which is that character that marks the end
> of a line in text files, means it causes the printer to move the
> paper up one line - in old line printers and teletypes. CTRL-M or ^M
> is a RETURN (also ENTER nowdays) and that caused the print head to
> return to the beginning of the line. By the time UNIX came along,
> it wasn't necessary to use both characters to move the paper and print
> head because those were virtual. So, they just used one character -
> the line feed. But, MS-DOS and some others continued to use the
> pair to mean a new line for some reason - maybe the original association
> with IBM, although they didn't use ASCII, but EBCDIC - another animal.
>
> So, look up an ASCII chart with explanations and you can make an
> educated guess on the meanings.
>
> ////jerry
>
>
>> also is there a better page than the one I am using below to figure all
>> these keystrokes out?
>>
>> http://www.math.uh.edu/~bgb/emacs_keys.html
>>
>> Cheers,
>>
>> Noah
>>
>>
>> Peter A. Giessel wrote:
>>
>>> On 2006/10/27 15:20, Noah seems to have typed:
>>>
>>>
>>>> this is the best answer. Hits it right on the head of what I want.
>>>> What if I want the character to replace the ^M with a new line what do I
>>>> enter in the replace field?
>>>>
>>>>
>>> control-q control-j
>>>
>>>
>> _______________________________________________
>> freebsd-questions at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>>
More information about the freebsd-questions
mailing list