From d2d3900ea28d1bd2a86238e9c16d142d07ec7e45 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Mon, 18 May 2015 15:05:59 +0100 Subject: added .nvim with configuration --- .gitignore | 3 + nvim/after/ftplugin/tex/folding.vim | 0 nvim/after/ftplugin/tex/mappings.vim | 50 +++ nvim/after/ftplugin/tex/unilatex.vim | 675 +++++++++++++++++++++++++++++++++++ nvim/after/ftplugin/vim/folding.vim | 25 ++ nvim/after/syntax/cpp.vim | 3 + nvim/after/syntax/cpp.vim~ | 0 nvim/after/syntax/tex.vim | 6 + nvim/after/syntax/tex.vim~ | 6 + nvim/autoload/plug.vim | 1 + nvim/colors/mine.vim | 29 ++ nvim/colors/mine.vim~ | 29 ++ nvim/mySnippets/all.snippets | 25 ++ nvim/mySnippets/cpp.snippets | 0 nvim/mySnippets/mail.snippets | 31 ++ nvim/mySnippets/python.snippets | 0 nvim/mySnippets/tex.snippets | 103 ++++++ nvim/mySnippets/vim.snippets | 0 nvim/spell/en.utf-8.add | 3 + nvim/spell/en.utf-8.add.spl | Bin 0 -> 70 bytes nvimrc | 2 +- 21 files changed, 990 insertions(+), 1 deletion(-) create mode 100644 nvim/after/ftplugin/tex/folding.vim create mode 100644 nvim/after/ftplugin/tex/mappings.vim create mode 100644 nvim/after/ftplugin/tex/unilatex.vim create mode 100644 nvim/after/ftplugin/vim/folding.vim create mode 100644 nvim/after/syntax/cpp.vim create mode 100644 nvim/after/syntax/cpp.vim~ create mode 100644 nvim/after/syntax/tex.vim create mode 100644 nvim/after/syntax/tex.vim~ create mode 120000 nvim/autoload/plug.vim create mode 100644 nvim/colors/mine.vim create mode 100644 nvim/colors/mine.vim~ create mode 100644 nvim/mySnippets/all.snippets create mode 100644 nvim/mySnippets/cpp.snippets create mode 100644 nvim/mySnippets/mail.snippets create mode 100644 nvim/mySnippets/python.snippets create mode 100644 nvim/mySnippets/tex.snippets create mode 100644 nvim/mySnippets/vim.snippets create mode 100644 nvim/spell/en.utf-8.add create mode 100644 nvim/spell/en.utf-8.add.spl diff --git a/.gitignore b/.gitignore index 8719276..1e411d1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ mutt/cache/ mutt/mailboxes/ vim/vimundo/* vim/bundle/ +nvim/plugged/ +nvim/vim-plug/ +nvim/vimundo/ vifm/Trash vifm/vimfiles vifm/vifminfo diff --git a/nvim/after/ftplugin/tex/folding.vim b/nvim/after/ftplugin/tex/folding.vim new file mode 100644 index 0000000..e69de29 diff --git a/nvim/after/ftplugin/tex/mappings.vim b/nvim/after/ftplugin/tex/mappings.vim new file mode 100644 index 0000000..a8753bb --- /dev/null +++ b/nvim/after/ftplugin/tex/mappings.vim @@ -0,0 +1,50 @@ +inoremap (( \left( +inoremap )) \right) +inoremap {{ \left\{ +inoremap }} \right\} +inoremap [[ \left[ +inoremap ]] \right] +inoremap == \,=\, +inoremap >> \,\geq\, +inoremap << \,\leq\, +inoremap ++ \,+\, +inoremap -- \,-\, + +iabbrev ga \alpha +iabbrev gb \beta +iabbrev gg \gamma +iabbrev gd \delta +iabbrev ge \varepsilon +iabbrev gz \zeta +iabbrev gh \eta +iabbrev gt \theta +iabbrev gi \iota +iabbrev gk \kappa +iabbrev gl \lambda +iabbrev gm \mu +iabbrev gn \nu +iabbrev gx \xi +iabbrev gr \rho +iabbrev gs \sigma +iabbrev gf \phi +iabbrev gp \pi +iabbrev gw \omega +iabbrev dd \d + +function! SynctexShow() + let synctex = glob("*.synctex.gz") + if strlen(synctex) == 0 + echom "no synctex file found" + else + let pdffile = substitute(synctex,"synctex.gz","pdf","") + let execline = printf(":!zathura --synctex-forward %d:%d:%s %s", line('.'), col('.'), shellescape(bufname("%")), shellescape(pdffile)) + exec execline + end +endfunction + +nnoremap a :call SynctexShow() +nnoremap i :Latexmk +nnoremap e :LatexErrors +nnoremap o :LatexView +nnoremap k :LatexmkStop:LatexmkClean +nnoremap h :split header.sty diff --git a/nvim/after/ftplugin/tex/unilatex.vim b/nvim/after/ftplugin/tex/unilatex.vim new file mode 100644 index 0000000..69358fc --- /dev/null +++ b/nvim/after/ftplugin/tex/unilatex.vim @@ -0,0 +1,675 @@ +function! UTF8toLaTeX() + " store cursor position + let s:line = line(".") + let s:column = col(".") + silent %s/α/\\alpha/eg + silent %s/β/\\beta/eg + silent %s/γ/\\gamma/eg + silent %s/δ/\\delta/eg + silent %s/∊/\\epsilon/eg + silent %s/ε/\\varepsilon/eg + silent %s/ζ/\\zeta/eg + silent %s/η/\\eta/eg + silent %s/θ/\\theta/eg + silent %s/ϑ/\\vartheta/eg + silent %s/ι/\\iota/eg + silent %s/κ/\\kappa/eg + silent %s/λ/\\lambda/eg + silent %s/μ/\\mu/eg + silent %s/ν/\\nu/eg + silent %s/ξ/\\xi/eg + silent %s/π/\\pi/eg + silent %s/ϖ/\\varpi/eg + silent %s/ρ/\\rho/eg + silent %s/ϱ/\\varrho/eg + silent %s/σ/\\sigma/eg + silent %s/ς/\\varsigma/eg + silent %s/τ/\\tau/eg + silent %s/υ/\\upsilon/eg + silent %s/φ/\\phi/eg + silent %s/ϕ/\\varphi/eg + silent %s/χ/\\chi/eg + silent %s/ψ/\\psi/eg + silent %s/ω/\\omega/eg + silent %s/Γ/\\Gamma/eg + silent %s/Δ/\\Delta/eg + silent %s/Θ/\\Theta/eg + silent %s/Λ/\\Lambda/eg + silent %s/Ξ/\\Xi/eg + silent %s/Π/\\Pi/eg + silent %s/Υ/\\Upsilon/eg + silent %s/Φ/\\Phi/eg + silent %s/Ψ/\\Psi/eg + silent %s/Ω/\\Omega/eg + silent %s/≤/\\leq/eg + silent %s/≪/\\ll/eg + silent %s/≺/\\prec/eg + silent %s/≼/\\preceq/eg + silent %s/⊂/\\subset/eg + silent %s/⊆/\\subseteq/eg + silent %s/⊏/\\sqsubset/eg + silent %s/⊑/\\sqsubseteq/eg + silent %s/∈/\\in/eg + silent %s/⊢/\\vdash/eg + silent %s/∣/\\mid/eg + silent %s/⌣/\\smile/eg + silent %s/≥/\\geq/eg + silent %s/≫/\\gg/eg + silent %s/≻/\\succ/eg + silent %s/≽/\\succeq/eg + silent %s/⊃/\\supset/eg + silent %s/⊇/\\supseteq/eg + silent %s/⊐/\\sqsupset/eg + silent %s/⊒/\\sqsupseteq/eg + silent %s/∋/\\ni/eg + silent %s/⊣/\\dashv/eg + silent %s/∥/\\parallel/eg + silent %s/⌢/\\frown/eg + silent %s/∉/\\notin/eg + silent %s/≡/\\equiv/eg + silent %s/≐/\\doteq/eg + silent %s/∼/\\sim/eg + silent %s/≃/\\simeq/eg + silent %s/≈/\\approx/eg + silent %s/≅/\\cong/eg + silent %s/⋈/\\Join/eg + silent %s/⋈/\\bowtie/eg + silent %s/∝/\\propto/eg + silent %s/⊨/\\models/eg + silent %s/⊥/\\perp/eg + silent %s/≍/\\asymp/eg + silent %s/≠/\\neq/eg + silent %s/±/\\pm/eg + silent %s/⋅/\\cdot/eg + silent %s/×/\\times/eg + silent %s/∪/\\cup/eg + silent %s/⊔/\\sqcup/eg + silent %s/∨/\\vee/eg + silent %s/⊕/\\oplus/eg + silent %s/⊙/\\odot/eg + silent %s/⊗/\\otimes/eg + silent %s/△/\\bigtriangleup/eg + silent %s/⊲/\\lhd/eg + silent %s/⊴/\\unlhd/eg + silent %s/∓/\\mp/eg + silent %s/÷/\\div/eg + silent %s/∖/\\setminus/eg + silent %s/∩/\\cap/eg + silent %s/⊓/\\sqcap/eg + silent %s/∧/\\wedge/eg + silent %s/⊖/\\ominus/eg + silent %s/⊘/\\oslash/eg + silent %s/○/\\bigcirc/eg + silent %s/▽/\\bigtriangledown/eg + silent %s/⊳/\\rhd/eg + silent %s/⊵/\\unrhd/eg + silent %s/◁/\\triangleleft/eg + silent %s/▷/\\triangleright/eg + silent %s/⋆/\\star/eg + silent %s/∗/\\ast/eg + silent %s/∘/\\circ/eg + silent %s/∙/\\bullet/eg + silent %s/⋄/\\diamond/eg + silent %s/⊎/\\uplus/eg + silent %s/†/\\dagger/eg + silent %s/‡/\\ddagger/eg + silent %s/≀/\\wr/eg + silent %s/∑/\\sum/eg + silent %s/∏/\\prod/eg + silent %s/∐/\\coprod/eg + silent %s/∫/\\int/eg + silent %s/⋃/\\bigcup/eg + silent %s/⋂/\\bigcap/eg + silent %s/⊔/\\bigsqcup/eg + silent %s/∮/\\oint/eg + silent %s/⋁/\\bigvee/eg + silent %s/⋀/\\bigwedge/eg + silent %s/⊕/\\bigoplus/eg + silent %s/⊗/\\bigotimes/eg + silent %s/⊙/\\bigodot/eg + silent %s/⊎/\\biguplus/eg + silent %s/←/\\leftarrow/eg + silent %s/→/\\rightarrow/eg + silent %s/↔/\\leftrightarrow/eg + silent %s/⇐/\\Leftarrow/eg + silent %s/⇒/\\Rightarrow/eg + silent %s/⇔/\\Leftrightarrow/eg + silent %s/↦/\\mapsto/eg + silent %s/↩/\\hookleftarrow/eg + silent %s/↼/\\leftharpoonup/eg + silent %s/↽/\\leftharpoondown/eg + silent %s/↪/\\hookrightarrow/eg + silent %s/⇀/\\rightharpoonup/eg + silent %s/⇁/\\rightharpoondown/eg + silent %s/←/\\longleftarrow/eg + silent %s/→/\\longrightarrow/eg + silent %s/↔/\\longleftrightarrow/eg + silent %s/⇐/\\Longleftarrow/eg + silent %s/⇒/\\Longrightarrow/eg + silent %s/⇔/\\Longleftrightarrow/eg + silent %s/⇖/\\longmapsto/eg + silent %s/↑/\\uparrow/eg + silent %s/↓/\\downarrow/eg + silent %s/↕/\\updownarrow/eg + silent %s/⇑/\\Uparrow/eg + silent %s/⇓/\\Downarrow/eg + silent %s/⇕/\\Updownarrow/eg + silent %s/↗/\\nearrow/eg + silent %s/↘/\\searrow/eg + silent %s/↙/\\swarrow/eg + silent %s/↖/\\nwarrow/eg + silent %s/↝/\\leadsto/eg + silent %s/…/\\dots/eg + silent %s/⋯/\\cdots/eg + silent %s/⋮/\\vdots/eg + silent %s/⋱/\\ddots/eg + silent %s/ℏ/\\hbar/eg + silent %s/ℓ/\\ell/eg + silent %s/ℜ/\\Re/eg + silent %s/ℑ/\\Im/eg + silent %s/א/\\aleph/eg + silent %s/℘/\\wp/eg + silent %s/∀/\\forall/eg + silent %s/∃/\\exists/eg + silent %s/℧/\\mho/eg + silent %s/∂/\\partial/eg + silent %s/′/\\prime/eg + silent %s/∅/\\emptyset/eg + silent %s/∞/\\infty/eg + silent %s/∇/\\nabla/eg + silent %s/△/\\triangle/eg + silent %s/□/\\Box/eg + silent %s/◇/\\Diamond/eg + silent %s/⊥/\\bot/eg + silent %s/⊤/\\top/eg + silent %s/∠/\\angle/eg + silent %s/√/\\surd/eg + silent %s/♢/\\diamondsuit/eg + silent %s/♡/\\heartsuit/eg + silent %s/♣/\\clubsuit/eg + silent %s/♠/\\spadesuit/eg + silent %s/¬/\\neg/eg + silent %s/♭/\\flat/eg + silent %s/♮/\\natural/eg + silent %s/♯/\\sharp/eg + silent %s/Ϝ/\\digamma/eg + silent %s/ϰ/\\varkappa/eg + silent %s/ב/\\beth/eg + silent %s/ד/\\daleth/eg + silent %s/ג/\\gimel/eg + silent %s/⋖/\\lessdot/eg + silent %s/≤/\\leqslant/eg + silent %s/≦/\\leqq/eg + silent %s/⋘/\\lll/eg + silent %s/≲/\\lesssim/eg + silent %s/≶/\\lessgtr/eg + silent %s/⋚/\\lesseqgtr/eg + silent %s/≼/\\preccurlyeq/eg + silent %s/⋞/\\curlyeqprec/eg + silent %s/≾/\\precsim/eg + silent %s/⋐/\\Subset/eg + silent %s/⊏/\\sqsubset/eg + silent %s/∴/\\therefore/eg + silent %s/⌣/\\smallsmile/eg + silent %s/⊲/\\vartriangleleft/eg + silent %s/⊴/\\trianglelefteq/eg + silent %s/⋗/\\gtrdot/eg + silent %s/≧/\\geqq/eg + silent %s/⋙/\\ggg/eg + silent %s/≳/\\gtrsim/eg + silent %s/≷/\\gtrless/eg + silent %s/⋛/\\gtreqless/eg + silent %s/≽/\\succcurlyeq/eg + silent %s/⋟/\\curlyeqsucc/eg + silent %s/≿/\\succsim/eg + silent %s/⋑/\\Supset/eg + silent %s/⊐/\\sqsupset/eg + silent %s/∵/\\because/eg + silent %s/∥/\\shortparallel/eg + silent %s/⌢/\\smallfrown/eg + silent %s/⊳/\\vartriangleright/eg + silent %s/⊵/\\trianglerighteq/eg + silent %s/≑/\\doteqdot/eg + silent %s/≓/\\risingdotseq/eg + silent %s/≒/\\fallingdotseq/eg + silent %s/≖/\\eqcirc/eg + silent %s/≗/\\circeq/eg + silent %s/≜/\\triangleq/eg + silent %s/≏/\\bumpeq/eg + silent %s/≎/\\Bumpeq/eg + silent %s/∼/\\thicksim/eg + silent %s/≈/\\thickapprox/eg + silent %s/≊/\\approxeq/eg + silent %s/∽/\\backsim/eg + silent %s/⊨/\\vDash/eg + silent %s/⊩/\\Vdash/eg + silent %s/⊪/\\Vvdash/eg + silent %s/∍/\\backepsilon/eg + silent %s/∝/\\varpropto/eg + silent %s/≬/\\between/eg + silent %s/⋔/\\pitchfork/eg + silent %s/◀/\\blacktriangleleft/eg + silent %s/▷/\\blacktriangleright/eg + silent %s/⇠/\\dashleftarrow/eg + silent %s/⇇/\\leftleftarrows/eg + silent %s/⇆/\\leftrightarrows/eg + silent %s/⇚/\\Lleftarrow/eg + silent %s/↞/\\twoheadleftarrow/eg + silent %s/↢/\\leftarrowtail/eg + silent %s/⇋/\\leftrightharpoons/eg + silent %s/↰/\\Lsh/eg + silent %s/↫/\\looparrowleft/eg + silent %s/↶/\\curvearrowleft/eg + silent %s/↺/\\circlearrowleft/eg + silent %s/⇢/\\dashrightarrow/eg + silent %s/⇉/\\rightrightarrows/eg + silent %s/⇄/\\rightleftarrows/eg + silent %s/⇛/\\Rrightarrow/eg + silent %s/↠/\\twoheadrightarrow/eg + silent %s/↣/\\rightarrowtail/eg + silent %s/⇌/\\rightleftharpoons/eg + silent %s/↱/\\Rsh/eg + silent %s/↬/\\looparrowright/eg + silent %s/↷/\\curvearrowright/eg + silent %s/↻/\\circlearrowright/eg + silent %s/⊸/\\multimap/eg + silent %s/⇈/\\upuparrows/eg + silent %s/⇊/\\downdownarrows/eg + silent %s/↿/\\upharpoonleft/eg + silent %s/↾/\\upharpoonright/eg + silent %s/⇃/\\downharpoonleft/eg + silent %s/⇂/\\downharpoonright/eg + silent %s/⇝/\\rightsquigarrow/eg + silent %s/↭/\\leftrightsquigarrow/eg + silent %s/∔/\\dotplus/eg + silent %s/⋉/\\ltimes/eg + silent %s/⋓/\\Cup/eg + silent %s/⊻/\\veebar/eg + silent %s/⊞/\\boxplus/eg + silent %s/⊠/\\boxtimes/eg + silent %s/⋋/\\leftthreetimes/eg + silent %s/⋎/\\curlyvee/eg + silent %s/⋅/\\centerdot/eg + silent %s/⋈/\\rtimes/eg + silent %s/⋒/\\Cap/eg + silent %s/⊼/\\barwedge/eg + silent %s/⊟/\\boxminus/eg + silent %s/⊡/\\boxdot/eg + silent %s/⋌/\\rightthreetimes/eg + silent %s/⋏/\\curlywedge/eg + silent %s/⊺/\\intercal/eg + silent %s/⋇/\\divideontimes/eg + silent %s/∖/\\smallsetminus/eg + silent %s/⊝/\\circleddash/eg + silent %s/⊚/\\circledcirc/eg + silent %s/⊛/\\circledast/eg + silent %s/ℏ/\\hbar/eg + silent %s/ℏ/\\hslash/eg + silent %s/□/\\square/eg + silent %s/■/\\blacksquare/eg + silent %s/Ⓢ/\\circledS/eg + silent %s/△/\\vartriangle/eg + silent %s/▲/\\blacktriangle/eg + silent %s/∁/\\complement/eg + silent %s/▽/\\triangledown/eg + silent %s/▼/\\blacktriangledown/eg + silent %s/◊/\\lozenge/eg + silent %s/◆/\\blacklozenge/eg + silent %s/★/\\bigstar/eg + silent %s/∠/\\angle/eg + silent %s/∡/\\measuredangle/eg + silent %s/∢/\\sphericalangle/eg + silent %s/‵/\\backprime/eg + silent %s/∄/\\nexists/eg + silent %s/Ⅎ/\\Finv/eg + silent %s/∅/\\varnothing/eg + silent %s/ð/\\eth/eg + silent %s/℧/\\mho/eg + + call cursor(s:line,s:column) +endfunction + +function! LaTeXtoUTF8() + let s:line = line(".") + let s:column = col(".") + + let s:oldencoding = &l:fileencoding + set fileencoding=utf-8 + + " convert latex commands to unicode + silent %s/\\alpha\>/α/eg + silent %s/\\beta\>/β/eg + silent %s/\\gamma\>/γ/eg + silent %s/\\delta\>/δ/eg + silent %s/\\epsilon\>/∊/eg + silent %s/\\varepsilon\>/ε/eg + silent %s/\\zeta\>/ζ/eg + silent %s/\\eta\>/η/eg + silent %s/\\theta\>/θ/eg + silent %s/\\vartheta\>/ϑ/eg + silent %s/\\iota\>/ι/eg + silent %s/\\kappa\>/κ/eg + silent %s/\\lambda\>/λ/eg + silent %s/\\mu\>/μ/eg + silent %s/\\nu\>/ν/eg + silent %s/\\xi\>/ξ/eg + silent %s/\\pi\>/π/eg + silent %s/\\varpi\>/ϖ/eg + silent %s/\\rho\>/ρ/eg + silent %s/\\varrho\>/ϱ/eg + silent %s/\\sigma\>/σ/eg + silent %s/\\varsigma\>/ς/eg + silent %s/\\tau\>/τ/eg + silent %s/\\upsilon\>/υ/eg + silent %s/\\phi\>/φ/eg + silent %s/\\varphi\>/ϕ/eg + silent %s/\\chi\>/χ/eg + silent %s/\\psi\>/ψ/eg + silent %s/\\omega\>/ω/eg + silent %s/\\Gamma\>/Γ/eg + silent %s/\\Delta\>/Δ/eg + silent %s/\\Theta\>/Θ/eg + silent %s/\\Lambda\>/Λ/eg + silent %s/\\Xi\>/Ξ/eg + silent %s/\\Pi\>/Π/eg + silent %s/\\Upsilon\>/Υ/eg + silent %s/\\Phi\>/Φ/eg + silent %s/\\Psi\>/Ψ/eg + silent %s/\\Omega\>/Ω/eg + silent %s/\\leq\>/≤/eg + silent %s/\\ll\>/≪/eg + silent %s/\\prec\>/≺/eg + silent %s/\\preceq\>/≼/eg + silent %s/\\subset\>/⊂/eg + silent %s/\\subseteq\>/⊆/eg + silent %s/\\sqsubset\>/⊏/eg + silent %s/\\sqsubseteq\>/⊑/eg + silent %s/\\in\>/∈/eg + silent %s/\\vdash\>/⊢/eg + silent %s/\\mid\>/∣/eg + silent %s/\\smile\>/⌣/eg + silent %s/\\geq\>/≥/eg + silent %s/\\gg\>/≫/eg + silent %s/\\succ\>/≻/eg + silent %s/\\succeq\>/≽/eg + silent %s/\\supset\>/⊃/eg + silent %s/\\supseteq\>/⊇/eg + silent %s/\\sqsupset\>/⊐/eg + silent %s/\\sqsupseteq\>/⊒/eg + silent %s/\\ni\>/∋/eg + silent %s/\\dashv\>/⊣/eg + silent %s/\\parallel\>/∥/eg + silent %s/\\frown\>/⌢/eg + silent %s/\\notin\>/∉/eg + silent %s/\\equiv\>/≡/eg + silent %s/\\doteq\>/≐/eg + silent %s/\\sim\>/∼/eg + silent %s/\\simeq\>/≃/eg + silent %s/\\approx\>/≈/eg + silent %s/\\cong\>/≅/eg + silent %s/\\Join\>/⋈/eg + silent %s/\\bowtie\>/⋈/eg + silent %s/\\propto\>/∝/eg + silent %s/\\models\>/⊨/eg + silent %s/\\perp\>/⊥/eg + silent %s/\\asymp\>/≍/eg + silent %s/\\neq\>/≠/eg + silent %s/\\pm\>/±/eg + silent %s/\\cdot\>/⋅/eg + silent %s/\\times\>/×/eg + silent %s/\\cup\>/∪/eg + silent %s/\\sqcup\>/⊔/eg + silent %s/\\vee\>/∨/eg + silent %s/\\oplus\>/⊕/eg + silent %s/\\odot\>/⊙/eg + silent %s/\\otimes\>/⊗/eg + silent %s/\\bigtriangleup\>/△/eg + silent %s/\\lhd\>/⊲/eg + silent %s/\\unlhd\>/⊴/eg + silent %s/\\mp\>/∓/eg + silent %s/\\div\>/÷/eg + silent %s/\\setminus\>/∖/eg + silent %s/\\cap\>/∩/eg + silent %s/\\sqcap\>/⊓/eg + silent %s/\\wedge\>/∧/eg + silent %s/\\ominus\>/⊖/eg + silent %s/\\oslash\>/⊘/eg + silent %s/\\bigcirc\>/○/eg + silent %s/\\bigtriangledown\>/▽/eg + silent %s/\\rhd\>/⊳/eg + silent %s/\\unrhd\>/⊵/eg + silent %s/\\triangleleft\>/◁/eg + silent %s/\\triangleright\>/▷/eg + silent %s/\\star\>/⋆/eg + silent %s/\\ast\>/∗/eg + silent %s/\\circ\>/∘/eg + silent %s/\\bullet\>/∙/eg + silent %s/\\diamond\>/⋄/eg + silent %s/\\uplus\>/⊎/eg + silent %s/\\dagger\>/†/eg + silent %s/\\ddagger\>/‡/eg + silent %s/\\wr\>/≀/eg + silent %s/\\sum\>/∑/eg + silent %s/\\prod\>/∏/eg + silent %s/\\coprod\>/∐/eg + silent %s/\\int\>/∫/eg + silent %s/\\bigcup\>/⋃/eg + silent %s/\\bigcap\>/⋂/eg + silent %s/\\bigsqcup\>/⊔/eg + silent %s/\\oint\>/∮/eg + silent %s/\\bigvee\>/⋁/eg + silent %s/\\bigwedge\>/⋀/eg + silent %s/\\bigoplus\>/⊕/eg + silent %s/\\bigotimes\>/⊗/eg + silent %s/\\bigodot\>/⊙/eg + silent %s/\\biguplus\>/⊎/eg + silent %s/\\leftarrow\>/←/eg + silent %s/\\rightarrow\>/→/eg + silent %s/\\leftrightarrow\>/↔/eg + silent %s/\\Leftarrow\>/⇐/eg + silent %s/\\Rightarrow\>/⇒/eg + silent %s/\\Leftrightarrow\>/⇔/eg + silent %s/\\mapsto\>/↦/eg + silent %s/\\hookleftarrow\>/↩/eg + silent %s/\\leftharpoonup\>/↼/eg + silent %s/\\leftharpoondown\>/↽/eg + silent %s/\\hookrightarrow\>/↪/eg + silent %s/\\rightharpoonup\>/⇀/eg + silent %s/\\rightharpoondown\>/⇁/eg + silent %s/\\longleftarrow\>/←/eg + silent %s/\\longrightarrow\>/→/eg + silent %s/\\longleftrightarrow\>/↔/eg + silent %s/\\Longleftarrow\>/⇐/eg + silent %s/\\Longrightarrow\>/⇒/eg + silent %s/\\Longleftrightarrow\>/⇔/eg + silent %s/\\longmapsto\>/⇖/eg + silent %s/\\uparrow\>/↑/eg + silent %s/\\downarrow\>/↓/eg + silent %s/\\updownarrow\>/↕/eg + silent %s/\\Uparrow\>/⇑/eg + silent %s/\\Downarrow\>/⇓/eg + silent %s/\\Updownarrow\>/⇕/eg + silent %s/\\nearrow\>/↗/eg + silent %s/\\searrow\>/↘/eg + silent %s/\\swarrow\>/↙/eg + silent %s/\\nwarrow\>/↖/eg + silent %s/\\leadsto\>/↝/eg + silent %s/\\dots\>/…/eg + silent %s/\\cdots\>/⋯/eg + silent %s/\\vdots\>/⋮/eg + silent %s/\\ddots\>/⋱/eg + silent %s/\\hbar\>/ℏ/eg + silent %s/\\ell\>/ℓ/eg + silent %s/\\Re\>/ℜ/eg + silent %s/\\Im\>/ℑ/eg + silent %s/\\aleph\>/א/eg + silent %s/\\wp\>/℘/eg + silent %s/\\forall\>/∀/eg + silent %s/\\exists\>/∃/eg + silent %s/\\mho\>/℧/eg + silent %s/\\partial\>/∂/eg + silent %s/\\prime\>/′/eg + silent %s/\\emptyset\>/∅/eg + silent %s/\\infty\>/∞/eg + silent %s/\\nabla\>/∇/eg + silent %s/\\triangle\>/△/eg + silent %s/\\Box\>/□/eg + silent %s/\\Diamond\>/◇/eg + silent %s/\\bot\>/⊥/eg + silent %s/\\top\>/⊤/eg + silent %s/\\angle\>/∠/eg + silent %s/\\surd\>/√/eg + silent %s/\\diamondsuit\>/♢/eg + silent %s/\\heartsuit\>/♡/eg + silent %s/\\clubsuit\>/♣/eg + silent %s/\\spadesuit\>/♠/eg + silent %s/\\neg\>/¬/eg + silent %s/\\flat\>/♭/eg + silent %s/\\natural\>/♮/eg + silent %s/\\sharp\>/♯/eg + silent %s/\\digamma\>/Ϝ/eg + silent %s/\\varkappa\>/ϰ/eg + silent %s/\\beth\>/ב/eg + silent %s/\\daleth\>/ד/eg + silent %s/\\gimel\>/ג/eg + silent %s/\\lessdot\>/⋖/eg + silent %s/\\leqslant\>/≤/eg + silent %s/\\leqq\>/≦/eg + silent %s/\\lll\>/⋘/eg + silent %s/\\lesssim\>/≲/eg + silent %s/\\lessgtr\>/≶/eg + silent %s/\\lesseqgtr\>/⋚/eg + silent %s/\\preccurlyeq\>/≼/eg + silent %s/\\curlyeqprec\>/⋞/eg + silent %s/\\precsim\>/≾/eg + silent %s/\\Subset\>/⋐/eg + silent %s/\\sqsubset\>/⊏/eg + silent %s/\\therefore\>/∴/eg + silent %s/\\smallsmile\>/⌣/eg + silent %s/\\vartriangleleft\>/⊲/eg + silent %s/\\trianglelefteq\>/⊴/eg + silent %s/\\gtrdot\>/⋗/eg + silent %s/\\geqq\>/≧/eg + silent %s/\\ggg\>/⋙/eg + silent %s/\\gtrsim\>/≳/eg + silent %s/\\gtrless\>/≷/eg + silent %s/\\gtreqless\>/⋛/eg + silent %s/\\succcurlyeq\>/≽/eg + silent %s/\\curlyeqsucc\>/⋟/eg + silent %s/\\succsim\>/≿/eg + silent %s/\\Supset\>/⋑/eg + silent %s/\\sqsupset\>/⊐/eg + silent %s/\\because\>/∵/eg + silent %s/\\shortparallel\>/∥/eg + silent %s/\\smallfrown\>/⌢/eg + silent %s/\\vartriangleright\>/⊳/eg + silent %s/\\trianglerighteq\>/⊵/eg + silent %s/\\doteqdot\>/≑/eg + silent %s/\\risingdotseq\>/≓/eg + silent %s/\\fallingdotseq\>/≒/eg + silent %s/\\eqcirc\>/≖/eg + silent %s/\\circeq\>/≗/eg + silent %s/\\triangleq\>/≜/eg + silent %s/\\bumpeq\>/≏/eg + silent %s/\\Bumpeq\>/≎/eg + silent %s/\\thicksim\>/∼/eg + silent %s/\\thickapprox\>/≈/eg + silent %s/\\approxeq\>/≊/eg + silent %s/\\backsim\>/∽/eg + silent %s/\\vDash\>/⊨/eg + silent %s/\\Vdash\>/⊩/eg + silent %s/\\Vvdash\>/⊪/eg + silent %s/\\backepsilon\>/∍/eg + silent %s/\\varpropto\>/∝/eg + silent %s/\\between\>/≬/eg + silent %s/\\pitchfork\>/⋔/eg + silent %s/\\blacktriangleleft\>/◀/eg + silent %s/\\blacktriangleright\>/▷/eg + silent %s/\\dashleftarrow\>/⇠/eg + silent %s/\\leftleftarrows\>/⇇/eg + silent %s/\\leftrightarrows\>/⇆/eg + silent %s/\\Lleftarrow\>/⇚/eg + silent %s/\\twoheadleftarrow\>/↞/eg + silent %s/\\leftarrowtail\>/↢/eg + silent %s/\\leftrightharpoons\>/⇋/eg + silent %s/\\Lsh\>/↰/eg + silent %s/\\looparrowleft\>/↫/eg + silent %s/\\curvearrowleft\>/↶/eg + silent %s/\\circlearrowleft\>/↺/eg + silent %s/\\dashrightarrow\>/⇢/eg + silent %s/\\rightrightarrows\>/⇉/eg + silent %s/\\rightleftarrows\>/⇄/eg + silent %s/\\Rrightarrow\>/⇛/eg + silent %s/\\twoheadrightarrow\>/↠/eg + silent %s/\\rightarrowtail\>/↣/eg + silent %s/\\rightleftharpoons\>/⇌/eg + silent %s/\\Rsh\>/↱/eg + silent %s/\\looparrowright\>/↬/eg + silent %s/\\curvearrowright\>/↷/eg + silent %s/\\circlearrowright\>/↻/eg + silent %s/\\multimap\>/⊸/eg + silent %s/\\upuparrows\>/⇈/eg + silent %s/\\downdownarrows\>/⇊/eg + silent %s/\\upharpoonleft\>/↿/eg + silent %s/\\upharpoonright\>/↾/eg + silent %s/\\downharpoonleft\>/⇃/eg + silent %s/\\downharpoonright\>/⇂/eg + silent %s/\\rightsquigarrow\>/⇝/eg + silent %s/\\leftrightsquigarrow\>/↭/eg + silent %s/\\dotplus\>/∔/eg + silent %s/\\ltimes\>/⋉/eg + silent %s/\\Cup\>/⋓/eg + silent %s/\\veebar\>/⊻/eg + silent %s/\\boxplus\>/⊞/eg + silent %s/\\boxtimes\>/⊠/eg + silent %s/\\leftthreetimes\>/⋋/eg + silent %s/\\curlyvee\>/⋎/eg + silent %s/\\centerdot\>/⋅/eg + silent %s/\\rtimes\>/⋈/eg + silent %s/\\Cap\>/⋒/eg + silent %s/\\barwedge\>/⊼/eg + silent %s/\\boxminus\>/⊟/eg + silent %s/\\boxdot\>/⊡/eg + silent %s/\\rightthreetimes\>/⋌/eg + silent %s/\\curlywedge\>/⋏/eg + silent %s/\\intercal\>/⊺/eg + silent %s/\\divideontimes\>/⋇/eg + silent %s/\\smallsetminus\>/∖/eg + silent %s/\\circleddash\>/⊝/eg + silent %s/\\circledcirc\>/⊚/eg + silent %s/\\circledast\>/⊛/eg + silent %s/\\hbar\>/ℏ/eg + silent %s/\\hslash\>/ℏ/eg + silent %s/\\square\>/□/eg + silent %s/\\blacksquare\>/■/eg + silent %s/\\circledS\>/Ⓢ/eg + silent %s/\\vartriangle\>/△/eg + silent %s/\\blacktriangle\>/▲/eg + silent %s/\\complement\>/∁/eg + silent %s/\\triangledown\>/▽/eg + silent %s/\\blacktriangledown\>/▼/eg + silent %s/\\lozenge\>/◊/eg + silent %s/\\blacklozenge\>/◆/eg + silent %s/\\bigstar\>/★/eg + silent %s/\\angle\>/∠/eg + silent %s/\\measuredangle\>/∡/eg + silent %s/\\sphericalangle\>/∢/eg + silent %s/\\backprime\>/‵/eg + silent %s/\\nexists\>/∄/eg + silent %s/\\Finv\>/Ⅎ/eg + silent %s/\\varnothing\>/∅/eg + silent %s/\\eth\>/ð/eg + silent %s/\\mho\>/℧/eg + call cursor(s:line,s:column) +endfunction + +nnoremap cl :call UTF8toLaTeX() +nnoremap cu :call LaTeXtoUTF8() +command! Convert2Latex :call UTF8toLaTeX() +command! Convert2UTF8 :call LaTeXtoUTF8() + +" augroup LaTeX +" au! +" autocmd BufWritePre *.tex :Convert2Latex +" autocmd BufWritePost *.tex :Convert2UTF8 +" augroup END diff --git a/nvim/after/ftplugin/vim/folding.vim b/nvim/after/ftplugin/vim/folding.vim new file mode 100644 index 0000000..1454cbe --- /dev/null +++ b/nvim/after/ftplugin/vim/folding.vim @@ -0,0 +1,25 @@ +function! VimFolds() + let thisline = getline(v:lnum) + if match(thisline,'^"" ') >= 0 + return ">1" + elseif match(thisline,'^" ') >=0 + return ">1" + else + return "=" + endif +endfunction + +function! VimFoldText() + let startline = getline(v:foldstart) + if match(startline,'^"" ') >= 0 + let title = substitute(startline,'^"" \(.*\)$','\1',"") + return '# ' . title + elseif match(startline,'^" ') >=0 + let title = substitute(startline,'^" \(.*\)$','\1',"") + return ' ## ' .title + endif +endfunction + +setlocal foldmethod=expr +setlocal foldexpr=VimFolds() +setlocal foldtext=VimFoldText() diff --git a/nvim/after/syntax/cpp.vim b/nvim/after/syntax/cpp.vim new file mode 100644 index 0000000..4da741d --- /dev/null +++ b/nvim/after/syntax/cpp.vim @@ -0,0 +1,3 @@ +syntax keyword mPigroup pi +hi def link mPigroup Todo + diff --git a/nvim/after/syntax/cpp.vim~ b/nvim/after/syntax/cpp.vim~ new file mode 100644 index 0000000..e69de29 diff --git a/nvim/after/syntax/tex.vim b/nvim/after/syntax/tex.vim new file mode 100644 index 0000000..a40cc30 --- /dev/null +++ b/nvim/after/syntax/tex.vim @@ -0,0 +1,6 @@ +syn match texMathSymbol '\\arr\>' contained conceal cchar=← +syn match texMathSymbol '\\,' contained conceal cchar= +syn match texMathSymbol '\\mathcal' contained conceal cchar= +syn match texMathSymbol '\\text' contained conceal cchar= +syn match texMathSymbol '\\mathbb' contained conceal cchar= +syn match texMathSymbol '\\quad' contained conceal cchar= diff --git a/nvim/after/syntax/tex.vim~ b/nvim/after/syntax/tex.vim~ new file mode 100644 index 0000000..4e1d112 --- /dev/null +++ b/nvim/after/syntax/tex.vim~ @@ -0,0 +1,6 @@ +syn match texMathSymbol '\\arr\>' contained conceal cchar=← +syn match texMathSymbol '\\,' contained conceal cchar= +syn match texMathSymbol '\\mathcal' contained conceal cchar= +syn match texMathSymbol '\\text' contained conceal cchar= +syn match texMathSymbol '\\mathbb' contained conceal cchar= +syn match texMathSymbol '\\quad' contained conceal cchar= diff --git a/nvim/autoload/plug.vim b/nvim/autoload/plug.vim new file mode 120000 index 0000000..75d4078 --- /dev/null +++ b/nvim/autoload/plug.vim @@ -0,0 +1 @@ +/home/urbain/dotfiles/nvim/vim-plug/plug.vim \ No newline at end of file diff --git a/nvim/colors/mine.vim b/nvim/colors/mine.vim new file mode 100644 index 0000000..653682e --- /dev/null +++ b/nvim/colors/mine.vim @@ -0,0 +1,29 @@ +" Vim color file +" Maintainer: Urbain +" Last Change: 2002/10/14 Mon 16:41. +" version: 1.0 +" This color scheme uses a light background. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "mine" + +" Syntax group +hi Comment gui=none guifg=#af5f00 +hi Normal guibg=white guifg=Black +hi Type gui=none guifg=#005f00 +hi Statement gui=none guifg=#5f0000 +hi Special guifg=Black +hi Constant guifg=Gray +hi Error guifg=Red guibg=White +hi Preproc guifg=Blue "\end +hi Constant guifg=Green "\ $$ +hi Identifier guifg=Blue "\begin +hi LineNr gui=none guifg=Gray +hi FoldColumn guibg=#F5F4FD +hi Todo guibg=white gui=underline,italic guifg=Red +hi Conceal guibg=White guifg=DarkGreen diff --git a/nvim/colors/mine.vim~ b/nvim/colors/mine.vim~ new file mode 100644 index 0000000..653682e --- /dev/null +++ b/nvim/colors/mine.vim~ @@ -0,0 +1,29 @@ +" Vim color file +" Maintainer: Urbain +" Last Change: 2002/10/14 Mon 16:41. +" version: 1.0 +" This color scheme uses a light background. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "mine" + +" Syntax group +hi Comment gui=none guifg=#af5f00 +hi Normal guibg=white guifg=Black +hi Type gui=none guifg=#005f00 +hi Statement gui=none guifg=#5f0000 +hi Special guifg=Black +hi Constant guifg=Gray +hi Error guifg=Red guibg=White +hi Preproc guifg=Blue "\end +hi Constant guifg=Green "\ $$ +hi Identifier guifg=Blue "\begin +hi LineNr gui=none guifg=Gray +hi FoldColumn guibg=#F5F4FD +hi Todo guibg=white gui=underline,italic guifg=Red +hi Conceal guibg=White guifg=DarkGreen diff --git a/nvim/mySnippets/all.snippets b/nvim/mySnippets/all.snippets new file mode 100644 index 0000000..8094025 --- /dev/null +++ b/nvim/mySnippets/all.snippets @@ -0,0 +1,25 @@ +global !p +def make_comment(): + b, e = vim.eval("&commentstring").split( '%s' ) + return b, e +endglobal + +snippet todo "A universal TODO reminder" b +`!p +comment = make_comment() +snip.rv = comment[ 0 ] +` TODO: ${1:desc} (`!v $USER`, `!v strftime("%c")`) `!p +comment = make_comment() +snip.rv = comment[ 1 ]` +$0 +endsnippet + +snippet fix "A universal FIXME reminder" b +`!p +comment = make_comment() +snip.rv = comment[ 0 ] +` FIXME: ${1:desc} (`!v $USER`, `!v strftime("%c")`) `!p +comment = make_comment() +snip.rv = comment[ 1 ]` +$0 +endsnippet diff --git a/nvim/mySnippets/cpp.snippets b/nvim/mySnippets/cpp.snippets new file mode 100644 index 0000000..e69de29 diff --git a/nvim/mySnippets/mail.snippets b/nvim/mySnippets/mail.snippets new file mode 100644 index 0000000..c512f9b --- /dev/null +++ b/nvim/mySnippets/mail.snippets @@ -0,0 +1,31 @@ +snippet best "Best wishes" b +Best wishes, + +Urbain +endsnippet + +snippet dear "Email template" b +Dear ${1:Greg}, + +${2:# Body of the message} + +Best wishes, + +${3:Urbain} +endsnippet + +snippet sign "Signature" b +Urbain Vaes, +Department of Mathematics +Office 6M09 +endsnippet + +snippet bisous "Gros bisous" b +Gros bisous, + +Urbain +endsnippet + +snippet look "I'm looking forward to ..." b +I am looking forward to hearing from you, +endsnippet diff --git a/nvim/mySnippets/python.snippets b/nvim/mySnippets/python.snippets new file mode 100644 index 0000000..e69de29 diff --git a/nvim/mySnippets/tex.snippets b/nvim/mySnippets/tex.snippets new file mode 100644 index 0000000..fb061f0 --- /dev/null +++ b/nvim/mySnippets/tex.snippets @@ -0,0 +1,103 @@ +snippet real "Field of real numbers" i +\real +endsnippet + +snippet grad "Gradient" i +\grad +endsnippet + +snippet div "Divergence" i +\dive +endsnippet + +snippet new "New command" b +\newcommand{$1}[$2]{$3}$0 +endsnippet + +snippet op "Operator style" i +\op +endsnippet + +snippet pard "Partial derivative" i +\pardl{$1}{$2}$0 +endsnippet + +snippet pardd "Double partial derivative" i +\parddl{$1}{$2}$0 +endsnippet + +snippet herm "Hermite polynomials" i +\hermite +endsnippet + +snippet red "Red text" i +\red{$1}$0 +endsnippet + +snippet sumi "Sum over index set" i +\sum_{${1:i} \in ${2:I}}$0 +endsnippet + +snippet int "Integral" i +\int_{$1} +endsnippet + +snippet ip "Inner product" i +\ip{$1}{$2}$0 +endsnippet + +snippet norm "Norm" i +\norm{$1}$0 +endsnippet + +snippet test "Test functions" i +\test{${1:\real^n}}$0 +endsnippet + +snippet lp "Flat Lp space" i +\lp{${1:2}}{${2:\real^n}}$0 +endsnippet + +snippet lpw "Weighted Lp space" i +\wlp{${1:2}}{${2:\real^n}}{${3:\rho}}$0 +endsnippet + +snippet sob "Flat Sobolev space" i +\sobolev{${1:s}}{${2:\real^n}}$0 +endsnippet + +snippet sobw "Weighted Sobolev space" i +\wsobolev{${1:s}}{${2:\real^n}}{${3:\rho}}$0 +endsnippet + +snippet cont "Continuous function" i +\cont{$1}{$2}$0 +endsnippet + +snippet mean "Expectation" i +\expect $0 +endsnippet + +snippet dot "Dot product" i +\dotx +endsnippet + +snippet abs "Absolute value" i +\abs{ $1 }$0 +endsnippet + +snippet sum "Sum" i +\sum_{${1:i=1}}^{${2:n}} +endsnippet + +snippet smooth "Smooth function" i +\smooth{${1:\real^n}} $0 +endsnippet + +snippet cont "Continuous function" i +\cont{$1}{$2} $0 +endsnippet + +snippet ref "Clever reference" i +\cref{$1}$0 +endsnippet diff --git a/nvim/mySnippets/vim.snippets b/nvim/mySnippets/vim.snippets new file mode 100644 index 0000000..e69de29 diff --git a/nvim/spell/en.utf-8.add b/nvim/spell/en.utf-8.add new file mode 100644 index 0000000..1d49910 --- /dev/null +++ b/nvim/spell/en.utf-8.add @@ -0,0 +1,3 @@ +Plugin +Colorscheme +vim diff --git a/nvim/spell/en.utf-8.add.spl b/nvim/spell/en.utf-8.add.spl new file mode 100644 index 0000000..d34ca08 Binary files /dev/null and b/nvim/spell/en.utf-8.add.spl differ diff --git a/nvimrc b/nvimrc index 7e98dbf..9320b3e 100644 --- a/nvimrc +++ b/nvimrc @@ -108,7 +108,7 @@ set foldlevel=0 set noswapfile set nowritebackup set undofile -set undodir=/home/urbain/.vim/vimundo/ +set undodir=/home/urbain/.nvim/vimundo/ " Layout window set nonumber -- cgit v1.2.3