The char position used by $fileNameExtPos is actually from the
beginning, not end, so is useless here
However, we know that 'less' and 'scss' are 4 chars, so we can just
slice off those 4 chars always
Establish panes and which one we are looking at when running these
functions
Note: May need to not do this for switchMode, as the diff pane should
fall in line with the main pane
Look to fileExt to determine the file type by extension rather than
string in fileName which is the path. This means .c isn't mistakenly
picked up in paths such as /httpdocs/mydomain.com/file.rb
Simplified code with 2 improved ternary statements
className dropped by CodeMirror, need to pick up "error" from type
As it may not be there, we need to test for its existence and it's also
be part of a string eg "tag brackets error", so indexOf is needed
setLine deprecated, now need to use replaceRange and pass 2 objects for
start & end (line & ch)
getSelection needs "around" param as default is now "end"
Using commentChar now to handle char used on commenting (# or % for
Erlang)
Erlang, Julia, Java and YAML commenting covered
Include Python also as forgotten
adjustCursor to be set to 1 on single chars, overriding 2
Cursor adjusting done here now, not in parent function anymore as
adjustCursor value not available from that scope