====== Vim ====== ''vim'' is a modal editor (improving on vi). It can run without graphics, is ubiquitous, powerful, and efficient but is an acquired skill. * MIT's "missing semester" has an excellent lecture [[https://missing.csail.mit.edu/2020/editors/|video and notes]]. * ''vimtutor'' is a program included with vim that will guide you through usage -- run it from the command line. * [[https://github.com/vimwiki/vimwiki|vim-wiki]] ===== Commands ===== Victoria's review: a minimal vim session experience: - ''vim $filename'' -> opens a file in vim. If that file doesn't exist or you opened it in the wrong filepath, you will see an empty blank vim that says ''[NEW]'' at the bottom - ''i'' -> puts you in **i**nsert mode so you can freely type and move your cursor around. Says ''-- INSERT --'' in bottom left. - ''esc'' -> gets you out of insert mode move around - ''0'' puts your cursor to the beginning of the line (in command mode) - ''$'' puts your cursor to the end of the line (in command mode) - ''Shift + i'' puts your cursor to the beginning of the line and opens insert mode - ''Shift + a'' puts your cursor to the end of the line and opens insert mode - up and down arrows move you up and down each line but to move between lines click ''g'' then up or down arrow - exit * '':q'' -> quits vim * '':wq'' -> saves what you wrote and quits vim * '':q!'' -> does not save what you wrote and quits vim