File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import * as autocmd from "https://deno.land/x/denops_std@v2.1.3/autocmd/mod.ts";
33import * as anonymous from "https://deno.land/x/denops_std@v2.1.3/anonymous/mod.ts" ;
44import * as batch from "https://deno.land/x/denops_std@v2.1.3/batch/mod.ts" ;
55import * as fn from "https://deno.land/x/denops_std@v2.1.3/function/mod.ts" ;
6+ import * as vars from "https://deno.land/x/denops_std@v2.1.3/variable/mod.ts" ;
67import * as option from "https://deno.land/x/denops_std@v2.1.3/option/mod.ts" ;
78import { deferred } from "https://deno.land/std@0.111.0/async/mod.ts" ;
89
@@ -17,7 +18,8 @@ export async function open(denops: Denops): Promise<void> {
1718 * Open a `filename` buffer in a new tab page and wait the buffer is closed.
1819 */
1920export async function edit ( denops : Denops , filename : string ) : Promise < void > {
20- await denops . cmd ( "silent noswapfile tabedit `=filename`" , { filename } ) ;
21+ let opener = await vars . g . get ( denops , "guise_edit_opener" , "tab drop" ) ;
22+ await denops . cmd ( `silent noswapfile ${ opener } \`=filename\` | edit` , { filename } ) ;
2123 const [ winid , bufnr ] = await batch . gather ( denops , async ( denops ) => {
2224 await fn . win_getid ( denops ) ;
2325 await fn . bufnr ( denops ) ;
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ INTERFACE *guise-interface*
2525-----------------------------------------------------------------------------
2626VARIABLE *guise-variable*
2727
28+ *g:guise_edit_opener*
29+ Opener expression used to edit file
30+
31+ Default: "tab drop"
32+
2833*g:guise#disable_vim*
2934 Do NOT start channel server for Vim.
3035
You can’t perform that action at this time.
0 commit comments