Skip to content

Instantly share code, notes, and snippets.

@Inazuma110
Created September 11, 2019 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Inazuma110/1ce693f49879326249e0b4ab4ae03f1e to your computer and use it in GitHub Desktop.
Save Inazuma110/1ce693f49879326249e0b4ab4ae03f1e to your computer and use it in GitHub Desktop.
init.vim sample
" reset augroup
augroup MyAutoCmd
autocmd!
augroup END
if &compatible
set nocompatible
endif
" install dein.vim
let s:cache_home = empty($XDG_CACHE_HOME) ? expand('~/.cache') : $XDG_CACHE_HOME
let s:dein_dir = s:cache_home . '/dein'
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'
if !isdirectory(s:dein_repo_dir)
call system('git clone https://github.com/Shougo/dein.vim ' . shellescape(s:dein_repo_dir))
endif
let &runtimepath = s:dein_repo_dir .",". &runtimepath
let s:toml_file = fnamemodify(expand('<sfile>'), ':h').'/dein/dein.toml'
if dein#load_state(s:dein_dir)
call dein#begin(s:dein_dir)
call dein#load_toml(s:toml_file)
call dein#end()
call dein#save_state()
endif
if has('vim_starting') && dein#check_install()
call dein#install()
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment