Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let AIChat respect window placement mods like :vert, :tab, ... #114

Open
Konfekt opened this issue Jul 25, 2024 · 0 comments
Open

let AIChat respect window placement mods like :vert, :tab, ... #114

Konfekt opened this issue Jul 25, 2024 · 0 comments

Comments

@Konfekt
Copy link
Contributor

Konfekt commented Jul 25, 2024

It is only possible to open the buffer with the open cmd, but while often a new tab is convenient, sometimes a horiziontal or vertical tab is more suitable to keep track of the edited buffer.

How about letting :AI(New)Chat using <mods> to respect a supplied :vert/tab/ .... ?

#  doc/map.txt (lines 1827-1847)
	<mods>  The command modifiers, if specified. Otherwise, expands to
		nothing. Supported modifiers are |:aboveleft|, |:belowright|,
		|:botright|, |:browse|, |:confirm|, |:hide|, |:horizontal|,
		|:keepalt|, |:keepjumps|, |:keepmarks|, |:keeppatterns|,
		|:leftabove|, |:lockmarks|, |:noautocmd|, |:noswapfile|
		|:rightbelow|, |:sandbox|, |:silent|, |:tab|, |:topleft|,
		|:unsilent|, |:verbose|, and |:vertical|.
		Note that |:filter| is not supported.
		Examples: >
		    command! -nargs=+ -complete=file MyEdit
				\ for f in expand(<q-args>, 0, 1) |
				\ exe '<mods> split ' .. f |
				\ endfor

		    function! SpecialEdit(files, mods)
			for f in expand(a:files, 0, 1)
			    exe a:mods .. ' split ' .. f
			endfor
		    endfunction
		    command! -nargs=+ -complete=file Sedit
				\ call SpecialEdit(<q-args>, <q-mods>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant