


if has("syntax")
  syntax on
endif

"allows numbers to show up on the side"
set number
set hlsearch
"sets specific syntax depending on file's name"
filetype plugin on
"jump marker"
noremap <Space><Space> <Esc>/<++><Enter>"_c4l



"---HTML autofunctions!---"
"normal para"
autocmd FileType html inoremap ;p <p></p><Enter><Enter><++><Esc>2ki
"Code class"
autocmd FileType html inoremap ;c <pre class="preformatted"><Enter></pre><Enter><Enter><++><Esc>2k0i
"header tag (dont forget you can make these each their own option if you want)"
autocmd FileType html inoremap ;h <h id=">(<++>)" class="blog-header"><++></h<++>><Enter><Enter><++><Esc>2k$2Bhi
"header tag subclass"
autocmd FileType html inoremap ;sh <h id=">{<++>}" class="blog-header"><++></h<++>><Enter><Enter><++><Esc>2k$2Bhi
"header non blog class"
autocmd FileType html inoremap ;;h <h><++></h<++>><Enter><Enter><++><Esc>2kbi
"normal link"
autocmd FileType html inoremap ;ll <a href="<++>"><++></a> <++><Esc>0
"bold ta"
autocmd FileType html inoremap ;b <b></b> <++><Esc>4ba
"para code tag for when you need to list something from code block"
autocmd FileType html inoremap ;-c <code></code> <++><Esc>4ba
"table tag"
autocmd FileType html inoremap ;tb <table><CR><CR></table><Esc>ki
"th tag"
autocmd FileType html inoremap ;th <th></th> <CR><++><Esc>ka
"tr tag"
autocmd FileType html inoremap ;tr <tr><CR><CR></tr><CR><++><ESC>2ki
"td tag"
autocmd FileType html inoremap ;td <td class="" id="<++>"><++></td><CR><++><Esc>k/"<CR>a
"empty td tag for links"
autocmd FileType html inoremap ;tl <td></td><Esc>2ba
"<> tag"
autocmd FileType html inoremap ;<> &lt;&gt; <++><Esc>4ba
"TOC_add_bigheader"
autocmd FileType html noremap ;T />([0-9]<CR>a~<Esc>2l"by/)<Esc>/><CR>l"ty/<<CR>A%^%<Esc>/>()<CR>a~<Esc>l"bp/><CR>"tp/%^%<CR>d3l/>([0-9]<CR>h<Esc>
"new list item"
autocmd FileType html inoremap ;lh <li><a href="#>()"></a></li><Enter>
"new sublist item"
autocmd FileType html inoremap ;ls <li><a href="#>{}"></a></li><Enter>
"ul item"
autocmd FileType html inoremap ;ul <ul><CR><CR></ul><Esc>k
"TOC_add_subheader"
autocmd FileType html noremap ;sT />{[0-9]<CR>a~<Esc>2l"by/}<Esc>/><CR>l"ty/<<CR>A%^%<Esc>/>{}<CR>a~<Esc>l"bp/><CR>"tp/%^%<CR>d3l/>{[0-9]<CR>h<Esc>

if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif
" Auto-compile and run C++ code
map <F8> :w<CR>:!g++ % -o %< && ./%<<CR>

" run previous compiled code
map <F9> :e<CR>:!./%<<CR>

" clear terminal execution

map <F2> :!clear<CR><CR>

" Write and run Python file auto
map <F3> :w<CR>:!python3 %<CR>

" turn off line numbers
map <F6> :set nonumber <CR>

" turn on line numbers
map <F7> : set number <Cr>

