Using Vim - ktopolov/DatabaseSystem GitHub Wiki

Vim is a text editor which is widely used in Linux environments. Here are a few very basic uses of vim:

Basics

  • Open a file by running vim new_filename.txt. If the file does not already exist, VIM will create this file
  • There are two modes in VIM: Insert and read. By default, opening a file puts you in Read mode. Here, you can do a few useful things:
    • Search for a word or phrase using /<phrase> + Enter. Then, use n to go from one find to the next,
  • To enter Insert mode, type i. To escape insert mode, hit esc key.
  • To save work, exit Insert mode and use :w. To close the file, use :q. Both can be done in one shot using :wq, where the order matters!
  • If you make changes and do not want to write them, use :q! to force quit.
  • To change the color scheme using the default schemes, open any file in vim. Once inside the file, type :colorscheme <scheme> or just colo <scheme>. To see all color scheme options, hit tab twice

VIM Default Colorscheme

Create a VIM RC file in your user home directory:

vim ~/.vimrc

Insert the following line:

colorscheme <colorscheme>
⚠️ **GitHub.com Fallback** ⚠️