We talked about vim and how to set it up. Basically type
and follow this. You'll learn the basic hotkeys.
At this point, vim is still horribly useless compared to VSCode.
To edit the defaults file:
You can add the following to this file:
syntax on set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab autoindent set number nu relativenumber set incsearch wildmenu set backspace=indent,eol,start
Inside vim, typing
:source ~/.vimrc will adjust these defaults.
1 gives syntax coloring for each file.
2 sets an autoindenting where
tab will be replaced with 4 spaces, and backspacing will remove 4 spaces. The
smarttab will auto-indent when writing for loops, and
autoindent will keep the new line's tab spacing.
3 gives line numbers on the left side of vim.
relativenumber gives a relative distance between each line which is beneficial for commands like
k to go up N lines easily.
4 works with searching in files.
incsearch will jump to the first instance immediately while typing.
wildmenu shows the files while trying to
:edit <file> or
5 sets backspace to delete lines nicely instead of moving backwards.
Again, vim is still horribly useless compared to VSCode.
At this point, add these lines to your
call plug#begin('~/.vim/autoload') Plug 'scrooloose/nerdtree' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' call plug#end() let g:airline_theme='deus' nmap <F2> :NERDTreeToggle<CR>
which will set up 3 plugins.