Stop using vim like a pig

Abstract

Use the manual (really exhaustive):

  • vimtutor
  • :help

Leverage <C-z> to put the nvim in the background, and use fg to bring it back. You can use jobs to check current background jobs.

Buffers, windows, tabs

  • a buffer is the internal representation of a file
  • a window is a view of a buffer
  • a tab is a collection of windows, not just one buffer
  • use window on the same buffer (file) to have different views of the same file at the same time

Use netrw is a standard plugin to navigate in the project.

Quickfix

  • a collection of entries (errors, results of a search, tags…) that can be jumped to.
  • has a cousin, the location list
  • :help quickfix.txt
  • can use :make to call make and all errors will be put in the quickfix

Tag

  • a tag is a label extracted from your source files (function name, enum, global variables)
  • super useful for searching and navigating
  • :help tagsrch.txt