Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Open file promp function added & help updated

Prompt opens asking user to input relative file path, which on hitting
OK will attempt to open. Triggered with CTRL+o shortcut, which is also
added to help screen. Also clarified CTRL+g and noted it's anywhere, not
elsewhere.
  • Loading branch information...
commit e2adcabc5b8e7640349ae71afbe3958666d45f2d 1 parent a33ded4
@mattpass authored
Showing with 18 additions and 2 deletions.
  1. +3 −2 lib/help.php
  2. +15 −0 lib/ice-coder.js
View
5 lib/help.php
@@ -48,13 +48,14 @@
<span class="key">Right click</span> <span class="shortcut">Options for selected</span><br>
<span class="key">Delete</span> <span class="shortcut">Delete selected</span><br><br>
- <h2>Elsewhere</h2>
+ <h2>Anywhere</h2>
<span class="key">CTRL <span class="plus">+</span> &rarr;</span> <span class="shortcut">Next tab</span><br>
<span class="key">CTRL <span class="plus">+</span> &larr;</span> <span class="shortcut">Previous tab</span><br>
<span class="key">CTRL <span class="plus">+</span> +</span> <span class="shortcut">New tab</span><br>
<span class="key">CTRL <span class="plus">+</span> -</span> <span class="shortcut">Close current tab</span><br>
+ <span class="key">CTRL <span class="plus">+</span> o</span> <span class="shortcut">Open file prompt</span><br>
<span class="key">CTRL <span class="plus">+</span> f</span> <span class="shortcut">Find</span><br>
- <span class="key">CTRL <span class="plus">+</span> g</span> <span class="shortcut">Go to line</span><br>
+ <span class="key">CTRL <span class="plus">+</span> g</span> <span class="shortcut">Focus on Go to line input</span><br>
<span class="key">CTRL <span class="plus">+</span> s</span> <span class="shortcut">Save</span><br>
<span class="key">CTRL <span class="plus">+</span> Shift <span class="plus">+</span> s</span> <span class="shortcut">Save as...</span><br>
<span class="key">CTRL <span class="plus">+</span> Enter</span> <span class="shortcut">View webpage</span><br>
View
15 lib/ice-coder.js
@@ -584,6 +584,15 @@ var ICEcoder = {
}
},
+ // Show file prompt to open file
+ openPrompt: function() {
+ var fileLink;
+
+ if(fileLink = top.ICEcoder.getInput('Enter relative file path prefixed with /','')) {
+ top.ICEcoder.openFile(fileLink);
+ }
+ },
+
// Save a file
saveFile: function(saveAs) {
var saveType;
@@ -2037,6 +2046,12 @@ var ICEcoder = {
top.ICEcoder.ctrlKeyDown = false;
return false;
+ // CTRL+O (Open Prompt)
+ } else if(key==79 && top.ICEcoder.ctrlKeyDown==true) {
+ top.ICEcoder.openPrompt();
+ top.ICEcoder.ctrlKeyDown = false;
+ return false;
+
// CTRL+Space (Show snippet)
} else if(key==32 && top.ICEcoder.ctrlKeyDown==true && area=="content") {
top.ICEcoder.addSnippet();
Please sign in to comment.
Something went wrong with that request. Please try again.