screen bindings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bind CTRL-A e to edit a space-delimited path in vim | |
bind e source .screen/vim-path.screen | |
# bind CTRL-A K to view a manpage for a term starting at the cursor | |
bind K source .screen/man-word.screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# man-word.screen | |
# prevent messages from slowing this down | |
msgminwait 0 | |
# copy word starting at cursor | |
copy | |
stuff " e " | |
# open a new window that waits for a word to run man on | |
# (and uses 'read' to pause on error) | |
screen -t man /bin/sh -c 'xargs man || read' | |
# feed that window the copied word | |
paste '.' | |
# should display as 'stuff "^M^D"' in vim | |
# be sure to enter '^M' as 'CTRL-V ENTER' and '^D' as 'CTRL-V CTRL-D' | |
stuff " " | |
# turn message waiting back on | |
msgminwait 1 | |
# vi: ft=screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
au BufRead,BufNewFile *.screen set filetype=screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim-path.screen | |
# prevent messages from slowing this down | |
msgminwait 0 | |
# copy whitespace delimited path under cursor | |
copy | |
stuff "Bw Ebe " | |
# open a new window that waits for a path to run vim on | |
screen -t vim /bin/sh -c 'read TO_EDIT ; vim $TO_EDIT' | |
# feed that window the copied path | |
paste '.' | |
# should display as 'stuff "^M^D"' in vim | |
# be sure to enter '^M' as 'CTRL-V ENTER' and '^D' as 'CTRL-V CTRL-D' | |
stuff " " | |
# turn message waiting back on | |
msgminwait 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment