" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"color settings

set nocompatible
set encoding=utf-8
set ttimeoutlen=50
set t_Co=256
" ========General========
set number
set history=1000
set showcmd
set noerrorbells
set visualbell
set autoread
set hidden "Allows buffers Tabs to be in background
syntax on
set backspace=2 " make backspace work like most other programs
set ruler
set relativenumber
set updatetime=100            "vim update time
"set paste
set clipboard=unnamedplus
set mouse=a
"==========Spelling=======
" z= will bring up a list of options for miss spelled words
" ]s moves to the next spelling error
set spellfile=$HOME/.vim/spell/en.utf-8.add
set spell
set spellfile=$HOME/.vim/spell/en.utf-8.add
autocmd Filetype * hi clear SpellBad
autocmd Filetype * hi SpellBad ctermbg=52
autocmd Filetype * hi clear SpellRare
autocmd Filetype * hi SpellRare ctermbg=52
autocmd Filetype * hi clear SpellCap
autocmd Filetype * hi SpellCap ctermbg=52
autocmd Filetype * hi clear SpellLocal
autocmd Filetype * hi SpellLocal ctermbg=52

" ========Search=========
set hlsearch
set incsearch
set ignorecase
set smartcase
"Adds fuzzy finding to built in search
set path+=**
highlight Search cterm=NONE ctermfg=black ctermbg=22

" =======Scrolling======
set scrolloff=8
set sidescrolloff=15
set sidescroll=1

" =======ctags=======
" ctags can be used to jump around code in an unfamiliar code base or
" libraries that are being used
" Ctrl-]
" Ctrl-t
set tags=~/.tags,tags;
" Updates ctags in current python environment
"
command Utags execute "!ctags -R --fields=+l --languages=python --python-kinds=-iv --extra=+f -f ~/.tags $(python -c \"import os, sys; print(' '.join('{}'.format(d) for d in sys.path if os.path.isdir(d)))\")"


" =======pytest========
" use tpope dispatch
" This allows you to run pytest in vim and takes you to the errors
" :make will run pytest
" Once tests are complete the program will jump to the error
" :cn navigates to the next error
" :cp navigates to the previous error
" Error format was adopted from

" =======Special=======
nnoremap <leader>. :CtrlPTag<cr>
autocmd BufWritePre * :%s/\s\+$//e " Removes trailing white space on save


" =============tpope/dispatch============
autocmd FileType python execute "compiler pytest"

set background=dark    " Setting dark mode
colorscheme slate
" NERDTree Settings
nmap + :NERDTreeToggle<CR>
" NERDTree git plugin
let g:NERDTreeIndicatorMapCustom = {
    \ "Modified"  : "*",
    \ "Staged"    : "+",
    \ "Untracked" : "~",
    \ "Renamed"   : ">",
    \ "Unmerged"  : "=",
    \ "Deleted"   : "x",
    \ "Dirty"     : "X",
    \ "Clean"     : "c",
    \ 'Ignored'   : 'I',
    \ "Unknown"   : "?"
    \ }

"airline settings
let g:airline_powerline_fonts = 0

if !exists('g:airline_symbols')
    let g:airline_symbols = {}
endif

" unicode symbols
"let g:airline_left_sep = '»'
let g:airline_left_sep = ''
"let g:airline_right_sep = '«'
let g:airline_right_sep = ''
"let g:airline_symbols.linenr = ''
" let g:airline_symbols.linenr = ''
"let g:airline_symbols.branch = '¶'
"let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
"let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
let g:airline_symbols.notexists = 'Ɇ'
"tmuxline.vim settings
" let g:tmuxline_powerline_separators = 0
let g:airline_left_sep = '»'
"let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
"let g:airline_right_sep = '◀'
" let g:airline_symbols.crypt = '🔒'
" let g:airline_symbols.linenr = '☰'
" let g:airline_symbols.linenr = '␊'
" let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.maxlinenr = ''
"let g:airline_symbols.maxlinenr = '㏑'
"let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
"let g:airline_symbols.paste = '∥'
"let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = 'Ɇ'
let g:airline_symbols.whitespace = 'Ξ'
" Enable the list of buffers
let g:airline#extensions#tabline#enabled = 1
" " Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'


"promptline config
let g:promptline_powerline_symbols = 0
let g:promptline_preset = {
        \'a' : [ promptline#slices#host() ],
        \'b' : [ promptline#slices#user() ],
        \'c' : [ promptline#slices#cwd() ],
        \'x' : [ promptline#slices#conda_env() ],
        \'y' : [ promptline#slices#vcs_branch() ],
        \'warn' : [ promptline#slices#last_exit_code() ]}

"ctrlp settings
"let g:ctrlp_working_path_mode = 'ra' "Limits search
let g:ctrlp_dont_split = 'NERD'
let g:ctrlp_clear_cache_on_exit = 0
let g:tmuxline_powerline_separators = 0
" YouCompleteMe Settings
highlight Pmenu ctermfg=255 ctermbg=243
