You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love opening a new file and having the package name filled in.
I don't have much use for the default template, though. I set it to an empty file.
It would be nice if there were an option so that opening a new go file in an empty directory caused the buffer to contain "package d", where d is the name of the directory.
I'd have to change it if I were writing a command, but more often than not it would be the correct action, at least in my case.
The text was updated successfully, but these errors were encountered:
You can easily add a new setting, such as go_template_no_file which is added to line 14. So we would check first if go_template_no_file is set to 1 or if l:package_name is -1. Because go_template_no_file would come first, the else branch will be executed, which in return does what you want, basically creating a file with the package name.
I love opening a new file and having the package name filled in.
I don't have much use for the default template, though. I set it to an empty file.
It would be nice if there were an option so that opening a new go file in an empty directory caused the buffer to contain "package d", where d is the name of the directory.
I'd have to change it if I were writing a command, but more often than not it would be the correct action, at least in my case.
The text was updated successfully, but these errors were encountered: