Last active
February 16, 2016 18:53
-
-
Save cdosborn/8df40cf04fe5d40589de to your computer and use it in GitHub Desktop.
vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Make switching buffers easy | |
nmap <Leader>b :ls<CR>:buffer!<Space> | |
imap \ <Esc> | |
vmap \ <Esc> | |
inoremap <C-\> \ | |
nnoremap \ :noh<CR> | |
map <down> <C-d>zz | |
map <up> <C-u>zz | |
nnoremap <tab> zz | |
nnoremap '. '.zz | |
nnoremap j gj | |
nnoremap k gk | |
" Readline bindings for command mode | |
cnoremap <C-a> <Home> | |
cnoremap <C-e> <End> | |
cnoremap <C-p> <Up> | |
cnoremap <C-n> <Down> | |
cnoremap <C-b> <Left> | |
cnoremap <C-f> <Right> | |
cnoremap <C-d> <Del> | |
cnoremap <C-h> <BS> | |
cnoremap <C-x><C-e> <C-f> | |
cnoremap <C-r> <C-f>? | |
cnoremap <C-s> <C-f>/ | |
" The bindings below ought to be <M-...>, this is specific to 0SX | |
cnoremap <C-[>b <S-Left> | |
cnoremap <C-[>f <S-Right> | |
nnoremap <space> :w<CR> | |
nnoremap Q :q!<CR> | |
noremap ;; :%s:::g<Left><Left><Left> | |
" Use Vim settings, rather than Vi settings (much better!). | |
set nocompatible | |
set foldmethod=syntax | |
set expandtab | |
" Wrap after 78 chars | |
set tw=78 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set pastetoggle=<F2> | |
set noswapfile | |
set autochdir | |
set showmode | |
set history=50 " keep 50 lines of command line history | |
set ruler " show the cursor position all the time | |
set showcmd " display incomplete commands | |
set incsearch " do incremental searching | |
set hlsearch | |
set noswapfile | |
set undofile | |
set nomore " removes the annoying vim page message thing | |
set display=lastline " display lines that extend past bottom | |
syntax on | |
set wildmode=longest:full | |
set wildmenu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment