Adds an editorconfig file
Coding style: from 4 spaces to 2
x map, maps only visual mode as v map, maps both visual and select mode
Makes good usage of global and script local functions
Simplifies this function body