merge two files together

  1. in vim test : :read
  2. just run cat file.1 file.2 > file.merge or cat file.* > file.merge


  1. remove all spaces behind the lines %s/\s\+$//g
  2. remove line with charactor you wont like g/somestring/, d


  1. Show file encoding file $file or in vim :set fileencoding
  2. If you only want to see all kinds of encoding files, just edit ~/.vimrc set encoding=utf-8 fileencodings=ucs-bom,utf-8,cp936
  3. Change encoding :set fileencoding=utf-8
  4. Other ways to change encoding : lconv convmv

Delete BOM

  1. remove UTF-8 BOM :set nobomb
  2. keep UTF-8 BOM :set bomb

About how to search special characters

  1. Referencd :

Reference :