I’m working in a plugin where sometimes I need to move the file I’m working on to a new path, when it happens, I need to re-open it.
At this moment I’m doing that with:
window.run_command('close_file')
move(currentfilepath, newpath)
window.open_file(newpath)
I want to know if there is a better way to do this, I would like to avoid to close and re-open the ST windows
I was trying with:
move(currentfilepath, newpath)
view.file_name = newpath
But I suppose it doesn’t change the path in the buffer, does anyone knows if is possible to do something similar without close the current view?