About 95% of the problems new pi users have is that they don't understand how Linux permissions work.
The default Raspberry pi user is 'pi' who is non-privileged. Weewx runs as root which 'is' privileged.
So all you need to do is to preface your command with "sudo" so that your non-privileged user runs the command 'with' privileges. It's notionally like Windows where you can RunAs administrator.
So as Andrew replied, you run "sudo vi" or "sudo nano" or "sudo whatever-editor-you-are-using" and you'll be fine.