Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Buffer, quickfix windows, :Ack - does this work together?

Buffer, quickfix windows, :Ack - does this work together?

Gave this talk on the 5th @vimberlin meetup @LAUNCH/CO on the 27th of September 2012.

Matthias Günther

September 27, 2012
Tweet

More Decks by Matthias Günther

Other Decks in Technology

Transcript

  1. 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.
  2. - 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
  3. ✔ :buffers (:ls) – show all opened buffers ✔ :bd

    N – delete buffer with number N ✔ :ball – display all buffers in windows ✔ :b <name-of-buffer><TAB> - try it out ✔ :bn :bp :bf :bl next previous first last
  4. ✔ % - 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
  5. ✔ 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
  6. ✔ 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
  7. ✔ swapfile: alternative to buffers (good for great files) ✔

    buflisted: buffer shows up in the buffer list
  8. 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
  9. ✔ :ccl - close the quickfix window ✔ :lcl -

    close the window showing the "location list" for the current window