Created
June 20, 2016 14:26
-
-
Save tylerwillingham/38ec34d90bc7ec96d4ec40ae41789770 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
runtime macros/matchit.vim | |
set mouse=a | |
:imap jk <Esc> | |
:set relativenumber | |
set t_Co=256 | |
syntax on | |
colorscheme Tomorrow-Night | |
set background=dark | |
au BufRead,BufNewFile *.es6 set filetype=javascript | |
au BufRead,BufNewFile *.less set filetype=css | |
" set list | |
" set listchars=eol:¬,tab:>-,trail:~,extends:>,precedes:< | |
" code folding (http://smartic.us/2009/04/06/code-folding-in-vim/) | |
set foldmethod=indent | |
set foldnestmax=10 | |
set nofoldenable | |
set foldlevel=1 | |
" indentions | |
filetype plugin indent on | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set smarttab | |
set autoindent | |
set colorcolumn=80 | |
set cursorline | |
" incsearch | |
map / <Plug>(incsearch-forward) | |
map ? <Plug>(incsearch-backward) | |
map g/ <Plug>(incsearch-stay) | |
" set hlsearch | |
" Press Space to turn off highlighting and clear any message already displayed. | |
" nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR> | |
set nowrap | |
" splits | |
" most of this is from: https://robots.thoughtbot.com/vim-splits-move-faster-and-more-naturally | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
set splitbelow | |
set splitright | |
"Max out the height of the current split | |
"ctrl + w _ | |
"Max out the width of the current split | |
"ctrl + w | | |
"Normalize all split sizes, which is very handy when resizing terminal | |
"ctrl + w = | |
"Swap top/bottom or left/right split | |
"Ctrl+W R | |
"Break out current window into a new tabview | |
"Ctrl+W T | |
"Close every window in the current tabview but the current one | |
"Ctrl+W o | |
" Tabs | |
nnoremap tl :tabnext<CR> | |
nnoremap th :tabprev<CR> | |
nnoremap tn :tabedit .<cr> | |
nnoremap tx :tabclose<CR> | |
" bundles | |
set runtimepath^=~/.vim/bundle/ctrlp.vim | |
" for airline | |
set laststatus=2 | |
let g:airline_powerline_fonts = 1 | |
" no back up/swp files | |
"set nobackup | |
"set noswapfile | |
"set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp " store swap files here | |
let mapleader = ' ' | |
map <Leader>ac :Econtroller application<cr> | |
map <Leader>ag :Ag | |
map <Leader>b :!bundle | |
map <Leader>bo :!bundle open | |
map <Leader>cdb :e config/database.yml<cr> | |
map <Leader>cbs :set clipboard=unnamed<cr> | |
map <Leader>cbu :set clipboard=vimclipboard<cr> | |
map <Leader>ctg :!ctags -R .<cr> | |
map <Leader>d odebugger<cr><esc> | |
map <Leader>ee :e .<cr> | |
map <Leader>ea :A<cr> | |
map <Leader>ec :Econtroller | |
map <Leader>em :Emodel | |
map <Leader>er :e config/routes.rb<cr> | |
map <Leader>ev :Eview | |
map <Leader>gbl :Gblame<cr> | |
map <Leader>gbr :Gbrowse<cr> | |
map <Leader>gem :e Gemfile<cr> | |
map <Leader>gst :Gstatus<cr> | |
map <Leader>irl oRails.logger. # TODO: remove me<esc>F.a | |
map <Leader>sc :Eschema<cr> | |
map <Leader>vrc :e ~/.vimrc<cr> | |
map <Leader>gpull :!git pull<cr>:e!<cr> | |
" Ignore files (useful for Command-T) | |
let g:CommandTWildIgnore=&wildignore . ",node_modules/*" | |
" pathogen for managing bundles | |
execute pathogen#infect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment