Skip to content

Instantly share code, notes, and snippets.

@j03m
Last active August 29, 2015 14:00
Show Gist options
  • Save j03m/7c1656cd33d422ea6aab to your computer and use it in GitHub Desktop.
Save j03m/7c1656cd33d422ea6aab to your computer and use it in GitHub Desktop.
cua-ish vim
set nocompatible
set history=700
set backspace=indent,eol,start
set history=700
filetype plugin on
filetype indent on
set wildmenu
set wildignore=*.o,*~,*.pyc
set ruler
set number
set whichwrap+=<,>,h,l,[,]
set smartcase
set hlsearch
set encoding=utf8
set ffs=unix,dos,mac
set expandtab
set tabstop=4
set shiftwidth=4
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
set viminfo^=%
:map <C-z> u
:imap <C-z> <Esc>u
:map <C-s> :w <Enter>
:imap <C-s> <Esc>:w<Enter>
:map <Tab> >
:imap <Tab> <Esc> >
:vmap <Tab> >gv
:map <S-Tab> <
:imap <S-Tab> <Esc> <
:vmap <S-Tab> <gv
vmap <C-c> y<Esc>i
vmap <C-x> d<Esc>i
imap <C-v> <Esc>pi
imap <C-y> <Esc>ddi
map <C-z> <Esc>
imap <C-z> <Esc>ui
nmap <C-e> $
nmap <C-a> ^
vmap <C-e> $
vmap <C-a> ^
map <Right><Right> w
vmap <Right><Right> wgv
imap <Right><Right> <Esc>w
map <Left><Left> b
vmap <Left><Left> bgv
imap <Left><Left> <Esc>b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment