mirror of
https://git.qwik.space/left4code/Dotfiles.git
synced 2025-07-28 00:12:31 +05:30
68 lines
2.1 KiB
VimL
68 lines
2.1 KiB
VimL
|
|
|
|
|
|
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
|
|
"<> tag"
|
|
autocmd FileType html inoremap ;<> <> <++><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>
|
|
|