:w !sudo tee %
Showing posts with label vim. Show all posts
Showing posts with label vim. Show all posts
Get root permission and save a file inside of vim editor edit
http://stackoverflow.com/questions/1005/getting-root-permissions-on-a-file-inside-of-vi
vi 붙여넣기 시 들여쓰기 자동 들여쓰기 해제 edit
http://devday.tistory.com/entry/vi-붙여넣기-시-들여쓰기-문제
vi에서 붙여넣기를 하면 들여쓰기 때문에 본래 모양대로 들어가지 않는다.
이 때 다음과 같이 하면 문제를 해결할 수 있다.
:set paste
입력모드에서 붙여넣기를 한다.
붙여넣기 작업을 완료하면 다음과 같이 원래대로 복원할 수 있다.
:set nopaste
http://kldp.org/node/28154