Skip to content

Commit

Permalink
Update README, add screenshots of Alt+. and upload update message
Browse files Browse the repository at this point in the history
  • Loading branch information
wuub committed Aug 2, 2013
1 parent 34a4ceb commit fbb61cf
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Usage

- Open any requirements.txt file or Set syntax: requirements.txt of newly created file.
- Start typing package name -> autocompletion should trigger automatically.
- When cursor is placed on a single line, press `Alt+,` to pin package to the newest version but still in the current major version. For example, if the current version of xyz is 1.2.3, requirements.txt will generate following version line: xyz>=1.2.3,<2.0.0 following http://semver.org/.
- If you wish to pin exact versions, use `Alt+Shift+,` -> line will be replaced with xyz==1.2.3
- This package supports mutliline and multicursor selections. If you wish to bring requirements.txt file up to date, just `Ctrl+A` & `Alt+Shift+`, it.
- When cursor is placed on a single line, press `Alt+,` to pin package to the most recent version but still in the current major line. For example, if the current version of xyz is 1.2.3, requirements.txt will generate following version line: xyz>=1.2.3,<2.0.0 following http://semver.org/.
- If you wish to hard pin most recent versions, use `Alt+Shift+,` -> line will be replaced with xyz==1.2.3
- If you wish to pin a specific version, press `Alt+.` (soft) or `Alt+Shift+.` (hard) and pick a version from a quick panel.
- Commands with `,` support mutliline and multicursor selections. If you wish to bring requirements.txt file up to date, just `Ctrl+A` & `Alt+Shift+`.
- Using requirements.txt also normalizes package names, so mysql-python becomes MySQL-python.


Expand All @@ -24,9 +25,11 @@ Screenshots

* ![](./doc/img/autocomplete.png) Autocomplete
* ![](./doc/img/completed.png) Completed
* ![](./doc/img/soft_pin.png) Soft pinned `Alt+,`
* ![](./doc/img/hard_pin.png) Hard pinned `Alt+Shift+,`
* ![](./doc/img/soft_ver_sel.png) Select exact version for soft pin `Alt+.`
* ![](./doc/img/hard_ver_sel.png) Select exact version for hard pin `Alt+Shift+.`
* ![](./doc/img/soft_pin.png) Automatically soft pin most recent version `Alt+,`
* ![](./doc/img/hard_pin.png) Automatically hard pin most recent version `Alt+Shift+,`
* ![](./doc/img/selection.png) Multi-line selection
* ![](./doc/img/selection_soft.png) Multi-line selection & `Alt+,`
* ![](./doc/img/multicursor.png) Multiple cursors
* ![](./doc/img/multicursor_hard.png) Multiple cursort & `Alt+Shift+,`
* ![](./doc/img/multicursor_hard.png) Multiple cursor & `Alt+Shift+,`
Binary file added doc/img/hard_ver_sel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/soft_ver_sel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"0.2.0": "messages/0.2.0.txt"
}
7 changes: 7 additions & 0 deletions messages/0.2.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
=======================
requirements.txt 0.2.0
=======================

Changelog:
- BUGFIX: core rewritten to make it work on OSX+ST2 and Linux+ST2 2.0.2,
- NEW: Alt+. and Alt+Shift+. let you choose specific version
2 changes: 2 additions & 0 deletions requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def _parse_version_parts(s):


def _releases(name, show_hidden=False):
"""Because ServerProxy().package_releases() is soooo f*$& broken
under different ST2/3 + osx/windows/linux configurations"""
template = '''<?xml version='1.0'?>\n<methodCall>\n<methodName>package_releases</methodName>\n<params>\n<param>\n<value><string>{name}</string></value>\n</param>\n<param>\n<value><boolean>{flag}</boolean></value>\n</param>\n</params>\n</methodCall>\n'''
flag = 1 if show_hidden else 0
payload = template.format(name=name, flag=flag).encode("utf-8")
Expand Down

0 comments on commit fbb61cf

Please sign in to comment.