-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
158 lines (137 loc) · 4.2 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
155
156
157
158
"
" dotvim : https://github.com/dotphiles/dotvim
"
" Setup vim and load required plugins before dotvim
"
" Authors:
" Ben O'Hara <[email protected]>
"
set encoding=utf-8
" Call dotvim
source ~/.vim/dotvim.vim
if has("user_commands")
set nocompatible
filetype off
let g:python3_host_prog='python3'
let g:python_host_prog='python2'
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
"let g:vundles=['general', 'git', 'hg', 'programming', 'completion', 'ruby', 'python', 'misc']
"let g:vundles=['general', 'misc', 'python', 'programming', 'git']
let g:vundles=[]
"let g:neocomplcache_enable_at_startup = 1
" Load 'vundles'
source ~/.vim/vundles.vim
Bundle 'scrooloose/nerdtree'
Bundle 'Xuyuanp/nerdtree-git-plugin'
Bundle 'vim-airline/vim-airline-themes'
Bundle 'rust-lang/rust.vim'
Bundle 'KabbAmine/zeavim.vim'
Bundle 'racer-rust/vim-racer'
Bundle 'git://github.com/tpope/vim-dispatch.git'
Bundle 'git://github.com/digitaltoad/vim-pug.git'
Bundle 'git://github.com/saltstack/salt-vim.git'
Bundle 'git://github.com/leafgarland/typescript-vim.git'
Bundle 'git://github.com/lambdatoast/elm.vim.git'
Bundle 'OmniSharp/Omnisharp-vim'
Bundle 'git://github.com/Valloric/YouCompleteMe.git'
Bundle 'rdnetto/YCM-Generator'
Bundle 'mattn/emmet-vim'
Bundle 'rbgrouleff/bclose.vim'
Bundle 'francoiscabrol/ranger.vim'
Bundle 'PProvost/vim-ps1'
Bundle 'gregsexton/gitv'
Bundle 'mxw/vim-jsx'
Bundle 'walm/jshint.vim'
Bundle 'rhysd/open-pdf.vim'
Bundle 'https://github.com/google/vim-ft-go.git'
Bundle 'https://github.com/fatih/vim-go.git'
Bundle 'sindresorhus/vim-xo'
Bundle 'Chiel92/vim-autoformat'
Bundle 'neomake/neomake'
" Colour Schemes
Bundle 'arcticicestudio/nord-vim'
Bundle 'tomasr/molokai'
Bundle 'altercation/vim-colors-solarized'
Bundle 'iCyMind/NeoSolarized'
Bundle 'google/vim-colorscheme-primary'
Bundle 'https://github.com/joshdick/onedark.vim.git'
Bundle 'sickill/vim-monokai'
Bundle 'trusktr/seti.vim'
" EditorConfig (loaded last to prevent anything conflicting)
Bundle 'editorconfig/editorconfig-vim'
endif
filetype plugin on
":let base16colorspace=256
" JavaScript
let g:syntastic_javascript_checkers = ['standard']
let g:syntastic_javascript_standard_exec = 'semistandard'
" C#
let g:syntastic_cs_checkers = ['code_checker']
let g:OmniSharp_server_type = 'roslyn'
let g:EditorConfig_exec_path = '/usr/bin/editorconfig'
let g:EditorConfig_core_mode = 'external_command'
" Override colorscheme from base16
" Customize to your needs...
" Map NERDTree to Ctrl+\
map <C-\> :NERDTreeToggle<CR>
" Open NERDTree if no files were specified when starting vim
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" Clear Vim Search with 'C'
nnoremap <esc> :noh<return><esc>
nnoremap <esc>^[ <esc>^[]]
" Overrides for using Vim over an ssh connection
if $SSH_CONNECTION
let g:dotvim_colorscheme = 'molokai'
endif
if $TERM == "xterm"
set background = "dark"
endif
"if $VIM_COLOR_SCHEME != "" && $TERM != "xterm"
" :let g:dotvim_colorscheme = $VIM_COLOR_SCHEME
"endif
"if has("gui_running")
" :let $LC_TERM_PROFILE = "light"
" set guifont=Hack\ 13
" set background=light
" colorscheme solarized
"endif
if $LC_TERM_PROFILE == "light"
set background=light
else
set background=dark
endif
if $VIM_COLOR_SCHEME != ""
colorscheme $VIM_COLOR_SCHEME
else
colorscheme molokai
endif
if $VIM_COLOR_SCHEME == "molokai" || $VIM_COLOR_SCHEME == ""
let g:molokai_original = 1
let g:rehash256 = 1
endif
if $VIM_COLOR_SCHEME == "NeoSolarized"
set termguicolors
endif
" Remap Commands
" https://stackoverflow.com/questions/3878692/aliasing-a-command-in-vim#3879737
fun! SetupCommandAlias(from, to)
exec 'cnoreabbrev <expr> '.a:from
\ .' ((getcmdtype() is# ":" && getcmdline() is# "'.a:from.'")'
\ .'? ("'.a:to.'") : ("'.a:from.'"))'
endfun
" Map semicolon to colon
nnoremap ; :
vnoremap ; :
" If the term command exists (e.g in Neovim) alias is to '!'
if exists("term")
call SetupCommandAlias("!", "term")
call SetupCommandAlias("!*", "term")
endif
" Set formatting options last so that it's not immediately
" overriden by any other plugins.
set tabstop=2
set shiftwidth=2
set softtabstop=0
set expandtab