├── snippets ├── js2-mode │ ├── .yas-parents │ ├── al │ ├── el │ ├── log │ ├── ev.fire │ ├── if │ ├── com │ ├── each │ ├── init │ ├── debugger │ ├── ev.add │ ├── multiline-comment │ ├── for │ ├── class │ ├── function │ ├── return-comment │ ├── req.json │ ├── param-comment │ ├── type-multiline-comment │ ├── type-inline-comment │ └── req.html ├── org-mode │ ├── .yas-parents │ ├── heading1 │ ├── heading2 │ ├── heading3 │ ├── srcfile │ ├── heading4 │ ├── heading5 │ ├── revealsplit │ ├── variable │ ├── orglink │ ├── session │ ├── revealmargin │ ├── var │ ├── revealfooter │ ├── revealheader │ ├── revealmaxscale │ ├── revealminimumscale │ ├── revealslidenum │ ├── srcexport │ ├── bibliography │ ├── exports │ ├── revealroot │ ├── revealpropertybg │ ├── revealpropertybgsize │ ├── tagstat │ ├── revealpropertybgrepeat │ ├── todostat │ ├── revealpropertydatastate │ ├── revealtitlebackground │ ├── todokey │ ├── dir │ ├── revealtitlebg-size │ ├── revealtransition │ ├── tagkeys │ ├── revealtitlebg-repeat │ ├── tangle │ ├── revealtheme │ ├── srcresults │ ├── revealhlevel │ ├── revealpropertybgtransition │ └── revealfragmentstyle ├── js3-mode │ ├── .yas-parents │ ├── case │ ├── elif │ └── switch ├── markdown-mode │ ├── .yas-parents │ ├── bullets │ ├── codeinline │ ├── emphasis │ ├── boldface │ ├── indentbullets │ ├── image │ ├── link │ ├── unorderedlist │ ├── codeblock │ ├── horizontalrule │ ├── referenceimage │ ├── markdownmath │ ├── rcodeblock │ ├── referencelink │ ├── githubcodeblock │ ├── referencelabel │ ├── hexocodeblock │ ├── highlight │ ├── headerequal │ ├── headerminus │ └── orderedlist ├── web-mode │ ├── .yas-parents │ ├── doctype.html5 │ ├── dd │ ├── dt │ ├── th │ ├── html │ ├── dl │ ├── mailto │ ├── link.import │ ├── doctype │ ├── doctype.xhtml1_1 │ ├── meta │ ├── textarea │ ├── doctype.xhtml1 │ ├── doctype.xhtml1_strict │ ├── form │ ├── script.javascript │ ├── script.javascript-src │ ├── link.stylesheet │ ├── div │ ├── doctype.xhtml1_transitional │ ├── html.xmlns │ ├── meta.http-equiv │ └── link.stylesheet-ie ├── latex-mode │ ├── mu │ ├── nu │ ├── pi │ ├── xi │ ├── beta │ ├── bm │ ├── chi │ ├── circ │ ├── dash │ ├── eta │ ├── iota │ ├── phi │ ├── psi │ ├── rho │ ├── tau │ ├── alpha │ ├── delta │ ├── gamma │ ├── hat │ ├── kappa │ ├── maximum │ ├── minimum │ ├── nabla │ ├── omega │ ├── phiupper │ ├── piupper │ ├── psiupper │ ├── sigma │ ├── sine │ ├── tauupper │ ├── text │ ├── theta │ ├── times │ ├── union │ ├── ampersand │ ├── cosine │ ├── deltaupper │ ├── epsilon │ ├── forall │ ├── gammaupper │ ├── infinity │ ├── lambda │ ├── notin │ ├── odot │ ├── omegaupper │ ├── pause │ ├── sigmaupper │ ├── tangent │ ├── thetaupper │ ├── tilde │ ├── vector │ ├── belongsto │ ├── curl │ ├── epsilonupper │ ├── implies │ ├── inlinemath │ ├── interspacing │ ├── laplacian │ ├── midrule │ ├── notequal │ ├── partial │ ├── similar │ ├── starpower │ ├── subscript │ ├── toprule │ ├── circlecross │ ├── cite │ ├── definedas │ ├── emphasize │ ├── exponential │ ├── gradient │ ├── intersection │ ├── leftarrow │ ├── linebreak │ ├── naturallog │ ├── newitem │ ├── newlinbreak │ ├── newline │ ├── noindent │ ├── plusorminus │ ├── primepower │ ├── squareroot │ ├── superscript │ ├── therefore │ ├── underline │ ├── vspace │ ├── baroraverage │ ├── bluecolor │ ├── bottomrule │ ├── fraction │ ├── hline │ ├── hyperlink │ ├── inputfile │ ├── limit │ ├── newpage │ ├── only │ ├── redcolor │ ├── rightarrow │ ├── sinepower │ ├── andforcolumns │ ├── approximate │ ├── boldsymbol │ ├── choosefrom │ ├── cosinepower │ ├── differential │ ├── divergence │ ├── hspace │ ├── hyperboliccosine │ ├── hyperbolicsine │ ├── ifandonlyif │ ├── newtablecolumn │ ├── proportional │ ├── scaledbars │ ├── sineinverse │ ├── tangentpower │ ├── uncover │ ├── addcolumn │ ├── cosineinverse │ ├── differentialupper │ ├── hyperbolictangent │ ├── infinitysubscript │ ├── iterunion │ ├── lessthanorequalto │ ├── mathcaligraphic │ ├── newdescription │ ├── newlinemath │ ├── product │ ├── reference │ ├── summation │ ├── tangentinverse │ ├── tensor │ ├── usepackage │ ├── absolute │ ├── equivalentorsameas │ ├── evaluatedat │ ├── graphicspath │ ├── greaterthanequalto │ ├── kroeneckerdelta │ ├── leftopeninterval │ ├── listinputlisting │ ├── listoftables │ ├── matheulerscript │ ├── mychapter │ ├── partialpower │ ├── subandsuperscript │ ├── superandsubscript │ ├── listoffigures │ ├── rightopeninterval │ ├── scaledangles │ ├── scaledparenthesis │ ├── sec │ ├── chapter │ ├── differentialpower │ ├── environment │ ├── hyperbolicsinepower │ ├── norm │ ├── probability │ ├── scaledcurlybraces │ ├── scaledsquarebrackets │ ├── section │ ├── tableofcontents │ ├── tensorproduct │ ├── alternatingunittensor │ ├── differentialupperpower │ ├── hyperboliccosinepower │ ├── hyperbolicsineinverse │ ├── hyperbolictangentpower │ ├── includegraphics │ ├── iterintersection │ ├── partialfraction │ ├── renewcommand │ ├── scaledparenup │ ├── vspacenoindent │ ├── cyclicintegral │ ├── hyperboliccosineinverse │ ├── hyperbolictangentinverse │ ├── singleintegral │ ├── subsection │ ├── doubleintegral │ ├── framebox │ ├── tripleintegral │ ├── authorresponse │ ├── description │ ├── differentialfraction │ ├── exampleblock │ ├── subsubsection │ ├── differentialupperfraction │ ├── equation │ ├── manuscriptchanges │ ├── matrix │ ├── texttype │ ├── tikzpicture │ ├── differentialdot │ ├── partialpowerfraction │ ├── alignedequation │ ├── emphasisbox │ ├── title │ ├── listofalgorithms │ ├── differentialpowerfraction │ ├── block │ ├── differentialupperpowerfraction │ ├── figure │ ├── transferfuncmatrix │ ├── mathfonts │ ├── prime │ ├── selectsize │ ├── subfigure │ ├── piecewisefunction │ ├── bibliography │ ├── costfunction │ ├── dots │ ├── label │ ├── algorithm │ ├── booktabs │ ├── multipartfunction │ ├── table │ ├── mathbotsyms │ ├── sets │ ├── mathtopsyms │ ├── siunits │ ├── lstlanguage │ └── preamble ├── rst-mode │ ├── bold │ ├── bullets │ ├── italics │ ├── codeinline │ ├── numberedlist │ ├── link │ ├── section │ ├── subsection │ ├── subsubsection │ ├── part │ └── title ├── matlab-mode │ ├── case │ ├── if │ ├── trycatch │ ├── classdef │ ├── for │ ├── methods │ ├── properties │ ├── switch │ └── function ├── python-mode │ ├── pandas │ ├── seaborn │ └── def ├── poly-head-tail-mode │ └── figuredetails ├── c++-mode │ ├── param │ └── pragma ├── html-mode │ └── div └── c-mode │ └── pragma ├── .Rprofile ├── .pylintrc ├── .gitignore_global ├── .latexmkrc ├── .sshconfig ├── .lldbinit ├── .gitconfig ├── README.org ├── lang ├── sk-golang.el ├── matlab-mode │ ├── toolbox │ │ ├── dbhotlink.m │ │ ├── opentoline.m │ │ ├── emacsinit.m │ │ └── emacsdocomplete.m │ ├── matlab-mode-pkg.el │ ├── cedet-matlab.el │ ├── templates │ │ └── srecode-matlab.srt │ ├── srecode-matlab.el │ ├── company-matlab-shell.el │ └── dl_emacs_support.m ├── sk-web.el ├── sk-linter.el ├── sk-config.el ├── sk-poly.el ├── flycheck-matlab.el ├── sk-debug.el ├── sk-sql.el ├── sk-text.el ├── sk-elisp.el └── sk-latex.el ├── .gitignore ├── .gitmodules ├── requirements-global.txt ├── defuns ├── sk-search-defuns.el ├── sk-expand-defuns.el ├── sk-debug-defuns.el ├── sk-display-defuns.el ├── sk-misc-defuns.el ├── sk-dired-defuns.el └── sk-doc-defuns.el ├── .editorconfig ├── modes └── sk-dubcaps-mode.el ├── .zshrc ├── .ctags ├── config ├── sk-versions.el ├── sk-ryo-modal.el ├── sk-hydra.el ├── sk-nav.el └── sk-ryo-which-key.el ├── .tmux.conf ├── .bash_aliases ├── .mc-lists.el ├── .bashrc └── .functions /snippets/js2-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | js-mode 2 | -------------------------------------------------------------------------------- /snippets/org-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | latex-mode 2 | -------------------------------------------------------------------------------- /snippets/js3-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | js2-mode js-mode 2 | -------------------------------------------------------------------------------- /snippets/markdown-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | latex-mode 2 | -------------------------------------------------------------------------------- /.Rprofile: -------------------------------------------------------------------------------- 1 | .libPaths( c( "~/R/packages", .libPaths() )) 2 | -------------------------------------------------------------------------------- /.pylintrc: -------------------------------------------------------------------------------- 1 | [MASTER] 2 | extension-pkg-whitelist=numpy 3 | -------------------------------------------------------------------------------- /snippets/web-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | nxml-mode html-mode js-mode css-mode 2 | -------------------------------------------------------------------------------- /.gitignore_global: -------------------------------------------------------------------------------- 1 | *~ 2 | .DS_Store 3 | tags 4 | *.mat 5 | *.eps 6 | *.fig 7 | *.sql 8 | -------------------------------------------------------------------------------- /.latexmkrc: -------------------------------------------------------------------------------- 1 | $pdf_previewer = "open -a /Applications/Skim.app"; 2 | $out_dir = "build" 3 | -------------------------------------------------------------------------------- /snippets/js2-mode/al: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : alert 3 | # -- 4 | alert($0); -------------------------------------------------------------------------------- /snippets/latex-mode/mu: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: mu 3 | # key: muu 4 | # -- 5 | \mu -------------------------------------------------------------------------------- /snippets/latex-mode/nu: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: nu 3 | # key: nuu 4 | # -- 5 | \nu -------------------------------------------------------------------------------- /snippets/latex-mode/pi: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: pi 3 | # key: pii 4 | # -- 5 | \pi -------------------------------------------------------------------------------- /snippets/latex-mode/xi: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: xi 3 | # key: xii 4 | # -- 5 | \xi -------------------------------------------------------------------------------- /.sshconfig: -------------------------------------------------------------------------------- 1 | Host * 2 | AddKeysToAgent yes 3 | UseKeychain yes 4 | IdentityFile ~/.ssh/id_rsa 5 | -------------------------------------------------------------------------------- /snippets/js2-mode/el: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : else 3 | # -- 4 | else { 5 | $0 6 | } -------------------------------------------------------------------------------- /snippets/js2-mode/log: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : console.log 3 | # -- 4 | console.log($0); -------------------------------------------------------------------------------- /snippets/latex-mode/beta: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: beta 3 | # key: bet 4 | # -- 5 | \beta -------------------------------------------------------------------------------- /snippets/latex-mode/bm: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bm 3 | # key: bm 4 | # -- 5 | \bm{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/chi: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: chi 3 | # key: ch 4 | # -- 5 | \chi -------------------------------------------------------------------------------- /snippets/latex-mode/circ: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: circ 3 | # key: cir 4 | # -- 5 | \circ -------------------------------------------------------------------------------- /snippets/latex-mode/dash: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: dash 3 | # key: -- 4 | # -- 5 | --- $0 -------------------------------------------------------------------------------- /snippets/latex-mode/eta: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: eta 3 | # key: et 4 | # -- 5 | \eta -------------------------------------------------------------------------------- /snippets/latex-mode/iota: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: iota 3 | # key: io 4 | # -- 5 | \iota -------------------------------------------------------------------------------- /snippets/latex-mode/phi: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: phi 3 | # key: ph 4 | # -- 5 | \phi -------------------------------------------------------------------------------- /snippets/latex-mode/psi: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: psi 3 | # key: ps 4 | # -- 5 | \psi -------------------------------------------------------------------------------- /snippets/latex-mode/rho: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: rho 3 | # key: ro 4 | # -- 5 | \rho -------------------------------------------------------------------------------- /snippets/latex-mode/tau: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tau 3 | # key: ta 4 | # -- 5 | \tau -------------------------------------------------------------------------------- /snippets/rst-mode/bold: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bold 3 | # key: bo 4 | # -- 5 | **$0** -------------------------------------------------------------------------------- /snippets/js2-mode/ev.fire: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : fireEvent 3 | # -- 4 | fireEvent('$0') -------------------------------------------------------------------------------- /snippets/latex-mode/alpha: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: alpha 3 | # key: alp 4 | # -- 5 | \alpha -------------------------------------------------------------------------------- /snippets/latex-mode/delta: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: delta 3 | # key: de 4 | # -- 5 | \delta -------------------------------------------------------------------------------- /snippets/latex-mode/gamma: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: gamma 3 | # key: gam 4 | # -- 5 | \gamma -------------------------------------------------------------------------------- /snippets/latex-mode/hat: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hat 3 | # key: hat 4 | # -- 5 | \hat{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/kappa: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: kappa 3 | # key: ka 4 | # -- 5 | \kappa -------------------------------------------------------------------------------- /snippets/latex-mode/maximum: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: maximum 3 | # key: mx 4 | # -- 5 | \max -------------------------------------------------------------------------------- /snippets/latex-mode/minimum: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: minimum 3 | # key: mn 4 | # -- 5 | \min -------------------------------------------------------------------------------- /snippets/latex-mode/nabla: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: nabla 3 | # key: nab 4 | # -- 5 | \nabla -------------------------------------------------------------------------------- /snippets/latex-mode/omega: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: omega 3 | # key: om 4 | # -- 5 | \omega -------------------------------------------------------------------------------- /snippets/latex-mode/phiupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Phi 3 | # key: Ph 4 | # -- 5 | \Phi -------------------------------------------------------------------------------- /snippets/latex-mode/piupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: pi upper 3 | # key: Pii 4 | # -- 5 | \Pi -------------------------------------------------------------------------------- /snippets/latex-mode/psiupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Psi 3 | # key: Ps 4 | # -- 5 | \Psi -------------------------------------------------------------------------------- /snippets/latex-mode/sigma: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sigma 3 | # key: sig 4 | # -- 5 | \sigma -------------------------------------------------------------------------------- /snippets/latex-mode/sine: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sine 3 | # key: sin 4 | # -- 5 | \sin{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/tauupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Tau 3 | # key: Ta 4 | # -- 5 | \Tau -------------------------------------------------------------------------------- /snippets/latex-mode/text: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: text 3 | # key: tx 4 | # -- 5 | \text{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/theta: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: theta 3 | # key: tha 4 | # -- 5 | \theta -------------------------------------------------------------------------------- /snippets/latex-mode/times: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: times 3 | # key: xs 4 | # -- 5 | \times $0 -------------------------------------------------------------------------------- /snippets/latex-mode/union: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: union 3 | # key: cup 4 | # -- 5 | \cup $0 -------------------------------------------------------------------------------- /snippets/org-mode/heading1: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: heading 3 | # key: h1 4 | # -- 5 | * $0 -------------------------------------------------------------------------------- /snippets/org-mode/heading2: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: heading2 3 | # key: h2 4 | # -- 5 | ** $0 -------------------------------------------------------------------------------- /snippets/rst-mode/bullets: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bullets 3 | # key: li 4 | # -- 5 | * $0 -------------------------------------------------------------------------------- /snippets/rst-mode/italics: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: italics 3 | # key: it 4 | # -- 5 | *$0* -------------------------------------------------------------------------------- /.lldbinit: -------------------------------------------------------------------------------- 1 | command alias bfl breakpoint set -f %1 -l %2 2 | command alias pra process attach -name %1 3 | -------------------------------------------------------------------------------- /snippets/js2-mode/if: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : if 3 | # -- 4 | if (${1:condition}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /snippets/latex-mode/ampersand: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: ampersand 3 | # key: amp 4 | # -- 5 | & $0 -------------------------------------------------------------------------------- /snippets/latex-mode/cosine: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cosine 3 | # key: cos 4 | # -- 5 | \cos{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/deltaupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Delta 3 | # key: De 4 | # -- 5 | \Delta -------------------------------------------------------------------------------- /snippets/latex-mode/epsilon: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: epsilon 3 | # key: ep 4 | # -- 5 | \epsilon -------------------------------------------------------------------------------- /snippets/latex-mode/forall: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: for all 3 | # key: fora 4 | # -- 5 | \forall -------------------------------------------------------------------------------- /snippets/latex-mode/gammaupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Gamma 3 | # key: Gam 4 | # -- 5 | \Gamma -------------------------------------------------------------------------------- /snippets/latex-mode/infinity: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: infinity 3 | # key: infy 4 | # -- 5 | \infty -------------------------------------------------------------------------------- /snippets/latex-mode/lambda: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: lambda 3 | # key: lam 4 | # -- 5 | \lambda -------------------------------------------------------------------------------- /snippets/latex-mode/notin: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: not in 3 | # key: nin 4 | # -- 5 | \not\in $0 -------------------------------------------------------------------------------- /snippets/latex-mode/odot: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: circle dot 3 | # key: odot 4 | # -- 5 | \odot $0 -------------------------------------------------------------------------------- /snippets/latex-mode/omegaupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Omega 3 | # key: Om 4 | # -- 5 | \Omega -------------------------------------------------------------------------------- /snippets/latex-mode/pause: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: pause 3 | # key: pau 4 | # -- 5 | \pause 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/sigmaupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Sigma 3 | # key: Sig 4 | # -- 5 | \Sigma -------------------------------------------------------------------------------- /snippets/latex-mode/tangent: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tangent 3 | # key: tan 4 | # -- 5 | \tan{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/thetaupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Theta 3 | # key: Tha 4 | # -- 5 | \Theta -------------------------------------------------------------------------------- /snippets/latex-mode/tilde: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tilde 3 | # key: til 4 | # -- 5 | \tilde{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/vector: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: vector 3 | # key: vec 4 | # -- 5 | \vec{$1}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/bullets: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bullets 3 | # key: bu 4 | # -- 5 | * $0 -------------------------------------------------------------------------------- /snippets/org-mode/heading3: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: heading3 3 | # key: h3 4 | # -- 5 | *** $0 -------------------------------------------------------------------------------- /snippets/org-mode/srcfile: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: file 3 | # key: :f 4 | # -- 5 | :file ${1}$0 -------------------------------------------------------------------------------- /snippets/web-mode/doctype.html5: -------------------------------------------------------------------------------- 1 | #name : Doctype HTML 5 2 | #group : meta 3 | # -- 4 | 5 | -------------------------------------------------------------------------------- /snippets/js2-mode/com: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : comment (/* ... */) 3 | # -- 4 | /* 5 | * $0 6 | */ -------------------------------------------------------------------------------- /snippets/latex-mode/belongsto: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: belongs to 3 | # key: in 4 | # -- 5 | \in $0 -------------------------------------------------------------------------------- /snippets/latex-mode/curl: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: curl 3 | # key: cu 4 | # -- 5 | \nabla \times {$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/epsilonupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Epsilon 3 | # key: Ep 4 | # -- 5 | \Epsilon -------------------------------------------------------------------------------- /snippets/latex-mode/implies: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: implies 3 | # key: imp 4 | # -- 5 | \implies $0 -------------------------------------------------------------------------------- /snippets/latex-mode/inlinemath: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: inline math 3 | # key: mi 4 | # -- 5 | $$1$ $0 -------------------------------------------------------------------------------- /snippets/latex-mode/interspacing: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: spacing 3 | # key: sp 4 | # -- 5 | \\${1:@}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/laplacian: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: laplacian 3 | # key: lap 4 | # -- 5 | \nabla^{2} -------------------------------------------------------------------------------- /snippets/latex-mode/midrule: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: midrule 3 | # key: mr 4 | # -- 5 | \midrule 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/notequal: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: not equal to 3 | # key: neq 4 | # -- 5 | \neq $0 -------------------------------------------------------------------------------- /snippets/latex-mode/partial: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: partial 3 | # key: par 4 | # -- 5 | \partial{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/similar: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: similar symbol 3 | # key: sim 4 | # -- 5 | \sim $0 -------------------------------------------------------------------------------- /snippets/latex-mode/starpower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: star power 3 | # key: st 4 | # -- 5 | ^{*}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/subscript: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: subscript 3 | # key: dd 4 | # -- 5 | {$1}_{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/toprule: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: toprule 3 | # key: tr 4 | # -- 5 | \toprule 6 | $0 -------------------------------------------------------------------------------- /snippets/matlab-mode/case: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: case 3 | # key: ca 4 | # -- 5 | case $1 6 | $0 -------------------------------------------------------------------------------- /snippets/rst-mode/codeinline: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: code inline 3 | # key: ci 4 | # -- 5 | \`\`$0\`\` -------------------------------------------------------------------------------- /snippets/rst-mode/numberedlist: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: numbered list 3 | # key: ni 4 | # -- 5 | #. $0 -------------------------------------------------------------------------------- /snippets/latex-mode/circlecross: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: circle cross 3 | # key: oti 4 | # -- 5 | \otimes $0 -------------------------------------------------------------------------------- /snippets/latex-mode/cite: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cite 3 | # key: ci 4 | # -- 5 | ${0:$$(reftex-citation)} -------------------------------------------------------------------------------- /snippets/latex-mode/definedas: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: defined as 3 | # key: def 4 | # -- 5 | \triangleq $0 -------------------------------------------------------------------------------- /snippets/latex-mode/emphasize: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: emphasize 3 | # key: emp 4 | # -- 5 | \emph{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/exponential: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: expoenential 3 | # key: exp 4 | # -- 5 | {e}^{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/gradient: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: gradient 3 | # key: grad 4 | # -- 5 | \nabla {$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/intersection: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: intersection 3 | # key: cap 4 | # -- 5 | \cap $0 -------------------------------------------------------------------------------- /snippets/latex-mode/leftarrow: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: left arrow 3 | # key: larr 4 | # -- 5 | \leftarrow $0 -------------------------------------------------------------------------------- /snippets/latex-mode/linebreak: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: linebreak 3 | # key: lb 4 | # -- 5 | \\\\ 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/naturallog: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: natural log 3 | # key: ln 4 | # -- 5 | \ln{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/newitem: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: new item 3 | # key: nt 4 | # -- 5 | \item${1:<$2>} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/newlinbreak: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: new line break 3 | # key: nl 4 | # -- 5 | \\\\$0 -------------------------------------------------------------------------------- /snippets/latex-mode/newline: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: newline 3 | # key: newl 4 | # -- 5 | \newline 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/noindent: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: noindent 3 | # key: noi 4 | # -- 5 | \noindent 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/plusorminus: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: plus or minus 3 | # key: pm 4 | # -- 5 | \pm $0 -------------------------------------------------------------------------------- /snippets/latex-mode/primepower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: prime power 3 | # key: pr 4 | # -- 5 | ^{\prime} -------------------------------------------------------------------------------- /snippets/latex-mode/squareroot: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: square root 3 | # key: rt 4 | # -- 5 | \sqrt{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/superscript: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: superscript 3 | # key: up 4 | # -- 5 | {$1}^{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/therefore: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: therefore 3 | # key: t4 4 | # -- 5 | \therefore $0 -------------------------------------------------------------------------------- /snippets/latex-mode/underline: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: underline 3 | # key: un 4 | # -- 5 | \underline{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/vspace: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: vspace 3 | # key: vs 4 | # -- 5 | \vspace{0.25cm} 6 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/codeinline: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: code inline 3 | # key: co 4 | # -- 5 | \`$1\`$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/emphasis: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: emphasis 3 | # key: em 4 | # -- 5 | _${1:Text}_ $0 -------------------------------------------------------------------------------- /snippets/org-mode/heading4: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: heading 4 3 | # key: h4 4 | # -- 5 | **** $1 6 | 7 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/baroraverage: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bar or average 3 | # key: bar 4 | # -- 5 | \bar{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/bluecolor: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: blue color 3 | # key: clb 4 | # -- 5 | {\color{blue} $1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/bottomrule: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bottomrule 3 | # key: br 4 | # -- 5 | \bottomrule 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/fraction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: latex fraction 3 | # key: fr 4 | # -- 5 | \frac{$1}{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/hline: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: horizontal line 3 | # key: hline 4 | # -- 5 | \hline 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/hyperlink: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperlink 3 | # key: link 4 | # -- 5 | \href{$2}{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/inputfile: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: input file 3 | # key: inp 4 | # -- 5 | \input{$1} 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/limit: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: limit 3 | # key: lim 4 | # -- 5 | \lim_{{$1} \to {$2}} {$3} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/newpage: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: new page 3 | # key: np 4 | # -- 5 | \newpage 6 | 7 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/only: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: only 3 | # key: only 4 | # -- 5 | \only<$1> { 6 | $0 7 | } -------------------------------------------------------------------------------- /snippets/latex-mode/redcolor: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: color red 3 | # key: clr 4 | # -- 5 | {\color{red} $1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/rightarrow: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: right arrow 3 | # key: rarr 4 | # -- 5 | \rightarrow $0 -------------------------------------------------------------------------------- /snippets/latex-mode/sinepower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sine power 3 | # key: sinp 4 | # -- 5 | \sin^{${1:2}}{$2} -------------------------------------------------------------------------------- /snippets/markdown-mode/boldface: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bold face 3 | # key: bf 4 | # -- 5 | **${1:Text}** $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/indentbullets: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: indented bullets 3 | # key: iu 4 | # -- 5 | - $0 -------------------------------------------------------------------------------- /snippets/org-mode/heading5: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: heading 5 3 | # key: h5 4 | # -- 5 | ***** $1 6 | 7 | $0 -------------------------------------------------------------------------------- /snippets/org-mode/revealsplit: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal split 3 | # key: rsp 4 | # -- 5 | #+REVEAL: split -------------------------------------------------------------------------------- /snippets/org-mode/variable: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: new variable 3 | # key: var 4 | # -- 5 | ${1:name}=${2:value} -------------------------------------------------------------------------------- /snippets/python-mode/pandas: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: pandas 3 | # key: pd 4 | # -- 5 | import pandas as pd 6 | -------------------------------------------------------------------------------- /snippets/js2-mode/each: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : each 3 | # -- 4 | ${1:collection}.each(function($2) { 5 | $0 6 | }); -------------------------------------------------------------------------------- /snippets/js2-mode/init: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : Constructor 3 | # -- 4 | initialize: function($1) { 5 | $0 6 | } -------------------------------------------------------------------------------- /snippets/js3-mode/case: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: case 3 | # key: case 4 | # -- 5 | case ${1:value}: 6 | $0 7 | break; -------------------------------------------------------------------------------- /snippets/latex-mode/andforcolumns: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: and when writing columns 3 | # key: and 4 | # -- 5 | & $0 -------------------------------------------------------------------------------- /snippets/latex-mode/approximate: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: approximate symbol 3 | # key: app 4 | # -- 5 | \approx $0 -------------------------------------------------------------------------------- /snippets/latex-mode/boldsymbol: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: math boldsymbol 3 | # key: bo 4 | # -- 5 | \boldsymbol{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/choosefrom: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: choose from 3 | # key: choo 4 | # -- 5 | {{$1} \choose {$2}}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/cosinepower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cosine power 3 | # key: cosp 4 | # -- 5 | \cos^{${1:2}}{$2} -------------------------------------------------------------------------------- /snippets/latex-mode/differential: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: differential 3 | # key: dif 4 | # -- 5 | \mathrm{d}{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/divergence: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: divergence 3 | # key: div 4 | # -- 5 | \nabla \cdot {$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/hspace: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: horizontal space 3 | # key: hs 4 | # -- 5 | \hspace{0.25cm} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/hyperboliccosine: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic cosine 3 | # key: cosh 4 | # -- 5 | \cosh{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/hyperbolicsine: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic sine 3 | # key: sinh 4 | # -- 5 | \sinh{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/ifandonlyif: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: if and only if 3 | # key: iff 4 | # -- 5 | \Leftrightarrow $0 -------------------------------------------------------------------------------- /snippets/latex-mode/newtablecolumn: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: new column 3 | # key: nc 4 | # -- 5 | ${1:L}{${2:4}cm}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/proportional: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: proportional symbol 3 | # key: prop 4 | # -- 5 | \propto $0 -------------------------------------------------------------------------------- /snippets/latex-mode/scaledbars: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: scaled bars 3 | # key: ssd 4 | # -- 5 | \left| $1 \right|$0 -------------------------------------------------------------------------------- /snippets/latex-mode/sineinverse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sine inverse 3 | # key: sini 4 | # -- 5 | \sin^{-${2:1}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/tangentpower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tangent power 3 | # key: tanp 4 | # -- 5 | \tan^{${1:2}}{$2} -------------------------------------------------------------------------------- /snippets/latex-mode/uncover: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: uncover 3 | # key: unc 4 | # -- 5 | \uncover<$1> { 6 | $0 7 | } -------------------------------------------------------------------------------- /snippets/matlab-mode/if: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: if 3 | # key: if 4 | # -- 5 | if (${1:condition}) 6 | $0 7 | end -------------------------------------------------------------------------------- /snippets/python-mode/seaborn: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: seaborn 3 | # key: sns 4 | # -- 5 | import seaborn as sns 6 | -------------------------------------------------------------------------------- /snippets/rst-mode/link: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: link 3 | # key: link 4 | # -- 5 | \`${1:description} ${2:}\`_ -------------------------------------------------------------------------------- /snippets/latex-mode/addcolumn: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: add column 3 | # key: acol 4 | # -- 5 | ${1:L}{${2:4}cm}${3:|}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/cosineinverse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cosine inverse 3 | # key: cosi 4 | # -- 5 | \cos^{-${2:1}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/differentialupper: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Differential 3 | # key: Dif 4 | # -- 5 | \mathrm{D}{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/hyperbolictangent: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic tangent 3 | # key: tanh 4 | # -- 5 | \tanh{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/infinitysubscript: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: infinity subscript 3 | # key: inf 4 | # -- 5 | _{\infty} -------------------------------------------------------------------------------- /snippets/latex-mode/iterunion: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: iterative union 3 | # key: uni 4 | # -- 5 | \bigcup_{$1}^{$2} {$3}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/lessthanorequalto: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: less than or equal to 3 | # key: leq 4 | # -- 5 | \leq $0 -------------------------------------------------------------------------------- /snippets/latex-mode/mathcaligraphic: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: math caligraphic 3 | # key: cal 4 | # -- 5 | \mathcal{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/newdescription: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: new description 3 | # key: nd 4 | # -- 5 | \item[$1] $2 6 | $3 -------------------------------------------------------------------------------- /snippets/latex-mode/newlinemath: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: math newline 3 | # key: ma 4 | # -- 5 | \[ 6 | $1 7 | \] 8 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/product: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: product 3 | # key: prod 4 | # -- 5 | \prod\limits_{$1}^{$2} {$3} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/reference: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reference 3 | # key: ref 4 | # -- 5 | ${0:$$(sk/reftex-reference)} -------------------------------------------------------------------------------- /snippets/latex-mode/summation: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: summation 3 | # key: sum 4 | # -- 5 | \sum\limits_{$1}^{$2} {$3} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/tangentinverse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tangent inverse 3 | # key: tani 4 | # -- 5 | \tan^{-${2:1}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/tensor: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tensor 3 | # key: tens 4 | # -- 5 | \stackrel{\leftrightarrow}{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/usepackage: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: usepackage 3 | # key: use 4 | # -- 5 | \usepackage${2:[$0]}{$1} -------------------------------------------------------------------------------- /snippets/markdown-mode/image: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: image 3 | # key: img 4 | # -- 5 | ![${1:Alt Text}](${2:URL} $3) $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/link: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: link 3 | # key: link 4 | # -- 5 | [${1:Link Text}](${2:URL} $3) $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/unorderedlist: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: unordered list 3 | # key: ul 4 | # -- 5 | + ${1:Text} 6 | +$0 -------------------------------------------------------------------------------- /snippets/org-mode/orglink: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: org link 3 | # key: ol 4 | # -- 5 | [[${2:link}][${1:description}]]$0 -------------------------------------------------------------------------------- /snippets/org-mode/session: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: session 3 | # key: :s 4 | # -- 5 | :session *${1:$$(upcase yas-text)}* -------------------------------------------------------------------------------- /snippets/js2-mode/debugger: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: debugger 3 | # key: dbg 4 | # -- 5 | debugger; -------------------------------------------------------------------------------- /snippets/js2-mode/ev.add: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : addEvent 3 | # -- 4 | addEvent('${1:event}', function($2) { 5 | $0 6 | }); -------------------------------------------------------------------------------- /snippets/js2-mode/multiline-comment: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : multiline-comment 3 | #key: /** 4 | # -- 5 | /** 6 | * $0 7 | */ -------------------------------------------------------------------------------- /snippets/js3-mode/elif: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: else if 3 | # key: elif 4 | # -- 5 | else if (${1:condition}) { 6 | $0 7 | } -------------------------------------------------------------------------------- /snippets/latex-mode/absolute: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: absolute value 3 | # key: abs 4 | # -- 5 | \left\vert $1 \right\vert $0 -------------------------------------------------------------------------------- /snippets/latex-mode/equivalentorsameas: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: equivalent or same as 3 | # key: same 4 | # -- 5 | \equiv $0 -------------------------------------------------------------------------------- /snippets/latex-mode/evaluatedat: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: evaluated at 3 | # key: eval 4 | # -- 5 | {\biggr \rvert}_{$1}^{$2} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/graphicspath: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: graphicspath 3 | # key: grapp 4 | # -- 5 | \graphicspath{$1} 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/greaterthanequalto: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: greater than or equal to 3 | # key: geq 4 | # -- 5 | \geq $0 -------------------------------------------------------------------------------- /snippets/latex-mode/kroeneckerdelta: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: kroenecker delta 3 | # key: kron 4 | # -- 5 | \delta_{${1:ij}} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/leftopeninterval: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: left open interval 3 | # key: lop 4 | # -- 5 | \left( $1 \right]$0 -------------------------------------------------------------------------------- /snippets/latex-mode/listinputlisting: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: lstinputlisting 3 | # key: lsi 4 | # -- 5 | \lstinputlisting{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/listoftables: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: list of tables 3 | # key: lot 4 | # -- 5 | \listoftables 6 | 7 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/matheulerscript: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: math eulerian script 3 | # key: eul 4 | # -- 5 | \mathscr{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/mychapter: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: my chapter 3 | # key: myc 4 | # -- 5 | \mychapter{${1:number}}{${2:name}} -------------------------------------------------------------------------------- /snippets/latex-mode/partialpower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: partial power 3 | # key: parp 4 | # -- 5 | \partial^{${1:2}}{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/subandsuperscript: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sub and superscript 3 | # key: du 4 | # -- 5 | {$1}_{$2}^{$3}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/superandsubscript: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: super and subscript 3 | # key: ud 4 | # -- 5 | {$1}^{$2}_{$3}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/codeblock: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: code block 3 | # key: cb 4 | # -- 5 | \`\`\` 6 | $1 7 | \`\`\` 8 | -------------------------------------------------------------------------------- /snippets/org-mode/revealmargin: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal margin 3 | # key: rmar 4 | # -- 5 | #+REVEAL_MARGIN: ${1:number} -------------------------------------------------------------------------------- /snippets/org-mode/var: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: variable 3 | # key: :v 4 | # -- 5 | :var ${1:variable name}=${2:variable value} -------------------------------------------------------------------------------- /snippets/latex-mode/listoffigures: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: list of figures 3 | # key: lof 4 | # -- 5 | \listoffigures 6 | 7 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/rightopeninterval: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: right open interval 3 | # key: rop 4 | # -- 5 | \left[ $1 \right)$0 -------------------------------------------------------------------------------- /snippets/latex-mode/scaledangles: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: scaled angular brackets 3 | # key: ssa 4 | # -- 5 | \langle $1 \rangle$0 -------------------------------------------------------------------------------- /snippets/latex-mode/scaledparenthesis: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: scaled paranthesis 3 | # key: ssp 4 | # -- 5 | \left( $1 \right)$0 -------------------------------------------------------------------------------- /snippets/latex-mode/sec: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: section 3 | # key: se 4 | # -- 5 | \section${1:*}{$2} 6 | ${0:$$(reftex-label)} 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/horizontalrule: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: horizontal rule 3 | # key: hr 4 | # -- 5 | 6 | ---------- 7 | 8 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/referenceimage: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reference image 3 | # key: rimg 4 | # -- 5 | ![${1:Alt Text}][$2] $0 -------------------------------------------------------------------------------- /snippets/web-mode/dd: -------------------------------------------------------------------------------- 1 | #contributor : Rodrigo Setti 2 | #name :
...
3 | #group : list 4 | # -- 5 |
$1
-------------------------------------------------------------------------------- /snippets/web-mode/dt: -------------------------------------------------------------------------------- 1 | #contributor : Rodrigo Setti 2 | #name :
...
3 | #group : list 4 | # -- 5 |
$1
-------------------------------------------------------------------------------- /snippets/latex-mode/chapter: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: chapter 3 | # key: cha 4 | # -- 5 | \chapter${1:*}{$2} 6 | ${0:$$(reftex-label)} 7 | -------------------------------------------------------------------------------- /snippets/latex-mode/differentialpower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: differential power 3 | # key: difp 4 | # -- 5 | \mathrm{d}^{${1:2}}{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/environment: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: environment 3 | # key: beg 4 | # -- 5 | \begin{$1} 6 | $2 7 | \end{$1} 8 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/hyperbolicsinepower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic sine power 3 | # key: sinhp 4 | # -- 5 | \sinh^{${2:2}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/norm: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: norm of an object 3 | # key: norm 4 | # -- 5 | \left\Vert $1 \right\Vert_{$2}^{$3} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/probability: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: probability 3 | # key: prob 4 | # -- 5 | Prob{\left[ $1 \right]} ${2:\leq} $3 -------------------------------------------------------------------------------- /snippets/latex-mode/scaledcurlybraces: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: scaled curly braces 3 | # key: ssb 4 | # -- 5 | \left\\{ $1 \right\\}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/scaledsquarebrackets: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: scaled square brackets 3 | # key: ssq 4 | # -- 5 | \left[ $1 \right]$0 -------------------------------------------------------------------------------- /snippets/latex-mode/section: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: section 3 | # key: se 4 | # -- 5 | \section${1:*}{$2} 6 | ${0:$$(reftex-label)} 7 | -------------------------------------------------------------------------------- /snippets/latex-mode/tableofcontents: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: table of contents 3 | # key: toc 4 | # -- 5 | \tableofcontents 6 | 7 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/tensorproduct: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tensor product 3 | # key: tenp 4 | # -- 5 | \bigotimes\limits_{$1}^{$2} {$3} $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/markdownmath: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: markdown math newline 3 | # key: mm 4 | # -- 5 | $$ 6 | $1 7 | $$ 8 | $0 9 | -------------------------------------------------------------------------------- /snippets/markdown-mode/rcodeblock: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: r code block 3 | # key: rb 4 | # -- 5 | \`\`\`{r ${0:name}} 6 | $1 7 | \`\`\` -------------------------------------------------------------------------------- /snippets/markdown-mode/referencelink: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reference link 3 | # key: rlink 4 | # -- 5 | [${1:Link Text}][$2] $0 6 | -------------------------------------------------------------------------------- /snippets/matlab-mode/trycatch: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: try catch 3 | # key: try 4 | # -- 5 | try 6 | $1 7 | catch 8 | $0 9 | end -------------------------------------------------------------------------------- /snippets/web-mode/th: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | #group : table 4 | # -- 5 | $2 -------------------------------------------------------------------------------- /snippets/js2-mode/for: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : for 3 | # -- 4 | for(var ${1:i} = ${2:0}; $1 < ${3:collection}.length; $1++) { 5 | $0 6 | } -------------------------------------------------------------------------------- /snippets/latex-mode/alternatingunittensor: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: alternating unit tensor 3 | # key: alt 4 | # -- 5 | \epsilon_{${1:ijk}} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/differentialupperpower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Differential power 3 | # key: Difp 4 | # -- 5 | \mathrm{D}^{${1:2}}{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/hyperboliccosinepower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic cosine power 3 | # key: coshp 4 | # -- 5 | \cosh^{${2:2}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/hyperbolicsineinverse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic sine inverse 3 | # key: sinhi 4 | # -- 5 | \sinh^{-${2:1}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/hyperbolictangentpower: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic tangent power 3 | # key: tanhp 4 | # -- 5 | \tanh^{${2:2}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/includegraphics: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: include graphics 3 | # key: incl 4 | # -- 5 | \includegraphics[scale=${1:1}]{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/iterintersection: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: iterative intersection 3 | # key: inter 4 | # -- 5 | \bigcap_{$1}^{$2} {$3}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/partialfraction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: partial fraction 3 | # key: pf 4 | # -- 5 | \frac{\partial{$1}}{\partial{$2}}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/renewcommand: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: renewcommand 3 | # key: rnc 4 | # -- 5 | \renewcommand{{${2:\arraystretch}}{$1}}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/scaledparenup: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: scaled parenthesis exponent 3 | # key: sspu 4 | # -- 5 | \left( $1 \right)^{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/vspacenoindent: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: vspacenoindent 3 | # key: voi 4 | # -- 5 | \vspace{0.25cm} 6 | \noindent 7 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/githubcodeblock: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: github code block 3 | # key: gb 4 | # -- 5 | \`\`\` ${1:lang} 6 | $0 7 | \`\`\` -------------------------------------------------------------------------------- /snippets/matlab-mode/classdef: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: classdef 3 | # key: cl 4 | # -- 5 | classdef ${1:ClassName} 6 | 7 | $0 8 | 9 | end -------------------------------------------------------------------------------- /snippets/matlab-mode/for: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: for 3 | # key: for 4 | # -- 5 | for ${1:i} = ${2:1}:${3:n}${4::${5:k}} 6 | $0 7 | end -------------------------------------------------------------------------------- /snippets/org-mode/revealfooter: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal slide footer 3 | # key: rfoot 4 | # -- 5 | #+REVEAL_SLIDE_FOOTER: ${1:footer} -------------------------------------------------------------------------------- /snippets/org-mode/revealheader: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal slide header 3 | # key: rhead 4 | # -- 5 | #+REVEAL_SLIDE_HEADER: ${1:header} -------------------------------------------------------------------------------- /snippets/org-mode/revealmaxscale: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal maximum scale 3 | # key: rmax 4 | # -- 5 | #+REVEAL_MAX_SCALE: ${1:number} -------------------------------------------------------------------------------- /snippets/org-mode/revealminimumscale: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal minimum scale 3 | # key: rmin 4 | # -- 5 | #+REVEAL_MIN_SCALE: ${1:number} -------------------------------------------------------------------------------- /snippets/web-mode/html: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | 7 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Sriram Krishnaswamy 3 | email = sriram.krish.92@gmail.com 4 | [core] 5 | editor = nvim 6 | [push] 7 | default = upstream 8 | -------------------------------------------------------------------------------- /snippets/latex-mode/cyclicintegral: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cyclic integral 3 | # key: cin 4 | # -- 5 | \oint_{$1} \! {$2} \, \mathrm{d} {$3} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/hyperboliccosineinverse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic cosine inverse 3 | # key: coshi 4 | # -- 5 | \cosh^{-${2:1}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/hyperbolictangentinverse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hyperbolic tangent inverse 3 | # key: tanhi 4 | # -- 5 | \tanh^{-${2:1}}{$1} -------------------------------------------------------------------------------- /snippets/latex-mode/singleintegral: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: single integral 3 | # key: int 4 | # -- 5 | \int_{$1}^{$2} \! {$3} \, \mathrm{d}{$4} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/subsection: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: subsection 3 | # key: su 4 | # -- 5 | \subsection${1:*}{$2} 6 | ${0:$$(reftex-label)} 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/referencelabel: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reference label 3 | # key: rlab 4 | # -- 5 | [${1:Reference}]: ${2:URL} $3 6 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/doubleintegral: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: double integral 3 | # key: intd 4 | # -- 5 | \iint\limits_{$1} \! {$2} \, \mathrm{d}{$3} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/framebox: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: framebox 3 | # key: frabox 4 | # -- 5 | \begin{center} 6 | \framebox{$1} 7 | \end{center} 8 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/tripleintegral: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: triple integral 3 | # key: intt 4 | # -- 5 | \iiint\limits_{$1} \! {$2} \, \mathrm{d}{$3} $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/hexocodeblock: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: hexo block code 3 | # key: hb 4 | # -- 5 | \`\`\` [${1:lang}] [${2:name}] 6 | $0 7 | \`\`\` -------------------------------------------------------------------------------- /snippets/matlab-mode/methods: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: methods 3 | # key: meth 4 | # -- 5 | methods (Access = ${1:public}) 6 | 7 | $0 8 | 9 | end -------------------------------------------------------------------------------- /snippets/org-mode/revealslidenum: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal slide numbering 3 | # key: rnum 4 | # -- 5 | #+OPTIONS: reveal_slide_number:${1:nil/h/v} -------------------------------------------------------------------------------- /snippets/org-mode/srcexport: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: exports 3 | # key: :ex 4 | # -- 5 | :exports ${1:$$(yas-choose-value '("code" "results" "both"))}$0 -------------------------------------------------------------------------------- /snippets/web-mode/dl: -------------------------------------------------------------------------------- 1 | #contributor : Rodrigo Setti 2 | #name :
...
3 | #group : list 4 | # -- 5 |
6 | $0 7 |
8 | -------------------------------------------------------------------------------- /snippets/js2-mode/class: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : Class 3 | # -- 4 | var ${1:name} = new Class({ 5 | initialize: function($2) { 6 | $0 7 | } 8 | }); -------------------------------------------------------------------------------- /snippets/latex-mode/authorresponse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: author's response 3 | # key: resp 4 | # -- 5 | {\color{blue} \textbf{Author's Response:} $1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/description: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: description 3 | # key: desc 4 | # -- 5 | \begin{description} 6 | \item[$1] $0 7 | \end{description} -------------------------------------------------------------------------------- /snippets/latex-mode/differentialfraction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: differential fraction 3 | # key: df 4 | # -- 5 | \frac{\mathrm{d}{$1}}{\mathrm{d}{$2}}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/exampleblock: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: example 3 | # key: eg 4 | # -- 5 | \begin{exampleblock} {$1} 6 | $2 7 | \end{exampleblock} 8 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/subsubsection: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: subsubsection 3 | # key: ssu 4 | # -- 5 | \subsubsection${1:*}{$2} 6 | ${0:$$(reftex-label)} 7 | -------------------------------------------------------------------------------- /snippets/org-mode/bibliography: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: org mode bibliography 3 | # key: ob 4 | # -- 5 | bibliography:$1 6 | bibliographystyle:${2:unsrt} 7 | -------------------------------------------------------------------------------- /snippets/org-mode/exports: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: exports 3 | # key: :x 4 | # -- 5 | :exports ${1:$$(yas-choose-value '("both" "source" "results" "none"))}$0 -------------------------------------------------------------------------------- /snippets/org-mode/revealroot: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal root 3 | # key: rro 4 | # -- 5 | #+REVEAL_ROOT: ${1:http://cdn.jsdelivr.net/reveal.js/3.0.0/} -------------------------------------------------------------------------------- /snippets/web-mode/mailto: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | $0 -------------------------------------------------------------------------------- /snippets/matlab-mode/properties: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: properties 3 | # key: prop 4 | # -- 5 | properties (Access = ${1:public}) 6 | 7 | $0 8 | 9 | end -------------------------------------------------------------------------------- /snippets/org-mode/revealpropertybg: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal background property 3 | # key: rbp 4 | # -- 5 | :reveal_background: ${1:image/hexcode/color} -------------------------------------------------------------------------------- /snippets/org-mode/revealpropertybgsize: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal background size property 3 | # key: rbps 4 | # -- 5 | :reveal_background_size: ${1:200}px -------------------------------------------------------------------------------- /snippets/org-mode/tagstat: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: Tags status 3 | # key: otas 4 | # binding: direct-keybinding 5 | # -- 6 | #+TAGS: $1 -------------------------------------------------------------------------------- /snippets/web-mode/link.import: -------------------------------------------------------------------------------- 1 | #contributor : Vikrant Rathore 2 | #name : 3 | # -- 4 | 5 | -------------------------------------------------------------------------------- /snippets/latex-mode/differentialupperfraction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: upper differential fraction 3 | # key: DF 4 | # -- 5 | \frac{\mathrm{D}{$1}}{\mathrm{D}{$2}}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/equation: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: equation 3 | # key: eq 4 | # -- 5 | \begin{equation${1:*}} 6 | $2 7 | ${0:$$(reftex-label)} 8 | \end{equation$1} -------------------------------------------------------------------------------- /snippets/latex-mode/manuscriptchanges: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: manuscript changes 3 | # key: chan 4 | # -- 5 | {\color{red} \textbf{Changes to the manuscript:} $1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/matrix: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: matrix 3 | # key: mat 4 | # -- 5 | \begin{${1:$$(yas-choose-value '("bmatrix" "pmatrix"))}} 6 | $2 7 | \end{$1}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/texttype: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: text fonts 3 | # key: tf 4 | # -- 5 | ${1:$$(yas-choose-value '("\\\\textit" "\\\\texttt" "\\\\textbf"))}{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/tikzpicture: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tikz picture 3 | # key: tikz 4 | # -- 5 | \begin{tikzpicture}[scale=${1:1}] 6 | $2 7 | \end{tikzpicture} 8 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/highlight: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: highlight 3 | # key: hi 4 | # -- 5 | {% highlight ${1:language} %} 6 | ${0:content} 7 | {% endhighlight %} -------------------------------------------------------------------------------- /snippets/org-mode/revealpropertybgrepeat: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal background repeat property 3 | # key: rbpr 4 | # -- 5 | :reveal_background_repeat: ${1:repeat} -------------------------------------------------------------------------------- /snippets/org-mode/todostat: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: TODO Status 3 | # key: otos 4 | # binding: direct-keybinding 5 | # -- 6 | #+SEQ_TODO: $1 -------------------------------------------------------------------------------- /snippets/python-mode/def: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: function 3 | # key: def 4 | # -- 5 | def ${1:funcname}(${2:arguments}): 6 | """${3:docstring}""" 7 | ${0:pass} -------------------------------------------------------------------------------- /snippets/rst-mode/section: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: section 3 | # key: se 4 | # -- 5 | ${1:Section} 6 | ${1:$(make-string (string-width yas-text) ?\=)} 7 | 8 | $0 9 | -------------------------------------------------------------------------------- /snippets/js2-mode/function: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: function 3 | # key: f 4 | # -- 5 | function${1: ${2:name}}(${3:arg}) { 6 | $0 7 | } -------------------------------------------------------------------------------- /snippets/latex-mode/differentialdot: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: differential dot 3 | # key: ddo 4 | # -- 5 | ${1:$$(yas-choose-value '("\\\\dot" 6 | "\\\\ddot"))} {$0} -------------------------------------------------------------------------------- /snippets/latex-mode/partialpowerfraction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: partial power fraction 3 | # key: pff 4 | # -- 5 | \frac{\partial^{${1:2}} {$2}}{\partial {$3}^{${4:2}}}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/headerequal: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Header = 3 | # key: h= 4 | # -- 5 | ${1:Header 1} 6 | ${1:$(make-string (string-width yas-text) ?\=)} 7 | 8 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/headerminus: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Header - 3 | # key: h- 4 | # -- 5 | ${1:Header 2} 6 | ${1:$(make-string (string-width yas-text) ?\-)} 7 | 8 | $0 -------------------------------------------------------------------------------- /snippets/org-mode/revealpropertydatastate: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal data state property 3 | # key: rdsp 4 | # -- 5 | :reveal_data_state: ${1:alert/blackout/soothe} -------------------------------------------------------------------------------- /snippets/org-mode/revealtitlebackground: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal title slide background 3 | # key: rtb 4 | # -- 5 | #+REVEAL_TITLE_SLIDE_BACKGROUND: ${1:image/url} -------------------------------------------------------------------------------- /snippets/org-mode/todokey: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: TODO keys 3 | # key: otok 4 | # binding: direct-keybinding 5 | # -- 6 | ${1:TODO}(${2:key}) -------------------------------------------------------------------------------- /snippets/poly-head-tail-mode/figuredetails: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: figure 3 | # key: fig 4 | # -- 5 | fig.${1:$$(yas-choose-value '("height=" "width=" "align=" "show="))}$0 -------------------------------------------------------------------------------- /snippets/web-mode/doctype: -------------------------------------------------------------------------------- 1 | #name : Doctype HTML 4.01 Strict 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/latex-mode/alignedequation: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: aligned equation 3 | # key: ali 4 | # -- 5 | \begin{aligned} 6 | ${1:LHS} & = ${2:RHS} \\\\$0 7 | \end{aligned} -------------------------------------------------------------------------------- /snippets/latex-mode/emphasisbox: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: emphasis box 3 | # key: box 4 | # -- 5 | \begin{empheq}[box=\widefbox]{equation${1:*}} 6 | $2 7 | \end{empheq} 8 | $0 -------------------------------------------------------------------------------- /snippets/latex-mode/title: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: title 3 | # key: ti 4 | # -- 5 | \title{$1} 6 | \date{${2:\today}} 7 | \author{${3:Sriram Krishnaswamy}} 8 | \maketitle 9 | -------------------------------------------------------------------------------- /snippets/org-mode/dir: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: dir 3 | # key: :d 4 | # -- 5 | :dir ${1:$$(unless yas-modified-p (completing-read "Bibliography: " 'read-file-name-internal))}$0 -------------------------------------------------------------------------------- /snippets/org-mode/revealtitlebg-size: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal title slide background size 3 | # key: rtbs 4 | # -- 5 | #+REVEAL_TITLE_SLIDE_BACKGROUND_SIZE: ${1:200}px -------------------------------------------------------------------------------- /snippets/org-mode/revealtransition: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal transition 3 | # key: rtr 4 | # -- 5 | #+REVEAL_TRANS: ${1:default/cube/page/concave/zoom/linear/fade/none} -------------------------------------------------------------------------------- /snippets/org-mode/tagkeys: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: Tags keys 3 | # key: otak 4 | # binding: direct-keybinding 5 | # -- 6 | ${1:Tag name}(${2:key}) -------------------------------------------------------------------------------- /snippets/rst-mode/subsection: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: subsection 3 | # key: sub 4 | # -- 5 | ${1:Subsection} 6 | ${1:$(make-string (string-width yas-text) ?\-)} 7 | 8 | $0 9 | -------------------------------------------------------------------------------- /snippets/web-mode/doctype.xhtml1_1: -------------------------------------------------------------------------------- 1 | #name : DocType XHTML 1.1 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/latex-mode/listofalgorithms: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: list of algorithms 3 | # key: loa 4 | # -- 5 | \listofalgorithms 6 | \addcontentsline{toc}{section}{List of algorithms} -------------------------------------------------------------------------------- /snippets/org-mode/revealtitlebg-repeat: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal title slide background repeat 3 | # key: rtbr 4 | # -- 5 | #+REVEAL_TITLE_SLIDE_BACKGROUND_REPEAT: ${1:repeat} -------------------------------------------------------------------------------- /snippets/org-mode/tangle: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: tangle 3 | # key: :t 4 | # -- 5 | :tangle ${1:$$(unless yas-modified-p (completing-read "Tangle into: " 'read-file-name-internal))}$0 -------------------------------------------------------------------------------- /snippets/rst-mode/subsubsection: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: subsubsection 3 | # key: ssu 4 | # -- 5 | ${1:Subsubsection} 6 | ${1:$(make-string (string-width yas-text) ?\*)} 7 | 8 | $0 -------------------------------------------------------------------------------- /snippets/js2-mode/return-comment: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name: return-comment 3 | #key: *@r 4 | #condition: (= (js2-node-type (js2-node-at-point)) js2-COMMENT) 5 | # -- 6 | * @return {${type}} -------------------------------------------------------------------------------- /snippets/latex-mode/differentialpowerfraction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: differential power fraction 3 | # key: dff 4 | # -- 5 | \frac{\mathrm{d}^{${1:2}}{$2}}{\mathrm{d}{$3}^{${4:2}}}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/orderedlist: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: ordered lists 3 | # key: ol 4 | # -- 5 | ${1:1}. ${2:Text} 6 | ${1:$(number-to-string (1+ (string-to-number yas-text)))}. $0 -------------------------------------------------------------------------------- /snippets/org-mode/revealtheme: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal theme 3 | # key: rth 4 | # -- 5 | #+REVEAL_THEME: ${1:beige/black/blood/league/moon/night/serif/simple/sky/solarized/white} -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+TITLE: Emacs Configuration 2 | 3 | Emacs configuration. 4 | 5 | #+BEGIN_SRC sh 6 | git clone --recurse-submodules https://github.com/sriramkswamy/dotemacs.git .emacs.d 7 | #+END_SRC 8 | -------------------------------------------------------------------------------- /snippets/js2-mode/req.json: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : json 3 | # -- 4 | new Request.JSON({ 5 | onSuccess: function(responseJSON, responseText) { 6 | $0 7 | } 8 | }).${1:send}(${2:url}); -------------------------------------------------------------------------------- /snippets/latex-mode/block: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: block 3 | # key: blk 4 | # -- 5 | \begin{${1:$$(yas-choose-value '("block" "alertblock" "exampleblock"))}}{${2:name}} 6 | $0 7 | \end{$1} -------------------------------------------------------------------------------- /snippets/org-mode/srcresults: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: results 3 | # key: :r 4 | # -- 5 | :results ${1:$$(yas-choose-value '("output" "graphics" "drawer" "value" "file" "value graphics"))}$0 -------------------------------------------------------------------------------- /snippets/js2-mode/param-comment: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name: param-comment 3 | #key: *@p 4 | #condition: (= (js2-node-type (js2-node-at-point)) js2-COMMENT) 5 | # -- 6 | * @param {${type}} ${comment}. -------------------------------------------------------------------------------- /snippets/js2-mode/type-multiline-comment: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name: type-inline-comment 3 | #key: *ty 4 | #condition: (= (js2-node-type (js2-node-at-point)) js2-COMMENT) 5 | # -- 6 | * @type {${type}} -------------------------------------------------------------------------------- /snippets/latex-mode/differentialupperpowerfraction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: upper differential power fraction 3 | # key: DFF 4 | # -- 5 | \frac{\mathrm{D}^{${1:2}}{$2}}{\mathrm{D}{$3}^{${4:2}}}$0 -------------------------------------------------------------------------------- /snippets/web-mode/meta: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #group : meta 3 | #name : 4 | # -- 5 | -------------------------------------------------------------------------------- /snippets/web-mode/textarea: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/matlab-mode/switch: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: switch 3 | # key: sw 4 | # -- 5 | switch ${1:variable} 6 | case $2 7 | $3 8 | case $4 9 | $5 10 | otherwise 11 | $0 12 | end 13 | -------------------------------------------------------------------------------- /snippets/org-mode/revealhlevel: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: reveal header level 3 | # key: rhl 4 | # binding: direct-keybinding 5 | # -- 6 | #+REVEAL_HLEVEL: ${1:1/2/3/4} 7 | -------------------------------------------------------------------------------- /snippets/web-mode/doctype.xhtml1: -------------------------------------------------------------------------------- 1 | #name : DocType XHTML 1.0 frameset 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/web-mode/doctype.xhtml1_strict: -------------------------------------------------------------------------------- 1 | #name : DocType XHTML 1.0 Strict 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/web-mode/form: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
3 | # -- 4 |
5 | $0 6 |
-------------------------------------------------------------------------------- /lang/sk-golang.el: -------------------------------------------------------------------------------- 1 | ;; golang support 2 | (use-package go-mode 3 | :ensure t 4 | :mode ("\\.go\\'" . go-mode) 5 | :hook ((go-mode . sk/company-golang))) 6 | 7 | ;; provide this config 8 | (provide 'sk-golang) 9 | -------------------------------------------------------------------------------- /snippets/c++-mode/param: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Sriram Krishnaswamy 3 | # name: param 4 | # key: @p 5 | # condition: 'force-in-comment 6 | # -- 7 | * @param ${1:argument} ${2:argument description}$0 -------------------------------------------------------------------------------- /snippets/js2-mode/type-inline-comment: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name: type-inline-comment 3 | #key: @ty 4 | #condition: (not (= (js2-node-type (js2-node-at-point)) js2-COMMENT)) 5 | # -- 6 | /** @type {${type}} */ -------------------------------------------------------------------------------- /snippets/web-mode/script.javascript: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/web-mode/script.javascript-src: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/latex-mode/figure: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: figure 3 | # key: fig 4 | # -- 5 | \begin{figure}[$1] 6 | ${5:\centering} 7 | $4 8 | \caption{$2} 9 | ${0:$$(reftex-label)} 10 | \end{figure} 11 | -------------------------------------------------------------------------------- /snippets/latex-mode/transferfuncmatrix: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: transfer function matrix 3 | # key: tfmat 4 | # -- 5 | ${1:M} = 6 | \left[ 7 | \begin{array}{${2:cc|c}} 8 | $0 9 | \end{array} 10 | \right] -------------------------------------------------------------------------------- /snippets/js3-mode/switch: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: switch 3 | # key: sw 4 | # -- 5 | switch (${1:variable}) { 6 | case ${2:value}: 7 | $0 8 | break; 9 | 10 | default: 11 | break; 12 | } -------------------------------------------------------------------------------- /snippets/latex-mode/mathfonts: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: math fonts 3 | # key: mf 4 | # -- 5 | ${1:$$(yas-choose-value '("\\\\mathrm" 6 | "\\\\mathbb" 7 | "\\\\mathcal" 8 | "\\\\mathit"))}{$2} $0 -------------------------------------------------------------------------------- /snippets/matlab-mode/function: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: function 3 | # key: func 4 | # -- 5 | function [${1:returns}] = ${2:$$(unless yas-modified-p (file-name-base (buffer-file-name)))} (${3:arguments}) 6 | $0 7 | end -------------------------------------------------------------------------------- /snippets/web-mode/link.stylesheet: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/latex-mode/prime: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: prime 3 | # key: pri 4 | # -- 5 | ${1:$$(yas-choose-value '("\\\\prime" 6 | "\\\\dprime" 7 | "\\\\tprime" 8 | "\\\\qprime"))}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/selectsize: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: select size 3 | # key: ss 4 | # -- 5 | \\${1:$$(yas-choose-value '("small" 6 | "huge" 7 | "large" 8 | "footnotesize" 9 | "scriptsize"))}$0 -------------------------------------------------------------------------------- /snippets/org-mode/revealpropertybgtransition: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal background transition property 3 | # key: rbpt 4 | # -- 5 | :reveal_background_trans: ${1:default/cube/page/concave/zoom/linear/fade/none} 6 | -------------------------------------------------------------------------------- /snippets/rst-mode/part: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: part 3 | # key: part 4 | # -- 5 | ${1:$(make-string (string-width yas-text) ?\#)} 6 | ${1:Part} 7 | ${1:$(make-string (string-width yas-text) ?\#)} 8 | 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/html-mode/div: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: div 3 | # key: div 4 | # binding: direct-keybinding 5 | # -- 6 |
7 | $0 8 |
-------------------------------------------------------------------------------- /snippets/js2-mode/req.html: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : html 3 | # -- 4 | new Request.HTML({ 5 | onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) { 6 | $0 7 | } 8 | }).${1:get}(${2:url}); -------------------------------------------------------------------------------- /snippets/web-mode/div: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: div 3 | # key: div 4 | # binding: direct-keybinding 5 | # -- 6 |
7 | $0 8 |
-------------------------------------------------------------------------------- /snippets/web-mode/doctype.xhtml1_transitional: -------------------------------------------------------------------------------- 1 | #name : DocType XHTML 1.0 Transitional 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /snippets/web-mode/html.xmlns: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | secret.el 2 | .ropeproject/* 3 | autoload/** 4 | eclim/** 5 | plugged/** 6 | plugin/** 7 | session/** 8 | undodir/** 9 | tags 10 | *.lock 11 | *.temp 12 | .netrwhist 13 | /transient/* 14 | /.cache/* 15 | url/* 16 | *.sqlite 17 | -------------------------------------------------------------------------------- /snippets/c++-mode/pragma: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: OpenMP pragmas 3 | # key: pragma 4 | # binding: direct-keybinding 5 | # -- 6 | \#pragma omp ${1:$$(yas-choose-value '("parallel" "for" "parallel for"))} 7 | $0 -------------------------------------------------------------------------------- /snippets/c-mode/pragma: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: OpenMP pragmas 3 | # key: pragma 4 | # binding: direct-keybinding 5 | # -- 6 | \#pragma omp ${1:$$(yas-choose-value '("parallel" "for" "parallel for"))} 7 | $0 -------------------------------------------------------------------------------- /snippets/rst-mode/title: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: title or chapter 3 | # key: ti 4 | # -- 5 | ${1:$(make-string (string-width yas-text) ?\*)} 6 | ${1:Chapter} 7 | ${1:$(make-string (string-width yas-text) ?\*)} 8 | 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/web-mode/meta.http-equiv: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | #group : meta 4 | # -- 5 | 6 | -------------------------------------------------------------------------------- /snippets/latex-mode/subfigure: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sub figure 3 | # key: sfig 4 | # -- 5 | \begin{subfigure}[${1:b}]{${2:0.5}\textwidth} 6 | ${6:\centering} 7 | $5 8 | \caption{$3} 9 | ${0:$$(reftex-label)} 10 | \end{subfigure} 11 | -------------------------------------------------------------------------------- /snippets/org-mode/revealfragmentstyle: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: reveal default fragmentation 3 | # key: rfrag 4 | # -- 5 | #+ATTR_REVEAL: :frag (${1:t/grow/shrink/roll-in/fade-out/highlight-red/highlight-blue/appear/none}) ${2:frag_idx} ${3:(numbers)} -------------------------------------------------------------------------------- /snippets/latex-mode/piecewisefunction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: piecewise function 3 | # key: pwise 4 | # -- 5 | $1 = 6 | \begin{cases} 7 | \hfill $2 \hfill & \text{, \hspace{0.25cm} $3} \\\\ 8 | \hfill $4 \hfill & \text{, \hspace{0.25cm} $5} \\\\ 9 | \end{cases} -------------------------------------------------------------------------------- /snippets/latex-mode/bibliography: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: bibliography 3 | # key: bib 4 | # -- 5 | \bibliography{${1:$$(unless yas-modified-p (completing-read "Bibliography: " 'read-file-name-internal))}} 6 | \bibliographystyle{${2:$$(yas-choose-value '("plain" "ieee"))}} -------------------------------------------------------------------------------- /snippets/latex-mode/costfunction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cost function 3 | # key: cost 4 | # -- 5 | \begin{aligned} 6 | & \underset{$1}{\text{minimize}} 7 | & & $2 \\\\ 8 | & \text{subject to} 9 | & & $3, ${4:\\;} $5, \\\\ 10 | & & & $6. 11 | \end{aligned} -------------------------------------------------------------------------------- /snippets/web-mode/link.stylesheet-ie: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /lang/matlab-mode/toolbox/dbhotlink.m: -------------------------------------------------------------------------------- 1 | function dbhotlink(L) 2 | 3 | [ST, I] = dbstack('-completenames'); 4 | if L+1 <=numel(ST) 5 | fprintf('%i \n', ST(L+1).file, ... 6 | ST(L+1).line, ST(L+1).line); 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /snippets/latex-mode/dots: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: dots 3 | # key: dots 4 | # -- 5 | ${1:$$(yas-choose-value '("\\\\cdot" 6 | "\\\\cdots" 7 | "\\\\ldot" 8 | "\\\\ldots" 9 | "\\\\vdot" 10 | "\\\\vdots" 11 | "\\\\ddots"))} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/label: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: label 3 | # key: lab 4 | # -- 5 | \label{${1:$$(yas-choose-value '("eq:" 6 | "fig:" 7 | "sfig:" 8 | "tab:" 9 | "sec:" 10 | "ssec:" 11 | "subssec:" 12 | "cha:"))}}$0 -------------------------------------------------------------------------------- /lang/matlab-mode/matlab-mode-pkg.el: -------------------------------------------------------------------------------- 1 | (define-package "matlab-mode" "20160902.459" "Major mode for MATLAB(R) dot-m files" 'nil :url "http://sourceforge.net/projects/matlab-emacs/" :keywords 2 | '("matlab" "programming" "language" "(X)emacs")) 3 | ;; Local Variables: 4 | ;; no-byte-compile: t 5 | ;; End: 6 | -------------------------------------------------------------------------------- /snippets/latex-mode/algorithm: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: algorithm 3 | # key: algo 4 | # -- 5 | \begin{algorithm} 6 | \label{$1} 7 | \caption{$2} 8 | \begin{algorithmic}[1] 9 | \Procedure{${3:My procedure}}{} 10 | \State $0 11 | \EndProcedure 12 | \end{algorithmic} 13 | \end{algorithm} 14 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "use-package"] 2 | path = use-package 3 | url = https://github.com/jwiegley/use-package.git 4 | [submodule "ycmd"] 5 | path = ycmd 6 | url = https://github.com/Valloric/ycmd 7 | [submodule "packs/smartparens"] 8 | path = packs/smartparens 9 | url = https://github.com/Fuco1/smartparens.git 10 | -------------------------------------------------------------------------------- /snippets/latex-mode/booktabs: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: booktabs 3 | # key: btab 4 | # -- 5 | \begin{table}[${1:h}] 6 | \centering 7 | \begin{tabular}{$2} 8 | \toprule 9 | $3 10 | \midrule 11 | $4 12 | \bottomrule 13 | \end{tabular} 14 | \caption{$5} 15 | ${0:$$(reftex-label)} 16 | \end{table} 17 | -------------------------------------------------------------------------------- /snippets/latex-mode/multipartfunction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: multipart function 3 | # key: multif 4 | # -- 5 | \begin{equation${2:*}} 6 | $1 = 7 | \left\{ 8 | \begin{array}{ll} 9 | x & \mbox{if } x \geq 0 \\ 10 | -x & \mbox{if } x < 0 11 | \end{array} 12 | \right} 13 | = 14 | \end{equation$2} -------------------------------------------------------------------------------- /snippets/latex-mode/table: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: table 3 | # key: tabl 4 | # -- 5 | \begin{table}[$1] 6 | \centering 7 | \begin{tabular}{${2:L}{${3:4}cm}${4:L}{${5:4}cm}$6} 8 | \toprule 9 | $9 10 | \bottomrule 11 | \end{tabular} 12 | \caption{$7} 13 | ${0:$$(reftex-label)} 14 | \end{table} 15 | -------------------------------------------------------------------------------- /snippets/latex-mode/mathbotsyms: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: math bottom symbols 3 | # key: mbot 4 | # -- 5 | ${1:$$(yas-choose-value '("\\\\wideutilde" 6 | "\\\\underbar" 7 | "\\\\underline" 8 | "\\\\underrightarrow" 9 | "\\\\underleftarrow" 10 | "\\\\underleftrightarrow"))}{$2}$0 -------------------------------------------------------------------------------- /snippets/latex-mode/sets: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: sets 3 | # key: set 4 | # -- 5 | ${1:$$(yas-choose-value '("\\\\subset" 6 | "\\\\subseteq" 7 | "\\\\not\\\\subset" 8 | "\\\\nsubseteq" 9 | "\\\\sqsubset" 10 | "\\\\sqsubseteq" 11 | "\\\\supset" 12 | "\\\\supseteq" 13 | "\\\\not\\\\supset" 14 | "\\\\nsupseteq" 15 | "\\\\sqsubset" 16 | "\\\\sqsupseteq"))} $0 -------------------------------------------------------------------------------- /snippets/latex-mode/mathtopsyms: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: math top symbols 3 | # key: mtop 4 | # -- 5 | ${1:$$(yas-choose-value '("\\\\dot" 6 | "\\\\ddot" 7 | "\\\\dddot" 8 | "\\\\acute" 9 | "\\\\grave" 10 | "\\\\tilde" 11 | "\\\\hat" 12 | "\\\\widehat" 13 | "\\\\bar" 14 | "\\\\overbar" 15 | "\\\\overline" 16 | "\\\\vec" 17 | "\\\\overleftarrow" 18 | "\\\\overleftrightarrow"))}{$2}$0 -------------------------------------------------------------------------------- /requirements-global.txt: -------------------------------------------------------------------------------- 1 | neovim 2 | neovim-remote 3 | requests 4 | setuptools 5 | python-language-server 6 | rope 7 | jedi 8 | json-rpc 9 | sphinx 10 | pytest 11 | nose 12 | numpy 13 | scipy 14 | scikit-learn 15 | matplotlib 16 | pandas 17 | seaborn 18 | plotly 19 | ggplot 20 | bokeh 21 | sympy 22 | pygments 23 | tensorflow 24 | ipython 25 | ipdb 26 | beautifulsoup4 27 | lxml 28 | html5lib 29 | howdoi 30 | virtualenv 31 | virtualenvwrapper 32 | yapf 33 | pylint 34 | autopep8 35 | flake8 36 | autoflake 37 | ansible 38 | fabric 39 | sqlalchemy 40 | jupyter 41 | -------------------------------------------------------------------------------- /defuns/sk-search-defuns.el: -------------------------------------------------------------------------------- 1 | ;; occur at point 2 | (defun sk/occur-at-point () 3 | "occur with the thing at point" 4 | (interactive) 5 | (occur (thing-at-point 'symbol))) 6 | 7 | ;; search TODOs in project 8 | (defun sk/search-todos-in-project () 9 | "search for the string TODO in a project" 10 | (interactive) 11 | (counsel-ag "TODO")) 12 | 13 | ;; search FIXMEs in project 14 | (defun sk/search-fixmes-in-project () 15 | "search for the string FIXME in a project" 16 | (interactive) 17 | (counsel-ag "FIXME")) 18 | 19 | ;; provide these functions 20 | (provide 'sk-search-defuns) 21 | -------------------------------------------------------------------------------- /lang/sk-web.el: -------------------------------------------------------------------------------- 1 | ;; web mode for many languages 2 | (use-package web-mode 3 | :ensure t 4 | :mode (("\\.html?\\'" . web-mode) 5 | ("\\.phtml\\'" . web-mode) 6 | ("\\.tpl\\.php\\'" . web-mode) 7 | ("\\.[agj]sp\\'" . web-mode) 8 | ("\\.as[cp]x\\'" . web-mode) 9 | ("\\.erb\\'" . web-mode) 10 | ("\\.mustache\\'" . web-mode) 11 | ("\\.djhtml\\'" . web-mode) 12 | ;; ("\\.js[x]\\'" . web-mode) 13 | ("\\.[s]css\\'" . web-mode)) 14 | :hook ((web-mode . sk/company-web))) 15 | 16 | ;; js 17 | (use-package js 18 | :ensure t 19 | :mode ("\\.js[x]\\'" . web-mode) 20 | :hook ((js-mode . sk/company-js))) 21 | 22 | ;; provide this configuration 23 | (provide 'sk-web) 24 | -------------------------------------------------------------------------------- /snippets/latex-mode/siunits: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: si units 3 | # key: si 4 | # -- 5 | \si{${1:$$(yas-choose-value '("\\\\kilo\\\\gram" 6 | "\\\\metre\\\\per\\\\second" 7 | "\\\\joule" 8 | "\\\\metre" 9 | "\\\\second" 10 | "\\\\centi\\\\metre" 11 | "\\\\gram" 12 | "\\\\per" 13 | "\\\\kilo" 14 | "\\\\kelvin" 15 | "\\\\square" 16 | "\\\\cubic" 17 | "\\\\degree" 18 | "\\\\newton" 19 | "\\\\hour" 20 | "\\\\pascal" 21 | "\\\\kilo\\\\pascal" 22 | "\\\\watt\\\\per\\\\metre\\\\per\\\\kelvin" 23 | "\\\\watt\\\\per\\\\square\\\\metre\\\\per\\\\kelvin"))}}$0 24 | -------------------------------------------------------------------------------- /lang/sk-linter.el: -------------------------------------------------------------------------------- 1 | (defun sk/spaceline-flycheck () 2 | "diminsih flycheck if spaceline is present" 3 | (interactive) 4 | (when (fboundp 'spaceline-compile) 5 | (diminish 'flycheck-mode ""))) 6 | 7 | ;; error checking 8 | (use-package flycheck 9 | :ensure t 10 | :hook ((prog-mode . flycheck-mode) 11 | (lisp-interaction-mode . flycheck-mode) 12 | (flycheck-mode . sk/spaceline-flycheck)) 13 | :commands (flycheck-buffer 14 | flycheck-previous-error 15 | flycheck-next-error 16 | flycheck-list-errors 17 | flycheck-explain-error-at-point 18 | flycheck-display-error-at-point 19 | flycheck-select-checker 20 | flycheck-verify-setup) 21 | :config 22 | (global-flycheck-mode)) 23 | 24 | ;; provide linter 25 | (provide 'sk-linter) 26 | -------------------------------------------------------------------------------- /snippets/latex-mode/lstlanguage: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: listings language syntax 3 | # key: lsl 4 | # -- 5 | \lstset{language=${1:python}, 6 | % basicstyle=\color{red}, 7 | breaklines=true, 8 | morekeywords={matlab2tikz}, 9 | keywordstyle=\color{blue}, 10 | morekeywords=[2]{1}, 11 | keywordstyle=[2]{\color{black}}, 12 | identifierstyle=\color{black}, 13 | stringstyle=\color{mylilas}, 14 | commentstyle=\color{mygreen}, 15 | showstringspaces=false, %without this there will be a symbol in the places where there is a space 16 | numbers=left, 17 | numberstyle={\tiny \color{black}}, % size of the numbers 18 | numbersep=9pt, % this defines how far the numbers are from the text 19 | emph=[1]{for,end,break}, 20 | emphstyle=[1]\color{red}, %some words to emphasise 21 | % emph=[2]{word1,word2}, emphstyle=[2]{style}, 22 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | 9 | # Set default charset 10 | [*.{java,html,js,jl,c,cpp,h,py,tex,m,clj,css,go,pl,php,r,rb,scala,sql,sh}] 11 | charset = utf-8 12 | 13 | # 4 space indentation 14 | [*.{py,java,jl,m,pl,php}] 15 | indent_style = space 16 | indent_size = 4 17 | 18 | # 2 space indentation 19 | [*.{c,cpp,h,tex,js,clj,css,html,r,rb,scala,sql,sh}] 20 | indent_style = space 21 | indent_size = 2 22 | 23 | # tab indentation 24 | [*.{md,mkd,markdown,go}] 25 | indent_style = tab 26 | 27 | # CMakeLists.txt 28 | [CMakeLists.txt] 29 | indent_style = space 30 | indent_size = 2 31 | 32 | # Makefile 33 | [Makefile] 34 | indent_style = tab 35 | indent_size = 4 36 | 37 | # Matches the exact file .travis.yml 38 | [.travis.yml] 39 | indent_style = space 40 | indent_size = 2 41 | -------------------------------------------------------------------------------- /lang/matlab-mode/toolbox/opentoline.m: -------------------------------------------------------------------------------- 1 | function opentoline(file, line, column) 2 | %OPENTOLINE Open to specified line in function file in Emacs. 3 | % This is a hack to override the built-in opentoline program in MATLAB. 4 | % 5 | % Remove this M file from your path to get the old behavior. 6 | 7 | editor = system_dependent('getpref', 'EditorOtherEditor'); 8 | editor = editor(2:end); 9 | 10 | if nargin==3 11 | linecol = sprintf('+%d:%d',line,column); 12 | else 13 | linecol = sprintf('+%d',line); 14 | end 15 | 16 | if ispc 17 | % On Windows, we need to wrap the editor command in double quotes 18 | % in case it contains spaces 19 | system(['"' editor '" "' linecol '" "' file '"&']); 20 | else 21 | % On UNIX, we don't want to use quotes in case the user's editor 22 | % command contains arguments (like "xterm -e vi") 23 | system([editor ' "' linecol '" "' file '" &']); 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /modes/sk-dubcaps-mode.el: -------------------------------------------------------------------------------- 1 | ;; Correct the DOuble capitals 2 | (defun sk/dcaps-to-scaps () 3 | "Convert word in DOuble CApitals to Single Capitals." 4 | (interactive) 5 | (and (= ?w (char-syntax (char-before))) 6 | (save-excursion 7 | (and (if (called-interactively-p) 8 | (skip-syntax-backward "w") 9 | (= -3 (skip-syntax-backward "w"))) 10 | (let (case-fold-search) 11 | (looking-at "\\b[[:upper:]]\\{2\\}[[:lower:]]")) 12 | (capitalize-word 1))))) 13 | (define-minor-mode sk/dubcaps-mode 14 | "Toggle `sk/dubcaps-mode'. Converts words in DOuble CApitals to 15 | Single Capitals as you type." 16 | :init-value nil 17 | (if sk/dubcaps-mode 18 | (add-hook 'post-self-insert-hook #'sk/dcaps-to-scaps nil 'local) 19 | (remove-hook 'post-self-insert-hook #'sk/dcaps-to-scaps 'local))) 20 | (add-hook 'text-mode-hook #'sk/dubcaps-mode) 21 | 22 | ;; provide the minor mode 23 | (provide 'sk-dubcaps-mode) 24 | -------------------------------------------------------------------------------- /lang/sk-config.el: -------------------------------------------------------------------------------- 1 | ;; JSON configuration 2 | (use-package json-mode 3 | :ensure t 4 | :mode (("\\.json\\'" . json-mode))) 5 | 6 | ;; XML configuration 7 | (use-package nxml-mode 8 | :mode (("\\.xml\\'" . nxml-mode) 9 | ("\\.launch\\'" . nxml-mode))) 10 | 11 | ;; YAML configuration 12 | (use-package yaml-mode 13 | :ensure t 14 | :mode (("\\.yaml\\'" . yaml-mode) 15 | ("\\.yml\\'" . yaml-mode))) 16 | 17 | ;; HAML configuration 18 | (use-package haml-mode 19 | :ensure t 20 | :mode (("\\.haml\\'" . yaml-mode) 21 | ("\\.hml\\'" . yaml-mode))) 22 | 23 | ;; VIMRC configuration 24 | (use-package vimrc-mode 25 | :ensure t 26 | :mode (("\\.vimrc\\'" . vimrc-mode) 27 | ("\\.vim\\'" . vimrc-mode))) 28 | 29 | ;; CMAKE configuration 30 | (use-package cmake-mode 31 | :ensure t 32 | :mode ("CMakeLists.txt" . cmake-mode)) 33 | 34 | ;; AutoHotKey configuration 35 | (use-package ahk-mode 36 | :ensure t 37 | :mode ("\\.ahk\\'" . ahk-mode)) 38 | 39 | ;; provide the file 40 | (provide 'sk-config) 41 | -------------------------------------------------------------------------------- /lang/matlab-mode/toolbox/emacsinit.m: -------------------------------------------------------------------------------- 1 | function emacsinit(clientcommand) 2 | % EMACSINIT Initialize the current MATLAB session for matlab-shell-mode 3 | 4 | if usejava('jvm') 5 | % Disable built-in editor showing up for debugging 6 | com.mathworks.services.Prefs.setBooleanPref('EditorGraphicalDebugging', true); 7 | % Disable the built-in editor for normal editing 8 | com.mathworks.services.Prefs.setBooleanPref('EditorBuiltinEditor', true); 9 | % Use emacsclient no-wait to send edit requests to a 10 | % running emacs. 11 | % if nargin == 0 12 | % clientcommand = 'emacsclient -n'; 13 | % end 14 | % com.mathworks.services.Prefs.setStringPref('EditorOtherEditor', clientcommand); 15 | end 16 | 17 | % Use the desktop hotlinking system in MATLAB Shell. matlab-shell 18 | % will interpret them, and provide clickable areas. 19 | % NOTE: This doesn't work in all cases where HotLinks are used. 20 | feature('HotLinks','on'); 21 | end -------------------------------------------------------------------------------- /lang/sk-poly.el: -------------------------------------------------------------------------------- 1 | (use-package poly-markdown 2 | :ensure t 3 | :mode ("\\.md$" . poly-markdown-mode)) 4 | 5 | (use-package poly-R 6 | :ensure t 7 | :mode ("\\.Rmd$" . poly-markdown+r-mode) 8 | 9 | :config 10 | (ryo-modal-major-mode-keys 11 | 'markdown-mode 12 | ;; polymode 13 | ("m a j" polymode-next-chunk :name "next chunk") 14 | ("m a J" polymode-next-chunk-same-type :name "next chunk of type") 15 | ("m a k" polymode-previous-chunk :name "prev chunk") 16 | ("m a K" polymode-previous-chunk-same-type :name "prev chunk same type") 17 | ("m a e" polymode-export :name "export") 18 | ("m a E" polymode-set-exporter :name "set exporter") 19 | ("m a w" markdown-cleanup-list-numbers :name "weave") 20 | ("m a W" markdown-complete-buffer :name "set weaver") 21 | ("m a c" polymode-toggle-chunk-narrowing :name "narrow chunk") 22 | ("m a x" polymode-kill-chunk :name "kill chunk") 23 | 24 | ;; eval 25 | ("m a a" polymode-eval-buffer :name "eval buffer") 26 | ("m a r" polymode-eval-region-or-chunk :name "eval region or chunk"))) 27 | 28 | ;; provide the configuration 29 | (provide 'sk-poly) 30 | -------------------------------------------------------------------------------- /lang/matlab-mode/toolbox/emacsdocomplete.m: -------------------------------------------------------------------------------- 1 | function emacsdocomplete(substring) 2 | % Ask for completions of SUBSTRING from MATLAB. 3 | % This is used by Emacs TAB in matlab-shell to provide possible 4 | % completions. This hides the differences between versions 5 | % for the calls needed to do completions. 6 | 7 | v = ver('MATLAB'); 8 | 9 | 10 | if str2double(v.Version) < 8.4 11 | 12 | % Pre R2014b: partial_string 13 | extracmd = ''; 14 | 15 | else 16 | 17 | % Post R2014b: partial_string, caret, num 18 | extracmd = [ ', ' num2str(length(substring)) ',0' ]; 19 | 20 | % DEV NOTE: If you find a test failure, contact Eric Ludlam 21 | % to also update matlab-emacs SF repository. 22 | 23 | end 24 | 25 | command = [ 'matlabMCRprocess_emacs = com.mathworks.jmi.MatlabMCR;' ... 26 | 'emacs_completions_output = matlabMCRprocess_emacs.mtFindAllTabCompletions(''' ... 27 | substring '''' extracmd '),' ... 28 | 'clear(''matlabMCRprocess_emacs'',''emacs_completions_output'');' ]; 29 | 30 | % Completion engine needs to run in the base workspace to know 31 | % what the variables you have to work with are. 32 | evalin('base',command); 33 | 34 | end -------------------------------------------------------------------------------- /.zshrc: -------------------------------------------------------------------------------- 1 | 2 | # The following lines were added by compinstall 3 | zstyle :compinstall filename '/home/sriramkswamy/.zshrc' 4 | 5 | autoload -Uz compinit 6 | compinit 7 | # End of lines added by compinstall 8 | # Lines configured by zsh-newuser-install 9 | HISTFILE=~/.histfile 10 | HISTSIZE=1000 11 | SAVEHIST=1000 12 | unsetopt beep 13 | bindkey -v 14 | # End of lines configured by zsh-newuser-install 15 | 16 | # terminal 17 | export TERM=screen-256color 18 | 19 | # PATH 20 | export PATH=/home/sriramkswamy/.fzf/bin:$PATH 21 | export PATH=/home/sriramkswamy/.cargo/bin:$PATH 22 | export PATH=/home/sriramkswamy/local/bin:$PATH 23 | 24 | # python virtualenv 25 | source ~/venv/global/bin/activate 26 | 27 | # alias 28 | alias e='emacs -nw' 29 | alias v='nvim' 30 | alias m='tmux' 31 | alias s='tmux attach-session' 32 | 33 | # application aliases 34 | alias d='dropbox status' 35 | alias julia='/hom/sriramkswamy/julia-1.0.0/bin/julia' 36 | 37 | # git aliases 38 | alias g='git status' 39 | alias q='git commit -m' 40 | alias c='git commit' 41 | alias a='git add' 42 | alias p='git push' 43 | alias f='git pull' 44 | alias o='git clone' 45 | alias l="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'" 46 | 47 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 48 | 49 | # start dropbox 50 | dropbox start 51 | -------------------------------------------------------------------------------- /.ctags: -------------------------------------------------------------------------------- 1 | --recurse=yes 2 | --exclude=.git 3 | --exclude=vendor/* 4 | --exclude=node_modules/* 5 | --exclude=db/* 6 | --exclude=log/* 7 | 8 | --langdef=taskpaper 9 | --langmap=taskpaper:.taskpaper 10 | --regex-taskpaper=/^[ \t ]*(.*):$/\1/p,Project/ 11 | 12 | --langdef=markdown 13 | --langmap=markdown:.md 14 | --regex-markdown=/^#[ \t ]+(.*)/\1/h,Heading_L1/ 15 | --regex-markdown=/^##[ \t ]+(.*)/\1/i,Heading_L2/ 16 | --regex-markdown=/^###[ \t ]+(.*)/\1/k,Heading_L3/ 17 | 18 | --langdef=rmarkdown 19 | --langmap=rmarkdown:.rmd 20 | --regex-rmarkdown=/^#[ \t ]+(.*)/\1/h,Heading_L1/ 21 | --regex-rmarkdown=/^##[ \t ]+(.*)/\1/i,Heading_L2/ 22 | --regex-rmarkdown=/^###[ \t ]+(.*)/\1/k,Heading_L3/ 23 | 24 | --langdef=vimwiki 25 | --langmap=vimwiki:.txt 26 | --regex-vimwiki=/^#[ \t ]+(.*)/\1/h,Heading_L1/ 27 | --regex-vimwiki=/^##[ \t ]+(.*)/\1/i,Heading_L2/ 28 | --regex-vimwiki=/^###[ \t ]+(.*)/\1/k,Heading_L3/ 29 | 30 | --langdef=R 31 | --langmap=r:.R.r 32 | --regex-R=/^[ \t]*"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t]function/\1/f,Functions/ 33 | --regex-R=/^"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t][^f][^u][^n][^c][^t][^i][^o][^n]/\1/g,GlobalVars/ 34 | --regex-R=/[ \t]"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t][^f][^u][^n][^c][^t][^i][^o][^n]/\1/v,FunctionVariables/ 35 | 36 | --langdef=bib 37 | --langmap=bib:.bib 38 | --regex-bib=/^@[A-Za-z]+\{([^,]*)/\1/b,bib/ 39 | 40 | --langdef=matlab 41 | --langmap=matlab:.m 42 | --regex-matlab=/^function[ \t]*([a-zA-Z0-9_]+)[ \t]*=[ \t]*([a-zA-Z0-9_]+)/\2/f,functions/ 43 | --regex-matlab=/^function[ \t]*([a-zA-Z0-9_]+)[^=]*$/\1/f,functions/ 44 | -------------------------------------------------------------------------------- /defuns/sk-expand-defuns.el: -------------------------------------------------------------------------------- 1 | (defun sk/mark-inside-org-code () 2 | "Select inside an Org code block without the org specific syntax" 3 | (interactive) 4 | (er/mark-org-code-block) 5 | (next-line 1) 6 | (exchange-point-and-mark) 7 | (previous-line 1) 8 | (end-of-line 1)) 9 | 10 | (defun sk/mark-around-word () 11 | "Mark the word and the adjacent whitespace" 12 | (interactive) 13 | (if (looking-at-p "[[:space:]]") 14 | (mark-word) 15 | (er/mark-word) 16 | (exchange-point-and-mark) 17 | (if (looking-at-p "[[:space:]]") 18 | (forward-char 1) 19 | (exchange-point-and-mark) 20 | (backward-char 1) 21 | (if (looking-at-p "[[:space:]]") 22 | (exchange-point-and-mark) 23 | (forward-char 1))))) 24 | 25 | (defun sk/mark-inside-LaTeX-math () 26 | "Mark inside the latex math" 27 | (interactive) 28 | (er/mark-LaTeX-math) 29 | (forward-char 1) 30 | (exchange-point-and-mark) 31 | (backward-char 1)) 32 | 33 | (defun sk/mark-inside-python-block () 34 | "Mark inside a python block" 35 | (interactive) 36 | (er/mark-python-block) 37 | (next-line 1)) 38 | 39 | (defun sk/mark-inside-ruby-block () 40 | "Mark inside a ruby/julia block" 41 | (interactive) 42 | (er/mark-ruby-block-up) 43 | (next-line 1) 44 | (exchange-point-and-mark) 45 | (previous-line 1)) 46 | 47 | (defun sk/mark-around-symbol () 48 | "Mark around a symbol including the nearby whitespace" 49 | (interactive) 50 | (er/mark-symbol) 51 | (exchange-point-and-mark) 52 | (forward-char 1)) 53 | 54 | ;; provide expand region wrapper functions 55 | (provide 'sk-expand-defuns) 56 | -------------------------------------------------------------------------------- /config/sk-versions.el: -------------------------------------------------------------------------------- 1 | ;; best git wrapper ever 2 | (use-package magit 3 | :ensure t 4 | :ensure-system-package git 5 | :bind* ("C-x g" . magit-status) 6 | :commands 7 | (magit-blame)) 8 | 9 | ;; magit diff or generic ediff 10 | (defun sk/ediff (arg) 11 | "Magit ediff normally or generic ediff if called with universal argument" 12 | (interactive "P") 13 | (if arg 14 | (ediff) 15 | (magit-ediff-show-working-tree))) 16 | 17 | ;; highlight diffs 18 | (use-package diff-hl 19 | :ensure t 20 | :commands (global-diff-hl-mode 21 | diff-hl-mode 22 | diff-hl-next-hunk 23 | diff-hl-previous-hunk 24 | diff-hl-mark-hunk 25 | diff-hl-diff-goto-hunk 26 | diff-hl-revert-hunk) 27 | :config 28 | (global-diff-hl-mode) 29 | ;; (diff-hl-flydiff-mode) 30 | (diff-hl-margin-mode) 31 | (diff-hl-dired-mode)) 32 | 33 | ;; forge for GitHub and GitLab 34 | (use-package forge 35 | :ensure t 36 | :after magit) 37 | 38 | ;; git timemachine 39 | (use-package git-timemachine 40 | :ensure t 41 | :commands 42 | (git-timemachine-toggle)) 43 | 44 | ;; posting gists 45 | (use-package yagist 46 | :ensure t 47 | :init 48 | (setq yagist-encrypt-risky-config t) 49 | :commands 50 | (yagist-region-or-buffer)) 51 | 52 | ;; browse remote packages 53 | (use-package browse-at-remote 54 | :ensure t 55 | :commands 56 | (browse-at-remote)) 57 | 58 | ;; posting gists 59 | (defun sk/post-gist (arg) 60 | "post the gist. Toggle privacy with ARG" 61 | (interactive "p") 62 | (if (equal arg '(4)) 63 | (yagist-region-or-buffer-private) 64 | (yagist-region-or-buffer))) 65 | 66 | ;; provide version control configuration 67 | (provide 'sk-versions) 68 | -------------------------------------------------------------------------------- /defuns/sk-debug-defuns.el: -------------------------------------------------------------------------------- 1 | ;; add gud mode 2 | (defun sk/gud-mode () 3 | "add gud mode" 4 | (interactive) 5 | ;; (require 'gdb) 6 | (require 'realgud) 7 | (require 'gud)) 8 | 9 | ;; gud set breakpoint 10 | (defun sk/gud-break () 11 | "add gud break point" 12 | (interactive) 13 | (require 'gud) 14 | (sk/breakpoint-icon-set) 15 | (call-interactively #'gud-break)) 16 | 17 | ;; gud remove breakpoint 18 | (defun sk/gud-remove () 19 | "remove gud break point" 20 | (interactive) 21 | (require 'gud) 22 | (sk/breakpoint-icon-remove) 23 | (call-interactively #'gud-remove)) 24 | 25 | ;; gud step next 26 | (defun sk/gud-next () 27 | "step next" 28 | (interactive) 29 | (require 'gud) 30 | (call-interactively #'gud-next)) 31 | 32 | ;; gud step 33 | (defun sk/gud-step () 34 | "step" 35 | (interactive) 36 | (require 'gud) 37 | (call-interactively #'gud-step)) 38 | 39 | ;; gud up 40 | (defun sk/gud-up () 41 | "gud up" 42 | (interactive) 43 | (require 'gud) 44 | (call-interactively #'gud-up)) 45 | 46 | ;; gud down 47 | (defun sk/gud-down () 48 | "gud down" 49 | (interactive) 50 | (require 'gud) 51 | (call-interactively #'gud-down)) 52 | 53 | ;; gud finish 54 | (defun sk/gud-finish () 55 | "gud down" 56 | (interactive) 57 | (require 'gud) 58 | (call-interactively #'gud-finish)) 59 | 60 | ;; gud cont 61 | (defun sk/gud-cont () 62 | "gud cont" 63 | (interactive) 64 | (require 'gud) 65 | (call-interactively #'gud-cont)) 66 | 67 | ;; gud print 68 | (defun sk/gud-print () 69 | "gud print" 70 | (interactive) 71 | (require 'gud) 72 | (call-interactively #'gud-print)) 73 | 74 | ;; gud refresh 75 | (defun sk/gud-refresh () 76 | "gud refresh" 77 | (interactive) 78 | (require 'gud) 79 | (call-interactively #'gud-refresh)) 80 | 81 | ;; gud find-c-expr 82 | (defun sk/gud-find-c-expr () 83 | "gud find-c-expr" 84 | (interactive) 85 | (require 'gud) 86 | (call-interactively #'gud-find-c-expr)) 87 | 88 | ;; provide debugging wrapper functions 89 | (provide 'sk-debug-defuns) 90 | -------------------------------------------------------------------------------- /.tmux.conf: -------------------------------------------------------------------------------- 1 | # Change the prefix key 2 | set -g prefix ` 3 | 4 | # 0 is too far from ` ;) 5 | set -g base-index 1 6 | 7 | # Automatically set window title 8 | set-window-option -g automatic-rename on 9 | set-option -g set-titles on 10 | 11 | set -g default-terminal "screen-256color" 12 | set -g status-keys vi 13 | set -g history-limit 10000 14 | 15 | setw -g mode-keys vi 16 | # setw -g mode-mouse on 17 | setw -g monitor-activity on 18 | 19 | # pane splitting 20 | bind-key v split-window -h 21 | bind-key s split-window -v 22 | 23 | # resizing 24 | bind-key J resize-pane -D 5 25 | bind-key K resize-pane -U 5 26 | bind-key H resize-pane -L 5 27 | bind-key L resize-pane -R 5 28 | 29 | # Vim style pane selection 30 | bind-key h select-pane -L 31 | bind-key j select-pane -D 32 | bind-key k select-pane -U 33 | bind-key l select-pane -R 34 | 35 | # arrows for pane selection 36 | bind-key -n Left select-pane -L 37 | bind-key -n Down select-pane -D 38 | bind-key -n Up select-pane -U 39 | bind-key -n Right select-pane -R 40 | 41 | # window shortcuts 42 | bind-key p last-window 43 | bind-key n next-window 44 | bind-key N previous-window 45 | 46 | # fzf for pane switching 47 | bind-key -n C-l run "tmux split-window -l 12 'bash -ci ftpane'" 48 | 49 | # No delay for escape key press 50 | set -sg escape-time 0 51 | 52 | # Reload tmux config 53 | bind-key r source-file ~/.tmux.conf 54 | 55 | # THEME 56 | set -g status-bg black 57 | set -g status-fg white 58 | set -g window-status-current-bg white 59 | set -g window-status-current-fg black 60 | set -g window-status-current-attr bold 61 | set -g status-interval 60 62 | set -g status-left-length 30 63 | set -g status-left '#[fg=green](#S) #(whoami)' 64 | set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]' 65 | 66 | # Plugins 67 | set -g @plugin 'tmux-plugins/tpm' 68 | set -g @plugin 'tmux-plugins/tmux-resurrect' 69 | # for neovim 70 | set -g @resurrect-strategy-nvim 'session' 71 | 72 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 73 | run -b '~/.tmux/plugins/tpm/tpm' 74 | -------------------------------------------------------------------------------- /lang/matlab-mode/cedet-matlab.el: -------------------------------------------------------------------------------- 1 | ;;; cedet-matlab.el --- CEDET Setup support 2 | ;; 3 | ;; Copyright (C) 2009, 2012 Eric Ludlam 4 | ;; 5 | ;; Author: Eric Ludlam 6 | ;; X-RCS: $Id$ 7 | ;; 8 | ;; This program is free software; you can redistribute it and/or 9 | ;; modify it under the terms of the GNU General Public License as 10 | ;; published by the Free Software Foundation; either version 2, or (at 11 | ;; your option) any later version. 12 | 13 | ;; This program is distributed in the hope that it will be useful, but 14 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ;; General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with this program; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | ;; Boston, MA 02110-1301, USA. 22 | 23 | ;;; Commentary: 24 | ;; 25 | ;; Setup miscelaneous CEDET tools to work with MATLAB. 26 | 27 | ;;; Code: 28 | ;;;###autoload 29 | (defun matlab-cedet-setup () 30 | "Update various paths to get SRecode to identify our macros." 31 | (interactive) 32 | 33 | ;; Setup Semantic parser: 34 | (add-hook 'matlab-mode-hook 'semantic-default-matlab-setup) 35 | 36 | ;; Setup semanticdb for MATLAB support: 37 | (require 'semanticdb-matlab) 38 | 39 | ;; Setup Semantic Recoder (Template support for MATLAB and TLC.): 40 | (let* ((lib (locate-library "matlab.el" t)) 41 | (ededir (file-name-directory lib)) 42 | (tmpdir (file-name-as-directory 43 | (expand-file-name "templates" ededir)))) 44 | (when (not tmpdir) 45 | (error "Unable to locate MATLAB Templates directory")) 46 | 47 | ;; Rig up the map. 48 | (condition-case nil 49 | (require 'srecode-map) 50 | (error (require 'srecode/map))) 51 | 52 | (add-to-list 'srecode-map-load-path tmpdir) 53 | (srecode-map-update-map t) 54 | ) 55 | 56 | 57 | ) 58 | 59 | 60 | (provide 'cedet-matlab) 61 | ;;; cedet-matlab.el ends here 62 | -------------------------------------------------------------------------------- /lang/flycheck-matlab.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: t; -*- 2 | 3 | (require 'flycheck) 4 | (require 'matlab-server) 5 | (require 's) 6 | 7 | (defun flycheck-matlab--verify (checker) 8 | "Verify the matlab syntax checker." 9 | (list 10 | (flycheck-verification-result-new 11 | :label "mlint path checking" 12 | :message (if (and matlab-server-process 13 | (eq (process-status matlab-server-process) 'run)) 14 | "matlab is on" "matlab process not found") 15 | :face (if t 16 | 'success '(bold error)) ))) 17 | 18 | (defun flycheck-matlab-get-error (filepath) 19 | (if (and matlab-server-process 20 | (eq (process-status matlab-server-process) 'run)) 21 | (let ((rawerrstr (matlab-send-request-sync 22 | (s-trim (concat "arrayfun(@(x) display(sprintf('%d\t%d\t%s', x.line, x.column(1), x.message)), checkcode('" 23 | filepath "'))"))))) 24 | (delq nil 25 | (mapcar (lambda (rrs) 26 | (let* ((cleanrs (s-replace ">>" "" rrs)) 27 | (cleanrs-split (s-split "\t" (s-trim cleanrs)))) 28 | (when (= (length cleanrs-split) 3) 29 | (cl-multiple-value-bind (lpostart cpostart estr) cleanrs-split 30 | `(,(string-to-int lpostart) ,(string-to-int lpostart) ,(string-to-int cpostart) ,(string-to-int cpostart) ,estr))))) 31 | (s-split "\n" rawerrstr)))))) 32 | 33 | 34 | (defun flycheck-matlab--start (checker callback) 35 | (let* ((rawerror (flycheck-matlab-get-error (buffer-file-name))) 36 | (errors (mapcar (lambda (rerr) 37 | (cl-multiple-value-bind (lpostart lposend cpostart cposend estr) rerr 38 | (flycheck-error-new-at lpostart cpostart 'warning estr :checker checker))) 39 | rawerror))) 40 | (funcall callback 'finished errors))) 41 | 42 | 43 | (flycheck-define-generic-checker 'flycheck-matlab 44 | "A syntax checker for matlab." 45 | :start #'flycheck-matlab--start 46 | :verify #'flycheck-matlab--verify 47 | :modes '(matlab-mode) 48 | ;; :error-filter flycheck-matlab-error-filter 49 | :predicate (lambda () 50 | (eq major-mode 'matlab-mode))) 51 | 52 | (add-to-list 'flycheck-checkers 'flycheck-matlab) 53 | 54 | (provide 'flycheck-matlab) 55 | -------------------------------------------------------------------------------- /snippets/latex-mode/preamble: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: preamble 3 | # key: pre 4 | # -- 5 | \documentclass[${2:12}pt,a4paper]{${1:article}} 6 | 7 | \usepackage[utf8]{inputenc} 8 | \usepackage[left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry} 9 | \usepackage{booktabs} 10 | \usepackage{cancel} 11 | \usepackage{caption} 12 | \usepackage{cleveref} 13 | \usepackage{colortbl} 14 | \usepackage{csquotes} 15 | \usepackage{mathpazo} 16 | \usepackage{multirow} 17 | \usepackage{listings} 18 | \usepackage{pgfplots} 19 | \pgfplotsset{compat=1.10} 20 | \usepackage{helvet} 21 | \usepackage{grffile} 22 | \usepackage{graphicx} 23 | \usepackage{fancyhdr} 24 | \usepackage{hyperref} 25 | \usepackage{xcolor} 26 | \usepackage{cite} 27 | \usepackage{array} 28 | \usepackage{setspace} 29 | \usepackage{tikz} 30 | \usepackage{amsmath} 31 | \usepackage{amsfonts} 32 | \usepackage[mathscr]{eucal} 33 | \usepackage{amssymb} 34 | \usepackage{siunitx} 35 | \usepackage{chemmacros} 36 | \usepackage{esint} 37 | \usepackage{subcaption} 38 | \usepackage{titlesec} 39 | \usepackage{epstopdf} 40 | \usepackage{empheq} 41 | \usepackage{bm} 42 | 43 | \newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}} 44 | 45 | \definecolor{dark-red}{rgb}{0.4,0.15,0.15} 46 | \definecolor{dark-blue}{rgb}{0.15,0.15,0.4} 47 | \definecolor{medium-blue}{rgb}{0,0,0.5} 48 | \definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue 49 | \definecolor{mylilas}{RGB}{170,55,241} 50 | 51 | \hypersetup{colorlinks,linkcolor={dark-red},citecolor={dark-blue},urlcolor={medium-blue}} 52 | 53 | \newcolumntype{L}[1]{>{\raggedright\let\newline\\\\\arraybackslash\hspace{0pt}}m{#1}} 54 | \newcolumntype{C}[1]{>{\centering\let\newline\\\\\arraybackslash\hspace{0pt}}m{#1}} 55 | \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\\\arraybackslash\hspace{0pt}}m{#1}} 56 | 57 | \titleformat{\chapter}[block]{\normalfont\huge\bfseries}{\thechapter.}{1em}{\Huge} 58 | \titlespacing*{\chapter}{0pt}{-19pt}{0pt} 59 | 60 | \newcommand{\mychapter}[2] { 61 | \setcounter{chapter}{#1} 62 | \setcounter{section}{0} 63 | \chapter*{#2} 64 | \addcontentsline{toc}{chapter}{#2} 65 | } 66 | 67 | \pagenumbering{${3:gobble}} 68 | 69 | \begin{document} 70 | 71 | $0 72 | 73 | \end{document} -------------------------------------------------------------------------------- /defuns/sk-display-defuns.el: -------------------------------------------------------------------------------- 1 | ;; Some convenience functions for changing fonts 2 | 3 | ;;;###autoload 4 | (defun sk/courier-font () 5 | "Change font to Courier" 6 | (interactive) 7 | (set-face-attribute 'default nil :font "Courier") 8 | (set-frame-width (selected-frame) 97)) 9 | 10 | ;;;###autoload 11 | (defun sk/georgia-font () 12 | "Change font to Georgia" 13 | (interactive) 14 | (set-face-attribute 'default nil :font "Georgia" :height 160)) 15 | 16 | ;;;###autoload 17 | (defun sk/hack-font () 18 | "Change font to Hack" 19 | (interactive) 20 | (set-face-attribute 'default nil :font "Hack")) 21 | 22 | ;;;###autoload 23 | (defun sk/monaco-font () 24 | "Change font to Monaco" 25 | (interactive) 26 | (set-face-attribute 'default nil :font "Monaco")) 27 | 28 | ;;;###autoload 29 | (defun sk/consolas-font () 30 | "Change font to Consolas" 31 | (interactive) 32 | (set-face-attribute 'default nil :font "Consolas")) 33 | 34 | ;;;###autoload 35 | (defun sk/deja-vu-font () 36 | "Change font to DejaVu Sans Mono" 37 | (interactive) 38 | (set-face-attribute 'default nil :font "DejaVu Sans Mono")) 39 | 40 | ;; Some easy functions for font types 41 | 42 | ;;;###autoload 43 | (defun sk/tiny-type () 44 | "Reduce the font size to tiny" 45 | (interactive) 46 | (set-face-attribute 'default nil :height 150)) 47 | 48 | ;;;###autoload 49 | (defun sk/miniscule-type () 50 | "Reduce the font size to miniscule" 51 | (interactive) 52 | (set-face-attribute 'default nil :height 140)) 53 | 54 | ;;;###autoload 55 | (defun sk/small-type () 56 | "Reduce the font size to small" 57 | (interactive) 58 | (set-face-attribute 'default nil :height 190) 59 | (set-frame-width (selected-frame) 89)) 60 | 61 | ;;;###autoload 62 | (defun sk/medium-type () 63 | "Reduce the font size to medium" 64 | (interactive) 65 | (set-face-attribute 'default nil :height 215) 66 | (set-frame-width (selected-frame) 89)) 67 | 68 | ;;;###autoload 69 | (defun sk/large-type () 70 | "Reduce the font size to large" 71 | (interactive) 72 | (set-face-attribute 'default nil :height 350) 73 | (set-frame-width (selected-frame) 68)) 74 | 75 | ;; provide these functions 76 | (provide 'sk-display-defuns) 77 | -------------------------------------------------------------------------------- /defuns/sk-misc-defuns.el: -------------------------------------------------------------------------------- 1 | ;; Debug configuration for ROS Turtlebots using LSP DAP mode 2 | (defun sk/turtlebot-debugging-configurations () 3 | "ROS debug template with violet as the master and its odometry values" 4 | (interactive) 5 | (dap-register-debug-template 6 | "Python :: Turtlebot Subscribe Violet Master Violet Odom" 7 | (list :type "python" 8 | :args "violet_measure.json" 9 | :cwd (concat (getenv "HOME") 10 | "/Dropbox/Lab/Turtlebot/multi_agent/scripts") 11 | :target-module nil 12 | :request "launch" 13 | :name "Python :: Turtlebot Subscribe Violet Master Violet Odom"))) 14 | 15 | ;; Turtlebot masters 16 | (defun sk/turtlebot-violet-master () 17 | "Set violet as the ROS master for the Turtlebot" 18 | (interactive) 19 | (setenv "ROS_MASTER_URI" "http://10.0.1.5:11311")) 20 | (defun sk/turtlebot-blue-master () 21 | "Set blue as the ROS master for the Turtlebot" 22 | (interactive) 23 | (setenv "ROS_MASTER_URI" "http://10.0.1.8:11311")) 24 | (defun sk/turtlebot-green-master () 25 | "Set green as the ROS master for the Turtlebot" 26 | (interactive) 27 | (setenv "ROS_MASTER_URI" "http://10.0.1.16:11311")) 28 | (defun sk/turtlebot-yellow-master () 29 | "Set yellow as the ROS master for the Turtlebot" 30 | (interactive) 31 | (setenv "ROS_MASTER_URI" "http://10.0.1.13:11311")) 32 | (defun sk/turtlebot-orange-master () 33 | "Set orange as the ROS master for the Turtlebot" 34 | (interactive) 35 | (setenv "ROS_MASTER_URI" "http://10.0.1.11:11311")) 36 | (defun sk/turtlebot-red-master () 37 | "Set red as the ROS master for the Turtlebot" 38 | (interactive) 39 | (setenv "ROS_MASTER_URI" "http://10.0.1.15:11311")) 40 | 41 | ;; sublime merge 42 | (defun sk/open-git (arg) 43 | "open sublime merge in the current directory" 44 | (interactive "P") 45 | (if arg 46 | (shell-command (concat "smerge " default-directory)) 47 | (magit-status))) 48 | 49 | ;; switch between light and dark themes 50 | (defun sk/switch-themes () 51 | "switch between a set of light and dark theme" 52 | (interactive) 53 | (cond ((not (eq current-theme nil)) 54 | (sk/dark-theme)) 55 | ((eq current-theme nil) 56 | (sk/light-theme)))) 57 | 58 | ;; provide this configuration 59 | (provide 'sk-misc-defuns) 60 | -------------------------------------------------------------------------------- /defuns/sk-dired-defuns.el: -------------------------------------------------------------------------------- 1 | ;;;###autoload 2 | ;; Thanks to https://oremacs.com/2016/02/24/dired-rsync/ 3 | (defun sk/dired-rsync (dest) 4 | (interactive 5 | (list 6 | (expand-file-name 7 | (read-file-name 8 | "Rsync to:" 9 | (dired-dwim-target-directory))))) 10 | ;; store all selected files into "files" list 11 | (let ((files (dired-get-marked-files 12 | nil current-prefix-arg)) 13 | ;; the rsync command 14 | (tmtxt/rsync-command 15 | "rsync -arvz --progress ")) 16 | ;; add all selected file names as arguments 17 | ;; to the rsync command 18 | (dolist (file files) 19 | (setq tmtxt/rsync-command 20 | (concat tmtxt/rsync-command 21 | (shell-quote-argument file) 22 | " "))) 23 | ;; append the destination 24 | (setq tmtxt/rsync-command 25 | (concat tmtxt/rsync-command 26 | (shell-quote-argument dest))) 27 | ;; run the async shell command 28 | (async-shell-command tmtxt/rsync-command "*rsync*") 29 | ;; finally, switch to that window 30 | (other-window 1))) 31 | 32 | (defun sk/dired-rsync-map () 33 | "rsync map to dired" 34 | (define-key dired-mode-map "Y" 'sk/dired-rsync)) 35 | (add-hook 'dired-mode-hook 'sk/dired-rsync-map) 36 | 37 | ;; https://fuco1.github.io/2017-05-01-Support-for-imenu-in-dired.html 38 | ;; imenu in dired 39 | (defun sk/dired-imenu-prev-index-position (&optional arg) 40 | "Go to the header line of previous directory." 41 | (interactive "p") 42 | (unless (= (line-number-at-pos) 1) 43 | (call-interactively 'dired-prev-subdir) 44 | t)) 45 | 46 | (defun sk/dired-extract-index-name () 47 | "Extract name of the current item for imenu." 48 | (save-excursion 49 | (back-to-indentation) 50 | (buffer-substring-no-properties 51 | (point) 52 | (1- (re-search-forward ":$"))))) 53 | 54 | (defun sk/dired-imenu-create-index () 55 | "Create `imenu' index for dired." 56 | (let* ((alist (imenu-default-create-index-function)) 57 | (uniquified (f-uniquify-alist (-map 'car alist)))) 58 | (--remove 59 | (= 0 (length (car it))) 60 | (--map (cons (cdr (assoc (car it) uniquified)) (cdr it)) 61 | alist)))) 62 | 63 | (defun sk/dired-imenu-init () 64 | "Initialize `imenu' variables in current buffer." 65 | (setq-local imenu-prev-index-position-function 66 | 'sk/dired-imenu-prev-index-position) 67 | (setq-local imenu-extract-index-name-function 68 | 'sk/dired-extract-index-name) 69 | (setq-local imenu-create-index-function 70 | 'sk/dired-imenu-create-index)) 71 | (add-hook 'dired-mode-hook 'sk/dired-imenu-init) 72 | 73 | ;; provide dired functions 74 | (provide 'sk-dired-defuns) 75 | -------------------------------------------------------------------------------- /.bash_aliases: -------------------------------------------------------------------------------- 1 | # ls aliases 2 | alias ls='ls -GFh' 3 | alias sl='ls -GFh' 4 | alias la='ls -AGFh' 5 | alias lA='ls -alGFh' 6 | alias ll="ls -lh" 7 | alias lr="ls -Rlh" 8 | 9 | # editor alias 10 | alias v='nvim' 11 | alias e='emacs -nw' 12 | alias f='ranger' 13 | 14 | # tmux aliases 15 | PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")' 16 | 17 | # application aliases 18 | alias r='R --no-save --quiet' 19 | alias julia='/home/sriramkrish92/julia-1.0.0/bin/julia' 20 | alias mat='/home/sriramkrish92/MATLAB/bin/matlab -nosplash -nodesktop' 21 | alias matlab='/home/sriramkrish92/MATLAB/bin/matlab' 22 | 23 | # git aliases 24 | alias g='tig' 25 | alias gs='git status' 26 | alias ga='git add' 27 | alias gca='git commit --amend' 28 | alias gcm='git commit -m' 29 | alias gc='git commit' 30 | alias gp='git push' 31 | alias gf='git pull' 32 | alias gcl='git clone' 33 | alias gco='git checkout' 34 | alias gl="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'" 35 | alias gb='git branch' 36 | alias gr='git rebase' 37 | alias gi='git rebase --interactive' 38 | alias gm='git remote' 39 | alias gd='git diff' 40 | alias gn='git init' 41 | 42 | # latexmk shortcuts 43 | alias mk='latexmk -pvc -pdf' 44 | alias rmtex="rm -rf *.aux *.fdb_latexmk *.fls *.lof *.out *.log *.lot *.pdf *.toc *.bbl *.blg *.synctex.gz" 45 | 46 | # valigrind shortcuts 47 | alias valmem='valgrind --leak-check=full --show-leak-kinds=all --dsymutil=yes --leak-check-heuristics=all --log-file=valmem.log --leak-resolution=low' 48 | alias valcall='valgrind --tool=callgrind --log-file=valcall.log' 49 | alias valmass='valgrind --tool=massif --log-file=valmass.log' 50 | alias valhel='valgrind --tool=helgrind --log-file=valhel.log' 51 | 52 | # python virtualenv 53 | alias ve='virtualenv' 54 | alias vm='mkvirtualenv' 55 | alias vw='workon' 56 | alias vr='rmvirtualenv' 57 | alias vd='deactivate' 58 | 59 | # other convenient aliases 60 | alias pingu='ping -c 25 www.google.com' 61 | alias please='sudo $(fc -ln -1)' 62 | alias cl="clear" 63 | 64 | # youtube downloader 65 | alias ytvid="youtube-dl --format=mp4 -o '~/Downloads/MyVideos/%(title)s.%(ext)s'" 66 | alias ytplay="youtube-dl --format=mp4 -o '~/Downloads/MyVideos/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s'" 67 | alias ytchannel="youtube-dl --format=mp4 -o '~/Downloads/MyVideos/%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s'" 68 | 69 | # rclone 70 | alias rcr="rclone listremotes" 71 | alias rcconf="rclone config" 72 | alias rcls="rclone ls" 73 | alias rclsd="rclone lsd" 74 | alias rcmkdir="rclone mkdir" 75 | alias rcrmdir="rclone rmdir" 76 | alias rcdel="rclone delete" 77 | alias rcpurge="rclone purge" 78 | alias rccp="rclone copy" 79 | alias rcsync="rclone sync" 80 | -------------------------------------------------------------------------------- /config/sk-ryo-modal.el: -------------------------------------------------------------------------------- 1 | ;; getting "ESC" to work correctly in the terminal 2 | (defvar sk/fast-keyseq-timeout 50) 3 | 4 | (defun sk/tty-ESC-filter (map) 5 | (if (and (equal (this-single-command-keys) [?\e]) 6 | (sit-for (/ sk/fast-keyseq-timeout 1000.0))) 7 | [escape] map)) 8 | 9 | (defun sk/lookup-key (map key) 10 | (catch 'found 11 | (map-keymap (lambda (k b) (if (equal key k) (throw 'found b))) map))) 12 | 13 | (defun sk/catch-tty-ESC () 14 | "Setup key mappings of current terminal to turn a tty's ESC into `escape'." 15 | (interactive) 16 | (when (memq (terminal-live-p (frame-terminal)) '(t pc)) 17 | (let ((esc-binding (sk/lookup-key input-decode-map ?\e))) 18 | (define-key input-decode-map 19 | [?\e] `(menu-item "" ,esc-binding :filter sk/tty-ESC-filter))))) 20 | 21 | (add-hook 'after-init-hook 'sk/catch-tty-ESC) 22 | (add-hook 'prog-mode-hook 'sk/catch-tty-ESC) 23 | (add-hook 'text-mode-hook 'sk/catch-tty-ESC) 24 | 25 | ;; bind it explicity 26 | (bind-key* "C-x c" 'sk/catch-tty-ESC) 27 | 28 | ;; wrapper for entering and exiting ryo modal mode 29 | (defun sk/enable-ryo-modal-mode () 30 | "Explicitly enables ryo-modal mode" 31 | (interactive) 32 | (ryo-modal-mode 1)) 33 | (defun sk/disable-ryo-modal-mode () 34 | "Explicitly disables ryo-modal mode" 35 | (interactive) 36 | (ryo-modal-mode -1)) 37 | 38 | ;; disable in magit commit buffer alone 39 | (add-hook 'with-editor-mode-hook 'sk/disable-ryo-modal-mode) 40 | 41 | ;; open and edit line below 42 | (defun sk/open-and-edit-line-below () 43 | (interactive) 44 | (sk/open-line-below) 45 | (ryo-modal-mode -1)) 46 | 47 | ;; open and edit line above 48 | (defun sk/open-and-edit-line-above () 49 | (interactive) 50 | (sk/open-line-above) 51 | (ryo-modal-mode -1)) 52 | 53 | ;; use-package config 54 | (use-package ryo-modal 55 | :ensure t 56 | :chords ((" " . sk/enable-ryo-modal-mode)) 57 | :diminish (ryo-modal-mode . " μ") 58 | 59 | :hook ((text-mode . sk/enable-ryo-modal-mode) 60 | (prog-mode . sk/enable-ryo-modal-mode) 61 | (fundamental-mode . sk/enable-ryo-modal-mode) 62 | (doc-view-mode . sk/enable-ryo-modal-mode)) 63 | 64 | :bind (("" . sk/enable-ryo-modal-mode) 65 | :map ryo-modal-mode-map 66 | ("" . sk/remove-mark) 67 | ("." . ryo-modal-repeat) 68 | ("g >" . mc/skip-to-next-like-this) 69 | ("g <" . mc/skip-to-previous-like-this) 70 | (">" . mc/mark-next-like-this) 71 | ("<" . mc/mark-previous-like-this) 72 | ("\\" . mc/mark-all-dwim) 73 | ("|" . mc/edit-lines)) 74 | 75 | :init 76 | ;; remove ryo key word from which-key 77 | (push '((nil . "ryo:\\w+:") . (nil . "")) which-key-replacement-alist) 78 | 79 | ;; default cursor shape 80 | (setq-default cursor-type '(bar . 2)) 81 | ;; cursor for ryo modal mode 82 | (defvar ryo-modal-cursor-color "DarkGrey" 83 | "The cursor color used in `ryo-modal-mode'. If nil then use default color.") 84 | 85 | :config 86 | (sk/enable-ryo-modal-mode)) 87 | 88 | ;; provide the modal configuration 89 | (provide 'sk-ryo-modal) 90 | -------------------------------------------------------------------------------- /lang/matlab-mode/templates/srecode-matlab.srt: -------------------------------------------------------------------------------- 1 | ;; srecode-matlab.srt --- SREcode Templates for MATLAB. 2 | 3 | ;; Copyright (C) 2008, 2014 Eric Ludlam 4 | 5 | ;; Author: Eric Ludlam 6 | ;; X-RCS: $Id$ 7 | 8 | ;; This program is free software; you can redistribute it and/or 9 | ;; modify it under the terms of the GNU General Public License as 10 | ;; published by the Free Software Foundation; either version 2, or (at 11 | ;; your option) any later version. 12 | 13 | ;; This program is distributed in the hope that it will be useful, but 14 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ;; General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with this program; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | ;; Boston, MA 02110-1301, USA. 22 | 23 | 24 | set mode "matlab-mode" 25 | set escape_start "{{" 26 | set escape_end "}}" 27 | 28 | context file 29 | 30 | set comment_start "%" 31 | set comment_prefix "%" 32 | set comment_end "" 33 | 34 | ;; @todo - add argument support. 35 | ;; choose template based on script/function or class in current dir. 36 | template empty :matlab :file :user :time 37 | "Fill out an empty file." 38 | ---- 39 | {{#FILE_FUNCTION}}function {{FILE_SYMBOL}} 40 | {{comment_prefix}} {{FILE_DOC_SYMBOL}} - 41 | {{comment_prefix}} 42 | 43 | {{comment_prefix}} Copyright (C) {{YEAR}} {{?AUTHOR}} 44 | 45 | {{^}} 46 | 47 | end 48 | {{/FILE_FUNCTION}}{{#FILE_CLASS}}classdef {{FILE_SYMBOL}} 49 | {{comment_prefix}} Class {{FILE_DOC_SYMBOL}} 50 | {{comment_prefix}} 51 | 52 | {{comment_prefix}} Copyright (C) {{YEAR}} {{?AUTHOR}} 53 | 54 | properties 55 | 56 | end 57 | 58 | methods 59 | function h = {{FILE_SYMBOL}}({{^}}) 60 | % Constructor 61 | 62 | end 63 | end 64 | end 65 | 66 | {{/FILE_CLASS}} 67 | end 68 | ---- 69 | bind "e" 70 | 71 | 72 | context declaration 73 | 74 | 75 | prompt NAME "Name for declaration: " 76 | 77 | template classdef :time :user :time 78 | "Template to declare a class" 79 | ---- 80 | classdef {{?NAME}} 81 | % Class {{NAME:upcase}} 82 | % 83 | % Copyright (C) {{YEAR}} {{?AUTHOR}} 84 | 85 | properties 86 | 87 | end 88 | 89 | methods 90 | function h = {{NAME}}(varargin) 91 | {{^}} 92 | end 93 | end 94 | end 95 | ---- 96 | bind "c" 97 | 98 | template function :blank :indent 99 | "Template to declare a function." 100 | ---- 101 | function {{?NAME}} 102 | {{^}} 103 | end 104 | ---- 105 | bind "f" 106 | 107 | template variable :blank :indent 108 | "Template to declare a variable." 109 | ---- 110 | global {{?NAME}} 111 | ---- 112 | bind "v" 113 | 114 | context code 115 | 116 | template function :blank :indent 117 | "Nested functions are indented." 118 | ---- 119 | function {{?NAME}} 120 | {{^}} 121 | end 122 | ---- 123 | bind "f" 124 | 125 | template variable :blank :indent 126 | "Template to declare a variable." 127 | ---- 128 | persistent {{?NAME}} 129 | ---- 130 | bind "v" 131 | 132 | 133 | ;; end -------------------------------------------------------------------------------- /defuns/sk-doc-defuns.el: -------------------------------------------------------------------------------- 1 | ;; document in other window 2 | (defun sk/other-doc-down () 3 | "Other document next page" 4 | (interactive) 5 | (other-window 1) 6 | (doc-view-next-page) 7 | (other-window 1)) 8 | (defun sk/other-doc-up () 9 | "Other document prev page" 10 | (interactive) 11 | (other-window 1) 12 | (doc-view-previous-page) 13 | (other-window 1)) 14 | 15 | ;; document fit to page in window 16 | (defun sk/doc-fit () 17 | "Document next page" 18 | (interactive) 19 | (doc-view-fit-page-to-window)) 20 | 21 | ;; document fit to page in other window 22 | (defun sk/other-pdf-fit () 23 | "Other document next page" 24 | (interactive) 25 | (other-window 1) 26 | (pdf-view-fit-page-to-window) 27 | (other-window 1)) 28 | 29 | ;; document revert 30 | (defun sk/pdf-revert () 31 | "Document revert" 32 | (interactive) 33 | (pdf-view-revert-buffer nil t)) 34 | 35 | ;; document revert in the other window 36 | (defun sk/pdf-revert-other-window () 37 | "Document revert in the other window" 38 | (interactive) 39 | (other-window 1) 40 | (pdf-view-revert-buffer nil t) 41 | (other-window 1)) 42 | 43 | ;; document in other window 44 | (defun sk/other-pdf-down () 45 | "Other document next page" 46 | (interactive) 47 | (other-window 1) 48 | (pdf-view-next-page) 49 | (other-window 1)) 50 | (defun sk/other-pdf-up () 51 | "Other document prev page" 52 | (interactive) 53 | (other-window 1) 54 | (pdf-view-previous-page) 55 | (other-window 1)) 56 | 57 | ;; document fit to page in window 58 | (defun sk/pdf-fit () 59 | "Document next page" 60 | (interactive) 61 | (pdf-view-fit-page-to-window)) 62 | 63 | ;; document fit to page in other window 64 | (defun sk/other-pdf-fit () 65 | "Other document next page" 66 | (interactive) 67 | (other-window 1) 68 | (pdf-view-fit-page-to-window) 69 | (other-window 1)) 70 | 71 | ;; document revert 72 | (defun sk/pdf-revert () 73 | "Document revert" 74 | (interactive) 75 | (pdf-view-revert-buffer nil t)) 76 | 77 | ;; document revert in the other window 78 | (defun sk/pdf-revert-other-window () 79 | "Document revert in the other window" 80 | (interactive) 81 | (other-window 1) 82 | (pdf-view-revert-buffer nil t) 83 | (other-window 1)) 84 | 85 | ;; add interleave note for the pdf in the other window 86 | (defun sk/interleave-other-window-note () 87 | "Add interleaved note for the page in other window" 88 | (interactive) 89 | (sk/enable-ryo-modal-mode) 90 | (other-window 1) 91 | (interleave-add-note) 92 | (sk/disable-ryo-modal-mode)) 93 | 94 | ;; add interleave next page in other window 95 | (defun sk/interleave-other-window-next () 96 | "Move the next page in the other window when interleaving" 97 | (interactive) 98 | (sk/enable-ryo-modal-mode) 99 | (other-window 1) 100 | (interleave-go-to-next-page) 101 | (other-window 1)) 102 | 103 | ;; add interleave previous page in other window 104 | (defun sk/interleave-other-window-previous () 105 | "Move the previous page in the other window when interleaving" 106 | (interactive) 107 | (sk/enable-ryo-modal-mode) 108 | (other-window 1) 109 | (interleave-go-to-previous-page) 110 | (other-window 1)) 111 | 112 | ;; provide doc defuns 113 | (provide 'sk-doc-defuns) 114 | -------------------------------------------------------------------------------- /.mc-lists.el: -------------------------------------------------------------------------------- 1 | ;; This file is automatically generated by the multiple-cursors extension. 2 | ;; It keeps track of your preferences for running commands with multiple cursors. 3 | 4 | (setq mc/cmds-to-run-for-all 5 | '( 6 | LaTeX-insert-left-brace 7 | TeX-insert-backslash 8 | iy-go-to-char--command 9 | keyboard-escape-quit 10 | markdown-outdent-or-delete 11 | org-force-self-insert 12 | org-self-insert-command 13 | orgtbl-hijacker-command-109 14 | orgtbl-self-insert-command 15 | ryo-modal-repeat 16 | ryo:02cf7a4d74931d7e2ad7863c945288a8:symbol 17 | ryo:04a1830bad47c97c575a7afb01ebd040:line/region 18 | ryo:1cf9c664ed81221b6fc344af519fce32:prev\ word 19 | ryo:1cfaf336c571fd5dc56b11f0501d658c:next\ line 20 | ryo:1d69d4d933b4d946c12c557c0cc424e9:line/region 21 | ryo:338d4a47f5f4b3b250d1ba13da99a4d7:change\ rest\ of\ line 22 | ryo:383c5ebfbe83b7f3909fb586fad43303:surround 23 | ryo:387d4eb23bd670ec587cbb4f419c5285:recenter 24 | ryo:397a83ee2f149488d7befdb1e9d37ef9:change\ rest\ of\ line 25 | ryo:3b4de6bfee978cda9fbfd533eb6b619e:prev\ char 26 | ryo:3b5ff6385e5bc8f7bc61550b52b5d807:end\ of\ line 27 | ryo:3f5c328e4371c0d467e4c35fb044e295:pairs 28 | ryo:42b40417f5699bd9b798e75c854435c8:continue\ char\ back 29 | ryo:448d351be6b96f0d03006bc1b7f26005:prev\ selection/exchange\ selection 30 | ryo:4aaf04fe48afa26e80280149dac22e08:next\ char 31 | ryo:53b30d6e93958ac24aaa9cd3e8900c05:prev\ line 32 | ryo:5c270435746ade06f1fa52b9040fa75e:paste 33 | ryo:5c413f1850bc4e67b899d6f007f99154:undo 34 | ryo:5dda49ae5f7861ffbbbcd01d47d55745:delete\ char 35 | ryo:66a291f2c332a7f93d3ab5d1908e29df:start\ of\ buffer 36 | ryo:6d4202fc8a4bc64f4ae366cad016d448:open 37 | ryo:7f33085e6ca233c78a85c73419b5d27b:next\ para 38 | ryo:848b1d4c3d1ae485709df48d826047bd:word 39 | ryo:8628beab3b735c231dec1454d5e52aaa:next\ like\ this 40 | ryo:8d526cc7c75e2989b0c245f4e7fbf884:append\ end\ of\ line 41 | ryo:8f441a01654c7767fc44cd8931130317:word 42 | ryo:914d0a2ad8701c2b7e34a57fab70e4ab:end\ of\ buffer 43 | ryo:9423fbf987ffa1e4f72349ad8b521065:to\ end\ of\ word 44 | ryo:9aa38e17efbb2434c1e52d95c6145109:append 45 | ryo:9c18ac4c2959ab93895fdf9ea12e378b:to\ end\ of\ word 46 | ryo:9ce0af9cd3be773359309a09167a248b:scratch 47 | ryo:9e00663a69ce1ebcce54a8e7755de96a:next\ char\(s\) 48 | ryo:a1084d7db2ccb883ce9f47af4ba5db28:duplicate\ line/region 49 | ryo:a4e3ce2a56110bbda0134b8ec48025c6:interrupt 50 | ryo:ab2e3db597a537266eeaf6ea5bd6402f:open\ up 51 | ryo:b0149f53ca1e7fbb80ec479545786acc:insert 52 | ryo:bab6212da68063bb4a06af4d78a91764:dwim 53 | ryo:bcc1362392d5de0552e7ccb28c9fb0eb:beginning\ of\ line 54 | ryo:c5a5f7db0cfbf4dd58f7bab9f41dfb84:symbol 55 | ryo:d1fef67c9330c295d0b9d4d1f7352e9a:to\ end\ of\ word 56 | ryo:dff4676e9e13ff5ff13e695aac818e69:next\ word 57 | ryo:efc40336295ecb767ca17f53da17c18d:start\ of\ line 58 | ryo:f6a89d6c77c72ebf8134ae9c8d49757a:save\ buffer 59 | ryo:f702bcc409103f4740210958b21e5b8a:prev\ para 60 | ryo:fdd9ffea27f18efb32ef8d404f4ce6b8:pairs 61 | ryo:fe92aee84503d2040efde07672f5034c:insert\ start\ of\ line 62 | sk/enable-ryo-modal-mode 63 | sk/kill-region-or-backward-word 64 | sk/remove-mark 65 | sp-backward-delete-char 66 | sp-kill-hybrid-sexp 67 | wgrep-finish-edit 68 | )) 69 | 70 | (setq mc/cmds-to-run-once 71 | '( 72 | ryo:0b77cc277a66d90956a76cb9470e7936:search\ in\ buffer 73 | ryo:982ea0399e8b956527174c22290941db:last\ buffer 74 | sp-delete-char 75 | )) 76 | -------------------------------------------------------------------------------- /lang/matlab-mode/srecode-matlab.el: -------------------------------------------------------------------------------- 1 | ;;; srecode-matlab.el --- Extra SRecode support for MATLAB 2 | ;; 3 | ;; Copyright (C) 2014 Eric Ludlam 4 | ;; 5 | ;; Author: Eric Ludlam 6 | ;; X-RCS: $Id$ 7 | ;; 8 | ;; This program is free software; you can redistribute it and/or 9 | ;; modify it under the terms of the GNU General Public License as 10 | ;; published by the Free Software Foundation, either version 3 of the 11 | ;; License, or (at your option) any later version. 12 | 13 | ;; This program is distributed in the hope that it will be useful, but 14 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ;; General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with this program. If not, see http://www.gnu.org/licenses/. 20 | 21 | ;;; Commentary: 22 | ;; 23 | ;; Support some extra dictionary entries for MATLAB code. 24 | 25 | (require 'srecode) 26 | (require 'srecode/dictionary) 27 | (require 'srecode/semantic) 28 | (require 'matlab) 29 | 30 | ;;; Code: 31 | 32 | ;;; :matlab ARGUMENT HANDLER 33 | ;; 34 | ;; When a :matlab argument is required, fill the dictionary info 35 | ;; with this MATLAB specific stuff. 36 | ;; 37 | ;; Error if not in MATLAB mode. 38 | 39 | ;;;###autoload 40 | (defun srecode-semantic-handle-:matlab (dict) 41 | "Add macros into the dictionary DICT based on the current MATLAB buffer. 42 | Adds the following: 43 | FILE_SYMBOL - The file name as a symbol. 44 | FILE_DOC_SYMBOL - The file name as a symbol for doc strings. 45 | PACKAGE - The package this file is in, or empty if none. 46 | FILE_CLASS - Show section if filename should be a class. 47 | FILE_FUNCTION - Show setion if filename is a function. 48 | 49 | On class prediction - when filling in an empty file, if the filename and directory it is in 50 | match, for example @foo/foo.m then foo should be a classdef." 51 | (when (not (eq major-mode 'matlab-mode)) 52 | (error "Wrong mode for :matlab argument")) 53 | (let* ((fsym (file-name-sans-extension (file-name-nondirectory (buffer-file-name)))) 54 | (dir (directory-file-name (file-name-directory (buffer-file-name)))) 55 | (dsym (file-name-nondirectory dir))) 56 | ;; Convert the file name to a symbol. 57 | (srecode-dictionary-set-value dict "FILE_SYMBOL" fsym) 58 | (srecode-dictionary-set-value dict "FILE_DOC_SYMBOL" (upcase fsym)) 59 | ;; Check that dsym and fsym are the same 60 | (if (string= dsym (concat "@" fsym)) 61 | (srecode-dictionary-show-section dict "FILE_CLASS") 62 | (srecode-dictionary-show-section dict "FILE_FUNCTION")) 63 | ;; Now look at the stack of directories to see what the package name 64 | ;; might be. 65 | (let ((package "") 66 | (next (file-name-nondirectory dir))) 67 | (setq dir (file-name-directory dir)) 68 | ;; Keep scanning for packages while there is a + in the path. 69 | (while (and (> (length dir) 0) (string-match "/\\+\\w" dir)) 70 | (let ((first (aref next 0)) 71 | (rest (substring next 1))) 72 | (if (= first ?+) 73 | (setq package (concat rest "." package)) 74 | (setq dir "")) 75 | ;; Setup for next iteration. 76 | (setq dir (directory-file-name (directory-file-name dir))) 77 | (setq next (file-name-nondirectory dir)) 78 | )) 79 | (srecode-dictionary-set-value dict "PACKAGE" package) 80 | ))) 81 | 82 | (provide 'srecode-matlab) 83 | 84 | ;;; srecode-matlab.el ends here 85 | -------------------------------------------------------------------------------- /lang/matlab-mode/company-matlab-shell.el: -------------------------------------------------------------------------------- 1 | ;;; company-matlab-shell.el --- a matlab-shell-mode completion back-end for AUCTeX 2 | ;; 3 | ;; Copyright (C) 2009 David Engster 4 | ;; 5 | ;; This program is free software; you can redistribute it and/or 6 | ;; modify it under the terms of the GNU General Public License 7 | ;; as published by the Free Software Foundation; either version 2 8 | ;; of the License, or (at your option) any later version. 9 | ;; 10 | ;; This program is distributed in the hope that it will be useful, 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ;; GNU General Public License for more details. 14 | ;; 15 | ;; You should have received a copy of the GNU General Public License 16 | ;; along with this program. If not, see . 17 | 18 | (condition-case nil 19 | (require 'company) 20 | (error nil)) 21 | (eval-when-compile (require 'cl)) 22 | (require 'matlab) 23 | 24 | ;; the following code is mostly taken from matlab.el, (C) Eric M. Ludlam 25 | (defun company-matlab-shell-tab () 26 | "Send [TAB] to the currently running matlab process and retrieve completion." 27 | (goto-char (point-max)) 28 | (let ((inhibit-field-text-motion t)) 29 | (beginning-of-line)) 30 | (re-search-forward comint-prompt-regexp) 31 | (let* ((lastcmd (buffer-substring (point) (matlab-point-at-eol))) 32 | (tempcmd lastcmd) 33 | (completions nil) 34 | (limitpos nil)) 35 | ;; search for character which limits completion, and limit command to it 36 | (setq limitpos 37 | (if (string-match ".*\\([( /[,;=']\\)" lastcmd) 38 | (1+ (match-beginning 1)) 39 | 0)) 40 | (setq lastcmd (substring lastcmd limitpos)) 41 | ;; Whack the old command so we can insert it back later. 42 | (delete-region (+ (point) limitpos) (matlab-point-at-eol)) 43 | ;; double every single quote 44 | (while (string-match "[^']\\('\\)\\($\\|[^']\\)" tempcmd) 45 | (setq tempcmd (replace-match "''" t t tempcmd 1))) 46 | ;; collect the list 47 | (setq completions (matlab-shell-completion-list tempcmd)) 48 | (goto-char (point-max)) 49 | (insert lastcmd) 50 | completions)) 51 | 52 | (defun company-matlab-shell-grab-symbol () 53 | (when (string= (buffer-name (current-buffer)) (concat "*" matlab-shell-buffer-name "*")) 54 | (save-excursion 55 | (goto-char (point-max)) 56 | (let ((inhibit-field-text-motion t)) 57 | (beginning-of-line)) 58 | (re-search-forward comint-prompt-regexp) 59 | (let* ((lastcmd (buffer-substring (point) (matlab-point-at-eol))) 60 | limitpos) 61 | (setq limitpos 62 | (if (string-match ".*\\([( /[,;=']\\)" lastcmd) 63 | (1+ (match-beginning 1)) 64 | 0)) 65 | (substring-no-properties lastcmd limitpos))))) 66 | 67 | 68 | (defun company-matlab-shell-get-completions () 69 | (when (string= (buffer-name (current-buffer)) (concat "*" matlab-shell-buffer-name "*")) 70 | (mapcar 'car (company-matlab-shell-tab)))) 71 | 72 | ;;;###autoload 73 | (defun company-matlab-shell (command &optional arg &rest ignored) 74 | "A `company-mode' completion back-end for Matlab-Shell." 75 | (interactive (list 'interactive)) 76 | (case command 77 | ('interactive (company-begin-backend 'company-matlab-shell)) 78 | ('prefix (company-matlab-shell-grab-symbol)) 79 | ('candidates (company-matlab-shell-get-completions)) 80 | ('sorted t))) 81 | 82 | (provide 'company-matlab-shell) 83 | ;;; company-matlab-shell.el ends here 84 | -------------------------------------------------------------------------------- /lang/sk-debug.el: -------------------------------------------------------------------------------- 1 | ;; realgud - improved debugger 2 | (use-package realgud 3 | :ensure t 4 | :commands 5 | (realgud:backtrace-describe 6 | realgud:backtrace-init 7 | realgud:bashdb 8 | realgud:bashdb-customize 9 | realgud:cmd-backtrace 10 | realgud:cmd-break 11 | realgud:cmd-clear 12 | realgud:cmd-continue 13 | realgud:cmd-delete 14 | realgud:cmd-disable 15 | realgud:cmd-enable 16 | realgud:cmd-eval 17 | realgud:cmd-eval-at-point 18 | realgud:cmd-eval-dwim 19 | realgud:cmd-eval-region 20 | realgud:cmd-finish 21 | realgud:cmd-frame 22 | realgud:cmd-jump 23 | realgud:cmd-kill 24 | realgud:cmd-newer-frame 25 | realgud:cmd-next 26 | realgud:cmd-next-no-arg 27 | realgud:cmd-older-frame 28 | realgud:cmd-quit 29 | realgud:cmd-repeat-last 30 | realgud:cmd-restart 31 | realgud:cmd-shell 32 | realgud:cmd-step 33 | realgud:cmd-step-no-arg 34 | realgud:cmd-terminate 35 | realgud:cmd-until 36 | realgud:cmdbuf-follow-buffer 37 | realgud:cmdbuf-info-describe 38 | realgud:flake8-goto-msg-line 39 | realgud:follow 40 | realgud:follow-event 41 | realgud:follow-point 42 | realgud:gdb 43 | realgud:gdb-customize 44 | realgud:gdb-pid 45 | realgud:gdb-pid-associate 46 | realgud:gdb-reset 47 | realgud:gdb-track-mode 48 | realgud:goto-debugger-backtrace-line 49 | realgud:goto-debugger-loc-line 50 | realgud:goto-lang-backtrace-line 51 | realgud:goto-loc-hist-4 52 | realgud:goto-loc-hist-5 53 | realgud:goto-loc-hist-6 54 | realgud:goto-loc-hist-7 55 | realgud:goto-loc-hist-8 56 | realgud:goto-loc-hist-9 57 | realgud:goto-maven-errmsg-line 58 | realgud:gub-customize 59 | realgud:gub-goto-location 60 | realgud:gub-goto-panic-location 61 | realgud:info-mode 62 | realgud:ipdb 63 | realgud:ipdb-backend-complete 64 | realgud:ipdb-customize 65 | realgud:ipdb-remote 66 | realgud:jdb 67 | realgud:jdb-customize 68 | realgud:jdb-goto-control-frame-line 69 | realgud:jdb-goto-syntax-error-line 70 | realgud:jdb-track-mode 71 | realgud:kshdb 72 | realgud:kshdb-customize 73 | realgud:loc-describe 74 | realgud:nodejs 75 | realgud:nodejs-customize 76 | realgud:nodejs-reset 77 | realgud:pdb-customize 78 | realgud:pdb-delayed 79 | realgud:pdb-remote 80 | realgud:perl-goto-errmsg-line 81 | realgud:perldb 82 | realgud:perldb-customize 83 | realgud:perldb-reset 84 | realgud:pytest-goto-errmsg-line 85 | realgud:rails-goto-backtrace-line 86 | realgud:rdebug 87 | realgud:rdebug-customize 88 | realgud:reload-features 89 | realgud:remake 90 | realgud:remake-customize 91 | realgud:remove-ansi-schmutz 92 | realgud:reset 93 | realgud:rspec-goto-backtrace-line 94 | realgud:rubinius-goto-Xagent-backtrace-line 95 | realgud:ruby-goto-backtrace-line 96 | realgud:ruby-goto-dollar-bang-line 97 | realgud:send-input 98 | realgud:srcbuf-info-describe 99 | realgud:terminate 100 | realgud:terminate-srcbuf 101 | realgud:tooltip-eval 102 | realgud:track-from-region 103 | realgud:track-mode-disable 104 | realgud:track-mode-enable 105 | realgud:track-set-debugger 106 | realgud:trepan 107 | realgud:trepan-customize 108 | realgud:trepan-goto-control-frame-line 109 | realgud:trepan-goto-syntax-error-line 110 | realgud:trepan.pl 111 | realgud:trepan2 112 | realgud:trepan2-customize 113 | realgud:trepan2-delayed 114 | realgud:trepan3k 115 | realgud:trepan3k-customize 116 | realgud:trepan3k-delayed 117 | realgud:trepanjs 118 | realgud:trepanjs-customize 119 | realgud:trepanjs-goto-syntax-error-line 120 | realgud:trepanjs-reset 121 | realgud:trepanpl-customize 122 | realgud:trepanpl-goto-syntax-error-line 123 | realgud:trepanpl-reset 124 | realgud:trepanpl-track-mode 125 | realgud:window-bt 126 | realgud:window-bt-undisturb-src 127 | realgud:zshdb 128 | realgud:zshdb-customize 129 | realgud:pdb)) 130 | 131 | (defun sk/realgud-backtrace () 132 | "realgud backtrace" 133 | (interactive) 134 | (require 'realgud) 135 | (realgud:cmd-backtrace)) 136 | 137 | ;; provide debugging configuration 138 | (provide 'sk-debug) 139 | -------------------------------------------------------------------------------- /lang/sk-sql.el: -------------------------------------------------------------------------------- 1 | ;; sql operator bindings 2 | (defun sk/sql-operator () 3 | "operator text object bindings for sql" 4 | (interactive) 5 | (eval `(ryo-modal-major-mode-keys 6 | 'sql-mode 7 | ("m s" ,text-objects :then '(sql-send-region))))) 8 | 9 | (use-package sql 10 | :ensure t 11 | :mode ("\\.sql\\'" . sql-mode) 12 | :hook ((sql-mode . sk/sql-operator) 13 | (sql-mode . sk/company-sql)) 14 | :commands 15 | (sql-ms 16 | sql-db2 17 | sql-help 18 | sql-mode 19 | sql-mysql 20 | sql-solid 21 | sql-ingres 22 | sql-linter 23 | sql-oracle 24 | sql-sqlite 25 | sql-sybase 26 | sql-connect 27 | sql-vertica 28 | sql-informix 29 | sql-postgres 30 | sql-interbase 31 | sql-magic-go 32 | sql-mode-menu 33 | sql-copy-column 34 | sql-send-buffer 35 | sql-send-region 36 | sql-send-string 37 | sql-set-product 38 | sql-rename-buffer 39 | sql-send-paragraph 40 | sql-save-connection 41 | sql-magic-semicolon 42 | sql-product-interactive 43 | sql-set-sqli-buffer 44 | sql-show-sqli-buffer 45 | sql-end-of-statement 46 | sql-accumulate-and-indent 47 | sql-highlight-ms-keywords 48 | sql-interactive-mode-menu 49 | sql-beginning-of-statement 50 | sql-highlight-db2-keywords 51 | sql-highlight-ansi-keywords 52 | sql-highlight-mysql-keywords 53 | sql-highlight-solid-keywords 54 | sql-highlight-ingres-keywords 55 | sql-highlight-oracle-keywords 56 | sql-highlight-sqlite-keywords 57 | sql-highlight-sybase-keywords 58 | sql-highlight-vertica-keywords 59 | sql-highlight-informix-keywords 60 | sql-highlight-postgres-keywords 61 | sql-highlight-interbase-keywords 62 | sql-set-sqli-buffer-generally 63 | sql-toggle-pop-to-buffer-after-send-region 64 | sql-list-all 65 | sql-list-table 66 | sql-highlight-linter-keywords 67 | sql-send-line-and-next) 68 | ) 69 | 70 | ;; bindings 71 | (ryo-modal-major-mode-keys 72 | 'sql-mode 73 | ;; sql db 74 | ("m r r" sql-connect :name "connect") 75 | ("m r s" sql-mysql :name "mysql") 76 | ("m r p" sql-postgres :name "postgres") 77 | ("m r l" sql-sqlite :name "sqlite") 78 | 79 | ;; interactive 80 | ("m z" sql-show-sqli-buffer :name "show shell") 81 | ("m m" sql-send-buffer :name "run file") 82 | ("m c" sql-send-string :name "command") 83 | ("m s r" sql-send-region :name "region") 84 | ("m k" sql-send-paragraph :name "send para") 85 | ("m l" sql-send-line-and-next :name "send line") 86 | 87 | ;; functions 88 | ("m a" sql-list-all :name "list all") 89 | ("m t" sql-list-table :name "list table") 90 | ("m n" sql-rename-buffer :name "rename") 91 | ("m o" sql-copy-column :name "copy column") 92 | ("m i" sql-product-interactive :name "interactive prod") 93 | ("m p" sql-set-product :name "set product")) 94 | 95 | ;; which key hints 96 | (which-key-add-major-mode-key-based-replacements 'sql-mode 97 | "m r" "run" 98 | 99 | "m s" "eval" 100 | "m s i" "inside" 101 | "m s a" "around" 102 | "m s g" "global") 103 | 104 | ;; bindings 105 | (ryo-modal-major-mode-keys 106 | 'sql-interactive-mode 107 | ;; sql db 108 | ("m r r" sql-connect :name "connect") 109 | ("m r s" sql-mysql :name "mysql") 110 | ("m r p" sql-postgres :name "postgres") 111 | ("m r l" sql-sqlite :name "sqlite") 112 | 113 | ;; interactive 114 | ("m z" sql-show-sqli-buffer :name "show shell") 115 | ("m m" sql-send-buffer :name "run file") 116 | ("m c" sql-send-string :name "command") 117 | ("m s r" sql-send-region :name "region") 118 | ("m k" sql-send-paragraph :name "send para") 119 | ("m l" sql-send-line-and-next :name "send line") 120 | 121 | ;; functions 122 | ("m a" sql-list-all :name "list all") 123 | ("m t" sql-list-table :name "list table") 124 | ("m n" sql-rename-buffer :name "rename") 125 | ("m o" sql-copy-column :name "copy column") 126 | ("m i" sql-product-interactive :name "interactive prod") 127 | ("m p" sql-set-product :name "set product")) 128 | 129 | ;; which key hints 130 | (which-key-add-major-mode-key-based-replacements 'sql-interactive-mode 131 | "m r" "run" 132 | 133 | "m s" "eval" 134 | "m s i" "inside" 135 | "m s a" "around" 136 | "m s g" "global") 137 | 138 | ;; provide this configuration 139 | (provide 'sk-sql) 140 | -------------------------------------------------------------------------------- /.bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return;; 9 | esac 10 | 11 | # don't put duplicate lines or lines starting with space in the history. 12 | # See bash(1) for more options 13 | HISTCONTROL=ignoreboth 14 | 15 | # append to the history file, don't overwrite it 16 | shopt -s histappend 17 | 18 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 19 | HISTSIZE=1000 20 | HISTFILESIZE=2000 21 | 22 | # check the window size after each command and, if necessary, 23 | # update the values of LINES and COLUMNS. 24 | shopt -s checkwinsize 25 | 26 | # If set, the pattern "**" used in a pathname expansion context will 27 | # match all files and zero or more directories and subdirectories. 28 | #shopt -s globstar 29 | 30 | # make less more friendly for non-text input files, see lesspipe(1) 31 | #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 32 | 33 | # set variable identifying the chroot you work in (used in the prompt below) 34 | if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 35 | debian_chroot=$(cat /etc/debian_chroot) 36 | fi 37 | 38 | # set a fancy prompt (non-color, unless we know we "want" color) 39 | case "$TERM" in 40 | xterm-color|*-256color) color_prompt=yes;; 41 | esac 42 | 43 | # uncomment for a colored prompt, if the terminal has the capability; turned 44 | # off by default to not distract the user: the focus in a terminal window 45 | # should be on the output of commands, not on the prompt 46 | #force_color_prompt=yes 47 | 48 | if [ -n "$force_color_prompt" ]; then 49 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 50 | # We have color support; assume it's compliant with Ecma-48 51 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 52 | # a case would tend to support setf rather than setaf.) 53 | color_prompt=yes 54 | else 55 | color_prompt= 56 | fi 57 | fi 58 | 59 | if [ "$color_prompt" = yes ]; then 60 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 61 | else 62 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 63 | fi 64 | unset color_prompt force_color_prompt 65 | 66 | # If this is an xterm set the title to user@host:dir 67 | case "$TERM" in 68 | xterm*|rxvt*) 69 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 70 | ;; 71 | *) 72 | ;; 73 | esac 74 | 75 | # enable color support of ls and also add handy aliases 76 | if [ -x /usr/bin/dircolors ]; then 77 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 78 | alias ls='ls --color=auto' 79 | #alias dir='dir --color=auto' 80 | #alias vdir='vdir --color=auto' 81 | 82 | #alias grep='grep --color=auto' 83 | #alias fgrep='fgrep --color=auto' 84 | #alias egrep='egrep --color=auto' 85 | fi 86 | 87 | # colored GCC warnings and errors 88 | #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 89 | 90 | export EDITOR='nvim' 91 | 92 | # Alias definitions. 93 | # You may want to put all your additions into a separate file like 94 | # ~/.bash_aliases, instead of adding them here directly. 95 | # See /usr/share/doc/bash-doc/examples in the bash-doc package. 96 | 97 | if [ -f ~/.bash_aliases ]; then 98 | source ~/.bash_aliases 99 | fi 100 | 101 | # Custom functions 102 | if [ -f ~/.functions ]; then 103 | source ~/.functions 104 | fi 105 | 106 | # enable programmable completion features (you don't need to enable 107 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 108 | # sources /etc/bash.bashrc). 109 | if ! shopt -oq posix; then 110 | if [ -f /usr/share/bash-completion/bash_completion ]; then 111 | source /usr/share/bash-completion/bash_completion 112 | elif [ -f /etc/bash_completion ]; then 113 | source /etc/bash_completion 114 | fi 115 | fi 116 | 117 | [ -f ~/.fzf.bash ] && source ~/.fzf.bash 118 | 119 | # python virtualenv 120 | source ~/.virtualenvs/global/bin/activate 121 | 122 | # start tmux 123 | tmux 124 | -------------------------------------------------------------------------------- /lang/matlab-mode/dl_emacs_support.m: -------------------------------------------------------------------------------- 1 | function dl_emacs_support(varargin) 2 | % Download MATLAB support files for Emacs 3 | % 4 | % DL_EMACS_SUPPRT - download all Emacs support files into the 5 | % current directory. 6 | % 7 | % DL_EMACS_SUPPORT(FILESET) - download a FILESET of Emacs support. 8 | % Sets are: 9 | % dl - Download a new version of this download script. 10 | % core - Just the core MATLAB support files. 11 | % tlc - Just the core MATLAB/TLC support files. 12 | % cedet - Core, plus additional support for MATLAB using CEDET support. 13 | % Learn more about CEDET at: http://cedet.sf.net 14 | % support - Just the build files and READMEs for compiling. 15 | % all - All files 16 | % 17 | % DL_EMACS_SUPPORT(FILESET,DEST) - download FILESET and save in 18 | % destination directory DEST 19 | % 20 | % For the most reliable refresh of the repository, run these two 21 | % commands, the frist will make sure the downloader is current. 22 | % 23 | % dl_emacs_support dl 24 | % dl_emacs_support 25 | % 26 | % On unix, you can then execute: 27 | % 28 | % !make 29 | % 30 | % to compile. 31 | 32 | po = inputParser; 33 | 34 | addOptional(po, 'fileset', 'all', @ischar) 35 | addOptional(po, 'destination', pwd, @ischar) 36 | 37 | po.parse(varargin{:}); 38 | 39 | stuff = po.Results; 40 | 41 | if exist(stuff.destination,'dir') ~= 7 42 | error(['The folder: ''',stuff.destination, ''', does not exist.']); 43 | end 44 | 45 | downloader = { 'dl_emacs_support.m' }; 46 | 47 | coreFiles = { 'matlab-load.el' 'matlab.el' 'mlint.el' ... 48 | 'matlab-publish.el' 'company-matlab-shell.el' ... 49 | 'linemark.el' ... 50 | 'toolbox/emacsinit.m' 'toolbox/opentoline.m' 'toolbox/emacsdocomplete.m' }; 51 | tlcFiles = { 'tlc.el' }; 52 | cedetFiles = { 'cedet-matlab.el' 'semantic-matlab.el' ... 53 | 'semanticdb-matlab.el' 'srecode-matlab.el' ... 54 | 'templates/srecode-matlab.srt' }; 55 | supportFiles = { 'README.org' 'INSTALL' 'ChangeLog' ... 56 | 'Project.ede' 'Makefile' ... 57 | 'toolbox/Project.ede' 'toolbox/Makefile' ... 58 | 'templates/Project.ede' 'templates/Makefile'}; 59 | 60 | switch stuff.fileset 61 | case 'dl' 62 | getfiles(downloader); 63 | case 'core' 64 | mktoolboxdir 65 | getfiles(coreFiles); 66 | case 'tlc' 67 | mktoolboxdir 68 | getfiles(coreFiles); 69 | getfiles(tlcFiles); 70 | case 'cedet' 71 | mktoolboxdir 72 | getfiles(coreFiles); 73 | mktemplatedir; 74 | getfiles(cedetFiles); 75 | case 'support' 76 | mktemplatedir; 77 | getfiles(supportFiles); 78 | case 'all' 79 | mktoolboxdir 80 | getfiles(coreFiles); 81 | getfiles(tlcFiles); 82 | mktemplatedir; 83 | getfiles(cedetFiles); 84 | getfiles(supportFiles); 85 | otherwise 86 | error('Unknown fileset %s.', stuff.fileset); 87 | end 88 | 89 | function mktemplatedir 90 | templateDir = fullfile(stuff.destination,'templates'); 91 | if ~exist(templateDir,'dir') 92 | mkdir(templateDir); 93 | end 94 | end 95 | 96 | function mktoolboxdir 97 | toolboxDir = fullfile(stuff.destination,'toolbox'); 98 | if ~exist(toolboxDir,'dir') 99 | mkdir(toolboxDir); 100 | end 101 | end 102 | 103 | function getfiles(fList) 104 | for i = 1:length(fList) 105 | file = fList{i}; 106 | destFullFile = fullfile(stuff.destination,file); 107 | [ contents status ] = ... 108 | urlread(['https://sourceforge.net/p/matlab-emacs/src/ci/master/tree/cedet-matlab.el?format=raw',... 109 | file,'?revision=HEAD']); 110 | if ~status 111 | fprintf('Unable to download %s.\n', file); 112 | else 113 | fid = fopen(destFullFile,'w'); 114 | fwrite(fid,contents); 115 | fclose(fid); 116 | fprintf('Successfully downloaded and created: ''%s''.\n',... 117 | destFullFile); 118 | end 119 | end 120 | end 121 | end 122 | 123 | -------------------------------------------------------------------------------- /.functions: -------------------------------------------------------------------------------- 1 | # merge pdfs using ghostscript 2 | gsmerge () { 3 | gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf $1 $2 4 | } 5 | 6 | # pandoc convert from markdown to pdf 7 | mdtopdf () { 8 | pandoc -V geometry:margin=1in $1 -o $2 9 | } 10 | 11 | # k - kill processes - list only the ones you can kill. Modified the earlier script. 12 | k() { 13 | local pid 14 | if [ "$UID" != "0" ]; then 15 | pid=$(ps -f -u $UID | sed 1d | fzf -m | awk '{print $2}') 16 | else 17 | pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') 18 | fi 19 | 20 | if [ "x$pid" != "x" ] 21 | then 22 | echo $pid | xargs kill -${1:-9} 23 | fi 24 | } 25 | 26 | # f - cd to selected directory 27 | f() { 28 | local dir 29 | dir=$(find ${1:-.} -path '*/\.*' -prune \ 30 | -o -type d -print 2> /dev/null | fzf +m) && 31 | cd "$dir" 32 | } 33 | 34 | # Another fd - cd into the selected directory 35 | # This one differs from the above, by only showing the sub directories and not 36 | # showing the directories within those. 37 | j() { 38 | DIR=`find * -maxdepth 0 -type d -print 2> /dev/null | fzf-tmux` \ 39 | && cd "$DIR" 40 | } 41 | 42 | # l - cd to selected parent directory 43 | l() { 44 | local declare dirs=() 45 | get_parent_dirs() { 46 | if [[ -d "${1}" ]]; then dirs+=("$1"); else return; fi 47 | if [[ "${1}" == '/' ]]; then 48 | for _dir in "${dirs[@]}"; do echo $_dir; done 49 | else 50 | get_parent_dirs $(dirname "$1") 51 | fi 52 | } 53 | local DIR=$(get_parent_dirs $(realpath "${1:-$PWD}") | fzf-tmux --tac) 54 | cd "$DIR" 55 | } 56 | 57 | # d - fuzzy cd from anywhere 58 | # ex: d word1 word2 ... (even part of a file name) 59 | # zsh autoload function 60 | d() { 61 | local file 62 | 63 | file="$(locate -Ai -0 $@ | grep -z -vE '~$' | fzf --read0 -0 -1)" 64 | 65 | if [[ -n $file ]] 66 | then 67 | if [[ -d $file ]] 68 | then 69 | cd -- $file 70 | else 71 | cd -- ${file:h} 72 | fi 73 | fi 74 | } 75 | 76 | # c - git commit browser 77 | c() { 78 | git log --graph --color=always \ 79 | --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | 80 | fzf --ansi --no-sort --reverse --tiebreak=index --bind=ctrl-s:toggle-sort \ 81 | --bind "ctrl-m:execute: 82 | (grep -o '[a-f0-9]\{7\}' | head -1 | 83 | xargs -I % sh -c 'git show --color=always % | less -R') << 'FZF-EOF' 84 | {} 85 | FZF-EOF" 86 | } 87 | 88 | # x - create new tmux session, or switch to existing one. Works from within tmux too. (@bag-man) 89 | # `x` will allow you to select your tmux session via fzf. 90 | # `x irc` will attach to the irc session (if it exists), else it will create it. 91 | 92 | x() { 93 | [[ -n "$TMUX" ]] && change="switch-client" || change="attach-session" 94 | if [ $1 ]; then 95 | tmux $change -t "$1" 2>/dev/null || (tmux new-session -d -s $1 && tmux $change -t "$1"); return 96 | fi 97 | session=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0) && tmux $change -t "$session" || echo "No sessions found." 98 | } 99 | 100 | # ftpane - switch pane (@george-b) 101 | ftpane() { 102 | local panes current_window current_pane target target_window target_pane 103 | panes=$(tmux list-panes -s -F '#I:#P - #{pane_current_path} #{pane_current_command}') 104 | current_pane=$(tmux display-message -p '#I:#P') 105 | current_window=$(tmux display-message -p '#I') 106 | 107 | target=$(echo "$panes" | grep -v "$current_pane" | fzf +m --reverse) || return 108 | 109 | target_window=$(echo $target | awk 'BEGIN{FS=":|-"} {print$1}') 110 | target_pane=$(echo $target | awk 'BEGIN{FS=":|-"} {print$2}' | cut -c 1) 111 | 112 | if [[ $current_window -eq $target_window ]]; then 113 | tmux select-pane -t ${target_window}.${target_pane} 114 | else 115 | tmux select-pane -t ${target_window}.${target_pane} && 116 | tmux select-window -t $target_window 117 | fi 118 | } 119 | 120 | # mkdir and move there 121 | mkd () { 122 | mkdir -p "$1" 123 | cd $1 124 | } 125 | 126 | # search pdfs and within pdfs 127 | p () { 128 | open=mupdf # this will open pdf file withthe default PDF viewer on KDE, xfce, LXDE and perhaps on other desktops. 129 | 130 | ag -U -g ".pdf$" \ 131 | | fast-p \ 132 | | fzf --read0 --reverse -e -d $'\t' \ 133 | --preview-window down:80% --preview ' 134 | v=$(echo {q} | tr " " "|"); 135 | echo -e {1}"\n"{2} | grep -E "^|$v" -i --color=always; 136 | ' \ 137 | | cut -z -f 1 -d $'\t' | tr -d '\n' | xargs -r --null $open > /dev/null 2> /dev/null 138 | } 139 | 140 | -------------------------------------------------------------------------------- /lang/sk-text.el: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;; 2 | ;; Markdown ;; 3 | ;;;;;;;;;;;;;;;;;;;; 4 | 5 | ;; markdown and pandoc support 6 | (use-package markdown-mode 7 | :ensure t 8 | :mode (("\\.txt\\'" . markdown-mode) 9 | ("\\.md\\'" . markdown-mode) 10 | ("\\.mkd\\'" . markdown-mode) 11 | ("\\.markdown\\'" . markdown-mode)) 12 | 13 | :config 14 | 15 | ;; pandoc 16 | (use-package pandoc-mode 17 | :ensure t 18 | :diminish pandoc-mode 19 | :config 20 | (add-hook 'markdown-mode-hook 'pandoc-mode)) 21 | 22 | ;; nice hooks 23 | (add-hook 'markdown-mode-hook 'visual-line-mode) 24 | (add-hook 'gfm-mode-hook 'visual-line-mode) 25 | 26 | ;; markdown bindings 27 | (ryo-modal-major-mode-keys 28 | 'markdown-mode 29 | ;; navigation 30 | ("m j" markdown-next-visible-heading :name "next heading") 31 | ("m k" markdown-previous-visible-heading :name "previous heading") 32 | ("m h" markdown-up-heading :name "up heading") 33 | ;; organizing 34 | ("m RET" markdown-follow-thing-at-point :name "jump") 35 | ("m d" markdown-kill-thing-at-point :name "delete") 36 | ("m [" markdown-move-up :name "move up") 37 | ("m ]" markdown-move-down :name "move down") 38 | ("m <" markdown-promote :name "promote") 39 | ("m >" markdown-demote :name "demote") 40 | 41 | ;; inserting 42 | ("m i i" markdown-insert-italic :name "italic" :exit t) 43 | ("m i b" markdown-insert-bold :name "bold" :exit t) 44 | ("m i h" markdown-insert-hr :name "horizontal rule" :exit t) 45 | ("m i l" markdown-insert-link :name "link" :exit t) 46 | ("m i r" markdown-insert-reference-link :name "ref link" :exit t) 47 | ("m i w" markdown-insert-wiki-link :name "wiki link" :exit t) 48 | ("m i u" markdown-insert-uri :name "uri" :exit t) 49 | ("m i f" markdown-insert-footnote :name "footnote" :exit t) 50 | ("m i m" markdown-insert-image :name "image" :exit t) 51 | ("m i g" markdown-insert-reference-image :name "ref image" :exit t) 52 | ("m i c" markdown-insert-gfm-code-block :name "gfm code" :exit t) 53 | ("m i p" markdown-insert-pre :name "pre" :exit t) 54 | ("m i q" markdown-insert-blockquote :name "blockquote" :exit t) 55 | ("m i t" markdown-insert-list-item :name "list item" :exit t) 56 | ("m i k" markdown-insert-kbd :name "kbd" :exit t) 57 | ("m i 1" markdown-insert-header-atx-1 :name "atx h1" :read t) 58 | ("m i 2" markdown-insert-header-atx-2 :name "atx h2" :read t) 59 | ("m i 3" markdown-insert-header-atx-3 :name "atx h3" :read t) 60 | ("m i 4" markdown-insert-header-atx-4 :name "atx h4" :read t) 61 | ("m i 5" markdown-insert-header-atx-5 :name "atx h5" :read t) 62 | ("m i 6" markdown-insert-header-atx-6 :name "atx h6" :read t) 63 | ("m i =" markdown-insert-header-setext-1 :name "setext h1" :read t) 64 | ("m i -" markdown-insert-header-setext-2 :name "setext h2" :read t) 65 | 66 | ;; preview 67 | ("m l" markdown-toggle-inline-images :name "toggle images") 68 | ("m m" markdown-export :name "export") 69 | ("m x" markdown-export-and-preview :name "export and preview") 70 | ("m v" markdown-preview :name "markdown preview") 71 | ("m c" markdown-check-refs :name "check refs") 72 | ("m n" markdown-cleanup-list-numbers :name "cleanup list numbers") 73 | ("m o" markdown-complete-buffer :name "complete buffer") 74 | ("m w" markdown-other-window :name "other window") 75 | ;; pandoc 76 | ("m g" pandoc-main-hydra/body :name "pandoc"))) 77 | 78 | ;; ryo major mode hints 79 | (which-key-add-major-mode-key-based-replacements 'markdown-mode 80 | "m i" "insert" 81 | "m a" "auxiliary") 82 | 83 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 84 | ;; ReStructured Text ;; 85 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 86 | 87 | (use-package rst 88 | :ensure t 89 | :mode (("\\.rst\\'" . rst-mode)) 90 | :commands 91 | (rst-forward-section 92 | rst-backward-section 93 | rst-mark-section 94 | rst-promote-region 95 | rst-demote-region 96 | rst-insert-list 97 | rst-insert-list-new-item 98 | rst-insert-toc 99 | rst-compile 100 | rst-adjust) 101 | :config 102 | 103 | ;; nice hooks 104 | (add-hook 'rst-mode-hook 'visual-line-mode) 105 | 106 | ;; bindings 107 | (ryo-modal-major-mode-keys 108 | 'rst-mode 109 | ;; navigation 110 | ("m j" rst-forward-section :name "next heading") 111 | ("m k" rst-backward-section :name "previous heading") 112 | ;; organizing 113 | ("m d" rst-mark-section :name "mark section") 114 | ("m <" rst-promote-region :name "promote") 115 | ("m >" rst-demote-region :name "demote") 116 | 117 | ;; inserting 118 | ("m i l" rst-insert-list :name "list" :exit t) 119 | ("m i n" rst-insert-list-new-item :name "list item" :exit t) 120 | ("m i t" rst-insert-toc :name "toc" :exit t) 121 | 122 | ;; preview 123 | ("m c" rst-compile :name "compile") 124 | ("m n" rst-adjust :name "adjust"))) 125 | 126 | ;; ryo major mode hints 127 | (which-key-add-major-mode-key-based-replacements 'rst-mode 128 | "m i" "insert") 129 | 130 | ;; provide this config 131 | (provide 'sk-text) 132 | -------------------------------------------------------------------------------- /config/sk-hydra.el: -------------------------------------------------------------------------------- 1 | ;; hydra 2 | (use-package hydra 3 | :ensure t 4 | :defer t) 5 | 6 | ;; smartparens hydra 7 | (defhydra sk/smartparens-hydra (:color red :hint nil) 8 | " 9 | ^Move^ ^Edit^ ^Splice^ 10 | ^^^^^^^^^^^^^-------------------------------------------------------------------------------------------------- 11 | ^ ^ _k_ ^ ^ ^ ^ _p_ ^ ^ _<_: barf backward _u_: unwrap _x_: transpose _S_: splice _q_: quit 12 | _h_ ^+^ _l_ _b_ ^+^ _f_ _>_: barf forward _U_: unwrap back _c_: convolute _F_: forward 13 | ^ ^ _j_ ^ ^ ^ ^ _n_ ^ ^ _)_: slurp forward _d_: delete _r_: raise _B_: backward 14 | _a_: start _e_: end _(_: slurp backward _y_: copy _s_: split _A_: around 15 | " 16 | ("h" sp-backward-sexp) 17 | ("l" sp-forward-sexp) 18 | ("j" sp-next-sexp) 19 | ("k" sp-previous-sexp) 20 | ("p" sp-backward-down-sexp) 21 | ("n" sp-up-sexp) 22 | ("f" sp-down-sexp) 23 | ("b" sp-backward-up-sexp) 24 | ("a" sp-beginning-of-sexp) 25 | ("e" sp-end-of-sexp) 26 | ("<" sp-backward-barf-sexp) 27 | (">" sp-forward-barf-sexp) 28 | ("(" sp-backward-slurp-sexp) 29 | (")" sp-forward-slurp-sexp) 30 | ("u" sp-unwrap-sexp) 31 | ("U" sp-backward-unwrap-sexp) 32 | ("d" sp-kill-sexp) 33 | ("y" sp-copy-sexp) 34 | ("x" sp-transpose-sexp) 35 | ("c" sp-convolute-sexp) 36 | ("r" sp-raise-sexp) 37 | ("s" sp-split-sexp) 38 | ("S" sp-splice-sexp) 39 | ("F" sp-splice-sexp-killing-forward) 40 | ("B" sp-splice-sexp-killing-backward) 41 | ("A" sp-splice-sexp-killing-around) 42 | ("q" nil :color blue)) 43 | 44 | ;; debug adapter protocol 45 | (defhydra sk/dap-hydra (:color red :hint nil) 46 | " 47 | ^Stepping^ ^Switch^ ^Breakpoints^ ^Eval 48 | ^^^^^^^^----------------------------------------------------------------------------------------- 49 | _n_: Next _ss_: Session _bt_: Toggle _ee_: Eval 50 | _i_: Step in _st_: Thread _bd_: Delete _er_: Eval region 51 | _o_: Step out _sf_: Stack frame _ba_: Add _es_: Eval thing at point 52 | _c_: Continue _sl_: List locals _bc_: Set condition _eii_: Inspect 53 | _r_: Restart frame _sb_: List breakpoints _bh_: Set hit count _eir_: Inspect region 54 | _g_: Go _sS_: List sessions _bl_: Set log message _eis_: Inspect thing at point 55 | " 56 | ("n" dap-next) 57 | ("i" dap-step-in) 58 | ("o" dap-step-out) 59 | ("c" dap-continue) 60 | ("r" dap-restart-frame) 61 | ("g" dap-debug) 62 | ("ss" dap-switch-session) 63 | ("st" dap-switch-thread) 64 | ("sf" dap-switch-stack-frame) 65 | ("sl" dap-ui-locals) 66 | ("sb" dap-ui-breakpoints) 67 | ("sS" dap-ui-sessions) 68 | ("bt" dap-breakpoint-toggle) 69 | ("ba" dap-breakpoint-add) 70 | ("bd" dap-breakpoint-delete) 71 | ("bc" dap-breakpoint-condition) 72 | ("bh" dap-breakpoint-hit-condition) 73 | ("bl" dap-breakpoint-log-message) 74 | ("ee" dap-eval) 75 | ("er" dap-eval-region) 76 | ("es" dap-eval-thing-at-point) 77 | ("eii" dap-ui-inspect) 78 | ("eir" dap-ui-inspect-region) 79 | ("eis" dap-ui-inspect-thing-at-point) 80 | ("q" dap-disconnect "quit" :color blue)) 81 | 82 | ;; lsp hydra 83 | (defhydra sk/lsp-hydra (:color pink :hint nil :foreign-keys run) 84 | " 85 | ^Basics^ ^Find^ ^Peek^ ^Workspace 86 | ^^^^^^^^----------------------------------------------------------------------------------------- 87 | _h_: Highlight _d_: Definition _pt_: Type _wa_: Add folder 88 | _n_: Rename _t_: Type _pd_: Definition _wr_: Remove folder 89 | _a_: Code action _i_: Implementation _pi_: Implementation _ws_: Switch folder 90 | _f_: Format _l_: Documentation _ps_: Workspace sym _wd_: Description 91 | _R_: Restart _e_: Declaration _po_: Outline 92 | _Q_: Disconnect _r_: References _pr_: References 93 | " 94 | ("h" lsp-document-highlight :color red) 95 | ("n" lsp-rename :color red) 96 | ("a" lsp-execute-code-action :color red) 97 | ("f" lsp-format-buffer :color red) 98 | ("d" lsp-find-definition :color red) 99 | ("t" lsp-find-type-definition :color red) 100 | ("i" lsp-find-implementation :color red) 101 | ("l" lsp-ui-doc-show :color red) 102 | ("r" lsp-find-references :color red) 103 | ("e" lsp-find-declaration :color red) 104 | ("wa" lsp-workspace-folders-add :color red) 105 | ("wr" lsp-workspace-folders-remove :color red) 106 | ("ws" lsp-workspace-folders-switch :color red) 107 | ("wd" lsp-describe-session :color red) 108 | ("pt" lsp-ui-peek-find-type-definition :color red) 109 | ("pd" lsp-ui-peek-find-definitions :color red) 110 | ("pi" lsp-ui-peek-find-implementation :color red) 111 | ("pr" lsp-ui-peek-find-references :color red) 112 | ("po" lsp-ui-imenu :color red) 113 | ("ps" lsp-ui-peek-find-workspace-symbol :color red) 114 | ("R" lsp-restart-workspace :color red) 115 | ("Q" lsp-shutdown-workspace :color blue) 116 | ("q" nil "quit" :color blue)) 117 | 118 | ;; provide hydra 119 | (provide 'sk-hydra) 120 | -------------------------------------------------------------------------------- /lang/sk-elisp.el: -------------------------------------------------------------------------------- 1 | ;; split ielm 2 | (defun sk/ielm () 3 | "open ielm REPL in a split window" 4 | (interactive) 5 | (split-window-horizontally) 6 | (ielm) 7 | (other-window 1)) 8 | 9 | (defun sk/elisp-debug () 10 | "calls edebug instead of using C-u C-M-x" 11 | (interactive) 12 | (let ((current-prefix-arg 4)) ;; emulate C-u 13 | (call-interactively 'eval-defun))) 14 | 15 | ;; edebug 16 | (use-package edebug 17 | :commands 18 | (edebug-Trace-fast-mode 19 | edebug-top-level-nonstop 20 | edebug-Go-nonstop-mode 21 | edebug-Continue-fast-mode 22 | edebug-where 23 | edebug-top-level 24 | edebug-trace-mode 25 | edebug-go-mode 26 | edebug-set-breakpoint 27 | edebug-unset-breakpoint 28 | edebug-next-breakpoint 29 | edebug-continue-mode 30 | edebug-step-mode 31 | edebug-display-freq-count)) 32 | 33 | (use-package macrostep 34 | :ensure t 35 | :commands 36 | (macrostep-expand 37 | macrostep-collapse 38 | macrostep-collapse-all 39 | macrostep-next-macro 40 | macrostep-prev-macro)) 41 | 42 | (use-package emacs-lisp-mode 43 | :hook ((emacs-lisp-mode . sk/company-elisp))) 44 | 45 | (use-package lisp-interaction-mode 46 | :hook ((lisp-interaction-mode . sk/company-elisp))) 47 | 48 | (ryo-modal-major-mode-keys 49 | 'emacs-lisp-mode 50 | ;; macrostep 51 | ("m e" macrostep-expand :name "macro expand") 52 | ("m c" macrostep-collapse :name "macro collapse") 53 | ("m a" macrostep-collapse-all :name "macro collapse all") 54 | ("m n" macrostep-next-macro :name "macro next") 55 | ("m p" macrostep-prev-macro :name "macro previous") 56 | 57 | ;; semantic navigation 58 | ("m j" find-function :name "jump to function") 59 | ("m d" describe-function :name "doc of function") 60 | ("m v" find-variable :name "jump to variable") 61 | ("m w" describe-variable :name "doc of variable") 62 | ("m l" find-library :name "jump to library") 63 | ("m x" eval-last-sexp :name "eval last expression") 64 | ("m i" eval-print-last-sexp :name "eval and print last expression") 65 | ("m r" sk/ielm :name "run repl") 66 | 67 | ;; eval 68 | ("m s s" eval-region :name "eval region") 69 | 70 | ;; debugging 71 | ("m g g" sk/elisp-debug :name "start debugging") 72 | ("m g o" edebug-go-mode :name "go") 73 | ("m g s" edebug-set-breakpoint :name "set breakpoint") 74 | ("m g x" edebug-unset-breakpoint :name "delete breakpoint") 75 | ("m g b" edebug-next-breakpoint :name "next breakpoint") 76 | ("m g c" edebug-continue-mode :name "continue") 77 | ("m g n" edebug-step-mode :name "step next") 78 | ("m g l" edebug-display-freq-count :name "list frequency") 79 | ("m g t" edebug-trace-mode :name "trace") 80 | ("m g q" edebug-top-level :name "quit") 81 | ("m g w" edebug-where :name "where am i") 82 | ("m g f c" edebug-Continue-fast-mode :name "fast continue") 83 | ("m g f g" edebug-Go-nonstop-mode :name "fast nonstop") 84 | ("m g f q" edebug-top-level-nonstop :name "fast quit") 85 | ("m g f t" edebug-Trace-fast-mode :name "fast trace")) 86 | 87 | (ryo-modal-major-mode-keys 88 | 'lisp-interaction-mode 89 | ;; macrostep 90 | ("m e" macrostep-expand :name "macro expand") 91 | ("m c" macrostep-collapse :name "macro collapse") 92 | ("m a" macrostep-collapse-all :name "macro collapse all") 93 | ("m n" macrostep-next-macro :name "macro next") 94 | ("m p" macrostep-prev-macro :name "macro previous") 95 | 96 | ;; semantic navigation 97 | ("m j" find-function :name "jump to function") 98 | ("m d" describe-function :name "doc of function") 99 | ("m v" find-variable :name "jump to variable") 100 | ("m w" describe-variable :name "doc of variable") 101 | ("m l" find-library :name "jump to library") 102 | ("m x" eval-last-sexp :name "eval last expression") 103 | ("m i" eval-print-last-sexp :name "eval and print last expression") 104 | ("m r" sk/ielm :name "run repl") 105 | 106 | ;; eval 107 | ("m s s" eval-region :name "eval region") 108 | 109 | ;; debugging 110 | ("m g g" sk/elisp-debug :name "start debugging") 111 | ("m g o" edebug-go-mode :name "go") 112 | ("m g s" edebug-set-breakpoint :name "set breakpoint") 113 | ("m g x" edebug-unset-breakpoint :name "delete breakpoint") 114 | ("m g b" edebug-next-breakpoint :name "next breakpoint") 115 | ("m g c" edebug-continue-mode :name "continue") 116 | ("m g n" edebug-step-mode :name "step next") 117 | ("m g l" edebug-display-freq-count :name "list frequency") 118 | ("m g t" edebug-trace-mode :name "trace") 119 | ("m g q" edebug-top-level :name "quit") 120 | ("m g w" edebug-where :name "where am i") 121 | ("m g f c" edebug-Continue-fast-mode :name "fast continue") 122 | ("m g f g" edebug-Go-nonstop-mode :name "fast nonstop") 123 | ("m g f q" edebug-top-level-nonstop :name "fast quit") 124 | ("m g f t" edebug-Trace-fast-mode :name "fast trace")) 125 | 126 | ;; which key hints 127 | (which-key-add-major-mode-key-based-replacements 'emacs-lisp-mode 128 | "m g" "debug" 129 | "m g f" "fast" 130 | 131 | "m s" "eval" 132 | "m s i" "inside" 133 | "m s a" "around" 134 | "m s g" "global") 135 | 136 | ;; which key hints 137 | (which-key-add-major-mode-key-based-replacements 'lisp-interaction-mode 138 | "m g" "debug" 139 | "m g f" "fast" 140 | 141 | "m s" "eval" 142 | "m s i" "inside" 143 | "m s a" "around") 144 | 145 | ;; provide elisp configuration 146 | (provide 'sk-elisp) 147 | -------------------------------------------------------------------------------- /lang/sk-latex.el: -------------------------------------------------------------------------------- 1 | ;; scan and call reftex - useful when using with yasnippet 2 | (defun sk/reftex-reference () 3 | "scan and call reftex-reference" 4 | (interactive) 5 | (let ((current-prefix-arg 4)) ;; emulate C-u 6 | (call-interactively 'reftex-reference))) 7 | 8 | (use-package latex 9 | :ensure auctex 10 | :ensure company-auctex 11 | :ensure company-reftex 12 | :defer t 13 | :diminish reftex-mode 14 | :hook ((auctex-mode . sk/setup-ryo-latex-bindings) 15 | (auctex-mode . sk/company-auctex)) 16 | :bind* (("C-j a e" . company-auctex-environments) 17 | ("C-j a l" . company-auctex-labels) 18 | ("C-j a b" . company-auctex-bibs) 19 | ("C-j a s" . company-auctex-symbols) 20 | ("C-j a m" . company-auctex-macros)) 21 | 22 | :commands 23 | (LaTeX-mark-section 24 | LaTeX-mark-environment 25 | reftex-reference 26 | reftex-label 27 | reftex-citation 28 | reftex-view-crossref 29 | reftex-toc-recenter 30 | reftex-index 31 | preview-at-point 32 | preview-buffer 33 | LaTeX-fill-section 34 | LaTeX-fill-environment 35 | LaTeX-fill-paragraph 36 | LaTeX-fill-region 37 | reftex-reference 38 | reftex-label 39 | reftex-citation 40 | reftex-view-crossref 41 | reftex-toc-recenter 42 | reftex-index 43 | LaTeX-insert-environment 44 | LaTeX-section 45 | TeX-view 46 | TeX-master-file-ask 47 | TeX-home-buffer 48 | TeX-command-run-all 49 | TeX-recenter-output-buffer 50 | TeX-kill-job 51 | preview-clearout-buffer) 52 | :mode (("\\.tex\\'" . latex-mode) 53 | ("\\.xtx\\'" . latex-mode) 54 | ("\\.bib\\'" . bibtex-mode)) 55 | 56 | :bind (:map TeX-mode-map 57 | ("C-d" . company-auctex-symbols)) 58 | :bind (:map latex-mode-map 59 | ("C-d" . company-auctex-symbols)) 60 | :bind (:map LaTeX-mode-map 61 | ("C-d" . company-auctex-symbols)) 62 | 63 | :init 64 | (setq reftex-plug-into-AUCTeX t) 65 | (setq reftex-default-bibliography 66 | '("~/Dropbox/Kumar/Conferences/ACC2019/references.bib" 67 | "~/Dropbox/Kumar/Conferences/GNC2018/references.bib" 68 | "~/Dropbox/Kumar/Conferences/GNC2019/references.bib" 69 | "~/Dropbox/Kumar/Conferences/ICSSA 2017/paper/references.bib" 70 | "~/Dropbox/Kumar/Journals/journal2018-applications/references.bib" 71 | "~/Dropbox/Kumar/Journals/journal2018-method/references.bib" 72 | "~/Dropbox/Kumar/Proposal/presentation/references.bib" 73 | "~/Dropbox/Kumar/Proposal/references.bib")) 74 | (setq TeX-auto-save t) 75 | (setq TeX-parse-self t) 76 | (setq-default TeX-master nil) 77 | (setq TeX-PDF-mode t) 78 | 79 | :config 80 | (require 'tex) 81 | (require 'tex-buf) 82 | (require 'tex-bar) 83 | (require 'tex-fold) 84 | (require 'tex-font) 85 | (require 'tex-site) 86 | (require 'tex-wizard) 87 | (require 'latex) 88 | (require 'font-latex) 89 | (require 'preview) 90 | (require 'texmathp) 91 | ;; Use Skim as viewer, enable source <-> PDF sync 92 | ;; make latexmk available via C-c C-c 93 | ;; Note: SyncTeX is setup via ~/.latexmkrc (see below) 94 | (add-hook 'LaTeX-mode-hook 95 | (lambda () 96 | (push 97 | '("latexmk" "latexmk -xelatex -pdf -synctex=1 %s" TeX-run-TeX nil t 98 | :help "Run latexmk on file") 99 | TeX-command-list))) 100 | (add-hook 'TeX-mode-hook '(lambda () (setq TeX-command-default "latexmk"))) 101 | ;; use Skim as default pdf viewer 102 | ;; Skim's displayline is used for forward search (from .tex to .pdf) 103 | ;; option -b highlights the current line; option -g opens Skim in the background 104 | (setq TeX-view-program-selection '((output-pdf "PDF Viewer"))) 105 | (setq TeX-source-correlate-method 106 | '((pdf . synctex))) 107 | (cond 108 | ((eq system-type 'darwin) 109 | (setq TeX-view-program-list 110 | '(("PDF Viewer" "/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b")))) 111 | ((eq system-type 'gnu/linux) 112 | (setq TeX-view-program-list 113 | '(("PDF Viewer" TeX-evince-sync-view "evince"))))) 114 | 115 | ;; turn on reftex 116 | (reftex-mode)) 117 | (add-hook 'bibtex-mode-hook 'sk/enable-ryo-modal-mode) 118 | 119 | ;; latex mode bindings 120 | (ryo-modal-major-mode-keys 121 | 'latex-mode 122 | ("m x" preview-at-point :name "preview at point") 123 | ("m a" preview-buffer :name "preview buffer") 124 | ("m b" ivy-bibtex :name "bibliography") 125 | ("m q s" LaTeX-fill-section :name "fill section") 126 | ("m q e" LaTeX-fill-environment :name "fill env") 127 | ("m q p" LaTeX-fill-paragraph :name "fill para") 128 | ("m q q" LaTeX-fill-region :name "fill region") 129 | ("m r" reftex-reference :name "ref") 130 | ("m l" reftex-label :name "label") 131 | ("m c" reftex-citation :name "cite") 132 | ("m j" reftex-view-crossref :name "crossrefs") 133 | ("m t" reftex-toc-recenter :name "table of contents") 134 | ("m i" reftex-index :name "index") 135 | ("m e" LaTeX-insert-environment :name "environment") 136 | ("m s" LaTeX-section :name "section") 137 | ("m v" TeX-view :name "view") 138 | ("m f" TeX-master-file-ask :name "master file") 139 | ("m h" TeX-home-buffer :name "home buffer") 140 | ("m m" TeX-command-run-all :name "compile") 141 | ("m o" TeX-recenter-output-buffer :name "compile output") 142 | ("m k" TeX-kill-job :name "kill compilation") 143 | ("m d" preview-clearout-buffer :name "clear preview")) 144 | ;; hints 145 | (which-key-add-key-based-replacements 146 | "m q" "fill") 147 | 148 | ;; provide latex configuration 149 | (provide 'sk-latex) 150 | -------------------------------------------------------------------------------- /config/sk-nav.el: -------------------------------------------------------------------------------- 1 | ;; vim style char navigation 2 | (use-package iy-go-to-char 3 | :ensure t 4 | :init 5 | (setq iy-go-to-char-continue-when-repeating nil) 6 | :commands 7 | (iy-go-to-char 8 | iy-go-to-char-backward 9 | iy-go-up-to-char 10 | iy-go-up-to-char-backward 11 | iy-go-to-or-up-to-continue 12 | iy-go-to-or-up-to-continue-backward)) 13 | 14 | ;; wrapper functions based on iy-go-to-char 15 | (defun sk/mark-to-char () 16 | "mark to char using iy-go-to-char" 17 | (interactive) 18 | (set-mark (point)) 19 | (call-interactively #'iy-go-to-char)) 20 | (defun sk/mark-to-char-backward () 21 | "mark to char using iy-go-to-char-backward" 22 | (interactive) 23 | (push-mark (point)) 24 | (call-interactively #'iy-go-to-char-backward)) 25 | (defun sk/mark-up-to-char () 26 | "mark to char using iy-up-go-to-char" 27 | (interactive) 28 | (push-mark (point)) 29 | (call-interactively #'iy-go-up-to-char)) 30 | (defun sk/mark-up-to-char-backward () 31 | "mark to char using iy-up-go-to-char-backward" 32 | (interactive) 33 | (push-mark (point)) 34 | (call-interactively #'iy-go-up-to-char-backward)) 35 | (defun sk/mark-continue () 36 | "mark to char using iy-up-go-to-char-backward" 37 | (interactive) 38 | (push-mark (point)) 39 | (iy-go-to-or-up-to-continue 1)) 40 | (defun sk/mark-continue-backward () 41 | "mark to char using iy-up-go-to-char-backward" 42 | (interactive) 43 | (push-mark (point)) 44 | (iy-go-to-or-up-to-continue-backward 1)) 45 | 46 | ;; wrapper around avy 47 | (defun sk/mark-avy-char-timer () 48 | "mark to char using avy-char-timer" 49 | (interactive) 50 | (push-mark (point)) 51 | (call-interactively #'avy-goto-char-timer)) 52 | (defun sk/mark-avy-goto-line () 53 | "mark to char using avy-goto-line" 54 | (interactive) 55 | (push-mark (point)) 56 | (call-interactively #'avy-goto-line)) 57 | 58 | ;; simulating mouse click 59 | (use-package avy 60 | :ensure t 61 | :commands 62 | (avy-goto-char-2 63 | avy-goto-word-1 64 | avy-goto-char-2-above 65 | avy-goto-char-2-below 66 | avy-goto-char-in-line 67 | avy-goto-char-timer 68 | avy-goto-line) 69 | :init 70 | (setq avy-keys-alist 71 | `((avy-goto-char-2 . (?j ?k ?l ?f ?s ?d ?e ?r ?u ?i)) 72 | (avy-goto-word-1 . (?j ?k ?l ?f ?s ?d ?e ?r ?u ?i)) 73 | (avy-goto-char-in-line . (?j ?k ?l ?f ?s ?d ?e ?r ?u ?i)) 74 | (avy-goto-char-2-above . (?j ?k ?l ?f ?s ?d ?e ?r ?u ?i)) 75 | (avy-goto-char-2-below . (?j ?k ?l ?f ?s ?d ?e ?r ?u ?i)) 76 | (avy-goto-char-timer . (?j ?k ?l ?f ?s ?d ?e ?r ?u ?i)) 77 | (avy-goto-line . (?j ?k ?l ?f ?s ?d ?e ?r ?u ?i)))) 78 | ;; (setq avy-style 'pre) 79 | (setq avy-background t) 80 | (defface avy-lead-face-0 81 | '((t (:foreground "white" :background "DarkGrey"))) 82 | "Face used for first non-terminating leading chars.") 83 | :bind (("C-c G" . sk/mark-avy-char-timer) 84 | ("C-c g" . avy-goto-char-timer))) 85 | 86 | ;; jump to windows quickly 87 | (use-package ace-window 88 | :ensure t 89 | :bind* (("C-x o" . ace-window))) 90 | 91 | ;; jump and open links fast 92 | (use-package ace-link 93 | :ensure t 94 | :after (avy ace-window) 95 | :commands 96 | (ace-link-org) 97 | :config 98 | (ace-link-setup-default)) 99 | 100 | ;; moving across changes 101 | (use-package goto-chg 102 | :ensure t 103 | :commands (goto-last-change 104 | goto-last-change-reverse)) 105 | 106 | ;; smart beginning and end in buffers 107 | (if (not (version< emacs-version "25.3")) 108 | (use-package beginend 109 | :ensure t 110 | :hook ((dired-mode . beginend-global-mode) 111 | (text-mode . beginend-global-mode) 112 | (prog-mode . beginend-global-mode)) 113 | :diminish ((beginend-global-mode . "") 114 | (beginend-prog-mode . "")) 115 | :config 116 | (beginend-global-mode))) 117 | 118 | ;; moving across marks 119 | (use-package back-button 120 | :ensure t 121 | :commands 122 | (back-button-local-backward 123 | back-button-local-forward 124 | back-button-global-backward 125 | back-button-global-forward)) 126 | 127 | ;; dash or zeal documentation 128 | (use-package dash-at-point 129 | :ensure t 130 | :commands 131 | (dash-at-point-with-docset)) 132 | (use-package zeal-at-point 133 | :ensure t 134 | :commands 135 | (zeal-at-point 136 | zeal-at-point-search 137 | zeal-at-point-set-docset)) 138 | 139 | ;; dumb jumping 140 | (use-package dumb-jump 141 | :ensure t 142 | :ensure-system-package ag 143 | :commands 144 | (dumb-jump-go 145 | dumb-jump-goto-file-line) 146 | :config 147 | (dumb-jump-mode)) 148 | 149 | ;; folding 150 | (use-package vimish-fold 151 | :ensure t 152 | :commands 153 | (vimish-fold 154 | vimish-fold-toggle 155 | vimish-fold-toggle-all 156 | vimish-fold-unfold 157 | vimish-fold-unfold-all 158 | vimish-fold-delete 159 | vimish-fold-delete-all 160 | vimish-fold-refold 161 | vimish-fold-refold-all 162 | vimish-fold-next-fold 163 | vimish-fold-previous-fold) 164 | :init 165 | (vimish-fold-global-mode 1)) 166 | 167 | ;; improve desktop 168 | (use-package desktop+ 169 | :ensure t 170 | :after desktop 171 | :commands 172 | (desktop-load 173 | desktop-create 174 | desktop-create-auto 175 | desktop-load-auto)) 176 | 177 | ;; searching the current buffer quickly 178 | (use-package loccur 179 | :ensure t 180 | :commands 181 | (loccur 182 | loccur-current 183 | loccur-previous-match)) 184 | 185 | ;; provide navigation related packages 186 | (provide 'sk-nav) 187 | -------------------------------------------------------------------------------- /config/sk-ryo-which-key.el: -------------------------------------------------------------------------------- 1 | ;; Emacs side of bindings 2 | (which-key-add-key-based-replacements 3 | "C-j" "company backends" 4 | "C-j a" "auctex") 5 | 6 | ;; basic operators 7 | (which-key-add-key-based-replacements 8 | "c" "change" 9 | "C" "change rest of line" 10 | "c i" "inside" 11 | "c a" "around" 12 | "c g" "global" 13 | "c c" "change line or region" 14 | 15 | "d" "delete" 16 | "D" "delete rest of line" 17 | "d a" "inside" 18 | "d i" "around" 19 | "d g" "global" 20 | "d d" "delete line/region" 21 | 22 | "v" "select" 23 | "V" "start select" 24 | "v i" "inside" 25 | "v a" "around" 26 | "v g" "global" 27 | "v v" "expand region" 28 | 29 | "=" "indent" 30 | "= i" "inside" 31 | "= a" "around" 32 | "= g" "global" 33 | 34 | "z" "fold" 35 | "z i" "inside" 36 | "z a" "around" 37 | "z g" "global" 38 | 39 | "y" "copy" 40 | "Y" "copy rest of line" 41 | "y i" "inside" 42 | "y a" "around" 43 | "y g" "global" 44 | "y y" "copy line/region") 45 | 46 | ;; alignment 47 | (which-key-add-key-based-replacements 48 | "g l" "align" 49 | "g l SPC" "align whitespace" 50 | "g l SPC i" "inside" 51 | "g l SPC a" "around" 52 | "g l SPC g" "global" 53 | 54 | "g l d" "align semicolon" 55 | "g l d i" "inside" 56 | "g l d a" "around" 57 | "g l d g" "global" 58 | 59 | "g l &" "align ampersand" 60 | "g l & i" "inside" 61 | "g l & a" "around" 62 | "g l & g" "global" 63 | 64 | "g l q" "align quote" 65 | "g l q i" "inside" 66 | "g l q a" "around" 67 | "g l q g" "global" 68 | 69 | "g l =" "align equal" 70 | "g l = i" "inside" 71 | "g l = a" "around" 72 | "g l = g" "global" 73 | 74 | "g l c" "align comma" 75 | "g l c i" "inside" 76 | "g l c a" "around" 77 | "g l c g" "global" 78 | 79 | "g l ." "align dot" 80 | "g l . i" "inside" 81 | "g l . a" "around" 82 | "g l . g" "global" 83 | 84 | "g l :" "align colon" 85 | "g l : i" "inside" 86 | "g l : a" "around" 87 | "g l : g" "global" 88 | 89 | "g l %" "align percent" 90 | "g l % i" "inside" 91 | "g l % a" "around" 92 | "g l % g" "global" 93 | 94 | "g l #" "align hash" 95 | "g l # i" "inside" 96 | "g l # a" "around" 97 | "g l # g" "global" 98 | 99 | "g l" "align" 100 | "g l i" "inside" 101 | "g l a" "around" 102 | "g l g" "global") 103 | 104 | ;; multiple cursors 105 | (which-key-add-key-based-replacements 106 | ">" "multi cursors mark next" 107 | "<" "multi cursors mark previous" 108 | "\\" "multi cursors mark all" 109 | "|" "multi cursors edit lines" 110 | "g >" "multi cursors skip next" 111 | "g <" "multi cursors skip previous") 112 | 113 | ;; complex operators 114 | (which-key-add-key-based-replacements 115 | "v r" "rectangle mark" 116 | "v r i" "inside" 117 | "v r a" "around" 118 | "v r g" "global" 119 | 120 | "g c" "comment" 121 | "g c i" "inside" 122 | "g c a" "outside" 123 | "g c g" "global" 124 | 125 | "g r" "replace" 126 | "g r i" "inside" 127 | "g r a" "outside" 128 | "g r g" "global" 129 | 130 | "g v" "regexp replace" 131 | "g v i" "inside" 132 | "g v a" "outside" 133 | "g v g" "global" 134 | 135 | "g y" "copy to clipboard" 136 | "g y i" "inside" 137 | "g y a" "outside" 138 | "g y g" "global" 139 | 140 | "g u" "downcase" 141 | "g u i" "inside" 142 | "g u a" "outside" 143 | "g u g" "global" 144 | 145 | "g U" "upcase" 146 | "g U i" "inside" 147 | "g U a" "outside" 148 | "g U g" "global" 149 | 150 | "g w" "fill para" 151 | "g w i" "inside" 152 | "g w a" "outside" 153 | "g w g" "global" 154 | 155 | "g e" "grep" 156 | "g e i" "inside" 157 | "g e a" "outside" 158 | "g e g" "global" 159 | 160 | "g s" "search" 161 | "g s i" "inside" 162 | "g s a" "outside" 163 | "g s g" "global" 164 | 165 | "c y" "change to clipboard" 166 | "c y a" "inside" 167 | "c y i" "around" 168 | "c y g" "global" 169 | 170 | "d y" "delete to clipboard" 171 | "d y i" "inside" 172 | "d y a" "around" 173 | "d y g" "global") 174 | 175 | ;; repl operators 176 | (which-key-add-key-based-replacements 177 | "w r" "shell run" 178 | "w r i" "inside" 179 | "w r a" "around" 180 | "w r g" "global" 181 | 182 | "w t" "term run" 183 | "w t i" "inside" 184 | "w t a" "outside" 185 | "w t g" "global" 186 | 187 | "r q" "quickrun" 188 | "r q i" "inside" 189 | "r q a" "outside" 190 | "r q g" "global" 191 | 192 | "r Q" "quickrun replace" 193 | "r Q i" "inside" 194 | "r Q a" "outside" 195 | "r Q g" "global" 196 | 197 | "c v" "replace" 198 | "c v i" "inside" 199 | "c v a" "outside" 200 | "c v g" "global" 201 | 202 | "d v" "replace regexp" 203 | "d v i" "inside" 204 | "d v a" "outside" 205 | "d v g" "global" 206 | 207 | "w e" "eshell run" 208 | "w e i" "inside" 209 | "w e a" "outside" 210 | "w e g" "global" 211 | 212 | "r r" "tmux run" 213 | "r r a" "inside" 214 | "r r i" "around" 215 | "r r g" "global" 216 | 217 | "r s" "tmux send" 218 | "r s i" "inside" 219 | "r s a" "around" 220 | "r s g" "global") 221 | 222 | ;; movement 223 | (which-key-add-key-based-replacements 224 | "v o" "visual option" 225 | "c o" "change option" 226 | "d o" "desktop option" 227 | "y o" "snippet option") 228 | 229 | ;; movement 230 | (which-key-add-key-based-replacements 231 | "S" "smart/scroll" 232 | 233 | "w" "window" 234 | "w n" "narrow" 235 | "w n i" "inside" 236 | "w n a" "around" 237 | "w n g" "global" 238 | 239 | "w SPC" "whitespace" 240 | "w SPC i" "inside" 241 | "w SPC a" "around" 242 | "w SPC g" "global") 243 | 244 | ;; prefixes 245 | (which-key-add-key-based-replacements 246 | "r" "repl" 247 | "m" "mode" 248 | "g" "global" 249 | "SPC" "leader") 250 | 251 | ;; leader prefixes 252 | (which-key-add-key-based-replacements 253 | "SPC i" "info lsp" 254 | "SPC o" "debug lsp" 255 | "SPC v" "shells" 256 | "SPC m" "minor leader") 257 | 258 | ;; general functions 259 | (which-key-add-key-based-replacements 260 | "." "repeat" 261 | "ESC" "cancel") 262 | 263 | ;; provide which key config 264 | (provide 'sk-ryo-which-key) 265 | --------------------------------------------------------------------------------