static void search(void);
static void execute(void);
static void find(char* arg);
+static void open_file(void);
// Tag/Cmd Execution
static Tag* tag_lookup(char* cmd);
static KeyBinding Bindings[] = {
/* Function Keys */
//{ KEY_CTRL_F1, welcome },
+ //{ KEY_CTRL_F2, ctags_scan },
+ //{ KEY_CTRL_F11, fullscreen },
/* Standard Unix Shortcuts */
//{ KEY_CTRL_U, del_to_bol },
{ KEY_CTRL_T, change_focus },
{ KEY_CTRL_Q, quit },
{ KEY_CTRL_F, search },
- { KEY_CTRL_E, execute },
+ { KEY_CTRL_D, execute },
+
+ /* Picker Shortcuts */
+ { KEY_CTRL_O, open_file },
+ //{ KEY_CTRL_P, find_ctag },
+ //{ KEY_CTRL_G, goto_ctag },
+
{ 0, NULL }
};
static char* PasteCmd[] = { "xsel", "-bo", NULL };
#endif
static char* ShellCmd[] = { "/bin/sh", "-c", NULL, NULL };
+static char* PickFileCmd[] = { "./xfilepick", ".", NULL };
+static char* OpenCmd[] = { "./xedit", NULL, NULL };
/* Main Routine
*****************************************************************************/
view_findstr(getview(EDIT), arg);
}
+static void open_file(void) {
+ char* file = cmdread(PickFileCmd);
+ if (file) {
+ file[strlen(file)-1] = '\0';
+ OpenCmd[1] = file;
+ free(cmdread(OpenCmd));
+ }
+ free(file);
+}
+
/* Tag/Cmd Execution
*****************************************************************************/
static Tag* tag_lookup(char* cmd) {