Last active
February 28, 2019 02:37
-
-
Save leighghunt/7a53da1d13a382623ed122ec27f59492 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
set nocompatible | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
let g:NERDTreeDirArrowExpandable = '▸' | |
let g:NERDTreeDirArrowCollapsible = '▾' | |
let g:NERDTreeNodeDelimiter = "\u00a0" | |
" let g:ackprg = 'ag --nogroup --nocolor --column' | |
let g:ackprg = 'ag --vimgrep' | |
set backspace=2 " Backspace deletes like most programs in insert mode | |
set hlsearch | |
set ruler " show the cursor position all the time | |
set showcmd " display incomplete commands | |
set incsearch " do incremental searching | |
set nowrap | |
" Open new split panes to right and bottom, which feels more natural | |
set splitbelow | |
set splitright | |
" Quicker window movement | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-l> <C-w>l | |
" Get off my lawn | |
nnoremap <Left> :echoe "Use h"<CR> | |
nnoremap <Right> :echoe "Use l"<CR> | |
nnoremap <Up> :echoe "Use k"<CR> | |
nnoremap <Down> :echoe "Use j"<CR> | |
nnoremap <F5> :NERDTree<CR> | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -fsSL https://gist.githubusercontent.com/leighghunt/7a53da1d13a382623ed122ec27f59492/raw/ --output ~/.vimrc