simplenote-vim / simplenote.vim

vim plugin to interact with the simplenote service
http://www.vim.org/scripts/script.php?script_id=3582
MIT License
368 stars 31 forks source link

Ask for credentials separately #94

Closed derteta closed 7 years ago

derteta commented 7 years ago

Hi,

I created this fork since the way I'd like to work with my Simplenote credentials doesn't seem to work at the moment. I'd like to store my email/username in my .vimrc, but not my password. However, if I don't set g:SimplenotePassword the plugin always asks for both username and password.

My changes to set_cred will ensure that only the part of the credentials is asked for that isn't specified. Please let me know if there are any problems with the changes.

@mrtazz @atomicules I'm assuming that you guys are the best people to review this PR!?

Cheers

atomicules commented 7 years ago

Hi. Thanks! I will take a look (hopefully) soon.

atomicules commented 7 years ago

Hi, thanks for going to the length of writing tests. How are you intending that those are run?

Admittedly I haven't looked in detail, but I guess there is a reason why you couldn't user Vader?

Apart from quibbles over the tests this looks like a good addition though.

derteta commented 7 years ago

Hey, thanks for having a look.

I'm not sure about running the tests automatically. It seems simplenote.py is using travis ci for that purpose. Maybe that's an option here, too? How are the Vader tests run?

I haven't used Vader for 2 reasons:

  1. I have no experience with it (lame excuse, I know 😄 ).
  2. My changes only affected 1 function and I strongly believe in keeping the scope of tests minimal (to keep them fast).

However, if a few Vader tests are more in line with the general consensus, I'd be happy to spend some time writing them.

atomicules commented 7 years ago

I've merged that in without the tests for now.

derteta commented 7 years ago

Great, thanks!