-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
122 lines (103 loc) · 2.6 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
" General
let mapleader = ","
set nocompatible
set spell spelllang=en_us
set encoding=utf-8
set noerrorbells
set hidden
set nowrap
set autoread
set cmdheight=2 "Avoid hit-enter
set undofile
set gdefault
set foldlevel=999
set number
set foldmethod=indent
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
if has("win32")
set directory=$HOME\vimfiles\backup,$TEMP
set backupdir=$HOME\vimfiles\backup,$TEMP
set undodir=$HOME\vimfiles\backup,$TEMP
else
set directory=~/.vim/backup,/tmp
set backupdir=~/.vim/backup,/tmp
set undodir=~/.vim/undo,/tmp
endif
" Tab
set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
" Vundle
filetype off
if has("win32")
let &rtp=&rtp.','.$HOME."/vimfiles/bundle/vundle"
call vundle#begin($HOME."/vimfiles/bundle")
else
set rtp+=~/.vim/bundle/vundle/
call vundle#begin()
endif
Plugin 'gmarik/vundle'
Plugin 'tpope/vim-sensible'
Plugin 'rakr/vim-one'
Plugin 'Chiel92/vim-autoformat'
Plugin 'scrooloose/nerdtree'
Plugin 'xuyuanp/nerdtree-git-plugin'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'qpkorr/vim-bufkill'
Plugin 'ajh17/vimcompletesme'
Plugin 'godlygeek/tabular'
Plugin 'junegunn/goyo.vim'
Plugin 'junegunn/limelight.vim'
Plugin 'scrooloose/nerdcommenter'
Plugin 'scrooloose/syntastic'
Plugin 'sjl/gundo.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'Vimjas/vim-python-pep8-indent'
Plugin 'vim-pandoc/vim-pandoc'
Plugin 'vim-pandoc/vim-pandoc-syntax'
call vundle#end()
filetype plugin indent on
" File and omnicomplete
set cot=menu
au BufWrite * :Autoformat
" Search
set hlsearch
set ignorecase
set smartcase
" Appearance
syntax enable
set background=dark
colorscheme one
" Get rid of ugly Green insert
highlight! link ModeMsg MoreMsg
highlight Pmenu ctermbg=238 gui=bold
highlight! link Pmenu Search
highlight! link ColorColumn Search
highlight! link Spellbad Search
highlight! link WildMenu Search
" Plugins
let g:syntastic_enable_signs=0
let g:pandoc#syntax#conceal#use = 0
let g:formatdef_pandoc = '"pandoc -t markdown --standalone --atx-headers"'
let g:formatters_pandoc = ['pandoc']
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
" Remapping
nmap <leader>w :w<cr>
nmap <leader>c :BD<cr>
nmap <silent><C-X> :NERDTreeToggle<CR>
nmap <silent><C-H> :bp<CR>
nmap <silent><C-L> :bn<CR>
nmap <leader>t <C-W><C-W><CR>
nmap ; :
nmap <silent><leader>e :Explore<CR>
if has("win32")
nmap <silent><leader>rr :source $HOME/vimfiles/vimrc <cr>
else
nmap <silent><leader>rr :source ~/.vimrc <cr>
endif
nmap <silent><leader>x "+
vmap <silent><leader>x "+
nmap <silent><leader><leader><leader> :nohlsearch<CR>