[Python][vim] Notes

Formatting

  1. Put imports & constants at top of the file.
  2. Don’t create objects outside of classes in the global space.
  3. No parentheses with the python “return” method. (It makes people think there should be a tuple.)

Programming

  1. Functional: uses map method to replace for loops.
  2. Procedural
  3. Object

vim

  1. [ctrl-wr] : Swap window placement.
  2. [<space> + q] : Brings up nose error screen.
  3. [ctrl-z] : Puts vim in the background.
  4. [fg] : Puts vim back in the foreground.
  5. [<space> + re] : Reruns last test.
  6. [<space> + nm] : Right test where cursor is.
  7. [<space> + nc] : Run all tests in class.
  8. [<space> + nf] : Runs all test classes.

Github + vim

  1. [ts] : “tig status” brings up screen where you can select files to commit.
  2. [!] : Revert changes.
  3. [u] : Select on ts for commit.
  4. [C] : Commit files.
  5. [“pre” + 9<tab>] : Brings up altysnips selection for code of commit (in code comments). 9<tab> to exit once tag is selected.
  6. [./ci.sh] : Command that runs program in jenkins.
  7. [git push origin initial] to actually push the files up to github. I missed this one earlier.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s