All the posts I have found suggest going to the \"file types\" sub-section under XCode preferences and adding an external editor for a specific file type. However this optio
you have to make the editor you want is the default editor for the file type(cpp/h/lua ..).
step: first time you 'show in finder', then open the file with 'open as', then choose the editor you want, make sure you choose the 'always open it'. then every is ok now.