Well, this is oversimplified a bit, you'll need to add in your size calcs and so forth yourself
Code:
alias slap.preview {
  var %act = echo @slap.preview
  window -dkf @slap.preview 99 539 539 347
  noop $read(file.txt,p,$1)
}

The filename is not the same as your filename
/slap.preview <line number>