Some Notes on Vim

Some notes on Vim window management, Tab Management and Other Stuffsa.. Window Management a window in Vim is the viewport for a buffer. following are a few useful window management command: Key Binding Action Command <C-w> o close all windows except the current one :on, :only <C-w q close focused window ZZ close focused window after saving changes ZQ close focused window without saving changes <C-w v split window vertically :vsplit <C-w s split window horizentally :split <C-w H/J/K/L move window to a direction <C-w h/j/k/l switch between windows <C-W> f split the window and edit filepath under cursor a/file/path.

Session Management in Vim

If you ask me about the most underrated feature in Vim, my answer would be ‘Session Management’ straightaway! Just like any other “modern” editors, Vim does support sessions. What is a Session Before I go in-depth, let me explain what exactly is a Session in Vim. Simply put(from :help session): A Session keeps the Views for all windows, plus the global settings. An example of session could be: If I have opened a project and worked for an hour, and then closed it.

Registers in Vim

Registers in Vim are simply different locations where Vim could store texts. a register can be accessed by using " as prefix. For example: key "r can access register r. What content a register is currently holding, can be revealed by using command :reg <name of register>. Without the name, reg command would list all registers filled with certain data. Register Operations yank to register x: "xyw delete to register d: "ddw put from register a: "ap Types of Registers There are ten types of register vim comes with.