Cycling through buffers w/multiple windows

Help
2004-12-21
2013-05-02
  • Jeremy Cowgar
    Jeremy Cowgar
    2004-12-21

    I'm having problems getting the two files in my split screen to be exactly what I want them to be. Here's the case.

    I open file1.c, make changes, save. I'm planning on coming back, but I need to edit file2.c ... I open file2.c... Now ^Kn will bounce between those two. Now, I want to edit file3.c but want to view file1.c for reference (did much of the same work). ^Kn until file1.c is open, ^Ko ^Ke file3.c ... good, file1.c and file3.c are shown and ^Kp ^Kn can be used to bounce between the two, but now I want to add more to file3.c but want file2.c as a refernce.

    I can hit ^Kn and ^Kp all day long and never seem to get file2.c and file3.c up on the screen at the same time. I'm sure I am missing something.

    This only gets worse when you have, say 10 files open.

    Is there a way I can simply cycle through the open buffers in the current window? Meaning, let's say I am editing with the screen split, top and bottom. I have file1.c, file2.c, file3.c, file4.c and file5.c open. I'm in the top window editing file1.c and the bottom window has file5.c .

    I would like to hit some key sequence while in the top window and simply have it cycle through all the available buffers. So, ^Bn (for instance) would go from file1.c to file2.c, file3.c, file4.c, file5.c and back to file1.c ... ^Bp could do the reverse.

    Maybe this already exists, maybe it's not necessary because I simply misunderstand how the buffer cycling takes place, but can anyone help me with my problem? Wether it's explaining how the buffer cycling takes place or other key strokes to accomplish the task, whatever.

    I really like the speed and simplicity of Joe and would love to continue using it but I work in multiple files so often and this is getting to be a difficult task just getting which files I want opened on the screen at the same time.

    Thanks for any help,

    Jeremy

     
    • Jeremy Cowgar
      Jeremy Cowgar
      2004-12-21

      Hm. I did a co on the CVS copy of Jed and read the some of the files in the source (installed via Debian so didn't read docs in source dir orignally).

      In a file called LIST I found all sorts of cool commands including the ones I want:

      bufed (buffer editor: provides a menu selection of available buffers)
      nbuf (goto the next buffer (in the current window))
      pbuf (goto the previous buffer (in the current window))

      With those three commands everything makes sense.

      Thanks Joe!

      Jeremy