프린트 하기

OS환경 : Oracle Linux6.8(64bit)


방법 : 

vi 에서 %로 치환 할때 newline(엔터) 문자를 입력하려면 \r 을 사용하면 된다.


%s/before/after\r/g


From vim docs on patterns:


\r matches <CR>


\n matches an end-of-line - When matching in a string instead of buffer text a literal newline character is matched.



참조 : 

http://stackoverflow.com/questions/71323/how-to-replace-a-character-for-a-newline-in-vim

http://vim.wikia.com/wiki/Search_and_replace