Posts

Showing posts from April, 2021

VI Cheat Sheet

VI Cheat Sheet opening multiple files $ vim file1 file2 :e filename switching between files :n || :bn - switch to the next file :N || :bp - switch to the previous file :bf - switch to the first file :bl - switch to the last file :b <number> - switch to a specific file number :b <filename> - switch to a specific file filename :e# || Ctrl+^ - witch back and forth between two files :ls - list all open files (In the ls: output, the % refers to the current file, while the # refers to the alternate file) :wall - save (write) all open files :bw - quit the current file :qall - quit all open files :qall! - forcefully quit all files, discsarding changes opening and switching between multiple windows splitting windows horizontally $ vim -o file1 file2 :split <filename> || Ctrl+w,s - split windows horizontally in Vim; if no file filename is given the current file will be displayed in both splits splitting windows vertically $ vim -O fil...