Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify, tidy, and improve gitignore.py #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sijk
Copy link

@sijk sijk commented Jan 11, 2013

I haven't changed any externally visible functionality, but I have greatly simplified the implementation.

  • Read the list of boilerplate files from disk
  • Removed a bunch of duplicate code
  • Removed hard-coded paths

It should now be easier to maintain this package since you won't have to update the list in gitignore.py (4 times!!) if you add/remove any boilerplate files.

sijk added 2 commits January 12, 2013 01:05
- Read list of available boilerplates from subdirectory
  - Easier to maintain

- Don't inherit sublime.Window
  - This is a WindowCommand, not a Window

- Removed duplicate code
  - first_select, second_select
  - 4 occurrences of essentially the same list

- Removed hard-coded paths
Hmm... this repo needs a .gitignore! :-P
count = count+1

print dir_list
path = os.path.join(os.path.dirname(__file__), 'boilerplates')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On ST2 using Windows, this returns .\boilerplates, and causes line 10 to fail. It returns the full path in ST3 though (I'm currently making the plugin compatible with ST3)

sijk added 2 commits March 6, 2013 13:01
Apparently using a relative path doesn't work on Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants