"$XDG_CONFIG_HOME/vim/vimrc"
set path+=**
set wildmenu
set runtimepath^=$XDG_CONFIG_HOME/vim
set runtimepath+=$XDG_DATA_HOME/vim
set runtimepath+=$XDG_CONFIG_HOME/vim/after
set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
let g:netrw_home = $XDG_DATA_HOME."/vim"
call mkdir($XDG_DATA_HOME."/vim/spell", 'p')
set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p')
set directory=$XDG_STATE_HOME/vim/swap   | call mkdir(&directory, 'p')
set undodir=$XDG_STATE_HOME/vim/undo     | call mkdir(&undodir,   'p')
set viewdir=$XDG_STATE_HOME/vim/view     | call mkdir(&viewdir,   'p')
if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif

call plug#begin(expand('~/.config/vim/plugged'))
"Plug 'vimwiki/vimwiki'
Plug 'jceb/vim-orgmode'
Plug 'https://github.com/tpope/vim-speeddating'
Plug 'https://github.com/tpope/vim-repeat.git'
"Plug 'https://github.com/yegappan/taglist.git'
Plug 'https://github.com/chrisbra/NrrwRgn.git'
Plug 'https://github.com/inkarkat/vim-SyntaxRange.git'
"Plug 'https://github.com/arcticicestudio/nord-vim.git'
Plug 'dylanaraps/wal.vim'
Plug 'vim-airline/vim-airline'
Plug 'junegunn/goyo.vim'
"Plug 'junegunn/goyo.vim', { 'for': 'markdown' }
"Plug 'vim-airline/vim-airline-themes'
Plug 'ap/vim-css-color'
"Plug 'vifm/vifm.vim'
"Plug 'junegunn/vim-easy-align'
"Plug 'preservim/nerdtree'
" Any valid git URL is allowed
"Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
"Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
"Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-default branch
"Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
"Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options
"Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
"Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" Unmanaged plugin (manually installed and updated)
"Plug '~/my-prototype-plugin'
" fzf stuff
"Plug 'junegunn/fzf.vim'

" Initialize plugin system
call plug#end()

let &t_ti.="\e[1 q"
let &t_SI.="\e[5 q"
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"




set gp=git\ grep\ -n
set nocompatible
set notermguicolors
set background=dark
set number
syntax enable
colorscheme wal
let g:airline_powerline_fonts = 1
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let mapleader = ","
"let &t_SI = "\e[6 q"
"let &t_EI = "\e[2 q"
"nnoremap <leader>n :NERDTreeFocus<CR>
"nnoremap <C-n> :NERDTree<CR>
"nnoremap <C-t> :NERDTreeToggle<CR>
"nnoremap <silent> <C-f> :Files<CR>
"nnoremap <silent> <Leader>f :Rg<CR>
"nnoremap <leader>vv :Vifm<CR>
nnoremap <leader>vs :VsplitVifm<CR>
nnoremap <leader>sp :SplitVifm<CR>
nnoremap <leader>dv :DiffVifm<CR>
nnoremap <leader>tv :TabVifm<CR>
nnoremap <leader>sv :vsplit<CR>
nnoremap <leader>sh :split<CR>
nnoremap <C-p> :GFiles<Cr>
nnoremap <C-g> :vertical resize +2<CR>
nnoremap <C-h> :vertical resize -2<CR>
nnoremap <C-s> :resize +2<CR>
nnoremap <C-x> :resize -2<CR>
function! s:goyo_enter()
	set linebreak
	set spelllang=en_us
	set spell
	"HexokinaseTurnOff
endfunction
function! s:goyo_leave()
	set nolinebreak
	set nospell
	"HexokinaseTurnOn
endfunction
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()

let g:goyo_height='50%'
" nnoremap <Left> :echo "No left for you!"<CR>
" vnoremap <Left> :<C-u>echo "No left for you!"<CR>
" inoremap <Left> <C-o>:echo "No left for you!"<CR>
" nnoremap <Right> :echo "No right for you!"<CR>
" vnoremap <Right> :<C-u>echo "No right for you!"<CR>
" inoremap <Right> <C-o>:echo "No right for you!"<CR>
" nnoremap <Up> :echo "No Up for you!"<CR>
" vnoremap <Up> :<C-u>echo "No Up for you!"<CR>
" inoremap <Up> <C-o>:echo "No Up for you!"<CR>
" nnoremap <Down> :echo "No Down for you!"<CR>
" vnoremap <Down> :<C-u>echo "No Down for you!"<CR>
" inoremap <Down> <C-o>:echo "No Down for you!"<CR>
" Remove newbie crutches in Command Mode
cnoremap <Down> <Nop>
cnoremap <Left> <Nop>
cnoremap <Right> <Nop>
cnoremap <Up> <Nop>

" Remove newbie crutches in Insert Mode
inoremap <Down> <Nop>
inoremap <Left> <Nop>
inoremap <Right> <Nop>
inoremap <Up> <Nop>

" Remove newbie crutches in Normal Mode
nnoremap <Down> <Nop>
nnoremap <Left> <Nop>
nnoremap <Right> <Nop>
nnoremap <Up> <Nop>

" Remove newbie crutches in Visual Mode
vnoremap <Down> <Nop>
vnoremap <Left> <Nop>
vnoremap <Right> <Nop>
vnoremap <Up> <Nop>

