Created
January 25, 2015 23:31
-
-
Save Steve-V/ebf1c68b2d2435e669f3 to your computer and use it in GitHub Desktop.
pre-split 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 the user character , | |
let mapleader = "," | |
" make qq work as escape, save your pinkies | |
inoremap qq <esc> | |
inoremap <esc> <nop> | |
vnoremap qq v | |
" move by visual line rather than hard line | |
" essentially that way you dont have to scroll | |
" backwards when a line wraps | |
nnoremap j gj | |
nnoremap k gk | |
" remap movement commands for beginning and end of line | |
nnoremap g8 0 | |
nnoremap g9 ^ | |
nnoremap g0 $ | |
" This remaps q to do nothing | |
" If you want to record a macro, you have to hit | |
" <leader> q and then q again, because the first q will | |
" be no-op'ed out | |
nnoremap q <nop> | |
nnoremap <leader>q q | |
" ------------------------------- | |
" pathogen config | |
execute pathogen#infect() | |
filetype plugin indent on | |
" solarized config | |
syntax enable | |
set background=dark | |
colorscheme solarized | |
" line numbers and current line highlighting | |
set number | |
set cursorline | |
" allow changing buffers while modifications are present | |
set hidden | |
" allow folds to persist from save to open | |
au BufWinLeave *? mkview | |
au BufWinEnter *? silent loadview | |
" Enable airline / powerline | |
set laststatus=2 | |
set encoding=utf-8 | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_theme = 'solarized' | |
" enable gundo (graphical Undo) | |
nnoremap <F6> :GundoToggle<CR> | |
" alias BK (buffer kill) to BD (buffer delete) | |
nnoremap <leader>bk :bd<CR> | |
" create open (edit) file commands | |
nnoremap <leader>ee :e<SPACE> | |
nnoremap <F9> :e<SPACE> | |
" alias gn and gt to tab (buffer) commands | |
nnoremap gn :bn<CR> | |
nnoremap gt :bp<CR> | |
nnoremap <leader>gn gn | |
nnoremap <leader>gt gt | |
" create easier save commands (including quicksave!) | |
nnoremap <leader>ww :w<CR> | |
nnoremap <F5> :w<CR> | |
" map space and backspace to scroll | |
nnoremap <SPACE> 10jzz | |
nnoremap <BS> 10kzz | |
" make word wrapping work as expected | |
set wrap linebreak nolist textwidth=0 wrapmargin=0 | |
" make wrapped lines keep leading indentation | |
set breakindent | |
" make tabs appear as 3 spaces rather than as 8, never convert to spaces | |
set tabstop=3 softtabstop=3 noexpandtab shiftwidth=3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment