Add some snippets

master
Jonathan Hodgson 7 years ago
parent ae88b1140a
commit 8663429998
  1. 26
      .vimrc

@ -161,9 +161,21 @@ let g:quicktex_css = {
\';flex' : "display: flex;\<CR><++>", \';flex' : "display: flex;\<CR><++>",
\';inf' : "display: inline-flex;\<CR><++>", \';inf' : "display: inline-flex;\<CR><++>",
\ \
\'include' : "@import \"<+++>\";\<CR><++>",
\'@include' : "@import \"<+++>\";\<CR><++>",
\'require' : "@import \"<+++>\";\<CR><++>",
\'@require' : "@import \"<+++>\";\<CR><++>",
\'import' : "@import \"<+++>\";\<CR><++>"
\} \}
let g:quicktex_less = g:quicktex_css let g:quicktex_less = g:quicktex_css
" JS {{{3
let g:quicktex_javascript = {
\' ' : "\<ESC>/<+.*+>\<CR>\"_c/+>/e\<CR>",
\
\';fun' : "function <+++>(<++>){\<CR><++>\<CR>}",
\
\}
" Latex Normal {{{3 " Latex Normal {{{3
let g:quicktex_tex = { let g:quicktex_tex = {
\' ' : "\<ESC>/<+.*+>\<CR>\"_c/+>/e\<CR>", \' ' : "\<ESC>/<+.*+>\<CR>\"_c/+>/e\<CR>",
@ -247,6 +259,14 @@ let g:quicktex_markdown = {
\';a' : "[<+++>](<+url+>) <++>", \';a' : "[<+++>](<+url+>) <++>",
\} \}
let g:quicktex_pandoc = g:quicktex_markdown let g:quicktex_pandoc = g:quicktex_markdown
" PHP {{{3
let g:quicktex_php = {
\' ' : "\<ESC>/<+.*+>\<CR>\"_c/+>/e\<CR>",
\';ob' : "ob_start();\<CR><+++>\<CR>ob_get_clean();",
\';vd' : "var_dump(<+++>);",
\';obvd' : "ob_start();\<CR>var_dump(<+++>);\<CR>echo htmlspecialchars(ob_get_clean());",
\';nl' : "echo '<br />';",
\}
"}}} "}}}
@ -274,6 +294,12 @@ function! NewLatex()
setlocal filetype=tex setlocal filetype=tex
endfunction endfunction
" Commands {{{1
"gets the wp salts
command WpSalts :r! curl https://api.wordpress.org/secret-key/1.1/salt 2> /dev/null
" Mappings {{{1 " Mappings {{{1
" Move lines up/down/left/right using arrow keys " Move lines up/down/left/right using arrow keys
nnoremap <Down> ddp nnoremap <Down> ddp

Loading…
Cancel
Save