How do I exit vim?

Intro

Why Vim?

Vim is Charityware

Vim History

Vim Features

Supported Platforms

Getting Started

Installing Vim

Linux


        |# CentOS/RPM based distro
        |yum install vim-enhanced vim-common vim-minimal
        |
        |# Ubuntu/Debian
        |apt-get install vim
      

Mac


        |# Shipped with OSX _or_
        |# install latest via Homebrew
        |brew install vim
      

Windows

Download the Installer: http://www.vim.org/download.php/#pc

Learning Vim

Disable arrow keys


        |" vimrc file
        |nnoremap <up> <nop>
        |nnoremap <down> <nop>
        |nnoremap <left> <nop>
        |nnoremap <right> <nop>
        |inoremap <up> <nop>
        |inoremap <down> <nop>
        |inoremap <left> <nop>
        |inoremap <right> <nop>
      

Vim tutor

Vim Adventures!

Cheatsheet

Using Vim

Starting from scratch

Your first ~/.vimrc


        |execute pathogen#infect()
        |syntax on
        |filetype plugin indent on
      

Modes

Moving Around

Done in Normal/Visual mode

Character by character

The "h", "j", "k", and "l" commands to move the cursor left, down, up, and right respectively.

Word movement

The "w" command moves the cursor forward one word. Use numeric prefixes to modify the command. Move three words forward using "3w".

Line movement

The "$" command moves cursor to end of line. The "^" command moves cursor to the first non-blank character of the line. The "0" command moves the cursor to the very first character of the line.

Operators and motions

Combine operator with motion

"dw" to delete word

"d$" to delete to end of line

"cw" to change word

"c$" to change from cursor to end of line

Visual mode

Start visual mode with "v" or "V"

Pair with motions - "Vjj"

Delete "d" or "x"

Copy to clipboard

Extending Vim

Vimrc

Vim script (VimL)

Vimscript is the most common plugin format

Not just Vimscript - Ruby, Tcl, Lua, Perl, Python

Package Management

Manual

Vundle

Pathogen

Packages

Finding Packages

Packages I use

:qa!

More Information

Thank You

Github
github.com/adam12
Twitter
@adamrdaniels
Sourcecode
github.com/adam12/vim-devtricks-2014

/