diff options
author | Joe Dight <joe.dight@ntmail.uk> | 2022-06-29 22:41:42 +0100 |
---|---|---|
committer | Joe Dight <joe.dight@ntmail.uk> | 2022-07-05 15:36:21 +0100 |
commit | 15b7bab3a7a7f0cdd18b1c8c37f86a43edc3387f (patch) | |
tree | 84311068f356c015f0f90133ec23d5c3ad2f162a | |
parent | e18d0be2fb036f0832f4aaadc369359f9d19bf4a (diff) |
Allow changing default_open_file_under_cursor_cmd at runtime
-rwxr-xr-x | src/doc | 6 | ||||
-rwxr-xr-x | src/gram.y | 9 |
2 files changed, 14 insertions, 1 deletions
@@ -59,7 +59,10 @@ Navigation commands: g$ Go to the rightmost column visible on screen. gM Go to the middle column on the screen. gf Open filename or URL in current cell. - Uses helper script 'scopen'. + Uses helper script 'scopen' by default. + A different executable may be used by changing the + 'default_open_file_under_cursor_cmd' configuration variable + at runtime, using the :set command. H Go to the top row visible on screen. L Go to the lowest row visible on screen. M Go to the middle row on the screen. @@ -2162,6 +2165,7 @@ Commands for handling cell content: COPY_TO_CLIPBOARD_DELIMITED_TAB COPY_TO_CLIPBOARD_DELIMITED_TAB = {NUMBER} NOCOPY_TO_CLIPBOARD_DELIMITED_TAB + DEFAULT_OPEN_FILE_UNDER_CURSOR_CMD = {strarg} NEWLINE_ACTION = {NUMBER} TM_GMTOFF TM_GMTOFF = {num} @@ -288,6 +288,7 @@ token S_YANKCOL %token K_DEFAULT_PASTE_FROM_CLIPBOARD_CMD %token K_COPY_TO_CLIPBOARD_DELIMITED_TAB %token K_NOCOPY_TO_CLIPBOARD_DELIMITED_TAB +%token K_DEFAULT_OPEN_FILE_UNDER_CURSOR_CMD %token K_IGNORECASE %token K_NOIGNORECASE %token K_TM_GMTOFF @@ -1684,6 +1685,14 @@ setitem : else parse_str(user_conf_d, "copy_to_clipboard_delimited_tab=1", TRUE); } | K_NOCOPY_TO_CLIPBOARD_DELIMITED_TAB { parse_str(user_conf_d, "copy_to_clipboard_delimited_tab=0", TRUE); } + | K_DEFAULT_OPEN_FILE_UNDER_CURSOR_CMD '=' strarg { + char cmd[MAXCMD]; + char * s = (char *) $3; + sprintf(cmd, "default_open_file_under_cursor_cmd=%s", s); + parse_str(user_conf_d, cmd, FALSE); + scxfree(s); + } + | K_NEWLINE_ACTION '=' NUMBER { if ($3 == 0) parse_str(user_conf_d, "newline_action=0", TRUE); } | K_COMMAND_TIMEOUT { parse_str(user_conf_d, "command_timeout=3000", TRUE); } |