linux shell vim

Convert multiple files to utf8 using vim

Wednesday, December 3, 2014 · 1 minute · 58 words

The fastest and more efficient way to batch multiple files encoding conversion :

vim +"argdo se fileencoding=utf-8 | w | bnext" +"q" ` find . -type f -name "*.rsp"

+“argdo” : execute the following vim commands for each file (filencode, save and next buffer)

+“q” : quit after last one

find : get all files with corresponding name