Skip to content

Instantly share code, notes, and snippets.

@andriimosin
Created June 25, 2018 21:59
Show Gist options
  • Save andriimosin/7a8a03cf95ea56f90c88a2f0add443dc to your computer and use it in GitHub Desktop.
Save andriimosin/7a8a03cf95ea56f90c88a2f0add443dc to your computer and use it in GitHub Desktop.
""
"" Janus setup
""
" Define paths
if has('win32') || has('win64') || has('win32unix')
let g:janus_path = expand("~/.vim/janus/vim")
let g:janus_vim_path = expand("~/.vim/janus/vim")
else
let g:janus_path = escape(fnamemodify(resolve(expand("<sfile>:p")), ":h"), ' ')
let g:janus_vim_path = escape(fnamemodify(resolve(expand("<sfile>:p" . "vim")), ":h"), ' ')
endif
let g:janus_custom_path = expand("~/.janus")
" Source janus's core
exe 'source ' . g:janus_vim_path . '/core/before/plugin/janus.vim'
" You should note that groups will be processed by Pathogen in reverse
" order they were added.
call janus#add_group("tools")
call janus#add_group("langs")
call janus#add_group("colors")
""
"" Customisations
""
if filereadable(expand("~/.vimrc.before"))
source ~/.vimrc.before
endif
" Disable plugins prior to loading pathogen
exe 'source ' . g:janus_vim_path . '/core/plugins.vim'
""
"" Pathogen setup
""
" Load all groups, custom dir, and janus core
call janus#load_pathogen()
" .vimrc.after is loaded after the plugins have loaded
" Mimic :grep and make ag the default tool.
let g:grepper = {
\ 'tools': ['ag', 'git', 'grep'],
\ 'open': 0,
\ 'jump': 1,
\ }
autocmd vimenter * NERDTree
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment