Sorry for my noobness in advance: I was wondering what <CR> stands for in various Vim manuals, etc. I keep seeing <CR>, but have no idea if that is a key sequence or abbreviation or what!
Sorry for my noobness in advance: I was wondering what <CR> stands for in various Vim manuals, etc. I keep seeing <CR>, but have no idea if that is a key sequence or abbreviation or what!
Carriage Return if i am not mistaken
Possibly refers to carriage return, aka enter. Just guessing though.
edit
I think maybe it refers strictly to the ASCII character for carriage return. Depending on your operating system, this may or may not be the same as the code(s) generated by pressing the Enter key.
http://www.eandem.co.uk/mrw/vim/usr_doc/index.htmlOriginally Posted by VIM USER MANUAL v7.3
Last edited by Telengard C64; October 31st, 2011 at 07:27 PM.
Yes, CR = Carraige Return. It basically means press the <enter> or <return> key.
UNIX distinguishes because lines are ended with just a CR on UNIX, but Windows uses CR followed by LF (Line Feed).
Yep, it's Carriage Return (ASCII 13). Often written as ^M or \r. CRs are found just before newlines in text files generated by DOS/Windows apps.
In vim, type :help keycodes.
Ah ha. Yes. You are right. You are "all" right. Thank you!!
And where does it come from? A typewriter. In the manual days you actually had to return the carriage back manually in order to start typing at the beginning. A line feed was accomplished in conjunction with this depending on how you did the return. When typewriters went electric, eventually the carriage no longer moved, just the print head. They needed something for everyone to understand who was used to the old way. CR was introduced as the abbreviation for a carriage return. When this is stored in a file at that time CR also represents an actual character. LF was introduced as the abbreviation for a line feed. Some OS's, when dealing with text files, take a CR as a CR/LF combination, others as just a CR. CR or a null was sometimes used to indicate the end of a "line" record in a text file as well.
Just part of what it's all about - all of that for a simple pair of characters, eh?
Dave
Bookmarks