-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
109 lines (91 loc) · 2.53 KB
/
vimrc
File metadata and controls
109 lines (91 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
execute pathogen#infect()
" Install vim-plug if it's not already installed
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'airblade/vim-gitgutter'
Plug 'chriskempson/base16-vim'
Plug 'ervandew/supertab'
Plug 'flazz/vim-colorschemes'
Plug 'janko-m/vim-test'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'mattn/gist-vim'
Plug 'mattn/webapi-vim'
Plug 'mileszs/ack.vim'
Plug 'mxw/vim-jsx'
Plug 'pangloss/vim-javascript'
Plug 'pbrisbin/vim-mkdir'
Plug 'terryma/vim-multiple-cursors' " I should look into this again
Plug 'tmhedberg/matchit'
Plug 'townk/vim-autoclose'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-endwise' " Auto completion for ruby `do;end`
Plug 'tpope/vim-fugitive' " Git
Plug 'tpope/vim-rails' " Easier navigation within Rails apps
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-rhubarb' " GitHub for Fugitive
Plug 'tpope/vim-surround'
Plug 'vim-ruby/vim-ruby'
call plug#end()
colorscheme base16-eighties
set wildmenu
set wildmode=longest,full,full
set ruler
set laststatus=2
set t_Co=256
set number relativenumber
set numberwidth=5
" set spell spelllang=en_us
set tabstop=2
set shiftwidth=2
set shiftround
set expandtab
set smartindent
" Display extra whitespace
set list listchars=tab:»·,trail:·,nbsp:·
syntax on
filetype plugin indent on
set textwidth=100
set colorcolumn=+1
set cursorline
" 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
" Better tabs
" inoremap jk <esc>
nnoremap tc :tabedit .<return>:tabo!<return>
nnoremap th gT
nnoremap tl gt
nnoremap tm :tabm
nnoremap tn :tabedit .<return>
nnoremap to :tabo<return>
nnoremap tx :tabclose<return>
" Highlight search results
set hlsearch
let mapleader = ' '
" vim-test strategy
let test#strategy = 'vtr'
" Switch b/w last two files
nnoremap <Leader><Leader> <c-^>
map <Leader><Tab> :w<return>
map <Leader>s :sort<return>
map <Leader>F :GFiles<return>
map <Leader>ak :Ack!
map <Leader>em :Emodel
map <Leader>gi :Gist -a<return>
map <Leader>li :SyntasticCheck<return>
map <Leader>lo :lopen<return>
map <Leader>tf :TestFile<return>
map <Leader>tl :TestLast<return>
map <Leader>tn :TestNearest<return>
map <Leader>tv :TestVisit<return>
map <Leader>/ :noh<return>