Author Topic: How to process lines from two buffers and add info to a new buffer?  (Read 3526 times)

Bamsen

  • Community Member
  • Posts: 66
  • Hero Points: 8
Hi,

I have two buffers open and I want to read lines from them (get_line) and do some processing and then add lines to a new third buffer (insert_line).
The problem is, I can not find the command to switch buffers, to make get_line read where it should.
Also I need the command to create a new buffer that I can write the result to.

If you could please provide me with the relevant commands, and maybe point to a document where I would have been able to find commands I need, I would be very happy.

Thanks,
Morten

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: How to process lines from two buffers and add info to a new buffer?
« Reply #1 on: January 26, 2015, 10:12:11 AM »
I think just edit could be fine. Regarding a 'third buffer' it depends.
Do you want to create a new file (edit) or do you need a temp. buffer (_create_temp_view) ?
Good luck, HS2

Bamsen

  • Community Member
  • Posts: 66
  • Hero Points: 8
Re: How to process lines from two buffers and add info to a new buffer?
« Reply #2 on: January 29, 2015, 07:47:30 AM »
I seem to be able to do this with _next_window() and load_files("+i +t")