The warning "Set encoding before setting scriptencoding (see :help :scriptencoding)" is reported when a set encoding= is found in any file after :scriptencoding
To reproduce:
- Create a file
dir1/file1.vim with the following:
set encoding=utf-8
scriptencoding utf-8
- Create a file
dir2/file2.vim with the following:
Expected result: no error
Actual result:
dir2/file2.vim:1:1: Set encoding before setting scriptencoding (see :help :scriptencoding)