-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
155 lines (132 loc) · 3.42 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
set nocompatible
"" BUNDLES
" Configuration
let $GIT_SSL_NO_VERIFY = 'true'
if has("win32")
set rtp+=%USERPROFILE%/vimfiles/bundle/Vundle.vim
else
set shell=/bin/bash
set rtp+=~/.vim/bundle/Vundle.vim/
endif
let mapleader = "\\"
set laststatus=2 "for Powerline
let g:airline_powerline_fonts = 1
nmap <Leader>rt :TagbarToggle<CR>
nmap <Leader>n :NERDTreeToggle<CR>
call vundle#begin()
" Must have
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-repeat'
Plugin 'a.vim'
" Functional
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/nerdcommenter'
Plugin 'tpope/vim-surround'
Plugin 'fholgado/minibufexpl.vim'
Plugin 'tpope/vim-fugitive'
" Visual
Plugin 'bling/vim-airline'
Plugin 'altercation/vim-colors-solarized'
Plugin 'tomasr/molokai'
Plugin 'flazz/vim-colorschemes'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'noahfrederick/vim-noctu'
Plugin 'arcticicestudio/nord-vim'
" Language
Plugin 'marijnh/tern_for_vim'
Plugin 'sheerun/vim-polyglot'
" Other
"Plugin 'jeffkreeftmeijer/vim-numbertoggle'
Plugin 'majutsushi/tagbar'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-shell'
Plugin 'vimwiki/vimwiki' " personal wiki
Plugin 'junegunn/goyo.vim' " distraction free
Plugin 'mhinz/vim-signify' " VCS gutter
call vundle#end()
" Enable file type detection and do language-dependent indenting
filetype plugin indent on
set showcmd
set backspace=indent,eol,start
syntax on
" Show line numbers, relative to current line
set number
set relativenumber
" Allow hidden buffers, don't limit to 1 file per window/split
set hidden
if (has('gui_running'))
set lines=50 columns=140
endif
set nowrap
set guioptions+=b
set autochdir
set encoding=utf-8
set tags+=./tags;
set regexpengine=1
let g:easytags_auto_highlight = 1
"" Searching
set hlsearch
set incsearch
set ignorecase
set smartcase
"" KEYMAPS
" Use j and k for <Esc>
" Note: These seem to behave badly on the Kitty terminal emulator
" https://github.com/zeit/hyper/issues/2819
"inoremap jk <Esc>
"inoremap kj <Esc>
"nnoremap <Esc> :noh<Return><Esc>
nmap <F8> :TagbarToggle<CR>
""
"" Filetypes
au BufRead,BufNewFile *.man set filetype=xml
"" VISUAL
if (has("win32") && !has('gui_running'))
set t_Co=16
colorscheme noctu
colorscheme default
else
set background=dark
colorscheme nord
if has("win32")
set guifont=Inconsolata_for_Powerline:h11
else
set guifont=Fira\ Code\ 13
endif
endif
""
" Keep cursor away from edges of screen
set so=5
"Highlight cursor line
augroup CursorLine
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
" au VimEnter,WinEnter,BufWinEnter * setlocal cursorcolumn
au WinLeave * setlocal nocursorline
" au WinLeave * setlocal nocursorcolumn
augroup END
" Make trailing whitespace annoyingly highlighted.
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
" Tab Settings
set expandtab
set shiftwidth=4
set tabstop=4
set smarttab
set cindent
let indent_guides_enable_on_vim_startup = 1
let g:easytags_async = 1
if has("win32")
let g:easytags_cmd = 'C:\Users\dylang\Documents\bin\ctags.exe'
let g:tagbar_ctags_bin = 'C:\Users\dylang\Documents\bin\ctags.exe'
endif
if has("mouse")
set mouse=a
noremap <MiddleMouse> <LeftMouse>
endif
" Use system clipboard by default
set clipboard=unnamedplus