The BEST Text Editor*

Vim is Fun

How to VIM

Different Modes

  • Normal Mode
    • j,k,l,h
  • Insert Mode
    • esc
  • Visual Mode
    • y

That's it!

How to customize your .vimrc

It's like building a house

Mine

Code Example

What you need to know

Mapping

Basic mappings

  • map (recursive)
  • noremap

 

Specific to Modes

  • inoremap
  • nnoremap

Important Mappings

inoremap jj <ESC>

 

nnoremap   <up>   <nop>
nnoremap  <down>  <nop>
nnoremap  <left>  <nop>
nnoremap  <right> <nop>

 

<leader>

let mapleader="\<Space>"

 

Useful Examples

noremap <leader>s :w<CR>
nnoremap <leader>w :wq<CR>
nnoremap <leader>fq :q!<CR>
nnoremap <leader>q :xa<CR>

 

Package Manager

 

  • vim plug
  • Vundle
  • NeoVundle
  • Pathogen

Vundle Example

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
call vundle#end()            

 

 

 

Plugin 'fatih/vim-go'
Plugin 'terryma/vim-multiple-cursors'
 

Set Up

Requiring

Let me help you build your house

Thank you

Intro to Vim

By Roberto Ortega