UNIX treats the end of line differently than other operating systems. Sometimes when editing files in both Windows and UNIX environments, a CTRL-M character is visibly displayed at the end of each line as ^M in vi. To remove the ^M characters at the end of all lines in vi, use: :%s/^V^M//g The ^V is… Continue reading [vi editor] Remove Ctrl-M Char
Category: programming
[vi editor] Remove Auto Indent
Since VIM 6.0 the indent has been improved so much. But sometimes when we are pasting formated text (source code or HTML etc) into a buffer, VIM indents again so that lines will be padded with too much spaces. To turn off the indents, just type this command: :set noautoindent And it’s disappear like magic..… Continue reading [vi editor] Remove Auto Indent