Last active
December 14, 2015 04:59
-
-
Save jacobstern/5031943 to your computer and use it in GitHub Desktop.
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
" Jacob Stern - vimrc | |
call pathogen#infect('bundle') | |
call pathogen#helptags() | |
set nocompatible | |
"lets backspace actually work in insert mode | |
set backspace=indent,eol,start | |
"always can use the mouse | |
set mouse=a | |
"hide buffers when abandoned | |
set hidden | |
"jump back to last position when reopening a file | |
if has("autocmd") | |
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | |
\| exe "normal g'\"" | endif | |
endif | |
"setting up colorscheme | |
set t_Co=256 | |
set background=dark | |
colorscheme molokai | |
"colorscheme solarized | |
syntax on | |
"leader key | |
let mapleader = "," | |
"easy navigation of splits | |
map <Leader>n <C-W>T | |
map <Leader>w <C-W><C-W> | |
map <Leader>s :split<CR> | |
map <Leader>v :vsplit<CR> | |
"because i always accidentally type Q and K | |
"does anyone actually like looking stuff up / ex mode? | |
map K <Nop> | |
map Q <Nop> | |
"F1 for help is annoying. just type :help | |
inoremap <F1> <ESC> | |
nnoremap <F1> <ESC> | |
nnoremap <F1> <ESC> | |
"wildmenu for completion | |
set showcmd | |
set wildmode=list:longest,list,full | |
set wildmenu | |
"improve searching. Highlight all, stay highlighted, and better casing | |
set hlsearch | |
set incsearch | |
"press space to unhighlight search | |
nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR> | |
set ignorecase | |
set smartcase | |
"change title of window | |
set title | |
"line numbers | |
set ruler | |
set number | |
"highlight current line | |
set cursorline | |
"make tab stops not huge + smarter | |
set shiftwidth=4 | |
set tabstop=4 | |
set autoindent | |
set smartindent | |
set smarttab | |
"make tabs spaces | |
set expandtab | |
"always see statusbar | |
set laststatus=2 | |
"begin scrolling before reach top/bottom | |
set scrolloff=6 | |
"omnicompletion | |
filetype plugin on | |
set ofu=syntaxcomplete#Complete | |
"keybindings | |
imap jj <ESC> | |
nnoremap ; : | |
"call togglebg#map("<F5>") | |
nnoremap <F2> :DoShowMarks!<cr> | |
nnoremap <F3> :NoShowMarks!<cr> | |
"bind j and k to behave more nicely with long lines (potentially dangerous) | |
nnoremap j gj | |
nnoremap k gk | |
"remap arrow keys to be useful | |
noremap <silent><left> : bprevious<cr> | |
noremap <silent><right> :bnext<cr> | |
noremap <silent><up> :ls<cr>:buffer | |
"for powerline | |
let g:Powerline_symbols = 'fancy' | |
call Pl#Theme#ReplaceSegment('fileformat','pwd') | |
call Pl#Theme#RemoveSegment('fileencoding') | |
"mappings for ctrlp | |
nnoremap <leader>b :CtrlPBuffer<CR> | |
nnoremap <leader>f :CtrlPCurFile<CR> | |
nnoremap <leader>d :CtrlPCurWD<CR> | |
"flash when errors occur | |
set visualbell | |
set errorbells | |
"misc settings | |
set shell=bash | |
set cursorline | |
set showcmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment