-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
73 lines (58 loc) · 1.74 KB
/
vimrc
File metadata and controls
73 lines (58 loc) · 1.74 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
let mapleader = "\<Space>"
nmap <leader>vr :sp $MYVIMRC<cr>
nmap <leader>so :source $MYVIMRC<cr>
if filereadable(expand("~/.vimrc.bundles"))
source ~/.vimrc.bundles
endif
imap <C-s> <esc>:w<cr>
set backspace=2 " Backspace deletes like most programs in insert mode
set ruler " show the cursor position all the time
set laststatus=2 " Always display the status line
set clipboard=unnamed " Use system clipboard
" Numbers
set number
set numberwidth=5
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
syntax on
endif
filetype plugin indent on
" Softtabs, 2 spaces
set tabstop=2
set shiftwidth=2
set shiftround
set expandtab
" Make it obvious where 80 characters is
set textwidth=80
set colorcolumn=+1
" Display extra whitespace
set list listchars=tab:»·,trail:·,nbsp:·
nnoremap <C-p> :Files<cr>
let g:fzf_files_options =
\ '--reverse ' .
\ '--preview "(coderay {} || cat {}) 2> /dev/null | head -'.&lines.'"'
" Use ripgrep to search with fzf
if executable('rg')
set grepprg=rg\ --color=never
let $FZF_DEFAULT_COMMAND='rg --files -g "" --hidden --ignore-file ".rignore"'
end
" 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
" Color scheme
let g:everforest_spell_foreground = 'colored'
colorscheme everforest
autocmd FileType eruby set spell spelllang=en_us
highlight NonText guibg=#060606
highlight Folded guibg=#0A0A0A guifg=#9090D0
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
" Test shortcuts
nnoremap <silent> <Leader>t :TestFile<CR>
nnoremap <silent> <Leader>T :TestNearest<CR>
nnoremap <silent> <Leader>l :TestLast<CR>
nnoremap <silent> <Leader>a :TestFile<CR>
nnoremap <silent> <Leader>gt :TestVisit<CR>
nnoremap <silent> <Leader>A :TestSuite<CR>