diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | latexmkrc | 3 | ||||
-rwxr-xr-x | make | 3 | ||||
-rw-r--r-- | msmtprc | 22 | ||||
-rw-r--r-- | mutt/muttrc | 3 | ||||
-rw-r--r-- | offlineimap.py | 12 | ||||
-rw-r--r-- | passwords/gmail.asc | 18 | ||||
-rw-r--r-- | passwords/hotmail.asc | 18 | ||||
-rw-r--r-- | passwords/imperial.asc | 18 | ||||
-rw-r--r-- | passwords/main.asc | 18 | ||||
-rw-r--r-- | vim/after/ftplugin/tex/unilatex.vim | 675 | ||||
-rw-r--r-- | vim/mySnippets/all.snippets | 26 | ||||
-rw-r--r-- | vim/vimrc | 51 |
13 files changed, 825 insertions, 44 deletions
@@ -2,8 +2,8 @@ mutt/cache/ mutt/mailboxes/ vim/bundle/ vifm/Trash +passwords mutt/mutt-colors-solarized/ mutt/temp/ -passwords mutt/cache/ mutt/cache/headers @@ -1,4 +1,5 @@ -$pdf_mode = 0; +$pdf_mode = 1; $pdf_previewer = 'zathura -s -x "vim --servername SYNC --remote +%{line} %{input}" %O %S'; $clean_ext = "synctex.gz bbl pdf"; +$new_viewer_always [0]; @@ -4,12 +4,13 @@ dir=~/dotfiles olddir=~/dotfiles_old # Files to sync -files="vim mutt vifm bashrc zshrc xmodmap mynotes tmux.conf zathurarc offlineimaprc inputrc latexmkrc crontab gitconfig" +files="vim mutt passwords vifm msmtprc bashrc zshrc xmodmap mynotes tmux.conf zathurarc offlineimaprc offlineimap.py inputrc latexmkrc crontab gitconfig" rm -rf $olddir mkdir -p $olddir cd $dir +chmod 600 msmtprc for file in $files; do echo $file mv ~/.$file $olddir @@ -0,0 +1,22 @@ +defaults +auth on +tls on +tls_trust_file /etc/ssl/certs/ca-certificates.crt +logfile ~/.msmtp.log + +account gmail +host smtp.gmail.com +port 587 +from urbain.p.vaes@gmail.com +user urbain.p.vaes +passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.passwords/main.asc" + +account imperial +host smtp.cc.ic.ac.uk +from u.vaes13@imperial.ac.uk +user uv113 +passwordeval "gpg --use-agent --quiet --for-your-eyes-only --no-tty --decrypt ~/.passwords/imperial.asc" +port 587 + +# Set a default account +account default : imperial diff --git a/mutt/muttrc b/mutt/muttrc index 71d5d84..32f033e 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -5,7 +5,6 @@ set use_from = yes set envelope_from = "yes" # Folders -set folder = "~/.mail" set folder = ~/.mail set alias_file = ~/.mutt/alias set header_cache = ~/.mutt/cache/headers @@ -68,7 +67,7 @@ set edit_headers set include=yes # Mail out -set sendmail="/usr/sbin/ssmtp" +set sendmail="/usr/bin/msmtp" set beep_new diff --git a/offlineimap.py b/offlineimap.py new file mode 100644 index 0000000..c63b82d --- /dev/null +++ b/offlineimap.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +import os +import subprocess +def mailpasswd(acct): + acct = os.path.basename(acct) + path = "/home/urbain/.passwords/%s.asc" % acct + args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path] + try: + return subprocess.check_output(args).strip() + except subprocess.CalledProcessError: + return "" diff --git a/passwords/gmail.asc b/passwords/gmail.asc new file mode 100644 index 0000000..08de50b --- /dev/null +++ b/passwords/gmail.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +hQIMA2AwAsuYqCfXARAAyjVQBvW4y+mrxVRSUFmbRNoKhxaheAiqcFmOxOA41I0o +yXQ2798T46KMeg2hQlq0JgdSKzIx9glZ5vuSYZ2IO7KFqZ+otW3XMh6xqZ/TF68g +kc93FF8bTXHl/oThBJhgkrn1eGu2qwJFeAXWgBE79VBLrJ7dMhyJHpsJzVwW09AP +O5BP89noyqa6qP1seep+/d7AuOoHYmFRF647L1a//mphfit3Z+ckGRaDi3mBEJbm +YRsnJkLGO7Vc22JcgrDu1lsWa4ChXbOg9E1x2+75tIkaUVSq4dH1HII8zhb1pmdL +C1VPS0ndADE9WHAcjvuCVNHlsgRxm0dgnIL06kY5U2LhQ21AARMYNepkl5aHaXZg +mjIOu4qll31RKQtntZ1cc8vVXV+1FLjpYz7GapbqQ+ylVQf4lecSrPioCCtD7TzF +GqHNfS4X1Va3/qMG98cTI3P0RjK1YMvOoqxSrWbQcJTKU8fiq+COQungipq10lpi +/bHbQHVqrbFMI3vzAh6BHdSaIYkuz1fzNNTYbDUyHBV5KDbme8qIQZsIjpJ/yX1H +O2dw6lF3dNo+huf157KfL3pTwD8InyB4Hm6Aa1SQPBCrO495BpyKrZTWTlSO08+4 +ycFX+Xx8F/GN9i0G2IJUCyU/2AV6fLZAStuQIw3AMzwkb1NJ9bMAdSeU9MZR+qjS +TwHNHEP2LonaHTsbogdURSLeK7jtdKiPZYC0bKwQZJxEIwmDZZedweeufs5WLKjf +1Sh3VvJXlruAZJcJw6kGdyv0jddzHT0qu6qQ3V6x0KQ= +=Mfz/ +-----END PGP MESSAGE----- diff --git a/passwords/hotmail.asc b/passwords/hotmail.asc new file mode 100644 index 0000000..dd7f078 --- /dev/null +++ b/passwords/hotmail.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +hQIMA2AwAsuYqCfXARAAzPBo5qPX17TyoiGz6kls7JMP+7BSbpx5DhKGp6WHinrg +VdR9VmMKN9KpoJvUD7JQpHua1FTBd2m++8npIThxKD7MaJgph+15oqTOuvf6rdrD +3+51UR5bwbknt7BDrvtX0ueMR05TcgCfoC3R6orbesTkbwaiy3uzatpMRlMBf/1c +ntb18Bluqg0KUie73Lpsmc52aRhAJF8dJgEk8qfbhd/sop3wuSbJgBWXxAcukgR6 +dKM7LI9lGu9z39VubRetE+G8fOb/oWGdqfUjHoWM1huMKztnJFS/ftd6zCh8wwDk +NrK+46pOLhi8ARPBEaCg01BK8JT42s+NE7mFneqlnK0g4rAWGDN3GUEGZMxOtUKb +gJlLuaQINKLTwy0Y2W5YUk4vbnRj4J0cs9tW/RyUB0t/o0bwKqB7k8hhmq4MJ5IM +2OzaAapw5ogZtf/+eww8L2UMgS/ESmJaQHl6kTzdsPI/WXpMATNf0qqFZ1FjRC/U +xEudfo60QumvH6JxO9rUR0a+dookI99emaFLyfNH7hIqGP8X6C5vRaruUCZtYufC +o2W3v1rLPAnKvVGli9ZxyetfXeolUwpKxHBwAAv3QNRONrzEfHOifvnCLlR8+n6K +FZvgIxengHKRnTwduJQE4td1LcjgWHhlpmPAcB6y0tddBLFwwUdNtPUSRsNQ/4nS +SQG/+mPrLscTKjxIIzaNUlXWKrrdBTism+ITSq96BKbNILR6M5Am9b5BZPLEY16e +izq7zYPh5PntZIm71rOMHb2GBiKcuH0UjXc= +=QzUQ +-----END PGP MESSAGE----- diff --git a/passwords/imperial.asc b/passwords/imperial.asc new file mode 100644 index 0000000..69c898a --- /dev/null +++ b/passwords/imperial.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +hQIMA2AwAsuYqCfXAQ/9EvZHVmMGZPRW+046vwxMV8QisZXGfA9BKcR4qAKGaylA +Eb/eJ+XnrVBoqnXdZdNMMeIXPkWGvPI7CEW++h7YOGm3/wgk3hUUIVAK36UwtCtl +DojOHDL4/HUnxFQaDkSuZUjnay9yPWROmUQYSK0O5EcvtuLEwPU6n3wECVb90FLe +GEBsRJJQaJ7dhdBC6/rcVUnaYH2ruzd/skDZRsIrCDyn+Nva5WPhpre3nJeYFfb2 +wwz9nv/2YDvlKahWXrzX8lQlwjBltrHteER/QQxHES6xOgkv0I8frYT+MXlLAVj1 +o6gHGOJiiNugFWr1XO+xrmbUirjxiBh6urIYdey/fJBqc77g8DPpTDD4WuZJoRG6 +5iVqxzoEOwqmtBUoaFuG6Ide5aTUL7SYPZ2nfdqrNYzNCAeLKgKJbbpAWXbzaLOn +04j1S1zPO9hzDPNP9HDu7ZGoHStMaJF2ydA15kK9L7F4oUGb9y2lonGP2N5WNLjy +AY4jlWenXGib+gMNoLQLUarZDcZV1bwTZvTX5fu7XB7634/aC7WOetnCU23VAkvw +DkUHmoMCoH/meTRqNENttRNgQtXd/h5lJotvNINid2PBM2TDGCzzSPluHNPWYdHh +2QjiWU0wZaY3GyNWEE9GDejusw05R+QUkoM+dy6hojHwf/1WkfhZBdH/ivRooavS +TgGPT2dqxi/Ac9mKCbyxA1EdrZ1h/ou3N4UyCTim14wbdjpkg7+CNjGv1CjesdBZ +WqjgZeSeTe9n8qSKlSodhYmSdz/1OlZiBONx58PKwQ== +=Lbhd +-----END PGP MESSAGE----- diff --git a/passwords/main.asc b/passwords/main.asc new file mode 100644 index 0000000..a31d6c3 --- /dev/null +++ b/passwords/main.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +hQIMA2AwAsuYqCfXAQ/+OoXBGvfhxrv1n/kR2h8Q4/jwhjQ+UlrL/F7bk3BR/ggy +dHhH230/Bcet4DzjBSqvC4UrxtWDLu2+Q+C1WaiIRgQ6Dor/aTx4ouJbJfMQhIH2 +zayNTWRoqsJ08NwTd0q4kVXkYF0R/rHdgMX6ornaW2sN3wAxd/3wMBNYbDlMr7Es +ga9tCKHggMrOS/D1+JnxqK8akrNO3AmJoAjMUDxu59+DPGirVrq92GuTH6du/Gb2 +diCaE9ruVHpPZh2UOIU/4EWbiqP5Pr2U7PnUmW6E7Dm7yu/488op4XA0Uda4hUEB +BoNTBcYt7An/+ZP5ve4EHOLGB/VALjqYhVbwLDQATfAg8gtkEmCohTy9EAFUKOZY +3xIi/+7OElZBikBMkKhieccG99QvNLwRbzVie1IkhefFuRipytidZ28WgoFFGf/R +izP+UjwmHRqYyNWrobBszmCogE3cpU5urk4iZCBMlwpqkeUFi01aPzRgaDBbCn2j +9MML2xJZvz2/itHCjGsb5u0tlp1ItIk/Lg3Uh1UFyyxxZuIPbCWeCZ+sK0Kq8wPC +E34Sri3Pa60dOWIkf7zPVpR8oE6CCq8X8/taDLAdCzvadG7qt4YALlGn2W8sgN7G +y0aAKafA6IvLgXx5jQZ45jBEYbvAQ39bSjpXY1AS6TlU2aqTh3VgBHvHzjube/nS +TQFRL4q9jgt2jhpPKYD8RLGhtHAUtKaEINpSAfzdbqVaQDAMX+a9vCTRvLcmhaOj +Nk2LrgAT2RGc3q04Nfo3pZ7qE0j6hRy2xrMoQggc +=2CB6 +-----END PGP MESSAGE----- diff --git a/vim/after/ftplugin/tex/unilatex.vim b/vim/after/ftplugin/tex/unilatex.vim new file mode 100644 index 0000000..69358fc --- /dev/null +++ b/vim/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 <buffer> <LocalLeader>cl :call UTF8toLaTeX()<CR> +nnoremap <buffer> <LocalLeader>cu :call LaTeXtoUTF8()<CR> +command! Convert2Latex :call UTF8toLaTeX() +command! Convert2UTF8 :call LaTeXtoUTF8() + +" augroup LaTeX +" au! +" autocmd BufWritePre *.tex :Convert2Latex +" autocmd BufWritePost *.tex :Convert2UTF8 +" augroup END diff --git a/vim/mySnippets/all.snippets b/vim/mySnippets/all.snippets index 9328a1e..8094025 100644 --- a/vim/mySnippets/all.snippets +++ b/vim/mySnippets/all.snippets @@ -1,3 +1,25 @@ -snippet jul "Jul the boss" -Jul is the boss of ${0:dance} +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 @@ -6,11 +6,11 @@ set rtp+=~/.vim/bundle/vundle/ call vundle#rc() "" Plugins +Plugin 'gmarik/vundle' Plugin 'LaTeX-Box-Team/latex-box' Plugin 'SirVer/ultisnips' Plugin 'altercation/vim-colors-solarized' Plugin 'christoomey/vim-tmux-navigator' -Plugin 'gmarik/vundle' Plugin 'godlygeek/tabular' Plugin 'gregsexton/gitv' Plugin 'honza/vim-snippets' @@ -30,14 +30,19 @@ Plugin 'tpope/vim-unimpaired' filetype plugin indent on syntax on -"" Configuration - " Leader maps let mapleader = "\\" let maplocalleader = "-" nmap <Space> <Leader> -" UltiSnips +" Plugins options +let g:ctrlp_map = '<c-p>' +let g:ctrlp_by_filename = 1 +let g:ctrlp_working_path_mode = 'r' +let g:ctrlp_show_hidden = 1 +let g:ctrlp_open_new_file = 't' +let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] + let g:UltiSnipsExpandTrigger="<tab>" let g:UltiSnipsJumpForwardTrigger="<tab>" let g:UltiSnipsJumpBackwardTrigger="<s-tab>" @@ -45,10 +50,7 @@ let g:UltiSnipsListSnippets="<c-l>" let g:UltiSnipsEditSplit="horizontal" let g:UltiSnipsSnippetsDir="~/.vim/mySnippets" let g:UltiSnipsSnippetDirectories=['UltiSnips', 'mySnippets'] -let g:ctrlp_open_new_file = 't' -noremap <c-h> :UltiSnipsEdit<Return> -" Latex-Box let g:tex_flavor='latex' let g:tex_conceal= 'adgm' let g:LatexBox_Folding=0 @@ -76,13 +78,6 @@ let NERDTreeIgnore=['\.pdf$', '\~$','\.toc$', \ '\.out$', '\.log$','\.aux$','\.sty$', \ '\.fdb_latexmk$', '\.synctex.gz$','\.latexmain$'] -" CTRL-P - -let g:ctrlp_map = '<c-p>' -let g:ctrlp_by_filename = 1 -let g:ctrlp_working_path_mode = '' -let g:ctrlp_show_hidden = 1 - "" Options " Tabs and indent @@ -114,11 +109,7 @@ set fillchars=fold:\ ,vert:\ , set showbreak=... set colorcolumn=0 set scrolloff=0 -if has('gui_running') - set t_Co=256 -else - set t_Co=256 -endif +set t_Co=256 set guitablabel=%N\ %t\ %M set showcmd @@ -172,6 +163,7 @@ nnoremap <Leader>n :set relativenumber!<cr> nnoremap <Leader>sp :set paste! nnoremap <Leader>sv :source ~/.vim/vimrc<cr> nnoremap <Leader>sc :source %<cr> +nnoremap <Leader>es :UltiSnipsEdit<Return> " Other maps nnoremap <Return> o<Esc> @@ -179,27 +171,12 @@ nnoremap <s-Return> O<Esc> nnoremap J mzJ`z nnoremap Y y$ -" nnoremap - za nnoremap <c-y> 3<c-y> nnoremap <c-e> 3<c-e> -nnoremap j gj -nnoremap k gk -nnoremap $ g$ -nnoremap ^ g^ -nnoremap gj j -nnoremap gk k -nnoremap g$ $ -nnoremap g^ ^ - -vnoremap j gj -vnoremap k gk -vnoremap $ g$ -vnoremap ^ g^ -vnoremap gj j -vnoremap gk k -vnoremap g$ $ -vnoremap g^ ^ +" Dvorak specific +nnoremap : , +nnoremap , : "" Latex let g:tex_fast="" |