if exists('g:syntax_on') == 0
  syntax on
endif
filetype plugin indent on

if has('termguicolors')
  set termguicolors
endif

let g:mapleader = "\<Space>"

colorscheme slate
set background=dark

" STATUSLINE
set laststatus=2
set statusline=
set statusline+=\ %F
set statusline+=\ %m

" NETRW
let g:netrw_liststyle = 3
let g:netrw_banner = 0
let g:netrw_browse_split = 1
let g:netrw_winsize = 20
let g:netrw_altv = 1

" CORE SETTINGS
set noruler
set number
set relativenumber
set noshowmode
set noshowcmd
set history=100
set wildmenu
set mouse=a
set scrolloff=3
set lazyredraw
set autowrite
set showmatch

" BACKUPS
set noswapfile
set nobackup
set nowritebackup

" INDENTATION
set autoindent
set tabstop=2
set shiftwidth=2
set expandtab
set wrap

" SEARCH
set incsearch
set hlsearch
set ignorecase
set smartcase

" KEY MAPPINGS
nnoremap <leader>s :%s/
nnoremap <silent> <BS> :nohlsearch<CR>
nnoremap <leader>w :w!<CR>
nnoremap <leader>q :q!<CR>
nnoremap <leader>0 :Vexplore<CR>
autocmd FileType python nnoremap <buffer> <leader>r :w<CR>:below terminal python %<CR>