Closed sding3 closed 1 year ago
There's no need for a :GoExport
; you can use the tab key with :GoRename
to cycle between PascalCase and camelCase forms.
@sding3 you may also be interested in changing your g:go_gorename_prefill
thusly:
let g:go_gorename_prefill = 'expand("<cword>") =~# "^[A-Z]" ? go#util#camelcase(expand("<cword>")) : go#util#pascalcase(expand("<cword>"))'
If you do that, then the other case will be the default value when :GoRename
is not given an argument, and you could easily enter: :GoRename<Enter><Enter>
to do the export. In such a case, the (go-rename)
mapping would also benefit.
@bhcleek - thank you, that's exactly what I need!
Add a new command
GoExport
which would export the current symbol if it's unexported currently, or unexport if it's exported currently.Yes, this is possible with
GoRename
today, but it's a bit cumbersome.