Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplified the choice of contexts for actions. When you create a new …

…action, a tm_dialog menu pops up for you to pick a context out of. When you want to change the context of an action, a similar tm_dialog menu pops up.

All other ways of changing the context are removed.
Also, the "Actions for Context" command is being removed, since All Actions easily replicates it (click on a context in the list of the left to only see that context.
The other two review commands (for Next actions) will also be merged into this one HTML window.

Future plans: To have this window update itself in the background, so the user could just have it running at all times.

git-svn-id: http://svn.textmate.org/trunk/Bundles/GTDAlt.tmbundle@5902 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
commit 71d72c25e819b7a8bff1755dca8f9b4c5014abd2 1 parent 47898e2
Charilaos Skiadas authored
View
40 Commands/Extend.tmCommand
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>beforeRunningCommand</key>
- <string>nop</string>
- <key>command</key>
- <string>#!/usr/bin/env ruby
-require File.join(ENV['TM_BUNDLE_SUPPORT'],'bin','GTDUtils.rb')
-require File.join(ENV['TM_SUPPORT_PATH'],'lib','escape.rb')
-include GTDLight
-line = STDIN.read
-contextList = GTDLight.get_env_contexts
-word = line.scan(/^\s*@(\S+)/)
-word = word.empty? ? line : word[0][0]
-len = word.length
-contextList = GTDLight.get_env_contexts
-choice = contextList.find {|i| i.slice(0..len-1) == word }
-if choice then
- print line.sub(/@(\S+)($|\s+)/) {|text,space| "@" + e_sn(choice) + ((space.nil? or space == "") ? " " : space)+"$0"}
-else
- print e_sn(line) + " "
-end
-</string>
- <key>fallbackInput</key>
- <string>line</string>
- <key>input</key>
- <string>selection</string>
- <key>keyEquivalent</key>
- <string> </string>
- <key>name</key>
- <string>Extend</string>
- <key>output</key>
- <string>insertAsSnippet</string>
- <key>scope</key>
- <string>text.gtdalt storage.type.context.action.gtdalt</string>
- <key>uuid</key>
- <string>52351CB8-C7BB-4119-AB3D-D7329A1B076A</string>
-</dict>
-</plist>
View
33 Commands/New.tmCommand
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+require ENV['TM_BUNDLE_SUPPORT'] + '/bin/GTDUtils.rb'
+require ENV['TM_SUPPORT_PATH'] + '/lib/dialog.rb'
+contextList = GTDLight.get_env_contexts
+choice = Dialog.menu(contextList)
+if choice then
+ print "@#{contextList[choice]} "
+else
+require ENV['TM_SUPPORT_PATH'] + '/lib/exit_codes.rb'
+ TextMate.exit_discard
+end
+</string>
+ <key>input</key>
+ <string>none</string>
+ <key>keyEquivalent</key>
+ <string>@</string>
+ <key>name</key>
+ <string>New</string>
+ <key>output</key>
+ <string>afterSelectedText</string>
+ <key>scope</key>
+ <string>text.gtdalt - meta.action - meta.line.project - meta.note</string>
+ <key>uuid</key>
+ <string>BBA04431-8960-4017-A684-7FBACB0F7FFF</string>
+</dict>
+</plist>
View
28 Commands/Select Context.tmCommand
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>beforeRunningCommand</key>
- <string>nop</string>
- <key>command</key>
- <string>#!/usr/bin/env ruby
-require File.join(ENV['TM_SUPPORT_PATH'],'lib','escape.rb')
-line = STDIN.read
-print e_sn(line).sub(/@(\S+)/,'@${1:\1}')
-</string>
- <key>fallbackInput</key>
- <string>line</string>
- <key>input</key>
- <string>selection</string>
- <key>keyEquivalent</key>
- <string>~c</string>
- <key>name</key>
- <string>Type</string>
- <key>output</key>
- <string>insertAsSnippet</string>
- <key>scope</key>
- <string>text.gtdalt meta.action</string>
- <key>uuid</key>
- <string>B8F4EBBA-F663-4507-A25A-023DD038F675</string>
-</dict>
-</plist>
View
28 Commands/Show Contexts.tmCommand
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>beforeRunningCommand</key>
- <string>nop</string>
- <key>command</key>
- <string>#!/usr/bin/env ruby
-require File.join(ENV['TM_BUNDLE_SUPPORT'],'bin','GTDUtils.rb')
-include GTDLight
-contextList = GTDLight.get_env_contexts
-print contextList.join("\n")</string>
- <key>fallbackInput</key>
- <string>line</string>
- <key>input</key>
- <string>none</string>
- <key>keyEquivalent</key>
- <string>^?</string>
- <key>name</key>
- <string>Show Contexts</string>
- <key>output</key>
- <string>showAsTooltip</string>
- <key>scope</key>
- <string>text.gtdalt storage.type.action.context.gtdalt</string>
- <key>uuid</key>
- <string>D2C7662A-04A5-4845-A1AB-A71CA35083B7</string>
-</dict>
-</plist>
View
44 Commands/actions for context.tmCommand
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>beforeRunningCommand</key>
- <string>saveActiveFile</string>
- <key>command</key>
- <string>#!/usr/bin/env ruby
-require File.join(ENV['TM_BUNDLE_SUPPORT'],'bin','GTDInfoRoutines.rb')
-require File.join(ENV['TM_SUPPORT_PATH'],'lib','dialog.rb')
-include GTD
-word = STDIN.read
-case word
-when /^@?(\w+)$/
- w = $1
-when /\s+@(\w+)\s*.*/
- w = $1
-end
-GTD.process_directory
-contexts = GTD.get_contexts
-if contexts.include?(word) then
- context = word
-else
- context = Dialog.request_item( :title =&gt; 'Listing actions for context', :prompt =&gt; 'Choose the new context', :items =&gt; contexts )
- exit unless context
-end
-#puts context
-puts html_actions_for_context(context)</string>
- <key>fallbackInput</key>
- <string>word</string>
- <key>input</key>
- <string>selection</string>
- <key>keyEquivalent</key>
- <string>^~@9</string>
- <key>name</key>
- <string>All for Context</string>
- <key>output</key>
- <string>showAsHTML</string>
- <key>scope</key>
- <string>text.gtdalt</string>
- <key>uuid</key>
- <string>C69611C8-DB19-45E5-A4C9-6665B77765A3</string>
-</dict>
-</plist>
View
31 Commands/change context.tmCommand
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>beforeRunningCommand</key>
- <string>nop</string>
- <key>command</key>
- <string>#!/usr/bin/env ruby
-require ENV['TM_BUNDLE_SUPPORT']+"/bin/GTDUtils.rb"
-include GTDLight
-line = STDIN.read
-#GTD.process_directory
-contextList = GTDLight.get_env_contexts
-print line.sub(/@(\S+)/) {|text| "@"+contextList.next(text[1..-1])}
-</string>
- <key>fallbackInput</key>
- <string>line</string>
- <key>input</key>
- <string>selection</string>
- <key>keyEquivalent</key>
- <string>^c</string>
- <key>name</key>
- <string>Next</string>
- <key>output</key>
- <string>replaceSelectedText</string>
- <key>scope</key>
- <string>text.gtdalt meta.action</string>
- <key>uuid</key>
- <string>B68706F9-891B-46FB-ABC0-39FCE6DB7819</string>
-</dict>
-</plist>
View
2  Commands/choose context.tmCommand
@@ -26,7 +26,7 @@ end
<key>keyEquivalent</key>
<string>^~c</string>
<key>name</key>
- <string>Choose</string>
+ <string>Change Context</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
View
42 Macros/EOL + new action.tmMacro
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>commands</key>
- <array>
- <dict>
- <key>command</key>
- <string>moveToEndOfLine:</string>
- </dict>
- <dict>
- <key>command</key>
- <string>insertNewline:</string>
- </dict>
- <dict>
- <key>argument</key>
- <dict>
- <key>content</key>
- <string>@${0:email}</string>
- <key>keyEquivalent</key>
- <string>@</string>
- <key>name</key>
- <string>new action</string>
- <key>scope</key>
- <string>text.gtdalt</string>
- <key>uuid</key>
- <string>6152B5ED-9BE0-4AAB-AB58-181D297A1CFF</string>
- </dict>
- <key>command</key>
- <string>insertSnippetWithOptions:</string>
- </dict>
- </array>
- <key>keyEquivalent</key>
- <string></string>
- <key>name</key>
- <string>New (on next line)</string>
- <key>scope</key>
- <string>text.gtdalt</string>
- <key>uuid</key>
- <string>4EDA94AC-8A6A-457D-A58B-DE6921F7D1FD</string>
-</dict>
-</plist>
View
59 Macros/New (on next line).tmMacro
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>commands</key>
+ <array>
+ <dict>
+ <key>command</key>
+ <string>moveToEndOfLine:</string>
+ </dict>
+ <dict>
+ <key>command</key>
+ <string>insertNewline:</string>
+ </dict>
+ <dict>
+ <key>argument</key>
+ <dict>
+ <key>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+require ENV['TM_BUNDLE_SUPPORT'] + '/bin/GTDUtils.rb'
+require ENV['TM_SUPPORT_PATH'] + '/lib/dialog.rb'
+contextList = GTDLight.get_env_contexts
+choice = Dialog.menu(contextList)
+if choice then
+ print "@#{contextList[choice]} "
+else
+require ENV['TM_SUPPORT_PATH'] + '/lib/exit_codes.rb'
+ TextMate.exit_discard
+end
+</string>
+ <key>input</key>
+ <string>none</string>
+ <key>keyEquivalent</key>
+ <string>@</string>
+ <key>name</key>
+ <string>New</string>
+ <key>output</key>
+ <string>afterSelectedText</string>
+ <key>scope</key>
+ <string>text.gtdalt - meta.action - meta.line.project - meta.note</string>
+ <key>uuid</key>
+ <string>BBA04431-8960-4017-A684-7FBACB0F7FFF</string>
+ </dict>
+ <key>command</key>
+ <string>executeCommandWithOptions:</string>
+ </dict>
+ </array>
+ <key>keyEquivalent</key>
+ <string></string>
+ <key>name</key>
+ <string>New (on next line)</string>
+ <key>scope</key>
+ <string>text.gtdalt</string>
+ <key>uuid</key>
+ <string>4EF0270A-A1D7-4E98-8123-6E6F1305B7E2</string>
+</dict>
+</plist>
View
16 Snippets/new action.tmSnippet
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>content</key>
- <string>@${0:email}</string>
- <key>keyEquivalent</key>
- <string>@</string>
- <key>name</key>
- <string>New</string>
- <key>scope</key>
- <string>text.gtdalt - meta.action - meta.line.project - meta.note</string>
- <key>uuid</key>
- <string>6152B5ED-9BE0-4AAB-AB58-181D297A1CFF</string>
-</dict>
-</plist>
View
34 info.plist
@@ -20,6 +20,7 @@
<string>D41A7357-2D2A-4716-8621-363134EDA81E</string>
<string>------------------------------------</string>
<string>8E083C6C-9C1A-4AD9-AA39-3BCABF925B73</string>
+ <string>0E310136-E497-47BF-82F8-26818C0829AA</string>
</array>
<key>submenus</key>
<dict>
@@ -91,36 +92,23 @@
<key>items</key>
<array>
<string>F4884C32-9046-48E8-AB57-1784AF8C264C</string>
- <string>C69611C8-DB19-45E5-A4C9-6665B77765A3</string>
<string>0DE9B1EC-09AA-4C2D-BA25-0DFC00536B25</string>
<string>DF60A353-8FFE-4516-8F7C-4B9552E6AC27</string>
</array>
<key>name</key>
<string>Active Actions</string>
</dict>
- <key>E74DC67B-874F-4296-90B9-782B06F0CF71</key>
- <dict>
- <key>items</key>
- <array>
- <string>B68706F9-891B-46FB-ABC0-39FCE6DB7819</string>
- <string>2B282247-5930-462F-8D6E-54ADF228EC49</string>
- <string>B8F4EBBA-F663-4507-A25A-023DD038F675</string>
- <string>52351CB8-C7BB-4119-AB3D-D7329A1B076A</string>
- <string>D2C7662A-04A5-4845-A1AB-A71CA35083B7</string>
- </array>
- <key>name</key>
- <string>Context</string>
- </dict>
<key>EA55C412-913F-45AD-979D-0A90666BB862</key>
<dict>
<key>items</key>
<array>
- <string>6152B5ED-9BE0-4AAB-AB58-181D297A1CFF</string>
- <string>4EDA94AC-8A6A-457D-A58B-DE6921F7D1FD</string>
+ <string>BBA04431-8960-4017-A684-7FBACB0F7FFF</string>
+ <string>4EF0270A-A1D7-4E98-8123-6E6F1305B7E2</string>
<string>65FAC309-42DC-4C48-AC0D-BC7AA5864C71</string>
<string>------------------------------------</string>
+ <string>2B282247-5930-462F-8D6E-54ADF228EC49</string>
+ <string>------------------------------------</string>
<string>22E30FFC-D3A0-47FE-B637-AEC86EEBFDF1</string>
- <string>E74DC67B-874F-4296-90B9-782B06F0CF71</string>
<string>------------------------------------</string>
<string>3BF349AD-3452-4CA4-AAA7-8836565E3A5F</string>
<string>BF20459A-D83B-4821-A68D-06F3D885309C</string>
@@ -149,16 +137,11 @@
<string>65E842B0-D1A6-40E7-91C0-3215930AC0EA</string>
<string>FFECDABA-E216-4182-B0CB-7031D279EEDE</string>
<string>98227572-90C0-43C5-A18B-EA2591674553</string>
- <string>6152B5ED-9BE0-4AAB-AB58-181D297A1CFF</string>
+ <string>BBA04431-8960-4017-A684-7FBACB0F7FFF</string>
<string>74B7D57C-F538-41BE-A228-1F077EC8F3B4</string>
- <string>4EDA94AC-8A6A-457D-A58B-DE6921F7D1FD</string>
+ <string>4EF0270A-A1D7-4E98-8123-6E6F1305B7E2</string>
<string>65FAC309-42DC-4C48-AC0D-BC7AA5864C71</string>
- <string>B68706F9-891B-46FB-ABC0-39FCE6DB7819</string>
- <string>B8F4EBBA-F663-4507-A25A-023DD038F675</string>
<string>2B282247-5930-462F-8D6E-54ADF228EC49</string>
- <string>D2C7662A-04A5-4845-A1AB-A71CA35083B7</string>
- <string>52351CB8-C7BB-4119-AB3D-D7329A1B076A</string>
- <string>C69611C8-DB19-45E5-A4C9-6665B77765A3</string>
<string>DF60A353-8FFE-4516-8F7C-4B9552E6AC27</string>
<string>0DE9B1EC-09AA-4C2D-BA25-0DFC00536B25</string>
<string>F4884C32-9046-48E8-AB57-1784AF8C264C</string>
@@ -180,6 +163,9 @@
<string>C36472BD-A8CD-4613-A595-CEFB052E6181</string>
<string>B8601C35-4EBE-4672-8A09-919A6730DC37</string>
<string>E6CF82DF-159E-4B88-B903-4B3BBCDD3233</string>
+ <string>D876C2A8-1E6F-4793-B990-8478DF7552DD</string>
+ <string>EB99AA83-E73B-42F6-88E1-6F8AB29F9BFD</string>
+ <string>0E310136-E497-47BF-82F8-26818C0829AA</string>
</array>
<key>uuid</key>
<string>30FA6EB3-2180-46F8-B2DD-EDA6B443CBB6</string>
Please sign in to comment.
Something went wrong with that request. Please try again.