Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
630 views
in Technique[技术] by (71.8m points)

unix - Insert the carriage return character in vim

I'm editing a network protocol frame stored a file in Unix ( newlines). I need to insert the carriage return character (U+000D aka ). When I try to paste it from the clipboard ("+p) or type it using Ctrl+Shift+u-000d, the linefeed is inserted (U+000A).

What is the right way to do it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Type: ctrl-v ctrl-m

On Windows Use: ctrl-q ctrl-m

Ctrl-V tells vi that the next character typed should be inserted literally and ctrl-m is the keystroke for a carriage return.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...