diff --git a/.vimrc b/.vimrc index 52567df..58fbd5e 100644 --- a/.vimrc +++ b/.vimrc @@ -23,6 +23,9 @@ set autoread " Turn on mouse Interaction set mouse=a +" Set spelcheck language +set spelllang=en_gb + " Set default split to be right or bottom set splitright set splitbelow @@ -77,6 +80,56 @@ set laststatus=2 let g:airline_powerline_fonts = 1 let g:airline_theme='dark' + +" Quick tex options {{{2 +let g:quicktex_html = { + \' ' : "\/<+.*+>\\"_c/+>/e\", + \';b' : "<+++> <++>", + \';i' : "<+++> <++>", + \';1' : "

<+++>

<++>", + \';2' : "

<+++>

<++>", + \';3' : "

<+++>

<++>", + \';p' : "

<+++>

<++>", + \';a' : "\"><+++> <++>", + \';ul' : "
    \
  • <+++>
  • \
\\<++>", + \';ol' : "
    \
  1. <+++>
  2. \
\\<++>", + \';li' : "
  • <++>
  • ", +\} + +let g:quicktex_tex = { + \' ' : "\/<+.*+>\\"_c/+>/e\", + \';b' : "\\textbf{<+++>} <++>", + \';e' : "\\emph{<+++>} <++>", + \'prf' : "\\begin{proof}\<+++>\\\end{proof}", +\} + +let g:quicktex_math = { + \' ' : "\/<+.*+>\\"_c/+>/e\", + \';b' : "\\mathbf{<+++>} <++>", + \'fr' : '\mathcal{R} ', + \'eq' : '= ', + \'set' : '\{ <+++> \} <++>', + \'frac' : '\frac{<+++>}{<++>} <++>', + \'one' : '1 ', + \'st' : ': ', + \'in' : '\in ', + \'bn' : '\mathbb{N} ', +\} + +let g:quicktex_markdown = { + \' ' : "\/<+.*+>\\"_c/+>/e\", + \';b' : "**<+++>** <++>", + \';i' : "*<+++>* <++>", + \';a' : "[<+++>](<+url+>) <++>", +\} + +let g:quicktex_pandoc = g:quicktex_markdown + + +"}}} + + + " Functions {{{1 function! NextMark() @@ -103,6 +156,9 @@ endfunction nnoremap ddp nnoremap ddkP +" Activate spelling +nnoremap :set spell! + " Disable Scroll wheel noremap noremap @@ -112,13 +168,13 @@ noremap vnoremap "+y inoremap "+pa -" Make atrl t open new tab +" Make Ctrl t open new tab nnoremap :tabnew " map gV to select previously pasted nnoremap gV "`[".getregtype(v:register)[0]."`]" " -" Set :w!! to save with sudo +" Set :w!! to save with sudo cnoremap w!! w !sudo tee % "Run current line as command @@ -135,7 +191,7 @@ nnoremap ev :vsplit $MYVIMRC nnoremap sv :source $MYVIMRC " Set double space in insert mode to go to next mark and enter insert mode -inoremap :call NextMark() +"inoremap :call NextMark() " Abreviations {{{1 @@ -186,51 +242,54 @@ endfun " autocmd VimEnter * call Start() " File Type Specific {{{1 +"Make web files fold on indent {{{2 augroup file_web autocmd! autocmd FileType html,css,less,javascript,php setlocal foldmethod=indent foldenable augroup END -augroup htmlShortcuts +" Add Html maps, Currently only pandoc conversion {{{2 +augroup html autocmd! - autocmd FileType html inoremap ;b (<.>)FbT>i - autocmd FileType html inoremap ;i (<.>)FeT>i - autocmd FileType html inoremap ;1

    (<.>)2kf ;2

    (<.>)2kf ;3

    (<.>)2kf ;p

    (<.>)02kf>a - autocmd FileType html inoremap ;a href="">(<.>)(<.>)F"i - autocmd FileType html inoremap ;ul
    (<.>)03kf ;li o
  • F>a - autocmd FileType html inoremap ;ol
    (<.>)03kf ;m @media screen and (min-width:px){(<.>)}?pxi - autocmd FileType css,less inoremap ;M @media screen and (max-width:px){(<.>)}?pxi -augroup end - -augroup new_html - autocmd! - autocmd BufNew,BufNewFile *.html call NewHtml() + " Run current line through pandoc. + " Convert from markdown to html + autocmd FileType html nnoremap p :.!pandoc -t html -f markdown-auto_identifiers --wrap=preserve + "convert from html to markdown + autocmd FileType html nnoremap P :.!pandoc -t markdown -f html --wrap=preserve --atx-headers + + "Run current selection through pandoc + " Convert from markdown to html + autocmd FileType html vnoremap p :!pandoc -t html -f markdown-auto_identifiers --wrap=preserve + "convert from html to markdown + autocmd FileType html vnoremap P :!pandoc -t markdown -f html --wrap=preserve --atx-headers augroup END -augroup new_latex +" Add latex maps, Currently only pandoc conversion {{{2 +augroup latex autocmd! - autocmd BufNew,BufNewFile *.tex,*.latex call NewLatex() + " Run current line through pandoc. + " Convert from markdown to latex + autocmd FileType tex,latex nnoremap p :.!pandoc -t latex -f markdown-auto_identifiers --wrap=preserve + "convert from latex to markdown + autocmd FileType tex,latex vnoremap P :.!pandoc -t markdown -f latex --wrap=preserve --atx-headers + + "Run current selection through pandoc + " Convert from markdown to latex + autocmd FileType tex,latex vnoremap p :!pandoc -t latex -f markdown-auto_identifiers --wrap=preserve + "convert from latex to markdown + autocmd FileType tex,latex vnoremap P :!pandoc -t markdown -f latex --wrap=preserve --atx-headers augroup END +" Make vim fold using markers {{{2 augroup file_vim autocmd! autocmd FileType vim setlocal foldmethod=marker foldenable augroup END -""set es6 files to javascript +""set es6 files to javascript {{{2 augroup detectES6 autocmd! autocmd BufNew,BufNewFile,BufRead *.es6 :setlocal filetype=javascript augroup END - diff --git a/bundle/quicktex b/bundle/quicktex index 50e30ce..3887cdc 160000 --- a/bundle/quicktex +++ b/bundle/quicktex @@ -1 +1 @@ -Subproject commit 50e30cee04420c4b457befd35d463d27973adcb9 +Subproject commit 3887cdc7c339dc0cf41a1d5431e9ec50f43b4d91