This project provides a urxvt extension to open the current buffer in vim. (I'm sure it can easily be adapted to use emacs or other editors).
It was inspired by reactivity vim part.
Once triggered, urxvt will create a temp file or a pipe and launch a new urxvt client with vim. After that, the terminal continues available.
- Copy the
buffer2vim
perl script in~/.urxvt/ext
- Enable it in
.Xresources
:and reload the file:URxvt.perl-ext-common: ...,buffer2vim URxvt.keysym.C-s: perl:buffer2vim:vim_last URxvt.keysym.C-S: perl:buffer2vim:vim urxvt.buffer2vim.lastrows: 3000
$ [[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
- Launch
$ urxvt
The configuration is done through .Xresources
, it supports the following keys:
! Number of rows to show with vim_last, default 1024:
urxvt.buffer2vim.lastrows: POSITIVE INT
! If you want to use temp files or a pipe to feed vim, default 'file':
urxvt.buffer2vim.tmpfiletype: 'file' | 'pipe'
With the configuration from the previous section you can use Ctrl+S to show only the last 3000 lines in VIM or Ctrl+Shift+S to show the whole buffer.
- Jose M Perez Ramos - Kuroneer
This project is released under the MIT License. Check LICENSE for more information.