aboutsummaryrefslogtreecommitdiffstats
path: root/vimput.pl
AgeCommit message (Collapse)Author
2017-12-15Take note of a possible message level to use for errorsTeddy Wing
2017-12-15Add a TODO to see if we can replace our signal with a commandTeddy Wing
2017-12-15Open a Tmux split with the prompt contentsTeddy Wing
After writing to the file, our keyboard shortcut opens a Tmux pane with a Vim and our input message available for editing. If we're not in Tmux, we should print an error message. Need to rewrite that to print a real Irssi message.
2017-12-15Write input contents on C-xTeddy Wing
Instead of writing the input message to a file on every key press, only write when Ctrl-X is pressed. This will be our command for opening Vim.
2017-12-15Write input contents on key pressTeddy Wing
Now instead of printing the current input to the Irssi window, write it to a script-specific file. The filename is inspired by Git. I figure we'll probably want to remove the file when we're done with it. Debated between creating a real temp file and using this one. We'll decide that later.
2017-12-15Make `$VERSION` and `%IRSSI` `our` variablesTeddy Wing
Learned about the Perl `our` keyword from https://github.com/shabble/irssi-docs/wiki/Guide#preamble which recommends using it. This allows us to eliminate the `use vars` line. Neat.
2017-12-15Print current input contentsTeddy Wing
Yes! Managed to read the current input line contents. Print this out on every key press. Thanks to these resources: Key press signal: https://github.com/shabble/irssi-docs/wiki/Signals#gui-readlinec Getting input line contents: https://github.com/shabble/irssi-docs/wiki/Irssi#getting-the-input-field-contents https://github.com/irssi/scripts.irssi.org/blob/master/scripts/per_window_prompt.pl