[GH-ISSUE #107] Record already opened vim session #698

Closed
opened 2026-03-15 08:54:58 +03:00 by kerem · 6 comments
Owner

Originally created by @hpurmann on GitHub (Jun 22, 2015).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/107

I want to record a particular thing inside of vim (e.g. this neomake to syntastic comparison which is currently just a gif).

To be as minimal as possible, I don't want to include opening neovim and jumping to the right line.

Is there a way to record a certain terminal window which is already opened? I imagine this could be great in combination with tmux (remote record certain pane).

Originally created by @hpurmann on GitHub (Jun 22, 2015). Original GitHub issue: https://github.com/asciinema/asciinema/issues/107 I want to record a particular thing inside of vim (e.g. this [neomake to syntastic comparison](http://hpurmann.com/2015/06/16/neovim-asynchronous-linting/) which is currently just a gif). To be as minimal as possible, I don't want to include opening neovim and jumping to the right line. Is there a way to record a certain terminal window which is already opened? I imagine this could be great in combination with tmux (remote record certain pane).
kerem closed this issue 2026-03-15 08:55:03 +03:00
Author
Owner

@ku1ik commented on GitHub (Jun 22, 2015):

Try asciinema rec -c "vim file +123". Or asciinema rec -c "tmux attach -t session1".

<!-- gh-comment-id:114084843 --> @ku1ik commented on GitHub (Jun 22, 2015): Try `asciinema rec -c "vim file +123"`. Or `asciinema rec -c "tmux attach -t session1"`.
Author
Owner

@ku1ik commented on GitHub (Jun 22, 2015):

You could first zoom a pane of your choosing (tmux has this) and then asciinema rec -c "tmux attach -t session1".

<!-- gh-comment-id:114085757 --> @ku1ik commented on GitHub (Jun 22, 2015): You could first zoom a pane of your choosing (tmux has this) and then `asciinema rec -c "tmux attach -t session1"`.
Author
Owner

@hpurmann commented on GitHub (Jun 22, 2015):

Yeah this sounds like a really good idea. I'll try that soon and give feedback. Anyway: great tool, thanks!

<!-- gh-comment-id:114086370 --> @hpurmann commented on GitHub (Jun 22, 2015): Yeah this sounds like a really good idea. I'll try that soon and give feedback. Anyway: great tool, thanks!
Author
Owner

@hpurmann commented on GitHub (Jun 22, 2015):

Works like a charm. But for some reason there seems to be an issue with the playback mode. I get 1;2 printed inside of vim as some line number. After detaching, I see that as well.

screen shot 2015-06-22 at 15 19 05

However, when looking at the uploaded cast, it looks just fine. Is this a known issue?

<!-- gh-comment-id:114100656 --> @hpurmann commented on GitHub (Jun 22, 2015): Works like a charm. But for some reason there seems to be an issue with the playback mode. I get 1;2 printed inside of vim as some line number. [After detaching, I see that as well](http://superuser.com/questions/629227/tmux-prints-12c-whenever-i-start-it-or-re-attach-to-a-session-in-cygwin). ![screen shot 2015-06-22 at 15 19 05](https://cloud.githubusercontent.com/assets/1228437/8282593/197e3aaa-18f2-11e5-9ae3-c43e9732a59d.png) However, when looking at [the uploaded cast](https://asciinema.org/a/78qkebbeamzma1fzcqqjdytyi), it looks just fine. Is this a known issue?
Author
Owner

@hpurmann commented on GitHub (Jun 22, 2015):

In regular vim, this issue doesn't appear on playback. Really strange but probably nothing associated with asciinema. Closing this issue now. Thanks for your help.

<!-- gh-comment-id:114112545 --> @hpurmann commented on GitHub (Jun 22, 2015): In regular vim, this issue doesn't appear on playback. Really strange but probably nothing associated with asciinema. Closing this issue now. Thanks for your help.
Author
Owner

@ku1ik commented on GitHub (Jun 22, 2015):

I know about this issue. It's a terminal itself putting these characters on vim's stdin (emulating user typing them) so vim can read and interpret them. It's a way of asking the terminal for its parameters. During playback asciinema sends the same escape codes that were emmited by vim but doesn't read from stdin so they stay in your prompt after asciinema finishes playback. The same thing happens for script/scriptreplay tools.

I'm opening a new issue to keep track of this.

<!-- gh-comment-id:114197153 --> @ku1ik commented on GitHub (Jun 22, 2015): I know about this issue. It's a terminal itself putting these characters on vim's stdin (emulating user typing them) so vim can read and interpret them. It's a way of asking the terminal for its parameters. During playback asciinema sends the same escape codes that were emmited by vim but doesn't read from stdin so they stay in your prompt after asciinema finishes playback. The same thing happens for `script`/`scriptreplay` tools. I'm opening a new issue to keep track of this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#698
No description provided.