Slide 1

Slide 1 text

http://www.flickr.com/photos/pastorfuture/2829852159/

Slide 2

Slide 2 text

Buffers vs. Tabs (And Windows?)

Slide 3

Slide 3 text

A buffer is the in-memory text of a file. A window is a viewport on a buffer. A tab page is a collection of windows.

Slide 4

Slide 4 text

http://www.flickr.com/photos/oberazzi/318947873/

Slide 5

Slide 5 text

- Buffers opens multiple files - Windows are for the purpose of splitting the workspace and displaying multiple files - Tabs are a different layout of windows of ALL of your existing buffers

Slide 6

Slide 6 text

http://www.flickr.com/photos/37prime/3836700346/

Slide 7

Slide 7 text

✔ :buffers (:ls) – show all opened buffers ✔ :bd N – delete buffer with number N ✔ :ball – display all buffers in windows ✔ :b - try it out ✔ :bn :bp :bf :bl next previous first last

Slide 8

Slide 8 text

http://www.flickr.com/photos/mariplus/6750780529/

Slide 9

Slide 9 text

✔ % - buffer in the current window ✔ # - the alternate buffer (the file you edited last) ✔ :b# - to jump between active and previous ✔ a - active buffer (loaded and visible in the current window ✔ u - unlisted buffer (e.g. help file) ✔ h - hidden buffer

Slide 10

Slide 10 text

Buffer options (change the behavior of a buffer)

Slide 11

Slide 11 text

✔ bufhidden: what happens when the buffer is no longer displayed in a window hide => hide the buffer (like minimizing window) unload => clear everything delete => closes the tab wipe => clear and delete from buffer list

Slide 12

Slide 12 text

✔ buftype: what kind of a buffer this window is nofile => not related to a file (tmp register) nowrite => buffer will not be written (used for error window) acwrite => buffer will always be written with BufWriteCmd quickfix => contains list of errors help => useful help command

Slide 13

Slide 13 text

✔ swapfile: alternative to buffers (good for great files) ✔ buflisted: buffer shows up in the buffer list

Slide 14

Slide 14 text

Example: directory buffer :setlocal buftype=nowrite :setlocal bufhidden=delete :setlocal noswapfile

Slide 15

Slide 15 text

http://www.flickr.com/photos/mariplus/6750780529/

Slide 16

Slide 16 text

http://en.wikipedia.org/wiki/Aztec_C Idea came from Manx's Aztec C compiler Save the error message from the compiler in a file and use Vim to jump to the errors by one

Slide 17

Slide 17 text

✔ :ccl - close the quickfix window ✔ :lcl - close the window showing the "location list" for the current window

Slide 18

Slide 18 text

:Ack (just uses :quickfix buffer)