Skip to content

Use SendToTmux in default bindings. - #2

Open
wesleyd wants to merge 3 commits into
sjl:masterfrom
wesleyd:master
Open

wesleyd wants to merge 3 commits into
sjl:masterfrom
wesleyd:master

Conversation

@wesleyd

@wesleyd wesleyd commented Nov 28, 2020

Copy link
Copy Markdown

The Send_to_tmux function doesn't check for newlines, but SendToTmux
does. I've found that the two functions are indistinguishable in
practice for most languages, but when I'm sending to a python repl, I
really want g:tslime_ensure_trailing_newline=2 to be acknowleged.

This also fixes an oddity where sending a small sub-sexpr to a lisp
repl didn't append a newline. With this fix, it will.

The Send_to_tmux function doesn't check for newlines, but SendToTmux
does. I've found that the two functions are indistinguishable in
practice for most languages, but when I'm sending to a python repl, I
really want g:tslime_ensure_trailing_newline=2 to be acknowleged.

This also fixes an oddity where sending a small sub-sexpr to a lisp
repl didn't append a newline. With this fix, it will.
When you fully unindent something and keep typing, a python repl
gets mad - it wants an extra blank line to process what you just
pasted. This adds that extra newline.

It would be nice if python had something like a, y'know, closing
brace or something we could send instead, but I guess a newline
*is* a python closing brace.

This is such a hack.
AFAICT, python 3.13 adds a new repl that knows how to handle blank
lines. So we don't need tmux's contortions to accomadate that.

I'll also have to tell my vimrc to no longer send *two* newlines
at the end of a paste, and to send only one.
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

Successfully merging this pull request may close these issues.

1 participant