Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rc windowing new-client: copy buffer and selections from calling client
"new" runs "kak -c" which opens a recently used buffer. More often than not, I rather want to preserve the calling client's buffer and selections. For example I might select a word and run "new" followed by "grep" on the selected word. If the selection is preserved I can use "new grep". A similar scenario is "new lsp-definition". Make "new" use the calling client's buffer and selections to support such scenarios. Center the viewport with vv, matching "edit <file> <line>". Vim does this in <c-w><c-v>. Another scenario is when I want to look at two regions from a file, side-by-side. My initial patch used the code below but Zz seems better: echo "try %| buffer -- '$(printf %s "$kak_buffile" | sed "s/'/''/g; s/|/||/g")' select $kak_selections_desc execute-keys vv |"
- Loading branch information