-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvimrc
91 lines (77 loc) · 2.49 KB
/
vimrc
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
filetype on " without this vim emits a zero exit status, later, because of :ft off
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
if filereadable(expand("~/.vimrc.bundles"))
source ~/.vimrc.bundles
endif
if filereadable(expand("~/.vimrc.bundles.local"))
source ~/.vimrc.bundles.local
endif
syntax on
set nocompatible
set clipboard=unnamed " yank and paste with the system clipboard
filetype plugin indent on
" vim-airline settings
let g:airline_powerline_fonts = 1
" Editing preferences
set autoindent
set autoread " reload files when changed on disk, i.e. via `git checkout`
set encoding=utf-8 " encoding preference
set expandtab " expand tabs to spaces
set smartcase " case-sensitive search if any caps
set softtabstop=2 " insert mode tab and backspace use 2 spaces
set tabstop=2 " actual tabs occupy 8 characters
set shiftwidth=2
set wildmenu " show a navigable menu for tab completion
set wildmode=longest,list,full
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*/logs,*/target,*/node_modules,*/bower_components " ignores misc. files
let g:ag_working_path_mode="r"
set hidden
" Searching preferences
set ignorecase " case-insensitive search
set incsearch " search as you type
" Visual settings
set number " Show row numbers
set cursorline " Highlight current line
" set gfn=Inconsolata\ for\ Powerline:h16
" set gfn=Hack:h14
set gfn=Inconsolata-dz\ for\ Powerline:h14
" set gfn=Fira\ Mono\ for\ Powerline:h15
colorscheme spacegray " Default colorscheme
set noshowmode " Hide the default mode text below statusline
set laststatus=2
set list " show trailing whitespace
set listchars=tab:▸\ ,trail:·,extends:❯,precedes:❮
set guioptions+=c " supresses popup messages in the statusline (macvim)
set guioptions-=L " no left scrollbar
set guioptions-=r " no right scrollbar
set guioptions-=R
" Keyboard shortcuts
let mapleader = ','
nnoremap / /\v
nnoremap n nzzzv
nnoremap N Nzzzv
nnoremap <C-a> :b
nnoremap ; :
map <silent> <leader>V :source ~/.vimrc<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>
" md is markdown
autocmd BufRead,BufNewFile *.md set filetype=markdown
" Swap settings
set directory-=.
let g:miniBufExplStatusLineText = ""
" Plugin settings
let g:ctrlp_match_window = 'max:20'
" Load local settings
if filereadable(expand("~/.vimrc.local"))
source ~/.vimrc.local
endif
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>