├── .gitee ├── ISSUE_TEMPLATE.zh-CN.md └── PULL_REQUEST_TEMPLATE.zh-CN.md ├── LICENSE ├── README.md ├── bashrc ├── cquery ├── bin │ └── cquery ├── config │ ├── cquery.config │ └── settings.json └── lib │ └── clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04 │ └── lib │ ├── clang │ └── 5.0.1 │ │ └── include │ │ ├── __clang_cuda_builtin_vars.h │ │ ├── __clang_cuda_cmath.h │ │ ├── __clang_cuda_complex_builtins.h │ │ ├── __clang_cuda_intrinsics.h │ │ ├── __clang_cuda_math_forward_declares.h │ │ ├── __clang_cuda_runtime_wrapper.h │ │ ├── __stddef_max_align_t.h │ │ ├── __wmmintrin_aes.h │ │ ├── __wmmintrin_pclmul.h │ │ ├── adxintrin.h │ │ ├── altivec.h │ │ ├── ammintrin.h │ │ ├── arm_acle.h │ │ ├── arm_neon.h │ │ ├── armintr.h │ │ ├── avx2intrin.h │ │ ├── avx512bwintrin.h │ │ ├── avx512cdintrin.h │ │ ├── avx512dqintrin.h │ │ ├── avx512erintrin.h │ │ ├── avx512fintrin.h │ │ ├── avx512ifmaintrin.h │ │ ├── avx512ifmavlintrin.h │ │ ├── avx512pfintrin.h │ │ ├── avx512vbmiintrin.h │ │ ├── avx512vbmivlintrin.h │ │ ├── avx512vlbwintrin.h │ │ ├── avx512vlcdintrin.h │ │ ├── avx512vldqintrin.h │ │ ├── avx512vlintrin.h │ │ ├── avx512vpopcntdqintrin.h │ │ ├── avxintrin.h │ │ ├── bmi2intrin.h │ │ ├── bmiintrin.h │ │ ├── clflushoptintrin.h │ │ ├── clzerointrin.h │ │ ├── cpuid.h │ │ ├── cuda_wrappers │ │ ├── algorithm │ │ ├── complex │ │ └── new │ │ ├── emmintrin.h │ │ ├── f16cintrin.h │ │ ├── float.h │ │ ├── fma4intrin.h │ │ ├── fmaintrin.h │ │ ├── fxsrintrin.h │ │ ├── htmintrin.h │ │ ├── htmxlintrin.h │ │ ├── ia32intrin.h │ │ ├── immintrin.h │ │ ├── intrin.h │ │ ├── inttypes.h │ │ ├── iso646.h │ │ ├── limits.h │ │ ├── lwpintrin.h │ │ ├── lzcntintrin.h │ │ ├── mm3dnow.h │ │ ├── mm_malloc.h │ │ ├── mmintrin.h │ │ ├── module.modulemap │ │ ├── msa.h │ │ ├── mwaitxintrin.h │ │ ├── nmmintrin.h │ │ ├── omp.h │ │ ├── opencl-c.h │ │ ├── pkuintrin.h │ │ ├── pmmintrin.h │ │ ├── popcntintrin.h │ │ ├── prfchwintrin.h │ │ ├── rdseedintrin.h │ │ ├── rtmintrin.h │ │ ├── s390intrin.h │ │ ├── sanitizer │ │ ├── allocator_interface.h │ │ ├── asan_interface.h │ │ ├── common_interface_defs.h │ │ ├── coverage_interface.h │ │ ├── dfsan_interface.h │ │ ├── esan_interface.h │ │ ├── linux_syscall_hooks.h │ │ ├── lsan_interface.h │ │ ├── msan_interface.h │ │ ├── tsan_interface.h │ │ └── tsan_interface_atomic.h │ │ ├── shaintrin.h │ │ ├── smmintrin.h │ │ ├── stdalign.h │ │ ├── stdarg.h │ │ ├── stdatomic.h │ │ ├── stdbool.h │ │ ├── stddef.h │ │ ├── stdint.h │ │ ├── stdnoreturn.h │ │ ├── tbmintrin.h │ │ ├── tgmath.h │ │ ├── tmmintrin.h │ │ ├── unwind.h │ │ ├── vadefs.h │ │ ├── varargs.h │ │ ├── vecintrin.h │ │ ├── wmmintrin.h │ │ ├── x86intrin.h │ │ ├── xmmintrin.h │ │ ├── xopintrin.h │ │ ├── xray │ │ ├── xray_interface.h │ │ └── xray_log_interface.h │ │ ├── xsavecintrin.h │ │ ├── xsaveintrin.h │ │ ├── xsaveoptintrin.h │ │ ├── xsavesintrin.h │ │ └── xtestintrin.h │ └── libclang.so.5 ├── fonts ├── CONSOLAS_NERD_FONT_MONO.TTF └── Droid_Sans_Mono_Nerd_Font_Complete_Mono_Windows_Compatible.otf ├── install.sh ├── nvim ├── screenshot ├── 函数列表.gif ├── 函数变量头文件跳转.gif ├── 头文件补全.gif ├── 快速查找函数.gif ├── 快速查找文件.gif ├── 文件列表.gif ├── 概览.png ├── 自动补全.gif └── 语法诊断.gif ├── start.sh ├── uninstall.sh ├── vim ├── .VimballRecord ├── .netrwhist ├── .vim ├── README.md ├── autoload │ ├── plug.vim │ └── tagbar.vim ├── colors │ ├── blues.vim │ ├── dracula.vim │ ├── dream.vim │ ├── monokai.vim │ ├── onedark.vim │ ├── solarized.vim │ └── tender.vim ├── init.vim ├── plugin │ ├── DoxygenToolkit.vim │ ├── a.vim │ ├── auto-pairs.vim │ ├── mark.vim │ └── tagbar.vim ├── snippets │ ├── _.snippets │ ├── actionscript.snippets │ ├── ada.snippets │ ├── alpaca.snippets │ ├── apache.snippets │ ├── arduino.snippets │ ├── autoit.snippets │ ├── awk.snippets │ ├── c.snippets │ ├── chef.snippets │ ├── clojure.snippets │ ├── cmake.snippets │ ├── codeigniter.snippets │ ├── coffee │ │ ├── angular_coffee.snippets │ │ ├── coffee.snippets │ │ ├── jquery_coffee.snippets │ │ └── requirejs_coffee.snippets │ ├── cpp.snippets │ ├── crystal.snippets │ ├── cs.snippets │ ├── css.snippets │ ├── cuda.snippets │ ├── d.snippets │ ├── dart.snippets │ ├── diff.snippets │ ├── django.snippets │ ├── dosini.snippets │ ├── eelixir.snippets │ ├── elixir.snippets │ ├── elm.snippets │ ├── erlang.snippets │ ├── eruby.snippets │ ├── falcon.snippets │ ├── fortran.snippets │ ├── go.snippets │ ├── haml.snippets │ ├── handlebars.snippets │ ├── haskell.snippets │ ├── html.snippets │ ├── htmldjango.snippets │ ├── htmltornado.snippets │ ├── idris.snippets │ ├── jade.snippets │ ├── java.snippets │ ├── javascript-bemjson.snippets │ ├── javascript-d3.snippets │ ├── javascript-es6-react.snippets │ ├── javascript-mocha.snippets │ ├── javascript-openui5.snippets │ ├── javascript │ │ ├── javascript-jasmine.snippets │ │ ├── javascript-jquery.snippets │ │ ├── javascript-react.snippets │ │ ├── javascript-requirejs.snippets │ │ ├── javascript.es6.snippets │ │ ├── javascript.node.snippets │ │ └── javascript.snippets │ ├── jinja.snippets │ ├── jsp.snippets │ ├── julia.snippets │ ├── kotlin.snippets │ ├── laravel.snippets │ ├── ledger.snippets │ ├── lfe.snippets │ ├── ls.snippets │ ├── lua.snippets │ ├── make.snippets │ ├── mako.snippets │ ├── markdown.snippets │ ├── matlab.snippets │ ├── mustache.snippets │ ├── objc.snippets │ ├── openfoam.snippets │ ├── perl.snippets │ ├── perl6.snippets │ ├── php.snippets │ ├── plsql.snippets │ ├── po.snippets │ ├── processing.snippets │ ├── progress.snippets │ ├── ps1.snippets │ ├── puppet.snippets │ ├── purescript.snippets │ ├── python.snippets │ ├── r.snippets │ ├── rails.snippets │ ├── reason.snippets │ ├── rst.snippets │ ├── ruby.snippets │ ├── rust.snippets │ ├── sass.snippets │ ├── scala.snippets │ ├── scheme.snippets │ ├── scss.snippets │ ├── sh.snippets │ ├── simplemvcf.snippets │ ├── slim.snippets │ ├── snippets.snippets │ ├── sql.snippets │ ├── stylus.snippets │ ├── supercollider.snippets │ ├── systemverilog.snippets │ ├── tcl.snippets │ ├── tex.snippets │ ├── textile.snippets │ ├── twig.snippets │ ├── typescript.snippets │ ├── verilog.snippets │ ├── vhdl.snippets │ ├── vim.snippets │ ├── vue.snippets │ ├── xml.snippets │ ├── xslt.snippets │ ├── yii-chtml.snippets │ ├── yii.snippets │ └── zsh.snippets └── syntax │ └── tagbar.vim ├── xshell可用字体.txt └── ycm_extra_conf.py /.gitee/ISSUE_TEMPLATE.zh-CN.md: -------------------------------------------------------------------------------- 1 | ### 该问题是怎么引起的? 2 | 3 | 4 | 5 | ### 重现步骤 6 | 7 | 8 | 9 | ### 报错信息 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md: -------------------------------------------------------------------------------- 1 | ### 该Pull Request关联的Issue 2 | 3 | 4 | ### 修改描述 5 | 6 | 7 | 8 | ### 测试用例 9 | 10 | 11 | 12 | ### 修复效果的截屏 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 HGtz2222 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VimForCpp 2 | ## 项目简介 3 | 本项目主要目标是帮助对vim配置方法不熟悉的新手封装的一键式vim环境安装包. 主要针对终端vim用户, 适合远程ssh连接Linux服务器进行开发的场景(例如使用阿里云服务器或者腾讯云服务器等). 4 | 5 | ## 特点 6 | >* 安装速度快(使用码云而不是github作为源). 网络畅通情况下, 几分钟内完成 vim 插件安装. 7 | >* 无需编译直接使用 YouCompleteMe(直接下载预编译好的 ycm\_core.so). 8 | >* 一键式安装. 真正做到一键式安装. 不光能一键式安装 Vim 配置, 同时也会安装依赖的程序(包括 git, neovim, ctags等) 9 | 10 | ## 支持环境 11 | 目前只支持 Centos7 x86_64. 后面会考虑 Ubuntu 等发行版的支持. 12 | 13 | ## 安装方法 14 | 15 | 在 shell 中执行指令(想在哪个用户下让vim配置生效, 就在哪个用户下执行这个指令. 强烈 "不推荐" 直接在 root 下执行): 16 | 17 | curl -sLf https://gitee.com/HGtz2222/VimForCpp/raw/master/install.sh -o ./install.sh && bash ./install.sh 18 | 19 | 需要按照提示输入 root 密码. 您的 root 密码不会被上传, 请放心输入. 20 | 21 | ## 卸载方法 22 | 23 | 在安装了 VimForCpp 的用户下执行: 24 | 25 | bash ~/.VimForCpp/uninstall.sh 26 | 27 | ## 功能演示 28 | ### 概览 29 | 30 | ![概览](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E6%A6%82%E8%A7%88.png) 31 | 32 | ### 自动补全(语义级别补全+模糊匹配) 33 | 34 | ![自动补全](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E8%87%AA%E5%8A%A8%E8%A1%A5%E5%85%A8.gif) 35 | 36 | ### 头文件补全 37 | 38 | ![头文件补全](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E5%A4%B4%E6%96%87%E4%BB%B6%E8%A1%A5%E5%85%A8.gif) 39 | 40 | ### 语法诊断 41 | 42 | ![语法诊断](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E8%AF%AD%E6%B3%95%E8%AF%8A%E6%96%AD.gif) 43 | 44 | ### 跳转到变量/函数定义, 跳转到头文件 45 | 46 | ![代码跳转](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E5%87%BD%E6%95%B0%E5%8F%98%E9%87%8F%E5%A4%B4%E6%96%87%E4%BB%B6%E8%B7%B3%E8%BD%AC.gif) 47 | 48 | ### 函数列表 49 | 50 | ![函数列表](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E5%87%BD%E6%95%B0%E5%88%97%E8%A1%A8.gif) 51 | 52 | ### 函数查找 53 | 54 | ![函数查找](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E5%BF%AB%E9%80%9F%E6%9F%A5%E6%89%BE%E5%87%BD%E6%95%B0.gif) 55 | 56 | ### 文件列表 57 | 58 | ![文件列表](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E6%96%87%E4%BB%B6%E5%88%97%E8%A1%A8.gif) 59 | 60 | ### 文件查找 61 | 62 | ![文件查找](https://gitee.com/HGtz2222/VimForCpp/raw/master/screenshot/%E5%BF%AB%E9%80%9F%E6%9F%A5%E6%89%BE%E6%96%87%E4%BB%B6.gif) 63 | 64 | ### 变量重命名 65 | TODO 66 | 67 | ### 查找函数调用位置 68 | TODO 69 | 70 | ### 快速查看函数声明 71 | TODO 72 | 73 | ## 包含的插件列表 74 | TODO 75 | 76 | ## 快速使用 77 | 目前IDE相关快捷键分为五个类别: 78 | 79 | 前缀键为 "空格" 80 | 第二键指定分类 81 | 第三键指定功能 82 | 83 | 分类键和功能键按照 "asdfg qwert" 的方式排序. 84 | 后续会支持快捷键提示 85 | 86 | 例如: 87 | 88 | 1. 跳转到函数定义: 89 | ``` 90 | fa 91 | ``` 92 | 93 | 2. 变量重命名 94 | ``` 95 | fd 96 | ``` 97 | 98 | 快捷键具体定义参考 vim/init.vim 中按键映射部分. 99 | 100 | **注意**: 当前的快捷键设定处在测试阶段, 可能会有大规模变动 101 | 102 | 103 | ### 窗口(a) 104 | TODO 105 | 106 | ### 查找(s) 107 | TODO 108 | 109 | ### 调试(d) 110 | TODO 111 | 112 | ### 语义(f) 113 | TODO 114 | 115 | ### 格式(g) 116 | TODO 117 | 118 | ## 关于图标显示 119 | 基于 vim-devicons 展示图标. 120 | vim-devicons依赖 Nerd Font 121 | 122 | nerd-fonts 123 | 124 | 如果使用 xshell 登录 Linux, 需要在 Windows 上安装 nerd-fonts. 并且在 xshell 中设置字体为 nerd-fonts. 但是由于 xshell 只支持等宽字体, 因此 nerd-fonts 中大部分字体是不能被 xshell 识别的. 125 | 此处我找到了几个可以使用的 nerd-fonts. 其他的没有进一步测试. 126 | 127 | DroidSansMono 128 | 129 | 其他字体可以参考文件 **xshell可用字体** 130 | 131 | 注意: 如果出现图标不能正确显示的问题, 可以注释掉 vim-devicons 132 | 133 | 134 | " Plug 'ryanoasis/vim-devicons' 135 | 136 | 将行首的 " 去掉即可. 137 | -------------------------------------------------------------------------------- /bashrc: -------------------------------------------------------------------------------- 1 | # .bashrc 2 | 3 | # Source global definitions 4 | if [ -f /etc/bashrc ]; then 5 | . /etc/bashrc 6 | fi 7 | 8 | # Uncomment the following line if you don't like systemctl's auto-paging feature: 9 | # export SYSTEMD_PAGER= 10 | 11 | # User specific aliases and functions 12 | 13 | # .bashrc 14 | 15 | # Source global definitions 16 | if [ -f /etc/bashrc ]; then 17 | . /etc/bashrc 18 | fi 19 | 20 | # Uncomment the following line if you don't like systemctl's auto-paging feature: 21 | # export SYSTEMD_PAGER= 22 | 23 | # User specific aliases and functions 24 | alias rm="rm -i" 25 | alias mv="mv -i" 26 | alias grephc="grep --include *.cc --include *.h --color" 27 | alias grepcc="grep --include *.cc --color" 28 | # alias gcc="/usr/local/gcc6/bin/gcc" 29 | # alias g++="/usr/local/gcc6/bin/g++" 30 | alias cl="clear" 31 | # 需要安装 gdbgui 32 | # pip install gdbgui 33 | alias gdbgui="gdbgui --host 0.0.0.0 --port 9090" 34 | 35 | # 需要安装 neovim 36 | # yum -y install epel-release 37 | # yum install neovim 38 | # yum install python2-neovim.noarch 39 | alias vi="nvim" 40 | alias vim="nvim" 41 | 42 | #ulimit -c unlimited 43 | 44 | export SVN_EDITOR=vim 45 | 46 | export TERM="screen-256color" 47 | 48 | export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH 49 | -------------------------------------------------------------------------------- /cquery/bin/cquery: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/cquery/bin/cquery -------------------------------------------------------------------------------- /cquery/config/cquery.config: -------------------------------------------------------------------------------- 1 | %clang 2 | %c -std=gnu11 3 | %cpp -std=gnu++14 4 | -pthread 5 | 6 | # Includes 7 | -I/usr/include 8 | -I/usr/include/c++/4.8.2 9 | -I. 10 | -------------------------------------------------------------------------------- /cquery/config/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "initializationOptions": { 3 | "cacheDirectory": "/tmp/cquery/cache" 4 | } 5 | 6 | } 7 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/__stddef_max_align_t.h: -------------------------------------------------------------------------------- 1 | /*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---=== 2 | * 3 | * Copyright (c) 2014 Chandler Carruth 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | *===-----------------------------------------------------------------------=== 24 | */ 25 | 26 | #ifndef __CLANG_MAX_ALIGN_T_DEFINED 27 | #define __CLANG_MAX_ALIGN_T_DEFINED 28 | 29 | #if defined(_MSC_VER) 30 | typedef double max_align_t; 31 | #elif defined(__APPLE__) 32 | typedef long double max_align_t; 33 | #else 34 | // Define 'max_align_t' to match the GCC definition. 35 | typedef struct { 36 | long long __clang_max_align_nonce1 37 | __attribute__((__aligned__(__alignof__(long long)))); 38 | long double __clang_max_align_nonce2 39 | __attribute__((__aligned__(__alignof__(long double)))); 40 | } max_align_t; 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/__wmmintrin_pclmul.h: -------------------------------------------------------------------------------- 1 | /*===---- __wmmintrin_pclmul.h - PCMUL intrinsics ---------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | #ifndef _WMMINTRIN_PCLMUL_H 24 | #define _WMMINTRIN_PCLMUL_H 25 | 26 | /// \brief Multiplies two 64-bit integer values, which are selected from source 27 | /// operands using the immediate-value operand. The multiplication is a 28 | /// carry-less multiplication, and the 128-bit integer product is stored in 29 | /// the destination. 30 | /// 31 | /// \headerfile 32 | /// 33 | /// \code 34 | /// __m128i _mm_clmulepi64_si128(__m128i __X, __m128i __Y, const int __I); 35 | /// \endcode 36 | /// 37 | /// This intrinsic corresponds to the VPCLMULQDQ instruction. 38 | /// 39 | /// \param __X 40 | /// A 128-bit vector of [2 x i64] containing one of the source operands. 41 | /// \param __Y 42 | /// A 128-bit vector of [2 x i64] containing one of the source operands. 43 | /// \param __I 44 | /// An immediate value specifying which 64-bit values to select from the 45 | /// operands. Bit 0 is used to select a value from operand \a __X, and bit 46 | /// 4 is used to select a value from operand \a __Y: \n 47 | /// Bit[0]=0 indicates that bits[63:0] of operand \a __X are used. \n 48 | /// Bit[0]=1 indicates that bits[127:64] of operand \a __X are used. \n 49 | /// Bit[4]=0 indicates that bits[63:0] of operand \a __Y are used. \n 50 | /// Bit[4]=1 indicates that bits[127:64] of operand \a __Y are used. 51 | /// \returns The 128-bit integer vector containing the result of the carry-less 52 | /// multiplication of the selected 64-bit values. 53 | #define _mm_clmulepi64_si128(__X, __Y, __I) \ 54 | ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(__X), \ 55 | (__v2di)(__m128i)(__Y), (char)(__I))) 56 | 57 | #endif /* _WMMINTRIN_PCLMUL_H */ 58 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/adxintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- adxintrin.h - ADX intrinsics -------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __ADXINTRIN_H 29 | #define __ADXINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) 33 | 34 | /* Intrinsics that are available only if __ADX__ defined */ 35 | static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx"))) 36 | _addcarryx_u32(unsigned char __cf, unsigned int __x, unsigned int __y, 37 | unsigned int *__p) 38 | { 39 | return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p); 40 | } 41 | 42 | #ifdef __x86_64__ 43 | static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx"))) 44 | _addcarryx_u64(unsigned char __cf, unsigned long long __x, 45 | unsigned long long __y, unsigned long long *__p) 46 | { 47 | return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p); 48 | } 49 | #endif 50 | 51 | /* Intrinsics that are also available if __ADX__ undefined */ 52 | static __inline unsigned char __DEFAULT_FN_ATTRS 53 | _addcarry_u32(unsigned char __cf, unsigned int __x, unsigned int __y, 54 | unsigned int *__p) 55 | { 56 | return __builtin_ia32_addcarry_u32(__cf, __x, __y, __p); 57 | } 58 | 59 | #ifdef __x86_64__ 60 | static __inline unsigned char __DEFAULT_FN_ATTRS 61 | _addcarry_u64(unsigned char __cf, unsigned long long __x, 62 | unsigned long long __y, unsigned long long *__p) 63 | { 64 | return __builtin_ia32_addcarry_u64(__cf, __x, __y, __p); 65 | } 66 | #endif 67 | 68 | static __inline unsigned char __DEFAULT_FN_ATTRS 69 | _subborrow_u32(unsigned char __cf, unsigned int __x, unsigned int __y, 70 | unsigned int *__p) 71 | { 72 | return __builtin_ia32_subborrow_u32(__cf, __x, __y, __p); 73 | } 74 | 75 | #ifdef __x86_64__ 76 | static __inline unsigned char __DEFAULT_FN_ATTRS 77 | _subborrow_u64(unsigned char __cf, unsigned long long __x, 78 | unsigned long long __y, unsigned long long *__p) 79 | { 80 | return __builtin_ia32_subborrow_u64(__cf, __x, __y, __p); 81 | } 82 | #endif 83 | 84 | #undef __DEFAULT_FN_ATTRS 85 | 86 | #endif /* __ADXINTRIN_H */ 87 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/armintr.h: -------------------------------------------------------------------------------- 1 | /*===---- armintr.h - ARM Windows intrinsics -------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | /* Only include this if we're compiling for the windows platform. */ 25 | #ifndef _MSC_VER 26 | #include_next 27 | #else 28 | 29 | #ifndef __ARMINTR_H 30 | #define __ARMINTR_H 31 | 32 | typedef enum 33 | { 34 | _ARM_BARRIER_SY = 0xF, 35 | _ARM_BARRIER_ST = 0xE, 36 | _ARM_BARRIER_ISH = 0xB, 37 | _ARM_BARRIER_ISHST = 0xA, 38 | _ARM_BARRIER_NSH = 0x7, 39 | _ARM_BARRIER_NSHST = 0x6, 40 | _ARM_BARRIER_OSH = 0x3, 41 | _ARM_BARRIER_OSHST = 0x2 42 | } _ARMINTR_BARRIER_TYPE; 43 | 44 | #endif /* __ARMINTR_H */ 45 | #endif /* _MSC_VER */ 46 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/avx512ifmaintrin.h: -------------------------------------------------------------------------------- 1 | /*===------------- avx512ifmaintrin.h - IFMA intrinsics ------------------=== 2 | * 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | * 22 | *===-----------------------------------------------------------------------=== 23 | */ 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __IFMAINTRIN_H 29 | #define __IFMAINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"))) 33 | 34 | static __inline__ __m512i __DEFAULT_FN_ATTRS 35 | _mm512_madd52hi_epu64 (__m512i __X, __m512i __Y, __m512i __Z) 36 | { 37 | return (__m512i) __builtin_ia32_vpmadd52huq512_mask ((__v8di) __X, 38 | (__v8di) __Y, 39 | (__v8di) __Z, 40 | (__mmask8) -1); 41 | } 42 | 43 | static __inline__ __m512i __DEFAULT_FN_ATTRS 44 | _mm512_mask_madd52hi_epu64 (__m512i __W, __mmask8 __M, __m512i __X, 45 | __m512i __Y) 46 | { 47 | return (__m512i) __builtin_ia32_vpmadd52huq512_mask ((__v8di) __W, 48 | (__v8di) __X, 49 | (__v8di) __Y, 50 | (__mmask8) __M); 51 | } 52 | 53 | static __inline__ __m512i __DEFAULT_FN_ATTRS 54 | _mm512_maskz_madd52hi_epu64 (__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z) 55 | { 56 | return (__m512i) __builtin_ia32_vpmadd52huq512_maskz ((__v8di) __X, 57 | (__v8di) __Y, 58 | (__v8di) __Z, 59 | (__mmask8) __M); 60 | } 61 | 62 | static __inline__ __m512i __DEFAULT_FN_ATTRS 63 | _mm512_madd52lo_epu64 (__m512i __X, __m512i __Y, __m512i __Z) 64 | { 65 | return (__m512i) __builtin_ia32_vpmadd52luq512_mask ((__v8di) __X, 66 | (__v8di) __Y, 67 | (__v8di) __Z, 68 | (__mmask8) -1); 69 | } 70 | 71 | static __inline__ __m512i __DEFAULT_FN_ATTRS 72 | _mm512_mask_madd52lo_epu64 (__m512i __W, __mmask8 __M, __m512i __X, 73 | __m512i __Y) 74 | { 75 | return (__m512i) __builtin_ia32_vpmadd52luq512_mask ((__v8di) __W, 76 | (__v8di) __X, 77 | (__v8di) __Y, 78 | (__mmask8) __M); 79 | } 80 | 81 | static __inline__ __m512i __DEFAULT_FN_ATTRS 82 | _mm512_maskz_madd52lo_epu64 (__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z) 83 | { 84 | return (__m512i) __builtin_ia32_vpmadd52luq512_maskz ((__v8di) __X, 85 | (__v8di) __Y, 86 | (__v8di) __Z, 87 | (__mmask8) __M); 88 | } 89 | 90 | #undef __DEFAULT_FN_ATTRS 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/avx512vpopcntdqintrin.h: -------------------------------------------------------------------------------- 1 | /*===------------- avx512vpopcntdqintrin.h - AVX512VPOPCNTDQ intrinsics 2 | *------------------=== 3 | * 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | *===-----------------------------------------------------------------------=== 24 | */ 25 | #ifndef __IMMINTRIN_H 26 | #error \ 27 | "Never use directly; include instead." 28 | #endif 29 | 30 | #ifndef __AVX512VPOPCNTDQINTRIN_H 31 | #define __AVX512VPOPCNTDQINTRIN_H 32 | 33 | /* Define the default attributes for the functions in this file. */ 34 | #define __DEFAULT_FN_ATTRS \ 35 | __attribute__((__always_inline__, __nodebug__, __target__("avx512vpopcntd" \ 36 | "q"))) 37 | 38 | static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi64(__m512i __A) { 39 | return (__m512i)__builtin_ia32_vpopcntq_512((__v8di)__A); 40 | } 41 | 42 | static __inline__ __m512i __DEFAULT_FN_ATTRS 43 | _mm512_mask_popcnt_epi64(__m512i __W, __mmask8 __U, __m512i __A) { 44 | return (__m512i)__builtin_ia32_selectq_512( 45 | (__mmask8)__U, (__v8di)_mm512_popcnt_epi64(__A), (__v8di)__W); 46 | } 47 | 48 | static __inline__ __m512i __DEFAULT_FN_ATTRS 49 | _mm512_maskz_popcnt_epi64(__mmask8 __U, __m512i __A) { 50 | return _mm512_mask_popcnt_epi64((__m512i)_mm512_setzero_si512(), __U, __A); 51 | } 52 | 53 | static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi32(__m512i __A) { 54 | return (__m512i)__builtin_ia32_vpopcntd_512((__v16si)__A); 55 | } 56 | 57 | static __inline__ __m512i __DEFAULT_FN_ATTRS 58 | _mm512_mask_popcnt_epi32(__m512i __W, __mmask16 __U, __m512i __A) { 59 | return (__m512i)__builtin_ia32_selectd_512( 60 | (__mmask16)__U, (__v16si)_mm512_popcnt_epi32(__A), (__v16si)__W); 61 | } 62 | 63 | static __inline__ __m512i __DEFAULT_FN_ATTRS 64 | _mm512_maskz_popcnt_epi32(__mmask16 __U, __m512i __A) { 65 | return _mm512_mask_popcnt_epi32((__m512i)_mm512_setzero_si512(), __U, __A); 66 | } 67 | 68 | #undef __DEFAULT_FN_ATTRS 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/bmi2intrin.h: -------------------------------------------------------------------------------- 1 | /*===---- bmi2intrin.h - BMI2 intrinsics -----------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #if !defined __X86INTRIN_H && !defined __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __BMI2INTRIN_H 29 | #define __BMI2INTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi2"))) 33 | 34 | static __inline__ unsigned int __DEFAULT_FN_ATTRS 35 | _bzhi_u32(unsigned int __X, unsigned int __Y) 36 | { 37 | return __builtin_ia32_bzhi_si(__X, __Y); 38 | } 39 | 40 | static __inline__ unsigned int __DEFAULT_FN_ATTRS 41 | _pdep_u32(unsigned int __X, unsigned int __Y) 42 | { 43 | return __builtin_ia32_pdep_si(__X, __Y); 44 | } 45 | 46 | static __inline__ unsigned int __DEFAULT_FN_ATTRS 47 | _pext_u32(unsigned int __X, unsigned int __Y) 48 | { 49 | return __builtin_ia32_pext_si(__X, __Y); 50 | } 51 | 52 | #ifdef __x86_64__ 53 | 54 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS 55 | _bzhi_u64(unsigned long long __X, unsigned long long __Y) 56 | { 57 | return __builtin_ia32_bzhi_di(__X, __Y); 58 | } 59 | 60 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS 61 | _pdep_u64(unsigned long long __X, unsigned long long __Y) 62 | { 63 | return __builtin_ia32_pdep_di(__X, __Y); 64 | } 65 | 66 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS 67 | _pext_u64(unsigned long long __X, unsigned long long __Y) 68 | { 69 | return __builtin_ia32_pext_di(__X, __Y); 70 | } 71 | 72 | static __inline__ unsigned long long __DEFAULT_FN_ATTRS 73 | _mulx_u64 (unsigned long long __X, unsigned long long __Y, 74 | unsigned long long *__P) 75 | { 76 | unsigned __int128 __res = (unsigned __int128) __X * __Y; 77 | *__P = (unsigned long long) (__res >> 64); 78 | return (unsigned long long) __res; 79 | } 80 | 81 | #else /* !__x86_64__ */ 82 | 83 | static __inline__ unsigned int __DEFAULT_FN_ATTRS 84 | _mulx_u32 (unsigned int __X, unsigned int __Y, unsigned int *__P) 85 | { 86 | unsigned long long __res = (unsigned long long) __X * __Y; 87 | *__P = (unsigned int) (__res >> 32); 88 | return (unsigned int) __res; 89 | } 90 | 91 | #endif /* !__x86_64__ */ 92 | 93 | #undef __DEFAULT_FN_ATTRS 94 | 95 | #endif /* __BMI2INTRIN_H */ 96 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/clflushoptintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- clflushoptintrin.h - CLFLUSHOPT intrinsic ------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __CLFLUSHOPTINTRIN_H 29 | #define __CLFLUSHOPTINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clflushopt"))) 33 | 34 | static __inline__ void __DEFAULT_FN_ATTRS 35 | _mm_clflushopt(char * __m) { 36 | __builtin_ia32_clflushopt(__m); 37 | } 38 | 39 | #undef __DEFAULT_FN_ATTRS 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/clzerointrin.h: -------------------------------------------------------------------------------- 1 | /*===----------------------- clzerointrin.h - CLZERO ----------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | #ifndef __X86INTRIN_H 24 | #error "Never use directly; include instead." 25 | #endif 26 | 27 | #ifndef _CLZEROINTRIN_H 28 | #define _CLZEROINTRIN_H 29 | 30 | /* Define the default attributes for the functions in this file. */ 31 | #define __DEFAULT_FN_ATTRS \ 32 | __attribute__((__always_inline__, __nodebug__, __target__("clzero"))) 33 | 34 | /// \brief Loads the cache line address and zero's out the cacheline 35 | /// 36 | /// \headerfile 37 | /// 38 | /// This intrinsic corresponds to the CLZERO instruction. 39 | /// 40 | /// \param __line 41 | /// A pointer to a cacheline which needs to be zeroed out. 42 | static __inline__ void __DEFAULT_FN_ATTRS 43 | _mm_clzero (void * __line) 44 | { 45 | __builtin_ia32_clzero ((void *)__line); 46 | } 47 | 48 | #undef __DEFAULT_FN_ATTRS 49 | 50 | #endif /* _CLZEROINTRIN_H */ 51 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/cuda_wrappers/complex: -------------------------------------------------------------------------------- 1 | /*===---- complex - CUDA wrapper for ------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __CLANG_CUDA_WRAPPERS_COMPLEX 25 | #define __CLANG_CUDA_WRAPPERS_COMPLEX 26 | 27 | // Wrapper around that forces its functions to be __host__ 28 | // __device__. 29 | 30 | // First, include host-only headers we think are likely to be included by 31 | // , so that the pragma below only applies to itself. 32 | #if __cplusplus >= 201103L 33 | #include 34 | #endif 35 | #include 36 | #include 37 | #include 38 | 39 | // Next, include our wrapper, to ensure that device overloads of 40 | // std::min/max are available. 41 | #include 42 | 43 | #pragma clang force_cuda_host_device begin 44 | 45 | // When compiling for device, ask libstdc++ to use its own implements of 46 | // complex functions, rather than calling builtins (which resolve to library 47 | // functions that don't exist when compiling CUDA device code). 48 | // 49 | // This is a little dicey, because it causes libstdc++ to define a different 50 | // set of overloads on host and device. 51 | // 52 | // // Present only when compiling for host. 53 | // __host__ __device__ void complex sin(const complex& x) { 54 | // return __builtin_csinf(x); 55 | // } 56 | // 57 | // // Present when compiling for host and for device. 58 | // template 59 | // void __host__ __device__ complex sin(const complex& x) { 60 | // return complex(sin(x.real()) * cosh(x.imag()), 61 | // cos(x.real()), sinh(x.imag())); 62 | // } 63 | // 64 | // This is safe because when compiling for device, all function calls in 65 | // __host__ code to sin() will still resolve to *something*, even if they don't 66 | // resolve to the same function as they resolve to when compiling for host. We 67 | // don't care that they don't resolve to the right function because we won't 68 | // codegen this host code when compiling for device. 69 | 70 | #pragma push_macro("_GLIBCXX_USE_C99_COMPLEX") 71 | #pragma push_macro("_GLIBCXX_USE_C99_COMPLEX_TR1") 72 | #define _GLIBCXX_USE_C99_COMPLEX 0 73 | #define _GLIBCXX_USE_C99_COMPLEX_TR1 0 74 | 75 | #include_next 76 | 77 | #pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX_TR1") 78 | #pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX") 79 | 80 | #pragma clang force_cuda_host_device end 81 | 82 | #endif // include guard 83 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/cuda_wrappers/new: -------------------------------------------------------------------------------- 1 | /*===---- complex - CUDA wrapper for ------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __CLANG_CUDA_WRAPPERS_NEW 25 | #define __CLANG_CUDA_WRAPPERS_NEW 26 | 27 | #include_next 28 | 29 | // Device overrides for placement new and delete. 30 | #pragma push_macro("CUDA_NOEXCEPT") 31 | #if __cplusplus >= 201103L 32 | #define CUDA_NOEXCEPT noexcept 33 | #else 34 | #define CUDA_NOEXCEPT 35 | #endif 36 | 37 | __device__ inline void *operator new(__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT { 38 | return __ptr; 39 | } 40 | __device__ inline void *operator new[](__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT { 41 | return __ptr; 42 | } 43 | __device__ inline void operator delete(void *, void *) CUDA_NOEXCEPT {} 44 | __device__ inline void operator delete[](void *, void *) CUDA_NOEXCEPT {} 45 | #pragma pop_macro("CUDA_NOEXCEPT") 46 | 47 | #endif // include guard 48 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/ia32intrin.h: -------------------------------------------------------------------------------- 1 | /* ===-------- ia32intrin.h ---------------------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __X86INTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __IA32INTRIN_H 29 | #define __IA32INTRIN_H 30 | 31 | #ifdef __x86_64__ 32 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) 33 | __readeflags(void) 34 | { 35 | return __builtin_ia32_readeflags_u64(); 36 | } 37 | 38 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) 39 | __writeeflags(unsigned long long __f) 40 | { 41 | __builtin_ia32_writeeflags_u64(__f); 42 | } 43 | 44 | #else /* !__x86_64__ */ 45 | static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__)) 46 | __readeflags(void) 47 | { 48 | return __builtin_ia32_readeflags_u32(); 49 | } 50 | 51 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) 52 | __writeeflags(unsigned int __f) 53 | { 54 | __builtin_ia32_writeeflags_u32(__f); 55 | } 56 | #endif /* !__x86_64__ */ 57 | 58 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) 59 | __rdpmc(int __A) { 60 | return __builtin_ia32_rdpmc(__A); 61 | } 62 | 63 | /* __rdtscp */ 64 | static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) 65 | __rdtscp(unsigned int *__A) { 66 | return __builtin_ia32_rdtscp(__A); 67 | } 68 | 69 | #define _rdtsc() __rdtsc() 70 | 71 | #define _rdpmc(A) __rdpmc(A) 72 | 73 | #endif /* __IA32INTRIN_H */ 74 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/inttypes.h: -------------------------------------------------------------------------------- 1 | /*===---- inttypes.h - Standard header for integer printf macros ----------===*\ 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | \*===----------------------------------------------------------------------===*/ 22 | 23 | #ifndef __CLANG_INTTYPES_H 24 | #define __CLANG_INTTYPES_H 25 | 26 | #if defined(_MSC_VER) && _MSC_VER < 1800 27 | #error MSVC does not have inttypes.h prior to Visual Studio 2013 28 | #endif 29 | 30 | #include_next 31 | 32 | #if defined(_MSC_VER) && _MSC_VER < 1900 33 | /* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x". 34 | * This triggers format warnings, so fix it up here. */ 35 | #undef PRId32 36 | #undef PRIdLEAST32 37 | #undef PRIdFAST32 38 | #undef PRIi32 39 | #undef PRIiLEAST32 40 | #undef PRIiFAST32 41 | #undef PRIo32 42 | #undef PRIoLEAST32 43 | #undef PRIoFAST32 44 | #undef PRIu32 45 | #undef PRIuLEAST32 46 | #undef PRIuFAST32 47 | #undef PRIx32 48 | #undef PRIxLEAST32 49 | #undef PRIxFAST32 50 | #undef PRIX32 51 | #undef PRIXLEAST32 52 | #undef PRIXFAST32 53 | 54 | #undef SCNd32 55 | #undef SCNdLEAST32 56 | #undef SCNdFAST32 57 | #undef SCNi32 58 | #undef SCNiLEAST32 59 | #undef SCNiFAST32 60 | #undef SCNo32 61 | #undef SCNoLEAST32 62 | #undef SCNoFAST32 63 | #undef SCNu32 64 | #undef SCNuLEAST32 65 | #undef SCNuFAST32 66 | #undef SCNx32 67 | #undef SCNxLEAST32 68 | #undef SCNxFAST32 69 | 70 | #define PRId32 "d" 71 | #define PRIdLEAST32 "d" 72 | #define PRIdFAST32 "d" 73 | #define PRIi32 "i" 74 | #define PRIiLEAST32 "i" 75 | #define PRIiFAST32 "i" 76 | #define PRIo32 "o" 77 | #define PRIoLEAST32 "o" 78 | #define PRIoFAST32 "o" 79 | #define PRIu32 "u" 80 | #define PRIuLEAST32 "u" 81 | #define PRIuFAST32 "u" 82 | #define PRIx32 "x" 83 | #define PRIxLEAST32 "x" 84 | #define PRIxFAST32 "x" 85 | #define PRIX32 "X" 86 | #define PRIXLEAST32 "X" 87 | #define PRIXFAST32 "X" 88 | 89 | #define SCNd32 "d" 90 | #define SCNdLEAST32 "d" 91 | #define SCNdFAST32 "d" 92 | #define SCNi32 "i" 93 | #define SCNiLEAST32 "i" 94 | #define SCNiFAST32 "i" 95 | #define SCNo32 "o" 96 | #define SCNoLEAST32 "o" 97 | #define SCNoFAST32 "o" 98 | #define SCNu32 "u" 99 | #define SCNuLEAST32 "u" 100 | #define SCNuFAST32 "u" 101 | #define SCNx32 "x" 102 | #define SCNxLEAST32 "x" 103 | #define SCNxFAST32 "x" 104 | #endif 105 | 106 | #endif /* __CLANG_INTTYPES_H */ 107 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/iso646.h: -------------------------------------------------------------------------------- 1 | /*===---- iso646.h - Standard header for alternate spellings of operators---=== 2 | * 3 | * Copyright (c) 2008 Eli Friedman 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | *===-----------------------------------------------------------------------=== 24 | */ 25 | 26 | #ifndef __ISO646_H 27 | #define __ISO646_H 28 | 29 | #ifndef __cplusplus 30 | #define and && 31 | #define and_eq &= 32 | #define bitand & 33 | #define bitor | 34 | #define compl ~ 35 | #define not ! 36 | #define not_eq != 37 | #define or || 38 | #define or_eq |= 39 | #define xor ^ 40 | #define xor_eq ^= 41 | #endif 42 | 43 | #endif /* __ISO646_H */ 44 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/mm_malloc.h: -------------------------------------------------------------------------------- 1 | /*===---- mm_malloc.h - Allocating and Freeing Aligned Memory Blocks -------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __MM_MALLOC_H 25 | #define __MM_MALLOC_H 26 | 27 | #include 28 | 29 | #ifdef _WIN32 30 | #include 31 | #else 32 | #ifndef __cplusplus 33 | extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size); 34 | #else 35 | // Some systems (e.g. those with GNU libc) declare posix_memalign with an 36 | // exception specifier. Via an "egregious workaround" in 37 | // Sema::CheckEquivalentExceptionSpec, Clang accepts the following as a valid 38 | // redeclaration of glibc's declaration. 39 | extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size); 40 | #endif 41 | #endif 42 | 43 | #if !(defined(_WIN32) && defined(_mm_malloc)) 44 | static __inline__ void *__attribute__((__always_inline__, __nodebug__, 45 | __malloc__)) 46 | _mm_malloc(size_t __size, size_t __align) 47 | { 48 | if (__align == 1) { 49 | return malloc(__size); 50 | } 51 | 52 | if (!(__align & (__align - 1)) && __align < sizeof(void *)) 53 | __align = sizeof(void *); 54 | 55 | void *__mallocedMemory; 56 | #if defined(__MINGW32__) 57 | __mallocedMemory = __mingw_aligned_malloc(__size, __align); 58 | #elif defined(_WIN32) 59 | __mallocedMemory = _aligned_malloc(__size, __align); 60 | #else 61 | if (posix_memalign(&__mallocedMemory, __align, __size)) 62 | return 0; 63 | #endif 64 | 65 | return __mallocedMemory; 66 | } 67 | 68 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) 69 | _mm_free(void *__p) 70 | { 71 | free(__p); 72 | } 73 | #endif 74 | 75 | #endif /* __MM_MALLOC_H */ 76 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/mwaitxintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- mwaitxintrin.h - MONITORX/MWAITX intrinsics ----------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __X86INTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef _MWAITXINTRIN_H 29 | #define _MWAITXINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mwaitx"))) 33 | static __inline__ void __DEFAULT_FN_ATTRS 34 | _mm_monitorx(void const * __p, unsigned __extensions, unsigned __hints) 35 | { 36 | __builtin_ia32_monitorx((void *)__p, __extensions, __hints); 37 | } 38 | 39 | static __inline__ void __DEFAULT_FN_ATTRS 40 | _mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock) 41 | { 42 | __builtin_ia32_mwaitx(__extensions, __hints, __clock); 43 | } 44 | 45 | #undef __DEFAULT_FN_ATTRS 46 | 47 | #endif /* _MWAITXINTRIN_H */ 48 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/nmmintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- nmmintrin.h - SSE4 intrinsics ------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef _NMMINTRIN_H 25 | #define _NMMINTRIN_H 26 | 27 | /* To match expectations of gcc we put the sse4.2 definitions into smmintrin.h, 28 | just include it now then. */ 29 | #include 30 | #endif /* _NMMINTRIN_H */ 31 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/pkuintrin.h: -------------------------------------------------------------------------------- 1 | /*===------------- pkuintrin.h - PKU intrinsics ------------------=== 2 | * 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | * 22 | *===-----------------------------------------------------------------------=== 23 | */ 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __PKUINTRIN_H 29 | #define __PKUINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("pku"))) 33 | 34 | static __inline__ unsigned int __DEFAULT_FN_ATTRS 35 | _rdpkru_u32(void) 36 | { 37 | return __builtin_ia32_rdpkru(); 38 | } 39 | 40 | static __inline__ void __DEFAULT_FN_ATTRS 41 | _wrpkru(unsigned int __val) 42 | { 43 | return __builtin_ia32_wrpkru(__val); 44 | } 45 | 46 | #undef __DEFAULT_FN_ATTRS 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/prfchwintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- prfchwintrin.h - PREFETCHW intrinsic -----------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #if !defined(__X86INTRIN_H) && !defined(_MM3DNOW_H_INCLUDED) 25 | #error "Never use directly; include or instead." 26 | #endif 27 | 28 | #ifndef __PRFCHWINTRIN_H 29 | #define __PRFCHWINTRIN_H 30 | 31 | #if defined(__PRFCHW__) || defined(__3dNOW__) 32 | /// \brief Loads a memory sequence containing the specified memory address into 33 | /// all data cache levels. The cache-coherency state is set to exclusive. 34 | /// Data can be read from and written to the cache line without additional 35 | /// delay. 36 | /// 37 | /// \headerfile 38 | /// 39 | /// This intrinsic corresponds to the \c PREFETCHT0 instruction. 40 | /// 41 | /// \param __P 42 | /// A pointer specifying the memory address to be prefetched. 43 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) 44 | _m_prefetch(void *__P) 45 | { 46 | __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */); 47 | } 48 | 49 | /// \brief Loads a memory sequence containing the specified memory address into 50 | /// the L1 data cache and sets the cache-coherency to modified. This 51 | /// provides a hint to the processor that the cache line will be modified. 52 | /// It is intended for use when the cache line will be written to shortly 53 | /// after the prefetch is performed. 54 | /// 55 | /// Note that the effect of this intrinsic is dependent on the processor 56 | /// implementation. 57 | /// 58 | /// \headerfile 59 | /// 60 | /// This intrinsic corresponds to the \c PREFETCHW instruction. 61 | /// 62 | /// \param __P 63 | /// A pointer specifying the memory address to be prefetched. 64 | static __inline__ void __attribute__((__always_inline__, __nodebug__)) 65 | _m_prefetchw(void *__P) 66 | { 67 | __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */); 68 | } 69 | #endif 70 | 71 | #endif /* __PRFCHWINTRIN_H */ 72 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/rdseedintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- rdseedintrin.h - RDSEED intrinsics -------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __X86INTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __RDSEEDINTRIN_H 29 | #define __RDSEEDINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("rdseed"))) 33 | 34 | static __inline__ int __DEFAULT_FN_ATTRS 35 | _rdseed16_step(unsigned short *__p) 36 | { 37 | return __builtin_ia32_rdseed16_step(__p); 38 | } 39 | 40 | static __inline__ int __DEFAULT_FN_ATTRS 41 | _rdseed32_step(unsigned int *__p) 42 | { 43 | return __builtin_ia32_rdseed32_step(__p); 44 | } 45 | 46 | #ifdef __x86_64__ 47 | static __inline__ int __DEFAULT_FN_ATTRS 48 | _rdseed64_step(unsigned long long *__p) 49 | { 50 | return __builtin_ia32_rdseed64_step(__p); 51 | } 52 | #endif 53 | 54 | #undef __DEFAULT_FN_ATTRS 55 | 56 | #endif /* __RDSEEDINTRIN_H */ 57 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/rtmintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- rtmintrin.h - RTM intrinsics -------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __RTMINTRIN_H 29 | #define __RTMINTRIN_H 30 | 31 | #define _XBEGIN_STARTED (~0u) 32 | #define _XABORT_EXPLICIT (1 << 0) 33 | #define _XABORT_RETRY (1 << 1) 34 | #define _XABORT_CONFLICT (1 << 2) 35 | #define _XABORT_CAPACITY (1 << 3) 36 | #define _XABORT_DEBUG (1 << 4) 37 | #define _XABORT_NESTED (1 << 5) 38 | #define _XABORT_CODE(x) (((x) >> 24) & 0xFF) 39 | 40 | /* Define the default attributes for the functions in this file. */ 41 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("rtm"))) 42 | 43 | static __inline__ unsigned int __DEFAULT_FN_ATTRS 44 | _xbegin(void) 45 | { 46 | return __builtin_ia32_xbegin(); 47 | } 48 | 49 | static __inline__ void __DEFAULT_FN_ATTRS 50 | _xend(void) 51 | { 52 | __builtin_ia32_xend(); 53 | } 54 | 55 | #define _xabort(imm) __builtin_ia32_xabort((imm)) 56 | 57 | #undef __DEFAULT_FN_ATTRS 58 | 59 | #endif /* __RTMINTRIN_H */ 60 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/s390intrin.h: -------------------------------------------------------------------------------- 1 | /*===---- s390intrin.h - SystemZ intrinsics --------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __S390INTRIN_H 25 | #define __S390INTRIN_H 26 | 27 | #ifndef __s390__ 28 | #error " is for s390 only" 29 | #endif 30 | 31 | #ifdef __HTM__ 32 | #include 33 | #endif 34 | 35 | #ifdef __VEC__ 36 | #include 37 | #endif 38 | 39 | #endif /* __S390INTRIN_H*/ 40 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/sanitizer/coverage_interface.h: -------------------------------------------------------------------------------- 1 | //===-- sanitizer/coverage_interface.h --------------------------*- C++ -*-===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // Public interface for sanitizer coverage. 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef SANITIZER_COVERAG_INTERFACE_H 14 | #define SANITIZER_COVERAG_INTERFACE_H 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | // Record and dump coverage info. 23 | void __sanitizer_cov_dump(); 24 | 25 | // Dump collected coverage info. Sorts pcs by module into individual 26 | // .sancov files. 27 | void __sanitizer_dump_coverage(const uintptr_t *pcs, uintptr_t len); 28 | 29 | #ifdef __cplusplus 30 | } // extern "C" 31 | #endif 32 | 33 | #endif // SANITIZER_COVERAG_INTERFACE_H 34 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/sanitizer/esan_interface.h: -------------------------------------------------------------------------------- 1 | //===-- sanitizer/esan_interface.h ------------------------------*- C++ -*-===// 2 | // 3 | // The LLVM Compiler Infrastructure 4 | // 5 | // This file is distributed under the University of Illinois Open Source 6 | // License. See LICENSE.TXT for details. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | // 10 | // This file is a part of EfficiencySanitizer, a family of performance tuners. 11 | // 12 | // Public interface header. 13 | //===----------------------------------------------------------------------===// 14 | #ifndef SANITIZER_ESAN_INTERFACE_H 15 | #define SANITIZER_ESAN_INTERFACE_H 16 | 17 | #include 18 | 19 | // We declare our interface routines as weak to allow the user to avoid 20 | // ifdefs and instead use this pattern to allow building the same sources 21 | // with and without our runtime library: 22 | // if (__esan_report) 23 | // __esan_report(); 24 | #ifdef _MSC_VER 25 | /* selectany is as close to weak as we'll get. */ 26 | #define COMPILER_RT_WEAK __declspec(selectany) 27 | #elif __GNUC__ 28 | #define COMPILER_RT_WEAK __attribute__((weak)) 29 | #else 30 | #define COMPILER_RT_WEAK 31 | #endif 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | // This function can be called mid-run (or at the end of a run for 38 | // a server process that doesn't shut down normally) to request that 39 | // data for that point in the run be reported from the tool. 40 | void COMPILER_RT_WEAK __esan_report(); 41 | 42 | // This function returns the number of samples that the esan tool has collected 43 | // to this point. This is useful for testing. 44 | unsigned int COMPILER_RT_WEAK __esan_get_sample_count(); 45 | 46 | #ifdef __cplusplus 47 | } // extern "C" 48 | #endif 49 | 50 | #endif // SANITIZER_ESAN_INTERFACE_H 51 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/shaintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- shaintrin.h - SHA intrinsics -------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __SHAINTRIN_H 29 | #define __SHAINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sha"))) 33 | 34 | #define _mm_sha1rnds4_epu32(V1, V2, M) __extension__ ({ \ 35 | __builtin_ia32_sha1rnds4((__v4si)(__m128i)(V1), (__v4si)(__m128i)(V2), (M)); }) 36 | 37 | static __inline__ __m128i __DEFAULT_FN_ATTRS 38 | _mm_sha1nexte_epu32(__m128i __X, __m128i __Y) 39 | { 40 | return (__m128i)__builtin_ia32_sha1nexte((__v4si)__X, (__v4si)__Y); 41 | } 42 | 43 | static __inline__ __m128i __DEFAULT_FN_ATTRS 44 | _mm_sha1msg1_epu32(__m128i __X, __m128i __Y) 45 | { 46 | return (__m128i)__builtin_ia32_sha1msg1((__v4si)__X, (__v4si)__Y); 47 | } 48 | 49 | static __inline__ __m128i __DEFAULT_FN_ATTRS 50 | _mm_sha1msg2_epu32(__m128i __X, __m128i __Y) 51 | { 52 | return (__m128i)__builtin_ia32_sha1msg2((__v4si)__X, (__v4si)__Y); 53 | } 54 | 55 | static __inline__ __m128i __DEFAULT_FN_ATTRS 56 | _mm_sha256rnds2_epu32(__m128i __X, __m128i __Y, __m128i __Z) 57 | { 58 | return (__m128i)__builtin_ia32_sha256rnds2((__v4si)__X, (__v4si)__Y, (__v4si)__Z); 59 | } 60 | 61 | static __inline__ __m128i __DEFAULT_FN_ATTRS 62 | _mm_sha256msg1_epu32(__m128i __X, __m128i __Y) 63 | { 64 | return (__m128i)__builtin_ia32_sha256msg1((__v4si)__X, (__v4si)__Y); 65 | } 66 | 67 | static __inline__ __m128i __DEFAULT_FN_ATTRS 68 | _mm_sha256msg2_epu32(__m128i __X, __m128i __Y) 69 | { 70 | return (__m128i)__builtin_ia32_sha256msg2((__v4si)__X, (__v4si)__Y); 71 | } 72 | 73 | #undef __DEFAULT_FN_ATTRS 74 | 75 | #endif /* __SHAINTRIN_H */ 76 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/stdalign.h: -------------------------------------------------------------------------------- 1 | /*===---- stdalign.h - Standard header for alignment ------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __STDALIGN_H 25 | #define __STDALIGN_H 26 | 27 | #ifndef __cplusplus 28 | #define alignas _Alignas 29 | #define alignof _Alignof 30 | #endif 31 | 32 | #define __alignas_is_defined 1 33 | #define __alignof_is_defined 1 34 | 35 | #endif /* __STDALIGN_H */ 36 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/stdarg.h: -------------------------------------------------------------------------------- 1 | /*===---- stdarg.h - Variable argument handling ----------------------------=== 2 | * 3 | * Copyright (c) 2008 Eli Friedman 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | *===-----------------------------------------------------------------------=== 24 | */ 25 | 26 | #ifndef __STDARG_H 27 | #define __STDARG_H 28 | 29 | #ifndef _VA_LIST 30 | typedef __builtin_va_list va_list; 31 | #define _VA_LIST 32 | #endif 33 | #define va_start(ap, param) __builtin_va_start(ap, param) 34 | #define va_end(ap) __builtin_va_end(ap) 35 | #define va_arg(ap, type) __builtin_va_arg(ap, type) 36 | 37 | /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode 38 | * or -ansi is not specified, since it was not part of C90. 39 | */ 40 | #define __va_copy(d,s) __builtin_va_copy(d,s) 41 | 42 | #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__) 43 | #define va_copy(dest, src) __builtin_va_copy(dest, src) 44 | #endif 45 | 46 | #ifndef __GNUC_VA_LIST 47 | #define __GNUC_VA_LIST 1 48 | typedef __builtin_va_list __gnuc_va_list; 49 | #endif 50 | 51 | #endif /* __STDARG_H */ 52 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/stdbool.h: -------------------------------------------------------------------------------- 1 | /*===---- stdbool.h - Standard header for booleans -------------------------=== 2 | * 3 | * Copyright (c) 2008 Eli Friedman 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | * 23 | *===-----------------------------------------------------------------------=== 24 | */ 25 | 26 | #ifndef __STDBOOL_H 27 | #define __STDBOOL_H 28 | 29 | /* Don't define bool, true, and false in C++, except as a GNU extension. */ 30 | #ifndef __cplusplus 31 | #define bool _Bool 32 | #define true 1 33 | #define false 0 34 | #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) 35 | /* Define _Bool, bool, false, true as a GNU extension. */ 36 | #define _Bool bool 37 | #define bool bool 38 | #define false false 39 | #define true true 40 | #endif 41 | 42 | #define __bool_true_false_are_defined 1 43 | 44 | #endif /* __STDBOOL_H */ 45 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/stdnoreturn.h: -------------------------------------------------------------------------------- 1 | /*===---- stdnoreturn.h - Standard header for noreturn macro ---------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __STDNORETURN_H 25 | #define __STDNORETURN_H 26 | 27 | #define noreturn _Noreturn 28 | #define __noreturn_is_defined 1 29 | 30 | #endif /* __STDNORETURN_H */ 31 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/vadefs.h: -------------------------------------------------------------------------------- 1 | /* ===-------- vadefs.h ---------------------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | /* Only include this if we are aiming for MSVC compatibility. */ 25 | #ifndef _MSC_VER 26 | #include_next 27 | #else 28 | 29 | #ifndef __clang_vadefs_h 30 | #define __clang_vadefs_h 31 | 32 | #include_next 33 | 34 | /* Override macros from vadefs.h with definitions that work with Clang. */ 35 | #ifdef _crt_va_start 36 | #undef _crt_va_start 37 | #define _crt_va_start(ap, param) __builtin_va_start(ap, param) 38 | #endif 39 | #ifdef _crt_va_end 40 | #undef _crt_va_end 41 | #define _crt_va_end(ap) __builtin_va_end(ap) 42 | #endif 43 | #ifdef _crt_va_arg 44 | #undef _crt_va_arg 45 | #define _crt_va_arg(ap, type) __builtin_va_arg(ap, type) 46 | #endif 47 | 48 | /* VS 2015 switched to double underscore names, which is an improvement, but now 49 | * we have to intercept those names too. 50 | */ 51 | #ifdef __crt_va_start 52 | #undef __crt_va_start 53 | #define __crt_va_start(ap, param) __builtin_va_start(ap, param) 54 | #endif 55 | #ifdef __crt_va_end 56 | #undef __crt_va_end 57 | #define __crt_va_end(ap) __builtin_va_end(ap) 58 | #endif 59 | #ifdef __crt_va_arg 60 | #undef __crt_va_arg 61 | #define __crt_va_arg(ap, type) __builtin_va_arg(ap, type) 62 | #endif 63 | 64 | #endif 65 | #endif 66 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/varargs.h: -------------------------------------------------------------------------------- 1 | /*===---- varargs.h - Variable argument handling -------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | #ifndef __VARARGS_H 24 | #define __VARARGS_H 25 | #error "Please use instead of " 26 | #endif 27 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/wmmintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- wmmintrin.h - AES intrinsics ------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef _WMMINTRIN_H 25 | #define _WMMINTRIN_H 26 | 27 | #include 28 | 29 | #include <__wmmintrin_aes.h> 30 | 31 | #include <__wmmintrin_pclmul.h> 32 | 33 | #endif /* _WMMINTRIN_H */ 34 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/x86intrin.h: -------------------------------------------------------------------------------- 1 | /*===---- x86intrin.h - X86 intrinsics -------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __X86INTRIN_H 25 | #define __X86INTRIN_H 26 | 27 | #include 28 | 29 | #include 30 | 31 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__3dNOW__) 32 | #include 33 | #endif 34 | 35 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__) 36 | #include 37 | #endif 38 | 39 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI2__) 40 | #include 41 | #endif 42 | 43 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__LZCNT__) 44 | #include 45 | #endif 46 | 47 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__POPCNT__) 48 | #include 49 | #endif 50 | 51 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDSEED__) 52 | #include 53 | #endif 54 | 55 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__PRFCHW__) 56 | #include 57 | #endif 58 | 59 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE4A__) 60 | #include 61 | #endif 62 | 63 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA4__) 64 | #include 65 | #endif 66 | 67 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__XOP__) 68 | #include 69 | #endif 70 | 71 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__TBM__) 72 | #include 73 | #endif 74 | 75 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__LWP__) 76 | #include 77 | #endif 78 | 79 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__F16C__) 80 | #include 81 | #endif 82 | 83 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__MWAITX__) 84 | #include 85 | #endif 86 | 87 | #if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__) 88 | #include 89 | #endif 90 | 91 | #endif /* __X86INTRIN_H */ 92 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/xsavecintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- xsavecintrin.h - XSAVEC intrinsic ------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __XSAVECINTRIN_H 29 | #define __XSAVECINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsavec"))) 33 | 34 | static __inline__ void __DEFAULT_FN_ATTRS 35 | _xsavec(void *__p, unsigned long long __m) { 36 | __builtin_ia32_xsavec(__p, __m); 37 | } 38 | 39 | #ifdef __x86_64__ 40 | static __inline__ void __DEFAULT_FN_ATTRS 41 | _xsavec64(void *__p, unsigned long long __m) { 42 | __builtin_ia32_xsavec64(__p, __m); 43 | } 44 | #endif 45 | 46 | #undef __DEFAULT_FN_ATTRS 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/xsaveintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- xsaveintrin.h - XSAVE intrinsic ------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __XSAVEINTRIN_H 29 | #define __XSAVEINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsave"))) 33 | 34 | static __inline__ void __DEFAULT_FN_ATTRS 35 | _xsave(void *__p, unsigned long long __m) { 36 | return __builtin_ia32_xsave(__p, __m); 37 | } 38 | 39 | static __inline__ void __DEFAULT_FN_ATTRS 40 | _xrstor(void *__p, unsigned long long __m) { 41 | return __builtin_ia32_xrstor(__p, __m); 42 | } 43 | 44 | #ifdef __x86_64__ 45 | static __inline__ void __DEFAULT_FN_ATTRS 46 | _xsave64(void *__p, unsigned long long __m) { 47 | return __builtin_ia32_xsave64(__p, __m); 48 | } 49 | 50 | static __inline__ void __DEFAULT_FN_ATTRS 51 | _xrstor64(void *__p, unsigned long long __m) { 52 | return __builtin_ia32_xrstor64(__p, __m); 53 | } 54 | #endif 55 | 56 | #undef __DEFAULT_FN_ATTRS 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/xsaveoptintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- xsaveoptintrin.h - XSAVEOPT intrinsic ------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __XSAVEOPTINTRIN_H 29 | #define __XSAVEOPTINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsaveopt"))) 33 | 34 | static __inline__ void __DEFAULT_FN_ATTRS 35 | _xsaveopt(void *__p, unsigned long long __m) { 36 | return __builtin_ia32_xsaveopt(__p, __m); 37 | } 38 | 39 | #ifdef __x86_64__ 40 | static __inline__ void __DEFAULT_FN_ATTRS 41 | _xsaveopt64(void *__p, unsigned long long __m) { 42 | return __builtin_ia32_xsaveopt64(__p, __m); 43 | } 44 | #endif 45 | 46 | #undef __DEFAULT_FN_ATTRS 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/xsavesintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- xsavesintrin.h - XSAVES intrinsic ------------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __XSAVESINTRIN_H 29 | #define __XSAVESINTRIN_H 30 | 31 | /* Define the default attributes for the functions in this file. */ 32 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsaves"))) 33 | 34 | static __inline__ void __DEFAULT_FN_ATTRS 35 | _xsaves(void *__p, unsigned long long __m) { 36 | __builtin_ia32_xsaves(__p, __m); 37 | } 38 | 39 | static __inline__ void __DEFAULT_FN_ATTRS 40 | _xrstors(void *__p, unsigned long long __m) { 41 | __builtin_ia32_xrstors(__p, __m); 42 | } 43 | 44 | #ifdef __x86_64__ 45 | static __inline__ void __DEFAULT_FN_ATTRS 46 | _xrstors64(void *__p, unsigned long long __m) { 47 | __builtin_ia32_xrstors64(__p, __m); 48 | } 49 | 50 | static __inline__ void __DEFAULT_FN_ATTRS 51 | _xsaves64(void *__p, unsigned long long __m) { 52 | __builtin_ia32_xsaves64(__p, __m); 53 | } 54 | #endif 55 | 56 | #undef __DEFAULT_FN_ATTRS 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/clang/5.0.1/include/xtestintrin.h: -------------------------------------------------------------------------------- 1 | /*===---- xtestintrin.h - XTEST intrinsic ---------------------------------=== 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | * THE SOFTWARE. 20 | * 21 | *===-----------------------------------------------------------------------=== 22 | */ 23 | 24 | #ifndef __IMMINTRIN_H 25 | #error "Never use directly; include instead." 26 | #endif 27 | 28 | #ifndef __XTESTINTRIN_H 29 | #define __XTESTINTRIN_H 30 | 31 | /* xtest returns non-zero if the instruction is executed within an RTM or active 32 | * HLE region. */ 33 | /* FIXME: This can be an either or for RTM/HLE. Deal with this when HLE is 34 | * supported. */ 35 | static __inline__ int 36 | __attribute__((__always_inline__, __nodebug__, __target__("rtm"))) 37 | _xtest(void) { 38 | return __builtin_ia32_xtest(); 39 | } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/cquery/lib/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.5 -------------------------------------------------------------------------------- /fonts/CONSOLAS_NERD_FONT_MONO.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/fonts/CONSOLAS_NERD_FONT_MONO.TTF -------------------------------------------------------------------------------- /fonts/Droid_Sans_Mono_Nerd_Font_Complete_Mono_Windows_Compatible.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/fonts/Droid_Sans_Mono_Nerd_Font_Complete_Mono_Windows_Compatible.otf -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | echo " 3 | +------------------------------------------------------+ 4 | | | 5 | | VimForCpp | 6 | | | 7 | +------------------------------------------------------+ 8 | 安装开始! 9 | 整个过程大概需要下载大约 200MB 数据. 流量党请慎入! 10 | " 11 | # 切换到 root 用户, 并且触发安装脚本 12 | install_user_home=$HOME 13 | 14 | function SwitchRoot() { 15 | echo "为了安装依赖程序, 需要使用 root 账户. 您的密码不会被上传." 16 | echo "请输入 root 密码:" 17 | su -c "curl -sLf https://gitee.com/HGtz2222/VimForCpp/raw/master/start.sh -o /tmp/start.sh && bash /tmp/start.sh $install_user_home" 18 | rm -f /tmp/start.sh > /dev/null 2>&1 19 | } 20 | 21 | # 切换到 root 用户 22 | SwitchRoot 23 | 24 | -------------------------------------------------------------------------------- /nvim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/nvim -------------------------------------------------------------------------------- /screenshot/函数列表.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/函数列表.gif -------------------------------------------------------------------------------- /screenshot/函数变量头文件跳转.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/函数变量头文件跳转.gif -------------------------------------------------------------------------------- /screenshot/头文件补全.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/头文件补全.gif -------------------------------------------------------------------------------- /screenshot/快速查找函数.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/快速查找函数.gif -------------------------------------------------------------------------------- /screenshot/快速查找文件.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/快速查找文件.gif -------------------------------------------------------------------------------- /screenshot/文件列表.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/文件列表.gif -------------------------------------------------------------------------------- /screenshot/概览.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/概览.png -------------------------------------------------------------------------------- /screenshot/自动补全.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/自动补全.gif -------------------------------------------------------------------------------- /screenshot/语法诊断.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askunix/VimForCpp/f9f004ba01a8771b3f419781190adcd38337b3f1/screenshot/语法诊断.gif -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | rm -rf ~/.VimForCpp 2 | rm -f ~/.vim 3 | rm -f ~/.vimrc 4 | rm -f ~/.ycm_extra_conf.py 5 | rm -f ~/.cquery 6 | [ -d /tmp/cquery ] && rm -rf /tmp/cquery 7 | echo "卸载完毕!" 8 | -------------------------------------------------------------------------------- /vim/.VimballRecord: -------------------------------------------------------------------------------- 1 | tagbar.vmb: call delete('/home/tangzhong/.vim/README.md')|call delete('/home/tangzhong/.vim/autoload/tagbar.vim')|call delete('/home/tangzhong/.vim/doc/tagbar.txt')|call delete('/home/tangzhong/.vim/plugin/tagbar.vim')|call delete('/home/tangzhong/.vim/syntax/tagbar.vim') 2 | -------------------------------------------------------------------------------- /vim/.netrwhist: -------------------------------------------------------------------------------- 1 | let g:netrw_dirhistmax =10 2 | let g:netrw_dirhist_cnt =1 3 | let g:netrw_dirhist_1='/home/tangzhong' 4 | -------------------------------------------------------------------------------- /vim/.vim: -------------------------------------------------------------------------------- 1 | /home/tangzhong/.vim -------------------------------------------------------------------------------- /vim/README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | Tagbar is a vim plugin for browsing the tags of source code files. 4 | It provides a sidebar that displays the ctags-generated tags of the current file, ordered by their scope. This means that for example methods in C++ are displayed under the class they are defined in. 5 | 6 | Check out the homepage at http://majutsushi.github.io/tagbar/ for more information. 7 | 8 | # Support for additional filetypes 9 | 10 | For filetypes that are not supported by Exuberant Ctags check out [the wiki](https://github.com/majutsushi/tagbar/wiki) to see whether other projects offer support for them and how to use them. Please add any other projects/configurations that you find or create yourself so that others can benefit from them, too. 11 | 12 | # Important: If the file structure is displayed wrong 13 | 14 | If you notice that there are some errors in the way your file's structure is displayed in Tagbar, please make sure that the bug is actually in Tagbar before you report a bug. Since Tagbar uses [exuberant-ctags](http://ctags.sourceforge.net/) and compatible programs to do the actual file parsing, it is likely that the bug is actually in one of those programs instead. 15 | 16 | There is an example in `:h tagbar-issues` about how to run ctags manually so you can determine where the bug actually is. If the bug is actually in ctags, please report it on their website instead, as there is nothing I can do about it in Tagbar. Thank you! 17 | 18 | You can also have a look at ctags bugs that have previously been filed on Tagbar here: 19 | https://github.com/majutsushi/tagbar/issues?labels=ctags-bug&page=1&state=closed 20 | -------------------------------------------------------------------------------- /vim/colors/blues.vim: -------------------------------------------------------------------------------- 1 | " Blues colorscheme for Vim 2 | " Cool text with VFD constants, sunny searches and 3 | " incandescent errors. 4 | " Maintainer: Daniel Lima 5 | " License: MIT 6 | 7 | if $TERM != 'linux' 8 | 9 | set bg=dark 10 | set t_Co=256 11 | let g:colors_name="blues" 12 | 13 | hi Normal ctermfg=251 ctermbg=None cterm=None guifg=#c6c6c6 guibg=#1c1c1c 14 | hi Cursor ctermfg=Black ctermbg=White cterm=None guifg=Black guibg=White 15 | hi SpecialKey ctermfg=30 ctermbg=None cterm=None guifg=#008787 guibg=#1c1c1c 16 | hi Directory ctermfg=32 ctermbg=None cterm=None guifg=#0087d7 guibg=#1c1c1c 17 | hi ErrorMsg ctermfg=203 ctermbg=None cterm=None guifg=#ff5f5f guibg=#1c1c1c 18 | hi PreProc ctermfg=248 ctermbg=None cterm=None guifg=#a8a8a8 guibg=#1c1c1c 19 | hi Search ctermfg=227 ctermbg=None cterm=None guifg=#ffff5f guibg=#1c1c1c 20 | hi Type ctermfg=75 ctermbg=None cterm=None guifg=#5fafff guibg=#1c1c1c 21 | hi Statement ctermfg=75 ctermbg=None cterm=None guifg=#5fafff guibg=#1c1c1c 22 | hi Comment ctermfg=242 ctermbg=None cterm=None guifg=#6c6c6c guibg=#1c1c1c 23 | hi Identifier ctermfg=105 ctermbg=None cterm=None guifg=#8787ff guibg=#1c1c1c 24 | hi DiffText ctermfg=203 ctermbg=None cterm=None guifg=#ff5f5f guibg=#1c1c1c 25 | hi Constant ctermfg=79 ctermbg=None cterm=None guifg=#5fd7af guibg=#1c1c1c 26 | hi Todo ctermfg=118 ctermbg=None cterm=None guifg=#87ff00 guibg=#1c1c1c 27 | hi Error ctermfg=203 ctermbg=None cterm=None guifg=#ff5f5f guibg=#1c1c1c 28 | hi Special ctermfg=103 ctermbg=None cterm=None guifg=#8787af guibg=#1c1c1c 29 | hi Ignore ctermfg=220 ctermbg=None cterm=None guifg=#ffd700 guibg=#1c1c1c 30 | hi Underline ctermfg=244 ctermbg=None cterm=None guifg=#808080 guibg=#1c1c1c 31 | hi NonText ctermfg=87 ctermbg=None cterm=None guifg=#5fffff guibg=#1c1c1c 32 | hi MatchParen ctermfg=203 ctermbg=None cterm=None guifg=#ff5f5f guibg=#1c1c1c 33 | 34 | hi Folded ctermfg=247 ctermbg=233 cterm=None guifg=#9e9e9e guibg=#1c1c1c 35 | hi FoldColumn ctermfg=247 ctermbg=233 cterm=None guifg=#9e9e9e guibg=#1c1c1c 36 | hi StatusLineNC ctermfg=238 ctermbg=233 cterm=None guifg=#262626 guibg=#444444 37 | hi StatusLine ctermfg=247 ctermbg=233 cterm=None guifg=#262626 guibg=#9e9e9e 38 | hi VertSplit ctermfg=247 ctermbg=None cterm=None guifg=#9e9e9e guibg=#1c1c1c 39 | 40 | hi LineNr ctermfg=247 ctermbg=233 cterm=None guifg=#9e9e9e guibg=#262626 41 | hi CursorLineNr ctermfg=White ctermbg=25 cterm=None guifg=White guibg=#005faf 42 | hi CursorLine ctermbg=234 cterm=None guibg=#262626 43 | hi Visual ctermbg=235 guibg=#303030 44 | 45 | hi Pmenu ctermfg=Gray ctermbg=235 cterm=None guifg=Gray guibg=#303030 46 | hi PmenuSel ctermfg=White ctermbg=25 cterm=None guifg=White guibg=#005faf 47 | hi PmenuSbar ctermfg=235 ctermbg=234 cterm=None guifg=#303030 guibg=#262626 48 | hi PmenuThumb ctermfg=Gray ctermbg=Gray cterm=None guifg=Gray guibg=Gray 49 | 50 | hi DiffAdd ctermfg=10 ctermbg=None cterm=None guifg=#00ff00 guibg=#1c1c1c 51 | hi DiffChange ctermfg=227 ctermbg=None cterm=None guifg=#ffff5f guibg=#1c1c1c 52 | hi DiffDelete ctermfg=203 ctermbg=None cterm=None guifg=#ff5f5f guibg=#1c1c1c 53 | hi SignColumn ctermfg=None ctermbg=None cterm=None guifg=#1c1c1c guibg=#1c1c1c 54 | 55 | end 56 | -------------------------------------------------------------------------------- /vim/snippets/actionscript.snippets: -------------------------------------------------------------------------------- 1 | snippet main 2 | package { 3 | import flash.display.*; 4 | import flash.Events.*; 5 | 6 | public class Main extends Sprite { 7 | public function Main ( ) { 8 | trace("start"); 9 | stage.scaleMode = StageScaleMode.NO_SCALE; 10 | stage.addEventListener(Event.RESIZE, resizeListener); 11 | } 12 | 13 | private function resizeListener (e:Event):void { 14 | trace("The application window changed size!"); 15 | trace("New width: " + stage.stageWidth); 16 | trace("New height: " + stage.stageHeight); 17 | } 18 | 19 | } 20 | 21 | } 22 | snippet class 23 | ${1:public|internal} class ${2:name} ${0:extends } { 24 | public function $2 ( ) { 25 | ("start"); 26 | } 27 | } 28 | snippet all 29 | package name { 30 | 31 | ${1:public|internal|final} class ${2:name} ${0:extends } { 32 | private|public| static const FOO = "abc"; 33 | private|public| static var BAR = "abc"; 34 | 35 | // class initializer - no JIT !! one time setup 36 | if Cababilities.os == "Linux|MacOS" { 37 | FOO = "other"; 38 | } 39 | 40 | // constructor: 41 | public function $2 ( ){ 42 | super2(); 43 | trace("start"); 44 | } 45 | public function name (a, b...){ 46 | super.name(..); 47 | lable:break 48 | } 49 | } 50 | } 51 | 52 | function A(){ 53 | // A can only be accessed within this file 54 | } 55 | snippet switch 56 | switch(${1}){ 57 | case ${2}: 58 | ${0} 59 | break; 60 | default: 61 | } 62 | snippet case 63 | case ${1}: 64 | ${0} 65 | break; 66 | snippet package 67 | package ${1:package}{ 68 | ${0} 69 | } 70 | snippet wh 71 | while ${1:cond}{ 72 | ${0} 73 | } 74 | snippet do 75 | do { 76 | ${0} 77 | } while (${1:cond}) 78 | snippet for enumerate names 79 | for (${1:var} in ${2:object}){ 80 | ${0} 81 | } 82 | snippet for enumerate values 83 | for each (${1:var} in ${2:object}){ 84 | ${0} 85 | } 86 | snippet get_set 87 | function get ${1:name} { 88 | return ${2} 89 | } 90 | function set $1 (newValue) { 91 | ${0} 92 | } 93 | snippet interface 94 | interface name { 95 | function method(${1}):${0:returntype}; 96 | } 97 | snippet try 98 | try { 99 | ${1:${VISUAL}} 100 | } catch (error:ErrorType) { 101 | ${2} 102 | } finally { 103 | ${0} 104 | } 105 | # For Loop (same as c.snippet) 106 | snippet for for (..) {..} 107 | for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { 108 | ${0} 109 | } 110 | # Custom For Loop 111 | snippet forr 112 | for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { 113 | ${0} 114 | } 115 | # If Condition 116 | snippet if 117 | if (${1:/* condition */}) { 118 | ${0:${VISUAL}} 119 | } 120 | snippet el 121 | else { 122 | ${0:${VISUAL}} 123 | } 124 | # Ternary conditional 125 | snippet t 126 | ${1:/* condition */} ? ${2:a} : ${0:b} 127 | snippet fun 128 | function ${1:function_name}(${2})${3} 129 | { 130 | ${0} 131 | } 132 | # FlxSprite (usefull when using the flixel library) 133 | snippet FlxSprite 134 | package 135 | { 136 | import org.flixel.* 137 | 138 | public class ${1:ClassName} extends ${2:FlxSprite} 139 | { 140 | public function $1(${3: X:Number, Y:Number}):void 141 | { 142 | super(X,Y); 143 | ${4} 144 | } 145 | 146 | override public function update():void 147 | { 148 | super.update(); 149 | ${0} 150 | } 151 | } 152 | } 153 | 154 | -------------------------------------------------------------------------------- /vim/snippets/alpaca.snippets: -------------------------------------------------------------------------------- 1 | snippet mod 2 | module ${0:`expand('%:t:r')`} 3 | snippet imp 4 | import ${0:http} 5 | snippet impt 6 | import type ${0:option.option} 7 | snippet exp 8 | export ${0} 9 | snippet expt 10 | export ${0} 11 | snippet fn 12 | val ${1:fn} ${2}: fn ${3:'a} -> ${4:'a} 13 | let $1 ${5} = 14 | ${0:${VISUAL}} 15 | snippet mat 16 | match ${1} with 17 | | ${2} -> ${0} 18 | snippet - 19 | | ${1} -> ${0} 20 | snippet let 21 | let ${1} = ${2:${VISUAL}} in 22 | ${0} 23 | snippet letf 24 | let ${1} = 25 | ${0:${VISUAL}} 26 | snippet ty 27 | type ${1:msg} 28 | = ${0} 29 | snippet test 30 | test "${1}" = 31 | ${0:${VISUAL}} 32 | snippet doc 33 | {-| ${0} 34 | -} 35 | snippet p 36 | |> ${0} 37 | snippet ae 38 | assert.equal ${0} 39 | -------------------------------------------------------------------------------- /vim/snippets/apache.snippets: -------------------------------------------------------------------------------- 1 | # Snippets for code blocks used oftenly in Apache files. 2 | # 3 | snippet dir 4 | 5 | DirectoryIndex ${0:index.html} 6 | Order Deny,Allow 7 | Deny from All 8 | 9 | # 10 | snippet filesmatch 11 | 12 | ${0:${VISUAL}} 13 | 14 | # 15 | snippet ifmodule 16 | 17 | ${0:${VISUAL}} 18 | 19 | # 20 | snippet limitexcept 21 | 22 | ${0:${VISUAL}} 23 | 24 | # 25 | snippet proxy 26 | 27 | ${0:${VISUAL}} 28 | 29 | # 30 | snippet virtualhost 31 | 32 | ServerAdmin ${3:webmaster@example.com} 33 | DocumentRoot ${4:/www/example.com} 34 | ServerName ${0:www.example.com} 35 | 36 | -------------------------------------------------------------------------------- /vim/snippets/arduino.snippets: -------------------------------------------------------------------------------- 1 | snippet setup 2 | void setup() 3 | { 4 | Serial.begin(${1:9600}); 5 | ${2} 6 | } 7 | 8 | snippet loop 9 | void loop() 10 | { 11 | ${0} 12 | } 13 | 14 | snippet inc 15 | #include <${1}.h> 16 | 17 | snippet def 18 | #define ${1} 19 | 20 | # if 21 | snippet if 22 | if (${1:/* condition */}) { 23 | ${0:${VISUAL}} 24 | } 25 | # else 26 | snippet el 27 | else { 28 | ${1} 29 | } 30 | # else if 31 | snippet elif 32 | else if (${1:/* condition */}) { 33 | ${2} 34 | } 35 | # ifi 36 | snippet ifi 37 | if (${1:/* condition */}) ${2}; 38 | 39 | # switch 40 | snippet switch 41 | switch (${1:/* variable */}) { 42 | case ${2:/* variable case */}: 43 | ${3} 44 | ${4:break;}${5} 45 | default: 46 | ${6} 47 | } 48 | 49 | snippet case 50 | case ${1:/* variable case */}: 51 | ${2} 52 | ${3:break;} 53 | 54 | # for 55 | snippet for 56 | for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) { 57 | ${4} 58 | } 59 | # for (custom) 60 | snippet forr 61 | for (int ${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { 62 | ${5} 63 | } 64 | # while 65 | snippet wh 66 | while (${1:/* condition */}) { 67 | ${2} 68 | } 69 | # do... while 70 | snippet do 71 | do { 72 | ${2} 73 | } while (${1:/* condition */}); 74 | ## 75 | ## Functions 76 | # function definition 77 | snippet fun 78 | ${1:void} ${2:function_name}(${3}) 79 | { 80 | ${4} 81 | } 82 | 83 | ## IO 84 | # pinMode OUTPUT 85 | snippet pinout 86 | pinMode(${1}, OUTPUT); 87 | # pinMode INPUT 88 | snippet pinin 89 | pinMode(${1}, INPUT); 90 | # digitalWrite HIGH 91 | snippet dwHigh 92 | digitalWrite(${1}, HIGH); 93 | # digitalWrite LOW 94 | snippet dwLow 95 | digitalWrite(${1}, LOW); 96 | # digitalRead 97 | snippet dr 98 | digitalRead(${1}); 99 | # analogRead 100 | snippet ar 101 | analogRead(${1}); 102 | # analogWrite 103 | snippet aw 104 | analogWrite(${1}); 105 | # serialRead 106 | snippet sr 107 | Serial.read(); 108 | # serialWrite 109 | snippet sw 110 | Serial.write(); 111 | # serial.print 112 | snippet sp 113 | Serial.print(${1}); 114 | # serial.println 115 | snippet sl 116 | Serial.println(${1}); 117 | 118 | 119 | # delay 120 | snippet dl 121 | delay(${1}); 122 | # millis 123 | snippet ml 124 | millis(); 125 | -------------------------------------------------------------------------------- /vim/snippets/autoit.snippets: -------------------------------------------------------------------------------- 1 | snippet if 2 | If ${1:condition} Then 3 | ${0:; True code} 4 | EndIf 5 | snippet el 6 | Else 7 | ${0} 8 | snippet eif 9 | ElseIf ${1:condition} Then 10 | ${0:; True code} 11 | # If/Else block 12 | snippet ife 13 | If ${1:condition} Then 14 | ${2:; True code} 15 | Else 16 | ${0:; Else code} 17 | EndIf 18 | # If/ElseIf/Else block - because there is eif this is not really neccessary 19 | snippet ifelif 20 | If ${1:condition 1} Then 21 | ${2:; True code} 22 | ElseIf ${3:condition 2} Then 23 | ${4:; True code} 24 | Else 25 | ${0:; Else code} 26 | EndIf 27 | # Switch block 28 | snippet switch 29 | Switch (${1:condition}) 30 | Case ${2:case1}: 31 | ${3:; Case 1 code} 32 | Case Else: 33 | ${0:; Else code} 34 | EndSwitch 35 | # Select block 36 | snippet select 37 | Select (${1:condition}) 38 | Case ${2:case1}: 39 | ${3:; Case 1 code} 40 | Case Else: 41 | ${0:; Else code} 42 | EndSelect 43 | # While loop 44 | snippet wh 45 | While (${1:condition}) 46 | ${0:; code...} 47 | WEnd 48 | # For loop 49 | snippet for 50 | For ${1:n} = ${3:1} to ${2:count} 51 | ${0:; code...} 52 | Next 53 | # New Function 54 | snippet func 55 | Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): 56 | ${0:Return} 57 | EndFunc 58 | # Message box 59 | snippet msg 60 | MsgBox(${0:MsgType}, ${1:"Title"}, ${2:"Message Text"}) 61 | # Debug Message 62 | snippet debug 63 | MsgBox(0, "Debug", ${0:"Debug Message"}) 64 | # Show Variable Debug Message 65 | snippet showvar 66 | MsgBox(0, "${0:VarName}", $1) 67 | -------------------------------------------------------------------------------- /vim/snippets/awk.snippets: -------------------------------------------------------------------------------- 1 | # cannot use /usr/bin/env because it does not support parameters (as -f) 2 | snippet #! #!/usr/bin/awk -f 3 | #!/usr/bin/awk -f 4 | 5 | # @include is a gawk extension 6 | snippet inc @include 7 | @include "${1}"${0} 8 | 9 | # @load is a gawk extension 10 | snippet loa @load 11 | @load "${1}"${0} 12 | 13 | snippet beg BEGIN { ... } 14 | BEGIN { 15 | ${0} 16 | } 17 | 18 | # BEGINFILE is a gawk extension 19 | snippet begf BEGINFILE { ... } 20 | BEGINFILE { 21 | ${0} 22 | } 23 | 24 | snippet end END { ... } 25 | END { 26 | ${0} 27 | } 28 | 29 | # ENDFILE is a gawk extension 30 | snippet endf ENDFILE { ... } 31 | ENDFILE { 32 | ${0} 33 | } 34 | 35 | snippet pri print 36 | print ${1:"${2}"}${0} 37 | 38 | snippet printf printf 39 | printf("${1:%s}\n", ${2})${0} 40 | 41 | snippet ign IGNORECASE 42 | IGNORECASE = ${1:1} 43 | 44 | snippet if if {...} 45 | if (${1}) { 46 | ${0:${VISUAL}} 47 | } 48 | 49 | snippet ife if ... else ... 50 | if (${1}) { 51 | ${2:${VISUAL}} 52 | } else { 53 | ${0} 54 | } 55 | 56 | snippet eif else if ... 57 | else if (${1}) { 58 | ${0} 59 | } 60 | 61 | snippet el else {...} 62 | else { 63 | ${0} 64 | } 65 | 66 | snippet wh while 67 | while (${1}) { 68 | ${2} 69 | } 70 | 71 | snippet do do ... while 72 | do { 73 | ${0} 74 | } while (${1}) 75 | 76 | snippet for for 77 | for (${2:i} = 0; i < ${1:n}; ${3:++i}) { 78 | ${0} 79 | } 80 | 81 | snippet fore for each 82 | for (${1:i} in ${2:array}) { 83 | ${0} 84 | } 85 | 86 | # the switch is a gawk extension 87 | snippet sw switch 88 | switch (${1}) { 89 | case ${2}: 90 | ${3} 91 | break 92 | default: 93 | ${0} 94 | break 95 | } 96 | 97 | # the switch is a gawk extension 98 | snippet case case 99 | case ${1}: 100 | ${0} 101 | break 102 | 103 | -------------------------------------------------------------------------------- /vim/snippets/clojure.snippets: -------------------------------------------------------------------------------- 1 | snippet comm 2 | (comment 3 | ${0}) 4 | snippet condp 5 | (condp ${1:pred} ${2:expr} 6 | ${0}) 7 | snippet def 8 | (def ${0}) 9 | snippet defm 10 | (defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}] 11 | ${0}) 12 | snippet defmm 13 | (defmulti ${1:name} "${2:doc-string}" ${0:dispatch-fn}) 14 | snippet defma 15 | (defmacro ${1:name} "${2:doc-string}" ${0:dispatch-fn}) 16 | snippet defn 17 | (defn ${1:name} "${2:doc-string}" [${3:arg-list}] 18 | ${0}) 19 | snippet defp 20 | (defprotocol ${1:name} 21 | ${0}) 22 | snippet defr 23 | (defrecord ${1:name} [${2:fields}] 24 | ${3:protocol} 25 | ${0}) 26 | snippet deft 27 | (deftest ${1:name} 28 | (is (= ${0:assertion}))) 29 | snippet is 30 | (is (= ${1} ${0})) 31 | snippet defty 32 | (deftype ${1:Name} [${2:fields}] 33 | ${3:Protocol} 34 | ${0}) 35 | snippet doseq 36 | (doseq [${1:elem} ${2:coll}] 37 | ${0}) 38 | snippet fn 39 | (fn [${1:arg-list}] ${0}) 40 | snippet if 41 | (if ${1:test-expr} 42 | ${2:then-expr} 43 | ${0:else-expr}) 44 | snippet if-let 45 | (if-let [${1:result} ${2:test-expr}] 46 | (${3:then-expr} $1) 47 | (${0:else-expr})) 48 | snippet imp 49 | (:import [${1:package}]) 50 | & {:keys [${1:keys}] :or {${0:defaults}}} 51 | snippet let 52 | (let [${1:name} ${2:expr}] 53 | ${0}) 54 | snippet letfn 55 | (letfn [(${1:name}) [${2:args}] 56 | ${0})]) 57 | snippet map 58 | (map ${1:func} ${0:coll}) 59 | snippet mapl 60 | (map #(${1:lambda}) ${0:coll}) 61 | snippet met 62 | (${1:name} [${2:this} ${3:args}] 63 | ${0}) 64 | snippet ns 65 | (ns ${0:name}) 66 | snippet dotimes 67 | (dotimes [_ 10] 68 | (time 69 | (dotimes [_ ${1:times}] 70 | ${0}))) 71 | snippet pmethod 72 | (${1:name} [${2:this} ${0:args}]) 73 | snippet refer 74 | (:refer-clojure :exclude [${0}]) 75 | snippet require 76 | (:require [${1:namespace} :as [${0}]]) 77 | snippet use 78 | (:use [${1:namespace} :only [${0}]]) 79 | snippet print 80 | (println ${0}) 81 | snippet reduce 82 | (reduce ${1:(fn [p n] ${3})} ${2}) 83 | snippet when 84 | (when ${1:test} ${0:body}) 85 | snippet when-let 86 | (when-let [${1:result} ${2:test}] 87 | ${0:body}) 88 | -------------------------------------------------------------------------------- /vim/snippets/cmake.snippets: -------------------------------------------------------------------------------- 1 | snippet init 2 | cmake_minimum_required(VERSION ${1:2.8.2}) 3 | project(${2:ProjectName}) 4 | 5 | find_package(${3:library}) 6 | 7 | include_directories(${$3_INCLUDE_DIRS}) 8 | 9 | add_subdirectory(${0:src}) 10 | 11 | add_executable($2) 12 | 13 | target_link_libraries($2 ${$3_LIBRARIES}) 14 | 15 | snippet proj 16 | project(${0:Name}) 17 | 18 | snippet min 19 | cmake_minimum_required(VERSION ${0:2.8.2}) 20 | 21 | snippet include 22 | include_directories(${${0:include_dir}}) 23 | 24 | snippet find 25 | find_package(${1:library} ${0:REQUIRED}) 26 | 27 | snippet glob 28 | file(glob ${1:srcs} *.${0:cpp}) 29 | 30 | snippet subdir 31 | add_subdirectory(${0:src}) 32 | 33 | snippet lib 34 | add_library(${1:lib} ${${0:srcs}}) 35 | 36 | snippet link 37 | target_link_libraries(${1:bin} ${0:somelib}) 38 | 39 | snippet bin 40 | add_executable(${1:bin}) 41 | 42 | snippet set 43 | set(${1:var} ${0:val}) 44 | 45 | snippet dep 46 | add_dependencies(${1:target} 47 | ${0:dep} 48 | ) 49 | 50 | snippet Ext_url 51 | include(ExternalProject) 52 | ExternalProject_Add(${1:googletest} 53 | URL ${2:http://googletest.googlecode.com/files/gtest-1.7.0.zip} 54 | URL_HASH SHA1=${3:f85f6d2481e2c6c4a18539e391aa4ea8ab0394af} 55 | SOURCE_DIR "${4:${CMAKE_BINARY_DIR}/gtest-src}" 56 | BINARY_DIR "${0:${CMAKE_BINARY_DIR}/gtest-build}" 57 | CONFIGURE_COMMAND "" 58 | BUILD_COMMAND "" 59 | INSTALL_COMMAND "" 60 | TEST_COMMAND "" 61 | ) 62 | 63 | snippet Ext_git 64 | include(ExternalProject) 65 | ExternalProject_Add(${1:googletest} 66 | GIT_REPOSITORY ${2:https://github.com/google/googletest.git} 67 | GIT_TAG ${3:master} 68 | SOURCE_DIR "${4:${CMAKE_BINARY_DIR}/googletest-src}" 69 | BINARY_DIR "${0:${CMAKE_BINARY_DIR}/googletest-build}" 70 | CONFIGURE_COMMAND "" 71 | BUILD_COMMAND "" 72 | INSTALL_COMMAND "" 73 | TEST_COMMAND "" 74 | ) 75 | 76 | snippet props 77 | set_target_properties(${1:target} 78 | ${2:properties} ${3:compile_flags} 79 | ${0:"-O3 -Wall -pedantic"} 80 | ) 81 | 82 | snippet test 83 | add_test(${1:ATestName} ${0:testCommand --options}) 84 | -------------------------------------------------------------------------------- /vim/snippets/coffee/coffee.snippets: -------------------------------------------------------------------------------- 1 | # Closure loop 2 | snippet forindo 3 | for ${1:name} in ${2:array} 4 | do ($1) -> 5 | ${0:// body} 6 | # Array comprehension 7 | snippet fora 8 | for ${1:name} in ${2:array} 9 | ${0:# body...} 10 | # Object comprehension 11 | snippet foro 12 | for ${1:key}, ${2:value} of ${3:object} 13 | ${0:# body...} 14 | # Range comprehension (inclusive) 15 | snippet forr 16 | for ${1:name} in [${2:start}..${3:finish}] 17 | ${0:# body...} 18 | snippet forrb 19 | for ${1:name} in [${2:start}..${3:finish}] by ${4:step} 20 | ${0:# body...} 21 | # Range comprehension (exclusive) 22 | snippet forrex 23 | for ${1:name} in [${2:start}...${3:finish}] 24 | ${0:# body...} 25 | snippet forrexb 26 | for ${1:name} in [${2:start}...${3:finish}] by ${4:step} 27 | ${0:# body...} 28 | # Function 29 | snippet fun 30 | (${1:args}) -> 31 | ${0:# body...} 32 | # Function (bound) 33 | snippet bfun 34 | (${1:args}) => 35 | ${0:# body...} 36 | # Class 37 | snippet cla class .. 38 | class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 39 | ${0} 40 | snippet cla class .. constructor: .. 41 | class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 42 | constructor: (${2:args}) -> 43 | ${3} 44 | 45 | ${0} 46 | snippet cla class .. extends .. 47 | class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass} 48 | ${0} 49 | snippet cla class .. extends .. constructor: .. 50 | class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass} 51 | constructor: (${3:args}) -> 52 | ${4} 53 | 54 | ${0} 55 | # If 56 | snippet if 57 | if ${1:condition} 58 | ${0:${VISUAL}} 59 | # If __ Else 60 | snippet ife 61 | if ${1:condition} 62 | ${2:${VISUAL}} 63 | else 64 | ${0:# body...} 65 | # Else if 66 | snippet eif 67 | else if ${1:condition} 68 | ${0:${VISUAL}} 69 | # Ternary If 70 | snippet ifte 71 | if ${1:condition} then ${2:value} else ${0:other} 72 | # Unless 73 | snippet unl 74 | ${1:action} unless ${0:condition} 75 | # Switch 76 | snippet swi 77 | switch ${1:object} 78 | when ${2:value} 79 | ${0:# body...} 80 | 81 | # Log 82 | snippet log 83 | console.log ${0} 84 | # Try __ Catch 85 | snippet try 86 | try 87 | ${1:${VISUAL}} 88 | catch ${2:error} 89 | ${0} 90 | # Require 91 | snippet req 92 | ${2:$1} = require '${1:sys}' 93 | # Export 94 | snippet exp 95 | ${0:root} = exports ? this 96 | 97 | snippet jsonp 98 | JSON.parse ${0:jstr} 99 | # JSON.stringify 100 | snippet jsons 101 | JSON.stringify ${0:object} 102 | -------------------------------------------------------------------------------- /vim/snippets/coffee/requirejs_coffee.snippets: -------------------------------------------------------------------------------- 1 | snippet def 2 | define ["${1:#dependencies1}"], (${2:#dependencies2}) -> 3 | ${0:TARGET} 4 | 5 | snippet defn 6 | define "${1:#name}", ["${2:#dependencies1}"], (${3:#dependencies2}) -> 7 | ${0:TARGET} 8 | 9 | snippet reqjs 10 | require ["${1:#dependencies1}"], (${2:#dependencies2}) -> 11 | ${0:TARGET} 12 | -------------------------------------------------------------------------------- /vim/snippets/crystal.snippets: -------------------------------------------------------------------------------- 1 | snippet req require 2 | require "${1}" 3 | snippet case 4 | case ${1:object} 5 | when ${2:condition} 6 | ${0} 7 | end 8 | snippet when 9 | when ${1:condition} 10 | ${0} 11 | snippet def 12 | def ${1:method_name} 13 | ${0} 14 | end 15 | snippet pdef 16 | private def ${1:method_name} 17 | ${0} 18 | end 19 | snippet if 20 | if ${1:condition} 21 | ${0:${VISUAL}} 22 | end 23 | snippet ife 24 | if ${1:condition} 25 | ${2:${VISUAL}} 26 | else 27 | ${0} 28 | end 29 | snippet wh 30 | while ${1:condition} 31 | ${0:${VISUAL}} 32 | end 33 | snippet cla class .. end 34 | class ${1:`substitute(vim_snippets#Filename(), "\(_\|^\)\(.\)", "\u\2", "g")`} 35 | ${0} 36 | end 37 | snippet mod class .. end 38 | module ${1:`substitute(vim_snippets#Filename(), "\(_\|^\)\(.\)", "\u\2", "g")`} 39 | ${0} 40 | end 41 | snippet r 42 | getter ${0:name} 43 | snippet r! 44 | getter! ${0:name} 45 | snippet r? 46 | getter? ${0:name} 47 | snippet w 48 | setter ${0:name} 49 | snippet w! 50 | setter! ${0:name} 51 | snippet w? 52 | setter? ${0:name} 53 | snippet rw 54 | property ${0:name} 55 | snippet rw! 56 | property! ${0:name} 57 | snippet rw? 58 | property? ${0:name} 59 | snippet defs 60 | def self.${1:class_method_name} 61 | ${0} 62 | end 63 | snippet defi 64 | def initialize(${1}) 65 | ${0} 66 | end 67 | snippet do 68 | do 69 | ${0:${VISUAL}} 70 | end 71 | snippet dov 72 | do |${1:v}| 73 | ${2} 74 | end 75 | snippet desc 76 | describe ${1:`substitute(substitute(vim_snippets#Filename(), "_spec$", "", ""), "\(_\|^\)\(.\)", "\u\2", "g")`} do 77 | ${0} 78 | end 79 | snippet it 80 | it "${1}" do 81 | ${0} 82 | end 83 | -------------------------------------------------------------------------------- /vim/snippets/cuda.snippets: -------------------------------------------------------------------------------- 1 | extends cpp 2 | -------------------------------------------------------------------------------- /vim/snippets/dart.snippets: -------------------------------------------------------------------------------- 1 | snippet lib 2 | library ${1}; 3 | ${0} 4 | snippet im 5 | import 'package:${1}/${2}.dart'; 6 | ${0} 7 | snippet rgx 8 | new RegExp(r'${1}') 9 | snippet var 10 | var ${1} = ${2}; 11 | snippet main 12 | main() { 13 | ${0} 14 | } 15 | snippet st 16 | static ${0} 17 | snippet fi 18 | final ${0} 19 | snippet re 20 | return ${0} 21 | snippet br 22 | break; 23 | snippet th 24 | throw ${0} 25 | snippet cl 26 | class ${1:`vim_snippets#Filename("", "untitled")`} ${0} 27 | snippet in 28 | interface ${1:`vim_snippets#Filename("", "untitled")`} ${0} 29 | snippet imp 30 | implements ${0} 31 | snippet ext 32 | extends ${0} 33 | snippet if 34 | if (${1:true}) { 35 | ${0} 36 | } 37 | snippet ife 38 | if (${1:true}) { 39 | ${2} 40 | } else { 41 | ${0} 42 | } 43 | snippet el 44 | else 45 | snippet sw 46 | switch (${1}) { 47 | ${0} 48 | } 49 | snippet cs 50 | case ${1}: 51 | ${0} 52 | snippet de 53 | default: 54 | ${0} 55 | snippet for 56 | for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) { 57 | ${0:$1[$2]} 58 | } 59 | snippet fore 60 | for (final ${2:item} in ${1:itemList}) { 61 | ${0} 62 | } 63 | snippet wh 64 | while (${1:/* condition */}) { 65 | ${0} 66 | } 67 | snippet dowh 68 | do { 69 | ${0} 70 | } while (${0:/* condition */}); 71 | snippet as 72 | assert(${0:/* condition */}); 73 | snippet try 74 | try { 75 | ${0:${VISUAL}} 76 | } catch (${1:Exception e}) { 77 | } 78 | snippet tryf 79 | try { 80 | ${0:${VISUAL}} 81 | } catch (${1:Exception e}) { 82 | } finally { 83 | } 84 | -------------------------------------------------------------------------------- /vim/snippets/diff.snippets: -------------------------------------------------------------------------------- 1 | # DEP-3 (http://dep.debian.net/deps/dep3/) style patch header 2 | snippet header DEP-3 style header 3 | Description: ${1} 4 | Origin: ${2:vendor|upstream|other}, ${3:url of the original patch} 5 | Bug: ${4:url in upstream bugtracker} 6 | Forwarded: ${5:no|not-needed|url} 7 | Author: ${6:`g:snips_author`} 8 | Reviewed-by: ${7:name and email} 9 | Last-Update: ${8:`strftime("%Y-%m-%d")`} 10 | Applied-Upstream: ${0:upstream version|url|commit} 11 | 12 | -------------------------------------------------------------------------------- /vim/snippets/dosini.snippets: -------------------------------------------------------------------------------- 1 | snippet ec 2 | ; http://editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = ${1:space_or_tab} 8 | indent_size = ${2:indent_size} 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | -------------------------------------------------------------------------------- /vim/snippets/eelixir.snippets: -------------------------------------------------------------------------------- 1 | extends html 2 | 3 | snippet % 4 | <% ${0} %> 5 | snippet = 6 | <%= ${0} %> 7 | snippet end 8 | <% end %> 9 | snippet for 10 | <%= for ${1:item} <- ${2:items} ${3:@conn} do %> 11 | ${0} 12 | <% end %> 13 | snippet if 14 | <%= if ${1} do %> 15 | ${0:${VISUAL}} 16 | <% end %> 17 | snippet ife 18 | <%= if ${1} do %> 19 | ${2:${VISUAL}} 20 | <%= else %> 21 | ${0} 22 | <% end %> 23 | snippet ft 24 | <%= form_tag(${1:"/users"}, method: ${2::post}) %> 25 | ${0} 26 | 27 | snippet lin 28 | <%= link "${1:Submit}", to: ${2:"/users"}, method: ${3::delete} %> 29 | snippet ff 30 | <%= form_for @changeset, ${1:"/users"}, fn f -> %> 31 | ${0} 32 | 33 | <%= submit "Submit" %> 34 | <% end %> 35 | snippet pry 36 | <% require IEx; IEx.pry %> 37 | -------------------------------------------------------------------------------- /vim/snippets/elm.snippets: -------------------------------------------------------------------------------- 1 | snippet mod 2 | module `substitute(substitute(expand('%:r'), '[/\\]','.','g'),'^\%(\l*\.\)\?','','')` exposing (${1}) 3 | ${0} 4 | snippet imp 5 | import ${0:Http} 6 | snippet impe 7 | import ${1:Html} exposing (${0:..}) 8 | snippet impae 9 | import ${1:Json.Encode} as ${2:Encode} exposing (${0:Value}) 10 | snippet fn 11 | ${1:fn} : ${2:a} -> ${3:a} 12 | $1 ${4} = 13 | ${0} 14 | snippet fn1 15 | ${1:fn} : ${2:a} -> ${3:a} 16 | $1 ${4} = 17 | ${0} 18 | snippet fn2 19 | ${1:fn} : ${2:a} -> ${3:a} -> ${4:a} 20 | $1 ${5} = 21 | ${0} 22 | snippet fn3 23 | ${1:fn} : ${2:a} -> ${3:a} -> ${4:a} -> ${5:a} 24 | $1 ${6} = 25 | ${0} 26 | snippet fn0 27 | ${1:fn} : ${2:a} 28 | $1 = 29 | ${0} 30 | snippet case 31 | case ${1} of 32 | ${2} -> 33 | ${0} 34 | snippet - 35 | ${1} -> 36 | ${0} 37 | snippet let 38 | let 39 | ${1} = 40 | ${2} 41 | in 42 | ${0} 43 | snippet if 44 | if ${1} then 45 | ${2:${VISUAL}} 46 | else 47 | ${0} 48 | snippet ty 49 | type ${1:Msg} 50 | = ${0} 51 | snippet tya 52 | type alias ${1:Model} = 53 | ${0} 54 | snippet test 55 | test "${1}" <| \_ -> $0 56 | snippet doc 57 | {-| ${0} 58 | -} 59 | snippet p 60 | |> ${0} 61 | snippet program 62 | import Html exposing (Html) 63 | 64 | 65 | type alias Model = 66 | {} 67 | 68 | 69 | type Msg 70 | = Noop 71 | 72 | 73 | main : Program Never Model Msg 74 | main = 75 | Html.program 76 | { init = init 77 | , view = view 78 | , update = update 79 | , subscriptions = subscriptions 80 | } 81 | 82 | 83 | init : ( Model, Cmd Msg ) 84 | init = 85 | {} ! [] 86 | 87 | 88 | update : Msg -> Model -> ( Model, Cmd Msg ) 89 | update msg model = 90 | case msg of 91 | Noop -> 92 | model ! [] 93 | 94 | 95 | subscriptions : Model -> Sub Msg 96 | subscriptions model = 97 | Sub.none 98 | 99 | 100 | view : Model -> Html Msg 101 | view model = 102 | Html.text "Hello, sailor!" 103 | -------------------------------------------------------------------------------- /vim/snippets/falcon.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env falcon 3 | 4 | # Import 5 | snippet imp 6 | import ${0:module} 7 | 8 | # Function 9 | snippet fun 10 | function ${2:function_name}(${3}) 11 | ${0} 12 | end 13 | 14 | # Class 15 | snippet class 16 | class ${1:class_name}(${2:class_params}) 17 | ${0:/* members/methods */} 18 | end 19 | 20 | # If 21 | snippet if 22 | if ${1:condition} 23 | ${0} 24 | end 25 | 26 | # If else 27 | snippet ife 28 | if ${1:condition} 29 | ${0} 30 | else 31 | ${1} 32 | end 33 | 34 | # If else if 35 | snippet eif 36 | elif ${1:condition} 37 | ${0} 38 | 39 | # Switch case 40 | snippet switch 41 | switch ${1:expression} 42 | case ${2:item} 43 | case ${0:item} 44 | default 45 | end 46 | 47 | # Select 48 | snippet select 49 | select ${1:variable} 50 | case ${2:TypeSpec} 51 | case ${0:TypeSpec} 52 | default 53 | end 54 | 55 | # For/in Loop 56 | snippet forin 57 | for ${1:element} in ${2:container} 58 | ${0} 59 | end 60 | 61 | # For/to Loop 62 | snippet forto 63 | for ${1:lowerbound} to ${2:upperbound} 64 | ${0} 65 | end 66 | 67 | # While Loop 68 | snippet wh 69 | while ${1:conidition} 70 | ${0} 71 | end 72 | -------------------------------------------------------------------------------- /vim/snippets/fortran.snippets: -------------------------------------------------------------------------------- 1 | snippet impl 2 | implicit none 3 | $0 4 | snippet prog 5 | program ${1:main} 6 | $0 7 | end program $1 8 | snippet mod 9 | module ${1:modulename} 10 | $0 11 | end module $1 12 | snippet proc 13 | procedure ${1:name} 14 | ${0} 15 | end procedure $1 16 | snippet iface 17 | interface ${1:name} 18 | ${0} 19 | end interface $1 20 | snippet doc 21 | ! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 22 | ! File: ${2:`vim_snippets#Filename('$1')`} 23 | ! Author: `g:snips_author` 24 | ! Email: `g:snips_email` 25 | ! Github: `g:snips_github` 26 | ! Description: $1 27 | ! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 28 | $0 29 | snippet dox 30 | !> @brief ${1} 31 | !! 32 | !> ${2} 33 | !> @author `g:snips_author` 34 | ${0} 35 | snippet doxp 36 | !> @param[${1}]${0} 37 | # Variables definitions 38 | # Boolean 39 | snippet bool 40 | logical :: $0 41 | # Integer 42 | snippet int 43 | integer :: $0 44 | snippet real 45 | real :: $0 46 | # Double Precision 47 | snippet double 48 | double precision :: $0 49 | # Char 50 | snippet str 51 | character(len=${1:*}) :: ${0:} 52 | # Types 53 | snippet type 54 | type(${1:name}) 55 | $0 56 | end type 57 | snippet const 58 | ${1:type}, parameter :: $2 = $0 59 | snippet arr 60 | ${1:type}, ${2:allocatable, }dimension(${3::}) :: $0 61 | snippet intent 62 | ${1:type}, intent(inout) :: $0 63 | # Array 64 | snippet / 65 | (/ $1 /) ${2:,&} $0 66 | snippet if 67 | if (${1:condition}) then 68 | $0 69 | end if 70 | snippet case 71 | select case (${1:expr}) 72 | case ($2) 73 | case default 74 | $3 75 | end select $0 76 | snippet do 77 | do ${1:i} = ${2:start}, ${3:end}, ${4:incr} 78 | $0 79 | end do 80 | snippet dow 81 | do while (${1:condition}) 82 | $2 83 | end do 84 | snippet sub 85 | subroutine ${1:name}($2) 86 | $0 87 | end subroutine $1 88 | snippet func 89 | function ${1:name}($2) result($3) 90 | $0 91 | end function $1 92 | snippet pr 93 | write(*,*) $0 94 | snippet dpr 95 | write(*,*) '$1 = ', $1 96 | snippet read 97 | read(unit = ${1:fp}, file = ${2:filename}, iostat = ${3:ierr}) $0 98 | snippet write 99 | write(unit = ${1:fp}, file = ${2:filename}, iostat = ${3:ierr}) $0 100 | snippet open 101 | open(unit = ${1:fp}, file = ${2:filename}, status = ${3:unknown}, iostat = ${4:ierr}) $0 102 | snippet close 103 | close(unit = ${1:fp}) $0 104 | -------------------------------------------------------------------------------- /vim/snippets/haml.snippets: -------------------------------------------------------------------------------- 1 | snippet t 2 | %table 3 | %tr 4 | %th 5 | ${1:headers} 6 | %tr 7 | %td 8 | ${0:headers} 9 | snippet ul 10 | %ul 11 | %li 12 | ${0:item} 13 | %li 14 | snippet rp 15 | = render :partial => "${0:item}" 16 | snippet rpc 17 | = render :partial => "${1:item}", :collection => ${0:@$1s} 18 | snippet rpl 19 | = render :partial => "${1:item}", :locals => { :${2:$1} => ${0:@$1} } 20 | snippet rpo 21 | = render :partial => "${1:item}", :object => ${0:@$1} 22 | snippet lt 23 | = link_to ${1:name}, ${2:dest} 24 | snippet mt 25 | = mail_to ${1:email_address}, ${2:name} 26 | snippet mts 27 | = mail_to ${1:email_address}, ${2:name}, :subject => ${3}, :body => ${4} 28 | snippet ife 29 | - if ${1:condition} 30 | ${2:${VISUAL}} 31 | - else 32 | ${0} 33 | snippet ifp 34 | - if ${1:condition}.presence? 35 | ${0:${VISUAL}} 36 | snippet ntc 37 | = number_to_currency(${1}) 38 | -------------------------------------------------------------------------------- /vim/snippets/handlebars.snippets: -------------------------------------------------------------------------------- 1 | snippet if # {{#if value}} ... {{/if}} 2 | {{#if ${1:value}}} 3 | ${0:${VISUAL}} 4 | {{/if}} 5 | snippet ifn # {{#unless value}} ... {{/unless}} 6 | {{#unless ${1:value}}} 7 | ${0:${VISUAL}} 8 | {{/unless}} 9 | snippet ife # {{#if value}} ... {{else}} .. {{/if}} 10 | {{#if ${1:value}}} 11 | ${2:${VISUAL}} 12 | {{else}} 13 | ${3} 14 | {{/if}} 15 | -------------------------------------------------------------------------------- /vim/snippets/htmldjango.snippets: -------------------------------------------------------------------------------- 1 | # Generic tags 2 | 3 | extends html 4 | 5 | snippet % 6 | {% ${1} %} 7 | snippet %% 8 | {% ${1:tag_name} %} 9 | ${0} 10 | {% end$1 %} 11 | snippet { 12 | {{ ${1} }} 13 | # Template Tags 14 | 15 | snippet autoescape 16 | {% autoescape ${1:off} %} 17 | ${0} 18 | {% endautoescape %} 19 | snippet block 20 | {% block ${1} %} 21 | ${0} 22 | {% endblock %} 23 | snippet # 24 | {# ${0:comment} #} 25 | snippet comment 26 | {% comment %} 27 | ${0} 28 | {% endcomment %} 29 | snippet cycle 30 | {% cycle ${1:val1} ${2:val2} ${3:as ${4}} %} 31 | snippet debug 32 | {% debug %} 33 | snippet extends 34 | {% extends "${0:base.html}" %} 35 | snippet filter 36 | {% filter ${1} %} 37 | ${0} 38 | {% endfilter %} 39 | snippet firstof 40 | {% firstof ${1} %} 41 | snippet for 42 | {% for ${1} in ${2} %} 43 | ${0} 44 | {% endfor %} 45 | snippet empty 46 | {% empty %} 47 | ${0} 48 | snippet if 49 | {% if ${1} %} 50 | ${0} 51 | {% endif %} 52 | snippet el 53 | {% else %} 54 | ${1} 55 | snippet eif 56 | {% elif ${1} %} 57 | ${0} 58 | snippet ifchanged 59 | {% ifchanged %}${1}{% endifchanged %} 60 | snippet ifequal 61 | {% ifequal ${1} ${2} %} 62 | ${0} 63 | {% endifequal %} 64 | snippet ifnotequal 65 | {% ifnotequal ${1} ${2} %} 66 | ${0} 67 | {% endifnotequal %} 68 | snippet include 69 | {% include "${0}" %} 70 | snippet load 71 | {% load ${0} %} 72 | snippet now 73 | {% now "${0:jS F Y H:i}" %} 74 | snippet regroup 75 | {% regroup ${1} by ${2} as ${0} %} 76 | snippet spaceless 77 | {% spaceless %}${0}{% endspaceless %} 78 | snippet ssi 79 | {% ssi ${0} %} 80 | snippet trans 81 | {% trans "${0:string}" %} 82 | snippet url 83 | {% url ${1} as ${0} %} 84 | snippet widthratio 85 | {% widthratio ${1:this_value} ${2:max_value} ${0:100} %} 86 | snippet with 87 | {% with ${1} as ${2} %} 88 | ${0} 89 | {% endwith %} 90 | 91 | # Template Filters 92 | 93 | # Note: Since SnipMate can't determine which template filter you are 94 | # expanding without the "|" character, these do not add the "|" 95 | # character. These save a few keystrokes still. 96 | 97 | # Note: Template tags that take no arguments are not implemented. 98 | 99 | snippet add 100 | add:"${0}" 101 | snippet center 102 | center:"${0}" 103 | snippet cut 104 | cut:"${0}" 105 | snippet date 106 | date:"${0}" 107 | snippet default 108 | default:"${0}" 109 | snippet defaultifnone 110 | default_if_none:"${0}" 111 | snippet dictsort 112 | dictsort:"${0}" 113 | snippet dictsortrev 114 | dictsortreversed:"${0}" 115 | snippet divisibleby 116 | divisibleby:"${0}" 117 | snippet floatformat 118 | floatformat:"${0}" 119 | snippet getdigit 120 | get_digit:"${0}" 121 | snippet join 122 | join:"${0}" 123 | snippet lengthis 124 | length_is:"${0}" 125 | snippet pluralize 126 | pluralize:"${0}" 127 | snippet removetags 128 | removetags:"${0}" 129 | snippet slice 130 | slice:"${0}" 131 | snippet stringformat 132 | stringformat:"${0}" 133 | snippet time 134 | time:"${0}" 135 | snippet truncatewords 136 | truncatewords:${0} 137 | snippet truncatewordshtml 138 | truncatewords_html:${0} 139 | snippet urlizetrunc 140 | urlizetrunc:${0} 141 | snippet wordwrap 142 | wordwrap:${0} 143 | -------------------------------------------------------------------------------- /vim/snippets/htmltornado.snippets: -------------------------------------------------------------------------------- 1 | # Generic tags 2 | 3 | snippet { 4 | {{ ${0} }} 5 | 6 | # Template tags 7 | 8 | snippet extends 9 | {% extends "${0:base.html}" %} 10 | snippet autoescape 11 | {% autoescape ${0:xhtml_escape | None} %} 12 | snippet apply 13 | {% apply ${1:function} %} 14 | ${0} 15 | {% end %} 16 | snippet block 17 | {% block ${1} %} 18 | ${0} 19 | {% end %} 20 | snippet for 21 | {% for ${1:item} in ${2} %} 22 | ${0} 23 | {% end %} 24 | snippet from 25 | {% from ${1:x} import ${0:y} %} 26 | snippet if 27 | {% if ${1:condition} %} 28 | ${0} 29 | {% end %} 30 | snippet eif 31 | {% elif ${0:condition} %} 32 | snippet el 33 | {% else %} 34 | snippet import 35 | {% import ${0:module} %} 36 | snippet include 37 | {% include "${0:filename}" %} 38 | snippet module 39 | {% module ${0:expression} %} 40 | snippet raw 41 | {% raw ${0:expression} %} 42 | snippet set 43 | {% set ${1:x} = ${0:y} %} 44 | snippet try 45 | {% try %} 46 | ${1:${VISUAL}} 47 | {% except %} 48 | ${2} 49 | {% finallly %} 50 | ${0} 51 | {% end %} 52 | snippet wh 53 | {% while ${1:condition} %} 54 | ${0} 55 | {% end %} 56 | -------------------------------------------------------------------------------- /vim/snippets/idris.snippets: -------------------------------------------------------------------------------- 1 | snippet mod 2 | module `substitute(substitute(expand('%:r'), '[/\\]','.','g'),'^\%(\l*\.\)\?','','')` 3 | ${0} 4 | snippet imp 5 | import ${0:List} 6 | snippet fn 7 | ${1:fn} : ${2:a} -> ${3:a} 8 | $1 ${4} = 9 | ${0} 10 | snippet fn1 11 | ${1:fn} : ${2:a} -> ${3:a} 12 | $1 ${4} = 13 | ${0} 14 | snippet fn2 15 | ${1:fn} : ${2:a} -> ${3:a} -> ${4:a} 16 | $1 ${5} = 17 | ${0} 18 | snippet fn3 19 | ${1:fn} : ${2:a} -> ${3:a} -> ${4:a} -> ${5:a} 20 | $1 ${6} = 21 | ${0} 22 | snippet fn0 23 | ${1:fn} : ${2:a} 24 | $1 = 25 | ${0} 26 | snippet case 27 | case ${1} of 28 | ${2} => 29 | ${0} 30 | snippet let 31 | let 32 | ${1} = 33 | ${2} 34 | in 35 | ${0} 36 | snippet wh 37 | where 38 | ${0} 39 | snippet if 40 | if ${1} then 41 | ${2:${VISUAL}} 42 | else 43 | ${0} 44 | ${0} 45 | snippet \ "Lambda function (\x => ...)" 46 | (\\${1:_} => ${0}) 47 | -------------------------------------------------------------------------------- /vim/snippets/jade.snippets: -------------------------------------------------------------------------------- 1 | # Angular HTML 2 | snippet rep 3 | div(ng-repeat='${1} in ${2}') 4 | 5 | snippet repf 6 | div(ng-repeat='${1} in ${2}' | ${3}) 7 | 8 | snippet repi 9 | div(ng-repeat='${1} in ${2}' track by $index) 10 | 11 | snippet hide 12 | div(ng-hide='${1}') 13 | 14 | snippet show 15 | div(ng-show='${1}') 16 | 17 | snippet if 18 | div(ng-if='${1}') 19 | -------------------------------------------------------------------------------- /vim/snippets/javascript-bemjson.snippets: -------------------------------------------------------------------------------- 1 | # Snippet for bemjson. https://en.bem.info/platform/bemjson/ 2 | 3 | # Blocks 4 | snippet b 5 | { 6 | block : '${1:name}', 7 | content : [ 8 | '${2:content}' 9 | ] 10 | } 11 | 12 | # btc - BEM block with text content 13 | snippet btc 14 | { 15 | block : '${1:name}', 16 | content: '${2:content}' 17 | } 18 | 19 | # bwm - BEM block with modifier. 20 | snippet bwm 21 | { 22 | block : '${1:name}', 23 | mods: { ${2:modName}: '${3:modVal}' }, 24 | content : [ 25 | '${4:content}' 26 | ] 27 | } 28 | 29 | # Elems 30 | 31 | # e - BEM elem 32 | snippet e 33 | { 34 | elem : '${1:name}', 35 | content : [ 36 | '${2:content}' 37 | ] 38 | } 39 | 40 | 41 | # mo - Mods 42 | snippet mo 43 | mods : { ${1:modName} : '${2:modVal}' }, 44 | 45 | # mi - BEM mix mod 46 | snippet mi 47 | mix : [ { ${1:block} : '${2:block}' } ], 48 | 49 | # a - BEM attrs mod 50 | snippet a 51 | attrs : { ${1:attr} : '${2:val}' }, 52 | 53 | -------------------------------------------------------------------------------- /vim/snippets/javascript-d3.snippets: -------------------------------------------------------------------------------- 1 | snippet .attr 2 | .attr("${1}", ${2}) 3 | snippet .style 4 | .style("${1}", ${2}) 5 | snippet axis 6 | d3.svg.axis() 7 | .orient(${1}) 8 | .scale(${2}) 9 | snippet fd 10 | function(d) { ${1} } 11 | snippet fdi 12 | function(d, i) { ${1} } 13 | snippet marginconvention 14 | var ${1:margin} = { top: ${2:10}, right: ${3:10}, bottom: ${4:10}, left: ${5:10} }; 15 | var ${6:width} = ${7:970} - $1.left - $1.right; 16 | var ${8:height} = ${9:500} - $1.top - $1.bottom; 17 | 18 | var ${10:svg} = d3.select("${11}").append("svg") 19 | .attr("width", $6 + $1.left + $1.right) 20 | .attr("height", $8 + $1.top + $1.bottom) 21 | .append("g") 22 | .attr("transform", "translate(" + $1.left + "," + $1.top + ")") 23 | snippet nest 24 | d3.nest() 25 | .key(${1}) 26 | .entries(${2}) 27 | snippet scale 28 | d3.scale.linear() 29 | .domain(${1}) 30 | .range(${2}) 31 | -------------------------------------------------------------------------------- /vim/snippets/javascript-es6-react.snippets: -------------------------------------------------------------------------------- 1 | # Import only React 2 | snippet ri1 3 | import React from 'react' 4 | 5 | # Import both React and Component 6 | snippet ri2 7 | import React, { Component } from 'react' 8 | import PropTypes from 'prop-types' 9 | 10 | # React class 11 | snippet rcla 12 | class ${1:MyComponent} extends Component { 13 | render() { 14 | return ( 15 | ${0:
} 16 | ) 17 | } 18 | } 19 | 20 | # React constructor 21 | snippet rcon 22 | constructor(props) { 23 | super(props) 24 | 25 | this.state = { 26 | ${1}: ${0}, 27 | } 28 | } 29 | 30 | # Proptypes for React Class 31 | snippet rcpt 32 | static propTypes = { 33 | ${1}: PropTypes.${0}, 34 | } 35 | 36 | # Default props for React Class 37 | snippet rcdp 38 | static defaultProps = { 39 | ${1}: ${0}, 40 | } 41 | 42 | # Presentational component 43 | snippet rcom 44 | props => { 45 | return ( 46 | ${0:
} 47 | ) 48 | } 49 | 50 | # Proptypes for Presentational component 51 | snippet rpt 52 | ${1}.propTypes = { 53 | ${2}: PropTypes.${0}, 54 | } 55 | 56 | # Default props for Presentational component 57 | snippet rdp 58 | ${1}.defaultProps = { 59 | ${2}: ${0}, 60 | } 61 | 62 | # Lifecycle Methods 63 | snippet rcdm 64 | componentDidMount() { 65 | ${0:${VISUAL}} 66 | } 67 | 68 | # State 69 | snippet rsst 70 | this.setState({ 71 | ${1}: ${0}, 72 | }) 73 | 74 | snippet rtst 75 | this.state.${0} 76 | 77 | # Props 78 | snippet rp 79 | props.${0} 80 | 81 | snippet rtp 82 | this.props.${0} 83 | -------------------------------------------------------------------------------- /vim/snippets/javascript-mocha.snippets: -------------------------------------------------------------------------------- 1 | snippet des "describe('thing', () => { ... })" b 2 | describe('${1:}', () => { 3 | ${0:${VISUAL}} 4 | }); 5 | snippet it "it('should do', () => { ... })" b 6 | it('${1:}', () => { 7 | ${0:${VISUAL}} 8 | }); 9 | snippet xit "xit('should do', () => { ... })" b 10 | xit('${1:}', () => { 11 | ${0:${VISUAL}} 12 | }); 13 | snippet bef "before(() => { ... })" b 14 | before(() => { 15 | ${0:${VISUAL}} 16 | }); 17 | snippet befe "beforeEach(() => { ... })" b 18 | beforeEach(() => { 19 | ${0:${VISUAL}} 20 | }); 21 | snippet aft "after(() => { ... })" b 22 | after(() => { 23 | ${0:${VISUAL}} 24 | }); 25 | snippet afte "afterEach(() => { ... })" b 26 | afterEach(() => { 27 | ${0:${VISUAL}} 28 | }); 29 | snippet exp "expect(...)" b 30 | expect(${1:})${0}; 31 | snippet expe "expect(...).to.equal(...)" b 32 | expect(${1:}).to.equal(${0}); 33 | snippet expd "expect(...).to.deep.equal(...)" b 34 | expect(${1:}).to.deep.equal(${0}); 35 | -------------------------------------------------------------------------------- /vim/snippets/javascript/javascript-react.snippets: -------------------------------------------------------------------------------- 1 | snippet ir 2 | import React from 'react'; 3 | snippet ird 4 | import ReactDOM from 'react-dom'; 5 | snippet cdm 6 | componentDidMount() { 7 | ${1} 8 | } 9 | snippet cdup 10 | componentDidUpdate(prevProps, prevState) { 11 | ${1} 12 | } 13 | snippet cwm 14 | componentWillMount() { 15 | ${1} 16 | } 17 | snippet cwr 18 | componentWillReceiveProps(nextProps) { 19 | ${1} 20 | } 21 | snippet cwun 22 | componentWillUnmount() { 23 | ${1} 24 | } 25 | snippet cwu 26 | componentWillUpdate(nextProps, nextState) { 27 | ${1} 28 | } 29 | snippet fup 30 | forceUpdate(${1:callback}); 31 | snippet dp 32 | static defaultProps = { 33 | ${1}: ${2}, 34 | } 35 | snippet st 36 | state = { 37 | ${1}: ${2}, 38 | } 39 | snippet pt 40 | static propTypes = { 41 | ${1}: React.PropTypes.${2:type}, 42 | } 43 | snippet rcc 44 | class ${1:ClassName} extends React.Component { 45 | render() { 46 | return ( 47 | ${0:
} 48 | ); 49 | } 50 | } 51 | snippet rdr 52 | ReactDOM.render(${1}, ${2}) 53 | snippet ercc 54 | export default class ${1:ClassName} extends React.Component { 55 | render() { 56 | return ( 57 | ${0:
} 58 | ); 59 | } 60 | } 61 | snippet ctor 62 | constructor() { 63 | super(); 64 | ${1} 65 | } 66 | snippet ren 67 | render() { 68 | return ( 69 | ${1:
} 70 | ); 71 | } 72 | snippet sst 73 | this.setState({ 74 | ${1}: ${2} 75 | }); 76 | snippet scu 77 | shouldComponentUpdate(nextProps, nextState) { 78 | ${1} 79 | } 80 | snippet prp i 81 | this.props.${1} 82 | snippet ste i 83 | this.state.${1} 84 | -------------------------------------------------------------------------------- /vim/snippets/javascript/javascript-requirejs.snippets: -------------------------------------------------------------------------------- 1 | snippet def 2 | define(["${1:#dependencies1}"], function (${2:#dependencies2}) { 3 | return ${0:TARGET}; 4 | }); 5 | 6 | snippet defn 7 | define("${1:#name}", ["${2:#dependencies1}"], function (${3:#dependencies2}) { 8 | return ${0:TARGET}; 9 | }); 10 | 11 | snippet reqjs 12 | require(["${1:#dependencies1}"], function (${2:#dependencies2}) { 13 | return ${0:TARGET}; 14 | }); 15 | -------------------------------------------------------------------------------- /vim/snippets/javascript/javascript.es6.snippets: -------------------------------------------------------------------------------- 1 | snippet const 2 | const ${1} = ${0}; 3 | snippet let 4 | let ${1} = ${0}; 5 | snippet im "import xyz from 'xyz'" 6 | import ${1} from '${2:$1}'; 7 | snippet imas "import * as xyz from 'xyz'" 8 | import * as ${1} from '${2:$1}'; 9 | snippet imm "import { member } from 'xyz'" 10 | import { ${1} } from '${2}'; 11 | snippet cla 12 | class ${1} { 13 | ${0:${VISUAL}} 14 | } 15 | snippet clax 16 | class ${1} extends ${2} { 17 | ${0:${VISUAL}} 18 | } 19 | snippet clac 20 | class ${1} { 21 | constructor(${2}) { 22 | ${0:${VISUAL}} 23 | } 24 | } 25 | snippet foro "for (const prop of object}) { ... }" 26 | for (const ${1:prop} of ${2:object}) { 27 | ${0:$1} 28 | } 29 | # Generator 30 | snippet fun* 31 | function* ${1:function_name}(${2}) { 32 | ${0:${VISUAL}} 33 | } 34 | snippet c=> 35 | const ${1:function_name} = (${2}) => { 36 | ${0:${VISUAL}} 37 | } 38 | snippet caf 39 | const ${1:function_name} = (${2}) => { 40 | ${0:${VISUAL}} 41 | } 42 | snippet => 43 | (${1}) => { 44 | ${0:${VISUAL}} 45 | } 46 | snippet af 47 | (${1}) => { 48 | ${0:${VISUAL}} 49 | } 50 | snippet sym 51 | const ${1} = Symbol('${0}'); 52 | snippet ed 53 | export default ${0} 54 | snippet ${ 55 | ${${1}}${0} 56 | -------------------------------------------------------------------------------- /vim/snippets/javascript/javascript.node.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env node 3 | # module exports 4 | snippet ex 5 | module.exports = ${1}; 6 | # require 7 | snippet re 8 | ${1:const} ${2} = require('${3:module_name}'); 9 | # EventEmitter 10 | snippet on 11 | on('${1:event_name}', function(${2:stream}) { 12 | ${3} 13 | }); 14 | snippet emit 15 | emit('${1:event_name}', ${2:args}); 16 | snippet once 17 | once('${1:event_name}', function(${2:stream}) { 18 | ${3} 19 | }); 20 | # http. User js function snippet as handler 21 | snippet http 22 | http.createServer(${1:handler}).listen(${2:port_number}); 23 | # net 24 | snippet net 25 | net.createServer(function(${1:socket}){ 26 | ${1}.on('data', function('data'){ 27 | ${2} 28 | ]}); 29 | ${1}.on('end', function(){ 30 | ${3} 31 | }); 32 | }).listen(${4:8124}); 33 | # Stream snippets 34 | snippet pipe 35 | pipe(${1:stream})${2} 36 | # Express snippets 37 | snippet eget 38 | ${1:app}.get('${2:route}', ${3:handler}); 39 | snippet epost 40 | ${1:app}.post('${2:route}', ${3:handler}); 41 | snippet eput 42 | ${1:app}.put('${2:route}', ${3:handler}); 43 | snippet edel 44 | ${1:app}.delete('${2:route}', ${3:handler}); 45 | # process snippets 46 | snippet stdin 47 | process.stdin 48 | snippet stdout 49 | process.stdout 50 | snippet stderr 51 | process.stderr 52 | -------------------------------------------------------------------------------- /vim/snippets/jinja.snippets: -------------------------------------------------------------------------------- 1 | # Generic tags 2 | 3 | extends html 4 | 5 | snippet % 6 | {% ${1} %} 7 | snippet %% 8 | {% ${1:tag_name} %} 9 | ${0} 10 | {% end$1 %} 11 | snippet { 12 | {{ ${1} }} 13 | # Template Tags 14 | 15 | snippet autoescape 16 | {% autoescape ${1:off} %} 17 | ${0} 18 | {% endautoescape %} 19 | snippet block 20 | {% block ${1} %} 21 | ${0} 22 | {% endblock %} 23 | snippet # 24 | {# ${0:comment} #} 25 | snippet comment 26 | {% comment %} 27 | ${0} 28 | {% endcomment %} 29 | snippet cycle 30 | {% cycle ${1:val1} ${2:val2} ${3:as ${4}} %} 31 | snippet debug 32 | {% debug %} 33 | snippet extends 34 | {% extends "${0:base.html}" %} 35 | snippet filter 36 | {% filter ${1} %} 37 | ${0} 38 | {% endfilter %} 39 | snippet firstof 40 | {% firstof ${1} %} 41 | snippet for 42 | {% for ${1} in ${2} %} 43 | ${0} 44 | {% endfor %} 45 | snippet empty 46 | {% empty %} 47 | ${0} 48 | snippet if 49 | {% if ${1} %} 50 | ${0} 51 | {% endif %} 52 | snippet el 53 | {% else %} 54 | ${1} 55 | snippet eif 56 | {% elif ${1} %} 57 | ${0} 58 | snippet ifchanged 59 | {% ifchanged %}${1}{% endifchanged %} 60 | snippet ifequal 61 | {% ifequal ${1} ${2} %} 62 | ${0} 63 | {% endifequal %} 64 | snippet ifnotequal 65 | {% ifnotequal ${1} ${2} %} 66 | ${0} 67 | {% endifnotequal %} 68 | snippet include 69 | {% include "${0}" %} 70 | snippet load 71 | {% load ${0} %} 72 | snippet now 73 | {% now "${0:jS F Y H:i}" %} 74 | snippet regroup 75 | {% regroup ${1} by ${2} as ${0} %} 76 | snippet spaceless 77 | {% spaceless %}${0}{% endspaceless %} 78 | snippet ssi 79 | {% ssi ${0} %} 80 | snippet trans 81 | {% trans %}${0}{% endtrans %} 82 | snippet url 83 | {% url ${1} as ${0} %} 84 | snippet widthratio 85 | {% widthratio ${1:this_value} ${2:max_value} ${0:100} %} 86 | snippet with 87 | {% with ${1} as ${2} %} 88 | ${0} 89 | {% endwith %} 90 | 91 | # Template Filters 92 | 93 | # Note: Since SnipMate can't determine which template filter you are 94 | # expanding without the "|" character, these do not add the "|" 95 | # character. These save a few keystrokes still. 96 | 97 | # Note: Template tags that take no arguments are not implemented. 98 | 99 | snippet add 100 | add:"${0}" 101 | snippet center 102 | center:"${0}" 103 | snippet cut 104 | cut:"${0}" 105 | snippet date 106 | date:"${0}" 107 | snippet default 108 | default:"${0}" 109 | snippet defaultifnone 110 | default_if_none:"${0}" 111 | snippet dictsort 112 | dictsort:"${0}" 113 | snippet dictsortrev 114 | dictsortreversed:"${0}" 115 | snippet divisibleby 116 | divisibleby:"${0}" 117 | snippet floatformat 118 | floatformat:"${0}" 119 | snippet getdigit 120 | get_digit:"${0}" 121 | snippet join 122 | join:"${0}" 123 | snippet lengthis 124 | length_is:"${0}" 125 | snippet pluralize 126 | pluralize:"${0}" 127 | snippet removetags 128 | removetags:"${0}" 129 | snippet slice 130 | slice:"${0}" 131 | snippet stringformat 132 | stringformat:"${0}" 133 | snippet time 134 | time:"${0}" 135 | snippet truncatewords 136 | truncatewords:${0} 137 | snippet truncatewordshtml 138 | truncatewords_html:${0} 139 | snippet urlizetrunc 140 | urlizetrunc:${0} 141 | snippet wordwrap 142 | wordwrap:${0} 143 | -------------------------------------------------------------------------------- /vim/snippets/jsp.snippets: -------------------------------------------------------------------------------- 1 | snippet @page 2 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 3 | snippet jstl 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 5 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 6 | snippet jstl:c 7 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 8 | snippet jstl:fn 9 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 10 | snippet cpath 11 | ${pageContext.request.contextPath} 12 | snippet cout 13 | 14 | snippet cset 15 | 16 | snippet cremove 17 | 18 | snippet ccatch 19 | 20 | snippet cif 21 | 22 | ${0} 23 | 24 | snippet cchoose 25 | 26 | ${0} 27 | 28 | snippet cwhen 29 | 30 | ${0} 31 | 32 | snippet cother 33 | 34 | ${0} 35 | 36 | snippet cfore 37 | 38 | ${0:} 39 | 40 | snippet cfort 41 | ${2:item1,item2,item3} 42 | 43 | ${0:} 44 | 45 | snippet cparam 46 | 47 | snippet cparam+ 48 | 49 | cparam+${0} 50 | snippet cimport 51 | 52 | snippet cimport+ 53 | 54 | 55 | cparam+${0} 56 | 57 | snippet curl 58 | 59 | ${0} 60 | snippet curl+ 61 | 62 | 63 | cparam+${0} 64 | 65 | ${3} 66 | snippet credirect 67 | 68 | snippet contains 69 | ${fn:contains(${1:string}, ${0:substr})} 70 | snippet contains:i 71 | ${fn:containsIgnoreCase(${1:string}, ${0:substr})} 72 | snippet endswith 73 | ${fn:endsWith(${1:string}, ${0:suffix})} 74 | snippet escape 75 | ${fn:escapeXml(${0:string})} 76 | snippet indexof 77 | ${fn:indexOf(${1:string}, ${0:substr})} 78 | snippet join 79 | ${fn:join(${1:collection}, ${0:delims})} 80 | snippet length 81 | ${fn:length(${0:collection_or_string})} 82 | snippet replace 83 | ${fn:replace(${1:string}, ${2:substr}, ${0:replace})} 84 | snippet split 85 | ${fn:split(${1:string}, ${0:delims})} 86 | snippet startswith 87 | ${fn:startsWith(${1:string}, ${0:prefix})} 88 | snippet substr 89 | ${fn:substring(${1:string}, ${2:begin}, ${0:end})} 90 | snippet substr:a 91 | ${fn:substringAfter(${1:string}, ${0:substr})} 92 | snippet substr:b 93 | ${fn:substringBefore(${1:string}, ${0:substr})} 94 | snippet lc 95 | ${fn:toLowerCase(${0:string})} 96 | snippet uc 97 | ${fn:toUpperCase(${0:string})} 98 | snippet trim 99 | ${fn:trim(${0:string})} 100 | -------------------------------------------------------------------------------- /vim/snippets/julia.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env julia 3 | 4 | # Functions 5 | snippet fun function definition 6 | function ${1}(${2}) 7 | ${0} 8 | end 9 | 10 | snippet ret return 11 | return(${0}) 12 | 13 | # Printing to console 14 | snippet pr print 15 | print("${1}") 16 | ${0} 17 | 18 | snippet prl print line 19 | println("${1}") 20 | ${0} 21 | 22 | # Includes 23 | snippet use load a package 24 | using ${0} 25 | 26 | snippet incl include source code 27 | include("${1}") 28 | ${0} 29 | 30 | # Loops 31 | snippet forc for loop iterating over iterable container 32 | for ${1} in ${2} 33 | ${0} 34 | end 35 | 36 | snippet for standard for loop 37 | for ${1} = ${2} 38 | ${0} 39 | end 40 | 41 | snippet fornest nested for loop 42 | for ${1} = ${2}, ${3} = ${4} 43 | ${0} 44 | end 45 | 46 | snippet wh while loop 47 | while ${1} ${2:<=} ${3} 48 | ${0} 49 | end 50 | 51 | # Conditionals 52 | snippet if if statement 53 | if ${1} 54 | ${0} 55 | end 56 | 57 | snippet el else part of statement 58 | else 59 | ${0} 60 | 61 | snippet eif else if part of if statement 62 | else if ${1} 63 | ${0} 64 | 65 | snippet ife full if-else statement 66 | if ${1} 67 | ${2} 68 | else 69 | ${0} 70 | end 71 | 72 | snippet tern ternary operator 73 | ${1} ? ${2} : ${3:nothing} 74 | 75 | # Exceptions 76 | snippet try try catch 77 | try 78 | ${1:${VISUAL}} 79 | catch ${2} 80 | ${0} 81 | end 82 | 83 | snippet fin finally statement 84 | finally 85 | ${0} 86 | 87 | snippet thr throw 88 | throw(${1}) 89 | ${0} 90 | 91 | # Messages 92 | snippet in 93 | info("${1}") 94 | ${0} 95 | 96 | snippet wa 97 | warn("${1}") 98 | ${0} 99 | 100 | snippet err 101 | error("${1}") 102 | ${0} 103 | -------------------------------------------------------------------------------- /vim/snippets/kotlin.snippets: -------------------------------------------------------------------------------- 1 | snippet fun 2 | fun ${1:name}(${2}): ${3:String} { 3 | ${4} 4 | } 5 | snippet pfun 6 | private fun ${1:name}(${2}): ${3:String} { 7 | ${4} 8 | } 9 | snippet ret 10 | return ${0} 11 | snippet whe 12 | when (${1:${VISUAL}}) { 13 | ${2} -> ${3} 14 | } 15 | snippet cla 16 | class ${1} { 17 | ${0:${VISUAL}} 18 | } 19 | snippet cobj 20 | companion object { 21 | ${0:${VISUAL}} 22 | } 23 | snippet obj 24 | object ${1} { 25 | ${0:${VISUAL}} 26 | } 27 | snippet if 28 | if (${1}) { 29 | ${0:${VISUAL}} 30 | } 31 | snippet ife 32 | if (${1}) { 33 | ${2:${VISUAL}} 34 | } else { 35 | ${0} 36 | } 37 | -------------------------------------------------------------------------------- /vim/snippets/ledger.snippets: -------------------------------------------------------------------------------- 1 | # Ledger 2 | snippet ent 3 | `strftime("%Y/%m/%d")` ${1:transaction} 4 | ${2:account} ${3:value} 5 | ${0:account} 6 | -------------------------------------------------------------------------------- /vim/snippets/lfe.snippets: -------------------------------------------------------------------------------- 1 | snippet defmo 2 | (defmodule ${1:`vim_snippets#Filename()`} 3 | (export ${2:all})) 4 | $0 5 | snippet def 6 | (defun $1 ($2) 7 | $0) 8 | snippet ltest 9 | (defmodule ${1:`vim_snippets#Filename()`} 10 | (behaviour ltest-unit) 11 | (export all)) 12 | 13 | (include-lib "ltest/include/ltest-macros.lfe") 14 | 15 | $0 16 | snippet test 17 | (deftest $1 18 | $0) 19 | -------------------------------------------------------------------------------- /vim/snippets/ls.snippets: -------------------------------------------------------------------------------- 1 | # Closure loop 2 | snippet forinlet 3 | for ${1:name} in ${2:array} 4 | let $1 5 | ${3} 6 | # Array comprehension 7 | snippet fora 8 | for ${1:name} in ${2:array} 9 | ${3} 10 | # Object comprehension 11 | snippet foro 12 | for ${1:key}, ${2:value} of ${3:object} 13 | ${4} 14 | # Range comprehension (inclusive) 15 | snippet forr 16 | for ${1:name} from ${2:start} to ${3:finish} 17 | ${4} 18 | snippet forrb 19 | for ${1:name} from ${2:start} to ${3:finish} by ${4:step} 20 | ${5} 21 | # Range comprehension (exclusive) 22 | snippet forrex 23 | for ${1:name} from ${2:start} til ${3:finish} 24 | ${4} 25 | snippet forrexb 26 | for ${1:name} from ${2:start} til ${3:finish} by ${4:step} 27 | ${5} 28 | # Function 29 | snippet fun 30 | (${1:args}) -> 31 | ${2} 32 | # Function (bound) 33 | snippet bfun 34 | (${1:args}) ~> 35 | ${2} 36 | # Class 37 | snippet cla class .. 38 | class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 39 | ${2} 40 | snippet cla class .. constructor: .. 41 | class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 42 | (${2:args}) -> 43 | ${3} 44 | 45 | ${4} 46 | snippet cla class .. extends .. 47 | class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass} 48 | ${3} 49 | snippet cla class .. extends .. constructor: .. 50 | class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass} 51 | (${3:args}) -> 52 | ${4} 53 | 54 | ${5} 55 | # If 56 | snippet if 57 | if ${1:condition} 58 | ${2} 59 | # If __ Else 60 | snippet ife 61 | if ${1:condition} 62 | ${2} 63 | else 64 | ${3} 65 | # Else if 66 | snippet elif 67 | else if ${1:condition} 68 | ${2} 69 | # Ternary If 70 | snippet ifte 71 | if ${1:condition} then ${2:value} else ${3:other} 72 | # Unless 73 | snippet unl 74 | ${1:action} unless ${2:condition} 75 | # Switch 76 | snippet swi 77 | switch ${1:object} 78 | case ${2:value} 79 | ${3} 80 | default void 81 | snippet mat 82 | match ${1:object} 83 | | ${2:value} => ${3} 84 | | otherwise => void 85 | 86 | # Log 87 | snippet log 88 | console.log ${1} 89 | # stringify 90 | snippet str 91 | JSON.stringify ${1}, void, 2 92 | 93 | # Try __ Catch 94 | snippet try 95 | try 96 | ${1:${VISUAL}} 97 | catch ${2:error} 98 | ${3} 99 | # Require 100 | snippet req 101 | ${2:$1} = require '${1}'${3} 102 | # Require! 103 | snippet req! 104 | require! ${1} 105 | 106 | # Export 107 | snippet exp 108 | ${1:root} = exports ? this 109 | -------------------------------------------------------------------------------- /vim/snippets/lua.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env lua 3 | $1 4 | snippet local 5 | local ${1:x} = ${0:1} 6 | snippet fun 7 | function ${1:fname}(${2:...}) 8 | ${0:-- body} 9 | end 10 | snippet for 11 | for ${1:i}=${2:1},${3:10} do 12 | ${0:print(i)} 13 | end 14 | snippet forp 15 | for ${1:i},${2:v} in pairs(${3:table_name}) do 16 | ${0:-- body} 17 | end 18 | snippet fori 19 | for ${1:i},${2:v} in ipairs(${3:table_name}) do 20 | ${0:-- body} 21 | end 22 | snippet if 23 | if ${1:condition} then 24 | ${2:-- body} 25 | end 26 | snippet ife 27 | if ${1:condition} then 28 | ${2:-- if condition} 29 | else 30 | ${0:-- else} 31 | end 32 | snippet elif 33 | elseif ${1:condition} then 34 | ${0:--body} 35 | snippet repeat 36 | repeat 37 | ${1:--body} 38 | until ${0:condition} 39 | snippet while 40 | while ${1:condition} do 41 | ${0:--body} 42 | end 43 | snippet print 44 | print("${1:string}") 45 | snippet im 46 | import "${1:import file}" 47 | -------------------------------------------------------------------------------- /vim/snippets/make.snippets: -------------------------------------------------------------------------------- 1 | # base 2 | snippet base 3 | .PHONY: clean, mrproper 4 | CC = gcc 5 | CFLAGS = -g -Wall 6 | 7 | all: $1 8 | 9 | %.o: %.c 10 | $(CC) $(CFLAGS) -c -o $@ $< 11 | 12 | ${1:out}: $1.o 13 | $(CC) $(CFLAGS) -o $@ $+ 14 | 15 | clean: 16 | rm -f *.o core.* 17 | 18 | mrproper: clean 19 | rm -f $1 20 | # add 21 | snippet add 22 | ${1:out}: $1.o 23 | $(CC) $(CFLAGS) -o $@ $+ 24 | # print 25 | snippet print 26 | print-%: ; @echo $*=$($*) 27 | # ifeq 28 | snippet if 29 | ifeq (${1:cond0}, ${2:cond1}) 30 | ${0:${VISUAL}} 31 | endif 32 | # ifeq ... else ... endif 33 | snippet ife 34 | ifeq (${1:cond0}, ${2:cond1}) 35 | ${3:${VISUAL}} 36 | else 37 | ${0} 38 | endif 39 | # else ... 40 | snippet el 41 | else 42 | ${0:${VISUAL}} 43 | # .DEFAULT_GOAL := target 44 | snippet default 45 | .DEFAULT_GOAL := ${1} 46 | # help target for self-documented Makefile 47 | snippet help 48 | help: ## Prints help for targets with comments 49 | @cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $\$1, $\$2}' 50 | ${0} 51 | 52 | snippet ma 53 | ${1:main}:$1.c 54 | gcc $^ -o $@ 55 | 56 | .PHONY:clean 57 | clean: 58 | rm $1 59 | -------------------------------------------------------------------------------- /vim/snippets/mako.snippets: -------------------------------------------------------------------------------- 1 | snippet def 2 | <%def name="${1:name}"> 3 | ${0:} 4 | 5 | snippet call 6 | <%call expr="${1:name}"> 7 | ${0:} 8 | 9 | snippet doc 10 | <%doc> 11 | ${0:} 12 | 13 | snippet text 14 | <%text> 15 | ${0:} 16 | 17 | snippet for 18 | % for ${1:i} in ${2:iter}: 19 | ${0:} 20 | % endfor 21 | snippet if if 22 | % if ${1:condition}: 23 | ${0:} 24 | % endif 25 | snippet ife if/else 26 | % if ${1:condition}: 27 | ${2:} 28 | % else: 29 | ${0:} 30 | % endif 31 | snippet try 32 | % try: 33 | ${1:${VISUAL}} 34 | % except${2:}: 35 | ${0:pass} 36 | % endtry 37 | snippet wh 38 | % while ${1:}: 39 | ${0:} 40 | % endwhile 41 | snippet $ 42 | ${ ${0:} } 43 | snippet <% 44 | <% ${0:} %> 45 | snippet 47 | snippet inherit 48 | <%inherit file="${0:filename}" /> 49 | snippet include 50 | <%include file="${0:filename}" /> 51 | snippet namespace 52 | <%namespace file="${0:name}" /> 53 | snippet page 54 | <%page args="${0:}" /> 55 | -------------------------------------------------------------------------------- /vim/snippets/markdown.snippets: -------------------------------------------------------------------------------- 1 | # Markdown 2 | 3 | # Includes octopress (http://octopress.org/) snippets 4 | 5 | # The suffix `c` stands for "Clipboard". 6 | 7 | snippet [ 8 | [${1:text}](http://${2:address}) 9 | snippet [* 10 | [${1:link}](${2:`@*`}) 11 | snippet [c 12 | [${1:link}](${2:`@+`}) 13 | snippet [" 14 | [${1:text}](http://${2:address} "${3:title}") 15 | snippet ["* 16 | [${1:link}](${2:`@*`} "${3:title}") 17 | snippet ["c 18 | [${1:link}](${2:`@+`} "${3:title}") 19 | snippet [: 20 | [${1:id}]: http://${2:url} 21 | 22 | snippet [:* 23 | [${1:id}]: ${2:`@*`} 24 | 25 | snippet [:c 26 | [${1:id}]: ${2:`@+`} 27 | 28 | snippet [:" 29 | [${1:id}]: http://${2:url} "${3:title}" 30 | 31 | snippet [:"* 32 | [${1:id}]: ${2:`@*`} "${3:title}" 33 | 34 | snippet [:"c 35 | [${1:id}]: ${2:`@+`} "${3:title}" 36 | 37 | snippet ![ 38 | ![${1:alttext}](${2:/images/image.jpg}) 39 | snippet ![* 40 | ![${1:alt}](${2:`@*`}) 41 | snippet ![c 42 | ![${1:alt}](${2:`@+`}) 43 | snippet ![" 44 | ![${1:alttext}](${2:/images/image.jpg} "${3:title}") 45 | snippet !["* 46 | ![${1:alt}](${2:`@*`} "${3:title}") 47 | snippet !["c 48 | ![${1:alt}](${2:`@+`} "${3:title}") 49 | snippet ![: 50 | ![${1:id}]: ${2:url} 51 | 52 | snippet ![:* 53 | ![${1:id}]: ${2:`@*`} 54 | 55 | snippet ![:" 56 | ![${1:id}]: ${2:url} "${3:title}" 57 | 58 | snippet ![:"* 59 | ![${1:id}]: ${2:`@*`} "${3:title}" 60 | 61 | snippet ![:"c 62 | ![${1:id}]: ${2:`@+`} "${3:title}" 63 | 64 | snippet < 65 | 66 | snippet <* 67 | <`@*`> 68 | snippet 70 | snippet ** 71 | **${1:bold}** 72 | snippet __ 73 | __${1:bold}__ 74 | snippet === 75 | `repeat('=', strlen(getline(line('.') - 3)))` 76 | 77 | ${0} 78 | snippet - 79 | - ${0} 80 | snippet --- 81 | `repeat('-', strlen(getline(line('.') - 3)))` 82 | 83 | ${0} 84 | snippet blockquote 85 | {% blockquote %} 86 | ${0:quote} 87 | {% endblockquote %} 88 | 89 | snippet blockquote-author 90 | {% blockquote ${1:author}, ${2:title} %} 91 | ${0:quote} 92 | {% endblockquote %} 93 | 94 | snippet blockquote-link 95 | {% blockquote ${1:author} ${2:URL} ${3:link_text} %} 96 | ${0:quote} 97 | {% endblockquote %} 98 | 99 | snippet ``` 100 | \`\`\`${1} 101 | ${0:${VISUAL}} 102 | \`\`\` 103 | 104 | # Language. 105 | snippet ```l 106 | \`\`\`${1:language} 107 | ${2:code} 108 | \`\`\` 109 | 110 | snippet codeblock-short 111 | {% codeblock %} 112 | ${0:code_snippet} 113 | {% endcodeblock %} 114 | 115 | snippet codeblock-full 116 | {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %} 117 | ${0:code_snippet} 118 | {% endcodeblock %} 119 | 120 | snippet gist-full 121 | {% gist ${1:gist_id} ${0:filename} %} 122 | 123 | snippet gist-short 124 | {% gist ${0:gist_id} %} 125 | 126 | snippet img 127 | {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${0:alt_text} %} 128 | 129 | snippet youtube 130 | {% youtube ${0:video_id} %} 131 | 132 | # The quote should appear only once in the text. It is inherently part of it. 133 | # See http://octopress.org/docs/plugins/pullquote/ for more info. 134 | 135 | snippet pullquote 136 | {% pullquote %} 137 | ${1:text} {" ${2:quote} "} ${0:text} 138 | {% endpullquote %} 139 | -------------------------------------------------------------------------------- /vim/snippets/matlab.snippets: -------------------------------------------------------------------------------- 1 | snippet if if 2 | if ${1} 3 | ${0} 4 | end 5 | 6 | snippet ife if ... else 7 | if ${1} 8 | ${2} 9 | else 10 | ${0} 11 | end 12 | 13 | snippet el else 14 | else 15 | ${0} 16 | 17 | snippet eif elsif 18 | elseif ${1} 19 | ${0} 20 | 21 | snippet wh while 22 | while ${1} 23 | ${0} 24 | end 25 | 26 | snippet for for 27 | for ${1:i} = ${2:1:n} 28 | ${0} 29 | end 30 | 31 | snippet parfor parfor 32 | parfor ${1:i} = ${2:1:n} 33 | ${0} 34 | end 35 | 36 | snippet fun function 37 | function [${3:out}] = ${1:`vim_snippets#Filename("$1", "fun_name")`}(${2}) 38 | ${0} 39 | 40 | snippet try try ... catch 41 | try 42 | ${1} 43 | catch ${2:err} 44 | ${0} 45 | end 46 | 47 | snippet switch switch 48 | switch ${1:n} 49 | case ${2:0} 50 | ${0} 51 | end 52 | 53 | snippet @ anonymous function 54 | @(${1:x}) ${0:x*x} 55 | 56 | snippet cl class 57 | classdef ${1:`vim_snippets#Filename("$1", "class_name")`} 58 | properties 59 | ${2} 60 | end 61 | methods 62 | ${0} 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /vim/snippets/mustache.snippets: -------------------------------------------------------------------------------- 1 | snippet if # {{#value}} ... {{/value}} 2 | {{#${1:value}}} 3 | ${0:${VISUAL}} 4 | {{/$1}} 5 | snippet ifn # {{^value}} ... {{/value}} 6 | {{^${1:value}}} 7 | ${0:${VISUAL}} 8 | {{/$1}} 9 | snippet ife # {{#value}} ... {{/value}} {{^value}} ... {{/value}} 10 | {{#${1:value}}} 11 | ${2:${VISUAL}} 12 | {{/$1}} 13 | {{^$1}} 14 | ${3} 15 | {{/$1}} 16 | -------------------------------------------------------------------------------- /vim/snippets/openfoam.snippets: -------------------------------------------------------------------------------- 1 | # 0/* 2 | snippet fv 3 | type fixedValue; 4 | value uniform ${0}; 5 | snippet zg 6 | type zeroGradient; 7 | snippet sym 8 | type symmetryPlane; 9 | # system/controlDict 10 | snippet forces 11 | forces 12 | { 13 | type forces; 14 | functionObjectLibs ("libforces.so"); 15 | enabled true; 16 | outputControl ${1:timeStep}; 17 | outputInterval ${2:1}; 18 | patches (${3}); 19 | log ${4:true}; 20 | CofR (${0:0 0 0}); 21 | } 22 | # system/fvSolution 23 | # solvers 24 | snippet gamg 25 | ${1:p} 26 | { 27 | solver GAMG; 28 | tolerance 1e-${2:6}; 29 | relTol ${0:0.0}; 30 | smoother GaussSeidel; 31 | cacheAgglomeration true; 32 | nCellsInCoarsestLevel 10; 33 | agglomerator faceAreaPair; 34 | mergeLevels 1; 35 | } 36 | snippet pbicg 37 | ${1:U} 38 | { 39 | solver PBiCG; 40 | preconditioner DILU; 41 | tolerance 1e-${2:6}; 42 | relTol ${0:0.0}; 43 | } 44 | # PIMPLE 45 | snippet pimple 46 | PIMPLE 47 | { 48 | nOuterCorrectors ${1:outer}; 49 | nCorrectors ${2:inner}; 50 | nNonOrthogonalCorrectors ${3:nonOrtho}; 51 | pRefCell ${4:cell}; 52 | pRefValue ${0:value for $4}; 53 | } 54 | -------------------------------------------------------------------------------- /vim/snippets/perl6.snippets: -------------------------------------------------------------------------------- 1 | # shebang 2 | snippet #! 3 | #!/usr/bin/env perl6 4 | 5 | # Hash Pointer 6 | snippet . 7 | => 8 | # Function 9 | snippet sub 10 | sub ${1:function_name}(${2:Str $var}) { 11 | ${3} 12 | } 13 | snippet mul 14 | multi ${1:function_name}(${2:Str $var}) { 15 | ${3} 16 | } 17 | # Conditional 18 | snippet if 19 | if ${1} { 20 | ${2} 21 | } 22 | # Conditional if..else 23 | snippet ife 24 | if ${1} { 25 | ${2} 26 | } 27 | else { 28 | ${3} 29 | } 30 | snippet eif 31 | elsif ${1) { 32 | ${2} 33 | } 34 | # Conditional One-line 35 | snippet xif 36 | ${1:expression} if ${2:condition}; 37 | # Unless conditional 38 | snippet unless 39 | unless ${1} { 40 | ${2} 41 | } 42 | # Unless conditional One-line 43 | snippet xunless 44 | ${1:expression} unless ${2:condition}; 45 | # Ternary conditional 46 | snippet tc 47 | ${1:condition} ?? ${2:value-if-true} !! ${3:value-if-false}; 48 | # given - when (perl6 switch) 49 | snippet switch 50 | given ${1:$var} { 51 | when ${2:condition} { 52 | ${3:# code block ...} 53 | } 54 | ${4} 55 | default { 56 | ${5} 57 | } 58 | } 59 | # 'loop' - C's for. 60 | snippet loop 61 | loop (my ${1:$i} = 0; $$1 < ${2:count}; $$1++) { 62 | ${3} 63 | } 64 | # for loop 65 | snippet for 66 | for ${1:@array} -> ${2:$variable} { 67 | ${3} 68 | } 69 | # While Loop 70 | snippet wh 71 | while ${1} { 72 | ${2} 73 | } 74 | # Repeat while and repean until 75 | snippet rp 76 | repeat { 77 | ${1} 78 | } ${2:while|until} ${3}; 79 | # classes .. 80 | snippet cl 81 | ${1:my} class ${2:ClassName} ${3:is|does Parent|Role}{ 82 | ${4} 83 | } 84 | snippet has 85 | has ${1:Type} ${2:$!identifier}; 86 | snippet mth 87 | method ${1:method_name}(${2:$attr}) { 88 | ${3} 89 | } 90 | snippet pmth 91 | method ${1:!}${2:method_name}(${3:$attr}) { 92 | ${4} 93 | } 94 | snippet smth 95 | submethod ${1:submethod_name}(${2:$attr}) { 96 | ${3} 97 | } 98 | # Tests 99 | snippet test 100 | use v6; 101 | use Test; 102 | ${1:use lib 'lib';} 103 | 104 | plan ${2:$num-tests}; 105 | 106 | # IO 107 | snippet slurp 108 | my ${1:$var} = "${2:filename}".IO.slurp; 109 | snippet rfile 110 | for "${1:filename}".IO.lines -> $line { 111 | ${2} 112 | } 113 | snippet open 114 | my $fh = open "${1:filename}", ${2::r|:w|:a}; 115 | ${3:# actions}; 116 | $fh.close; 117 | -------------------------------------------------------------------------------- /vim/snippets/plsql.snippets: -------------------------------------------------------------------------------- 1 | # create package spec 2 | snippet ps 3 | create or replace package ${1:name} 4 | as 5 | ${0:-- spec} 6 | end; -- end of package spec $1 7 | # create package body 8 | snippet pb 9 | create or replace package body ${1:name} 10 | as 11 | ${0:-- body} 12 | end; -- end of package body $1; 13 | # package procedure spec 14 | snippet pps 15 | procedure ${1:name}(${0:args}); 16 | # package procedure body 17 | snippet ppb 18 | procedure ${1:name}(${2:args}) 19 | as 20 | begin 21 | ${0:-- body} 22 | end $2; 23 | # package function spec 24 | snippet pfs 25 | function ${1:name}(${2:args}) 26 | return ${0:type}; 27 | # package function body 28 | snippet pfb 29 | function ${1:name}(${2:args}) 30 | return ${3:type} 31 | as 32 | l_res $3; 33 | begin 34 | ${0:-- body}; 35 | return l_res; 36 | end $1; 37 | # snow errors 38 | snippet err 39 | show errors; 40 | # proc/func in parameter 41 | snippet p 42 | ${1:name} ${2:in} ${3:type} ${0: := null} 43 | # package type: record 44 | snippet tr 45 | type tr_${1:name} is record (${0:/* columns */}); 46 | # package type: nested table 47 | snippet tt 48 | type tt_${1:name} is table of tr_${0:name}; 49 | # package type: indexed table 50 | snippet tti 51 | type tt_${1:name} is table of tr_${0:name} index by binary_integer; 52 | # proc/func comment 53 | snippet doc 54 | /* 55 | * ${0: comment ...} 56 | */ 57 | # plsql block 58 | snippet beg 59 | begin 60 | ${0} 61 | end; 62 | # plsql block with declare part 63 | snippet dec 64 | declare 65 | ${1} 66 | begin 67 | ${0} 68 | end; 69 | # return pipe row 70 | snippet rpipe 71 | for ${1:i} in 1 .. ${0:l_res}.count loop 72 | pipe row( $2($1) ); 73 | end loop; 74 | return; 75 | # bulk collect 76 | snippet bc 77 | bulk collect into ${0} 78 | # local variable 79 | snippet l 80 | l_${1} ${0:number}; 81 | # output 82 | snippet log 83 | dbms_output.put_line('${0}'); 84 | # for loop 85 | snippet for 86 | for ${1:i} in ${2:1}..${3:42} loop 87 | ${0} 88 | end loop; 89 | # for loop with select 90 | snippet fors 91 | for ${1:rec} in (${2: select}) loop 92 | ${0} 93 | end loop; 94 | # for loop with collection 95 | snippet forc 96 | for ${1:i} in ${2:l_var}.first .. $2.last loop 97 | ${0: -- dbms_output.put_line($2($1)); } 98 | end loop; 99 | # if 100 | snippet if 101 | if ${1} then 102 | ${0} 103 | end if; 104 | snippet ife 105 | if ${1} then 106 | ${2} 107 | else 108 | ${0} 109 | end if; 110 | -------------------------------------------------------------------------------- /vim/snippets/po.snippets: -------------------------------------------------------------------------------- 1 | snippet msg 2 | msgid "${1}" 3 | msgstr "${2}" 4 | 5 | ${0} 6 | -------------------------------------------------------------------------------- /vim/snippets/progress.snippets: -------------------------------------------------------------------------------- 1 | # Progress/OpenEdge ABL snippets 2 | # define 3 | snippet defbuf 4 | DEFINE BUFFER b_${1:TableName} FOR $1 ${0}. 5 | snippet defvar 6 | DEFINE VARIABLE ${1:VariableName} AS ${0}. 7 | snippet nl 8 | NO-LOCK 9 | snippet ne 10 | NO-ERROR 11 | snippet nle 12 | NO-LOCK NO-ERROR 13 | snippet ini 14 | INITIAL ${0:?} 15 | snippet nu 16 | NO-UNDO 17 | snippet err 18 | ERROR 19 | snippet ff 20 | FIND FIRST ${1:BufferName} 21 | ${2:WHERE $1.${3}} ${0} 22 | snippet input 23 | DEFINE INPUT PARAMETER ${1:ParamName} AS ${0}. 24 | snippet output 25 | DEFINE OUTPUT PARAMETER ${1:ParamName} AS ${0:ParamType}. 26 | snippet proc 27 | 28 | /******************************************************************************/ 29 | 30 | PROCEDURE ${1:ProcName}: 31 | 32 | ${0} 33 | 34 | END PROCEDURE. /* $1 */ 35 | 36 | /******************************************************************************/ 37 | 38 | snippet alert 39 | MESSAGE "${1:MessageContent}" ${2:Data} VIEW-AS ALERT-BOX. 40 | snippet if 41 | IF ${1:Condition} 42 | THEN ${2:Action} 43 | ${3:ELSE ${4:OtherWise}} 44 | snippet do 45 | DO${1: Clauses}: 46 | ${0} 47 | END. 48 | # datatypes 49 | snippet int 50 | INTEGER 51 | snippet char 52 | CHARACTER 53 | snippet log 54 | LOGICAL 55 | snippet dec 56 | DECIMAL 57 | snippet sep 58 | /* ------------------------------------------------------------------------- */ 59 | -------------------------------------------------------------------------------- /vim/snippets/ps1.snippets: -------------------------------------------------------------------------------- 1 | # Snippets for 2 | # Authored by Trevor Sullivan 3 | 4 | # PowerShell Class 5 | snippet class 6 | class { 7 | [string] ${0:FirstName} 8 | } 9 | 10 | # PowerShell Advanced Function 11 | snippet function 12 | function {0:name} { 13 | [CmdletBinding()] 14 | param ( 15 | [Parameter(Mandatory = $true)] 16 | [string] $Param1 17 | ) 18 | 19 | begin { 20 | } 21 | 22 | process { 23 | } 24 | 25 | end { 26 | } 27 | } 28 | 29 | # PowerShell Splatting 30 | snippet splatting 31 | $Params = @{ 32 | ${0:Param1} = 'Value1' 33 | ${1:Param2} = 'Value2' 34 | } 35 | ${3:CommandName} 36 | 37 | # PowerShell Enumeration 38 | snippet enum 39 | enum ${0:name} { 40 | ${1:item1} 41 | ${2:item2} 42 | } 43 | 44 | # PowerShell if..then 45 | snippet if 46 | if (${0:condition}) { 47 | ${1:statement} 48 | } 49 | 50 | # PowerShell While Loop 51 | snippet while 52 | while (${0:condition}) { 53 | ${1:statement} 54 | } 55 | 56 | # PowerShell Filter..Sort 57 | snippet filtersort 58 | ${0:command} | Where-Object -FilterScript { $PSItem.${1:property} -${2:operator} '${3:expression}' } | Sort-Object -Property ${4:sortproperty} 59 | -------------------------------------------------------------------------------- /vim/snippets/purescript.snippets: -------------------------------------------------------------------------------- 1 | snippet mod 2 | module `substitute(substitute(expand('%:r'), '[/\\]','.','g'),'^\%(\l*\.\)\?','','')` 3 | ( 4 | ) where 5 | 6 | import Prelude 7 | 8 | ${0} 9 | snippet imp 10 | import ${0:Data.List} 11 | snippet impq 12 | import ${1:Data.List} as ${0:List} 13 | snippet fn0 14 | ${1:name} :: ${2:a} 15 | $1 = ${0:undefined} 16 | snippet fn 17 | ${1:fn} :: ${2:a} -> ${3:a} 18 | $1 ${4}= ${0} 19 | snippet fn1 20 | ${1:fn} :: ${2:a} -> ${3:a} 21 | $1 ${4}= ${0} 22 | snippet fn2 23 | ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a} 24 | $1 ${5}= ${0} 25 | snippet fn3 26 | ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a} -> ${5:a} 27 | $1 ${6}= ${0} 28 | snippet case 29 | case ${1} of 30 | ${2} -> ${0} 31 | snippet let 32 | let 33 | ${1} = ${2} 34 | in 35 | ${3} 36 | snippet where 37 | where 38 | ${1} = ${0} 39 | snippet testunit 40 | module Test.Main where 41 | 42 | import Prelude 43 | import Test.Unit (suite, test) 44 | import Test.Unit.Main (runTest) 45 | import Test.Unit.Assert as Assert 46 | 47 | main = runTest do 48 | suite "${1}" do 49 | test "${2:the tests run}" do 50 | Assert.equal 51 | "Hello, world!" 52 | "Hello, sailor!" 53 | snippet if 54 | if ${1} then 55 | ${2:${VISUAL}} 56 | else 57 | ${0} 58 | snippet doc 59 | {-| ${0} 60 | -} 61 | snippet ty 62 | type ${1:Type} = 63 | ${0} 64 | snippet da 65 | data ${1:Type} = 66 | ${0:$1} 67 | snippet nty 68 | newtype ${1:Type} = 69 | ${2:$1} ${0:Int} 70 | snippet fi 71 | foreign import ${1} :: ${2} 72 | -------------------------------------------------------------------------------- /vim/snippets/r.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env Rscript 3 | 4 | # includes 5 | snippet lib 6 | library(${0:package}) 7 | snippet req 8 | require(${0:package}) 9 | snippet source 10 | source('${0:file}') 11 | 12 | # conditionals 13 | snippet if 14 | if (${1:condition}) { 15 | ${0} 16 | } 17 | snippet el 18 | else { 19 | ${0} 20 | } 21 | snippet ei 22 | else if (${1:condition}) { 23 | ${0} 24 | } 25 | 26 | # loops 27 | snippet wh 28 | while(${1}) { 29 | ${2} 30 | } 31 | snippet for 32 | for (${1:item} in ${2:list}) { 33 | ${3} 34 | } 35 | 36 | # functions 37 | snippet fun 38 | ${1:name} <- function (${2:variables}) { 39 | ${0} 40 | } 41 | snippet ret 42 | return(${0}) 43 | 44 | # dataframes, lists, etc 45 | snippet df 46 | ${1:name}[${2:rows}, ${0:cols}] 47 | snippet c 48 | c(${0:items}) 49 | snippet li 50 | list(${0:items}) 51 | snippet mat 52 | matrix(${1:data}, nrow = ${2:rows}, ncol = ${0:cols}) 53 | 54 | # apply functions 55 | snippet apply 56 | apply(${1:array}, ${2:margin}, ${0:function}) 57 | snippet lapply 58 | lapply(${1:list}, ${0:function}) 59 | snippet sapply 60 | lapply(${1:list}, ${0:function}) 61 | snippet vapply 62 | vapply(${1:list}, ${2:function}, ${0:type}) 63 | snippet mapply 64 | mapply(${1:function}, ${0:...}) 65 | snippet tapply 66 | tapply(${1:vector}, ${2:index}, ${0:function}) 67 | snippet rapply 68 | rapply(${1:list}, ${0:function}) 69 | 70 | # plyr functions 71 | snippet dd 72 | ddply(${1:frame}, ${2:variables}, ${0:function}) 73 | snippet dl 74 | dlply(${1:frame}, ${2:variables}, ${0:function}) 75 | snippet da 76 | daply(${1:frame}, ${2:variables}, ${0:function}) 77 | snippet d_ 78 | d_ply(${1:frame}, ${2:variables}, ${0:function}) 79 | 80 | snippet ad 81 | adply(${1:array}, ${2:margin}, ${0:function}) 82 | snippet al 83 | alply(${1:array}, ${2:margin}, ${0:function}) 84 | snippet aa 85 | aaply(${1:array}, ${2:margin}, ${0:function}) 86 | snippet a_ 87 | a_ply(${1:array}, ${2:margin}, ${0:function}) 88 | 89 | snippet ld 90 | ldply(${1:list}, ${0:function}) 91 | snippet ll 92 | llply(${1:list}, ${0:function}) 93 | snippet la 94 | laply(${1:list}, ${0:function}) 95 | snippet l_ 96 | l_ply(${1:list}, ${0:function}) 97 | 98 | snippet md 99 | mdply(${1:matrix}, ${0:function}) 100 | snippet ml 101 | mlply(${1:matrix}, ${0:function}) 102 | snippet ma 103 | maply(${1:matrix}, ${0:function}) 104 | snippet m_ 105 | m_ply(${1:matrix}, ${0:function}) 106 | 107 | # plot functions 108 | snippet pl 109 | plot(${1:x}, ${0:y}) 110 | snippet ggp 111 | ggplot(${1:data}, aes(${0:aesthetics})) 112 | snippet img 113 | ${1:(jpeg,bmp,png,tiff)}(filename = '${2:filename}', width = ${3}, height = ${4}, unit = '${5}') 114 | ${0:plot} 115 | dev.off() 116 | 117 | # statistical test functions 118 | snippet fis 119 | fisher.test(${1:x}, ${0:y}) 120 | snippet chi 121 | chisq.test(${1:x}, ${0:y}) 122 | snippet tt 123 | t.test(${1:x}, ${0:y}) 124 | snippet wil 125 | wilcox.test(${1:x}, ${0:y}) 126 | snippet cor 127 | cor.test(${1:x}, ${0:y}) 128 | snippet fte 129 | var.test(${1:x}, ${0:y}) 130 | snippet kvt 131 | kv.test(${1:x}, ${0:y}) 132 | -------------------------------------------------------------------------------- /vim/snippets/reason.snippets: -------------------------------------------------------------------------------- 1 | snippet doc 2 | /* 3 | ${0} 4 | */ 5 | snippet let 6 | let ${1} = ${0}; 7 | snippet fn 8 | let ${1} => { 9 | ${0} 10 | }; 11 | snippet fn0 12 | let ${1} () => { 13 | ${0} 14 | }; 15 | snippet fun 16 | fun ${1} => ${0} 17 | snippet ty 18 | type ${1} = ${1}; 19 | snippet mod 20 | module ${1} = { 21 | ${0} 22 | }; 23 | snippet modty 24 | module type ${1} = { 25 | ${0} 26 | }; 27 | snippet sw 28 | switch ${1} { 29 | | ${2} => ${0} 30 | } 31 | snippet | 32 | | ${1} => ${0} 33 | snippet if 34 | if (${1}) { 35 | ${2} 36 | } else { 37 | ${0} 38 | } 39 | -------------------------------------------------------------------------------- /vim/snippets/rst.snippets: -------------------------------------------------------------------------------- 1 | # rst 2 | 3 | snippet : 4 | :${1:field name}: ${0:field body} 5 | snippet * 6 | *${1:Emphasis}* ${0} 7 | snippet ** 8 | **${1:Strong emphasis}** ${0} 9 | snippet _ 10 | \`${1:hyperlink-name}\`_ 11 | .. _\`$1\`: ${0:link-block} 12 | snippet = 13 | ${1:Title} 14 | =====${2:=} 15 | ${0} 16 | snippet - 17 | ${1:Title} 18 | -----${2:-} 19 | ${0} 20 | #some directive 21 | snippet img: 22 | .. |${0:alias}| image:: ${1:img} 23 | snippet fig: 24 | .. figure:: ${1:img} 25 | :alt: ${0:alter text} 26 | 27 | $2 28 | snippet cont: 29 | .. contents:: 30 | ${0:content} 31 | snippet code: 32 | .. code:: ${1:type} 33 | 34 | ${0:write some code} 35 | snippet tip: 36 | .. tip:: 37 | ${0:my tips} 38 | snippet not: 39 | .. note:: 40 | ${0:my notes} 41 | snippet war: 42 | .. warning:: 43 | ${0:attention!} 44 | snippet imp: 45 | .. important:: 46 | ${0:this is importatnt} 47 | snippet att: 48 | .. attention:: 49 | ${0:hey!} 50 | snippet dan: 51 | .. danger:: 52 | ${0:ah!} 53 | snippet err: 54 | .. error:: 55 | ${0:Error occur} 56 | snippet cau: 57 | .. caution:: 58 | ${0:Watch out!} 59 | #Sphinx only 60 | snippet sid: 61 | .. sidebar:: ${1:Title} 62 | 63 | ${0} 64 | snippet tod: 65 | .. todo:: 66 | ${0} 67 | snippet lis: 68 | .. list-table:: ${0:Title} 69 | :header-rows: 1 70 | :stub-columns: 1 71 | 72 | * - x1,y1 73 | - x2,y1 74 | - x3,y1 75 | * - x1,y2 76 | - x2,y2 77 | - x3,y2 78 | * - x1,y3 79 | - x2,y3 80 | - x3,y3 81 | 82 | snippet toc: 83 | .. toctree:: 84 | :maxdepth: 2 85 | 86 | ${0} 87 | snippet dow: 88 | :download:\`${0:text} <${1:path}>\` 89 | snippet ref: 90 | :ref:\`${0:text} <${1:path}>\` 91 | snippet doc: 92 | :doc:`${0:text} <${1:path}>` 93 | # CJK optimize, CJK has no space between charaters 94 | snippet *c 95 | \ *${1:Emphasis}*\ ${0} 96 | snippet **c 97 | \ **${1:Strong emphasis}**\ ${0} 98 | 99 | -------------------------------------------------------------------------------- /vim/snippets/scheme.snippets: -------------------------------------------------------------------------------- 1 | snippet + 2 | (+ ${1} 3 | ${0}) 4 | 5 | snippet - 6 | (- ${1} 7 | ${0}) 8 | 9 | snippet / 10 | (/ ${1} 11 | ${0}) 12 | 13 | snippet * 14 | (* ${1} 15 | ${0}) 16 | 17 | # Definition 18 | snippet def 19 | (define (${1:name}) 20 | (${0:definition})) 21 | 22 | # Definition with lambda 23 | snippet defl 24 | (define ${1:name} 25 | (lambda (x)(${0:definition}))) 26 | 27 | # Condition 28 | snippet cond 29 | (cond ((${1:predicate}) (${2:action})) 30 | ((${3:predicate}) (${0:action}))) 31 | 32 | # If statement 33 | snippet if 34 | (if (${1:predicate}) 35 | (${2:true-action}) 36 | (${0:false-action})) 37 | -------------------------------------------------------------------------------- /vim/snippets/scss.snippets: -------------------------------------------------------------------------------- 1 | extends css 2 | 3 | snippet $ 4 | $${1:variable}: ${0:value}; 5 | snippet imp 6 | @import '${0}'; 7 | snippet mix 8 | @mixin ${1:name}(${2}) { 9 | ${0} 10 | } 11 | snippet inc 12 | @include ${1:mixin}(${2}); 13 | snippet ext 14 | @extend ${0}; 15 | snippet fun 16 | @function ${1:name}(${2:args}) { 17 | ${0} 18 | } 19 | snippet if 20 | @if ${1:condition} { 21 | ${0} 22 | } 23 | snippet ife 24 | @if ${1:condition} { 25 | ${2} 26 | } @else { 27 | ${0} 28 | } 29 | snippet eif 30 | @else if ${1:condition} { 31 | ${0} 32 | } 33 | snippet for 34 | @for ${1:$i} from ${2:1} through ${3:3} { 35 | ${0} 36 | } 37 | snippet each 38 | @each ${1:$item} in ${2:items} { 39 | ${0} 40 | } 41 | snippet while 42 | @while ${1:$i} ${2:>} ${3:0} { 43 | ${0} 44 | } 45 | -------------------------------------------------------------------------------- /vim/snippets/sh.snippets: -------------------------------------------------------------------------------- 1 | # Shebang. Executing bash via /usr/bin/env makes scripts more portable. 2 | snippet #! 3 | #!/usr/bin/env sh 4 | 5 | snippet s#! 6 | #!/usr/bin/env sh 7 | set -euo pipefail 8 | 9 | snippet safe 10 | set -euo pipefail 11 | 12 | snippet bash 13 | #!/usr/bin/env bash 14 | 15 | snippet sbash 16 | #!/usr/bin/env bash 17 | set -euo pipefail 18 | IFS=$'\n\t' 19 | 20 | snippet if 21 | if [[ ${1:condition} ]]; then 22 | ${0:${VISUAL}} 23 | fi 24 | snippet elif 25 | elif [[ ${1:condition} ]]; then 26 | ${0:${VISUAL}} 27 | snippet for 28 | for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do 29 | ${0:${VISUAL}} 30 | done 31 | snippet fori 32 | for ${1:needle} in ${2:haystack} ; do 33 | ${0:${VISUAL}} 34 | done 35 | snippet wh 36 | while [[ ${1:condition} ]]; do 37 | ${0:${VISUAL}} 38 | done 39 | snippet until 40 | until [[ ${1:condition} ]]; do 41 | ${0:${VISUAL}} 42 | done 43 | snippet case 44 | case ${1:word} in 45 | ${2:pattern}) 46 | ${0};; 47 | esac 48 | snippet go 49 | while getopts '${1:o}' ${2:opts} 50 | do 51 | case $$2 in 52 | ${3:o0}) 53 | ${0:#staments};; 54 | esac 55 | done 56 | # Set SCRIPT_DIR variable to directory script is located. 57 | snippet sdir 58 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 59 | # getopt 60 | snippet getopt 61 | __ScriptVersion="${1:version}" 62 | 63 | #=== FUNCTION ================================================================ 64 | # NAME: usage 65 | # DESCRIPTION: Display usage information. 66 | #=============================================================================== 67 | function usage () 68 | { 69 | echo "Usage : $${0:0} [options] [--] 70 | 71 | Options: 72 | -h|help Display this message 73 | -v|version Display script version" 74 | 75 | } # ---------- end of function usage ---------- 76 | 77 | #----------------------------------------------------------------------- 78 | # Handle command line arguments 79 | #----------------------------------------------------------------------- 80 | 81 | while getopts ":hv" opt 82 | do 83 | case $opt in 84 | 85 | h|help ) usage; exit 0 ;; 86 | 87 | v|version ) echo "$${0:0} -- Version $__ScriptVersion"; exit 0 ;; 88 | 89 | * ) echo -e "\n Option does not exist : $OPTARG\n" 90 | usage; exit 1 ;; 91 | 92 | esac # --- end of case --- 93 | done 94 | shift $(($OPTIND-1)) 95 | snippet root 96 | if [ \$(id -u) -ne 0 ]; then exec sudo \$0; fi 97 | 98 | snippet fun-sh 99 | ${1:function_name}() { 100 | ${0:#function_body} 101 | } 102 | 103 | snippet fun 104 | function ${1:function_name}() { 105 | ${0:#function_body} 106 | } 107 | -------------------------------------------------------------------------------- /vim/snippets/simplemvcf.snippets: -------------------------------------------------------------------------------- 1 | snippet sm_controller 2 | db->select('SELECT * FROM '.$table.' WHERE ${3:where}', $data); 49 | } 50 | 51 | public function getRows($where) 52 | { 53 | return $this->db->select('SELECT * FROM '.$table.'); 54 | } 55 | 56 | public function insert($data) 57 | { 58 | $this->db->insert($table, $data); 59 | } 60 | 61 | public function update($data, $where) 62 | { 63 | $this->db->update($table ,$data, $where); 64 | } 65 | 66 | public function delete($where) 67 | { 68 | $this->db->delete($table, $where); 69 | } 70 | } 71 | snippet sm_render 72 | View::render('${1:view}', $${2:array}); 73 | snippet sm_render_template 74 | View::renderTemplate('${1:part}', $${2:array}); 75 | 76 | # database 77 | snippet sm_db_select 78 | $this->db->select(${1:sql}, ${2:where}); 79 | 80 | snippet sm_db_insert 81 | $this->db->insert(${1:table}, ${2:data}); 82 | 83 | snippet sm_db_update 84 | $this->db->update(${1:table}, ${2:data}, ${3:where}); 85 | 86 | snippet sm_db_delete 87 | $this->db->delete(${1:table}, ${2:where}); 88 | 89 | snippet sm_db_truncate 90 | $this->db->delete(${1:table}); 91 | 92 | #session 93 | snippet sm_session_set 94 | Session::set(${1:key}, ${2:value}); 95 | 96 | snippet sm_session_get 97 | Session::get(${1:key}); 98 | 99 | snippet sm_session_pull 100 | Session::pull(${1:key}); 101 | 102 | snippet sm_session_id 103 | Session::id(); 104 | 105 | snippet sm_session_destroy 106 | Session::set(${1:key}); 107 | 108 | snippet sm_session_display 109 | Session::display(); 110 | 111 | #url 112 | snippet sm_url_redirect 113 | Url:redirect('${1:path}'); 114 | 115 | snippet sm_url_previous 116 | Url:previous(); 117 | 118 | snippet sm_url_templatepath 119 | Url:templatePath(); 120 | 121 | snippet sm_url_autolink 122 | Url:autolink('${1:string}'); 123 | -------------------------------------------------------------------------------- /vim/snippets/slim.snippets: -------------------------------------------------------------------------------- 1 | snippet pry 2 | - binding.pry 3 | snippet renp 4 | = render partial: '${0}' 5 | # Forms 6 | # ===== 7 | snippet fieldset 8 | fieldset 9 | legend ${1} 10 | snippet css 11 | link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}" 12 | snippet script 13 | script src="${1:script.js}" type="text/javascript" 14 | # Some useful Unicode entities 15 | # ============================ 16 | # Non-Breaking Space 17 | snippet nbs 18 |   19 | # ← 20 | snippet left 21 | ← 22 | # → 23 | snippet right 24 | → 25 | # ↑ 26 | snippet up 27 | ↑ 28 | # ↓ 29 | snippet down 30 | ↓ 31 | # ↩ 32 | snippet return 33 | ↩ 34 | # ⇤ 35 | snippet backtab 36 | ⇤ 37 | # ⇥ 38 | snippet tab 39 | ⇥ 40 | # ⇧ 41 | snippet shift 42 | ⇧ 43 | # ⌃ 44 | snippet ctrl 45 | ⌃ 46 | # ⌅ 47 | snippet enter 48 | ⌅ 49 | # ⌘ 50 | snippet cmd 51 | ⌘ 52 | # ⌥ 53 | snippet option 54 | ⌥ 55 | # ⌦ 56 | snippet delete 57 | ⌦ 58 | # ⌫ 59 | snippet backspace 60 | ⌫ 61 | # ⎋ 62 | snippet esc 63 | ⎋ 64 | -------------------------------------------------------------------------------- /vim/snippets/snippets.snippets: -------------------------------------------------------------------------------- 1 | # snippets for making snippets :) 2 | snippet snip 3 | snippet ${1:trigger} "${2:description}" 4 | ${0:${VISUAL}} 5 | snippet v 6 | {VISUAL} 7 | snippet $ 8 | ${${1:1}:${0:text}} 9 | -------------------------------------------------------------------------------- /vim/snippets/sql.snippets: -------------------------------------------------------------------------------- 1 | snippet tbl 2 | create table ${1:table} ( 3 | ${0:columns} 4 | ); 5 | snippet col 6 | ${1:name} ${2:type} ${3:default ''} ${0:not null} 7 | snippet ccol 8 | ${1:name} varchar2(${2:size}) ${3:default ''} ${0:not null} 9 | snippet ncol 10 | ${1:name} number ${3:default 0} ${0:not null} 11 | snippet dcol 12 | ${1:name} date ${3:default sysdate} ${0:not null} 13 | snippet ind 14 | create index ${0:$1_$2} on ${1:table}(${2:column}); 15 | snippet uind 16 | create unique index ${1:name} on ${2:table}(${0:column}); 17 | snippet tblcom 18 | comment on table ${1:table} is '${0:comment}'; 19 | snippet colcom 20 | comment on column ${1:table}.${2:column} is '${0:comment}'; 21 | snippet addcol 22 | alter table ${1:table} add (${2:column} ${0:type}); 23 | snippet seq 24 | create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${0:1}; 25 | snippet s* 26 | select * from ${0:table} 27 | -------------------------------------------------------------------------------- /vim/snippets/supercollider.snippets: -------------------------------------------------------------------------------- 1 | snippet b 2 | ( 3 | ${0} 4 | ) 5 | snippet if 6 | if (${1}) { 7 | ${0} 8 | } 9 | snippet ife 10 | if (${1}) { 11 | ${2} 12 | } { 13 | ${0} 14 | } 15 | snippet for 16 | for (${1:1}, ${2:10}) { |i| 17 | ${0} 18 | } 19 | snippet sdef 20 | SynthDef(\\${1:synthName}, {${2} 21 | ${0} 22 | }).add; 23 | -------------------------------------------------------------------------------- /vim/snippets/systemverilog.snippets: -------------------------------------------------------------------------------- 1 | extends verilog 2 | 3 | # Foreach Loop 4 | snippet fe 5 | foreach (${1}) begin 6 | ${0} 7 | end 8 | # Do-while statement 9 | snippet dowh 10 | do begin 11 | ${0} 12 | end while (${1}); 13 | # Combinational always block 14 | snippet alc 15 | always_comb begin ${1:: statement_label} 16 | ${0} 17 | end $1 18 | # Sequential logic 19 | snippet alff 20 | always_ff @(posedge ${1:clk}) begin ${2:: statement_label} 21 | ${0} 22 | end $2 23 | # Latched logic 24 | snippet all 25 | always_latch begin ${1:: statement_label} 26 | ${0} 27 | end $1 28 | # Class 29 | snippet cl 30 | class ${1:class_name}; 31 | // data or class properties 32 | ${0} 33 | 34 | // initialization 35 | function new(); 36 | endfunction : new 37 | 38 | endclass : $1 39 | # Typedef structure 40 | snippet types 41 | typedef struct { 42 | ${0} 43 | } ${1:name_t}; 44 | # Program block 45 | snippet prog 46 | program ${1:program_name} (); 47 | ${0} 48 | endprogram : $1 49 | # Interface block 50 | snippet intf 51 | interface ${1:program_name} (); 52 | // nets 53 | ${0} 54 | // clocking 55 | 56 | // modports 57 | 58 | endinterface : $1 59 | # Clocking Block 60 | snippet clock 61 | clocking ${1:clocking_name} @(${2:posedge} ${3:clk}); 62 | ${0} 63 | endclocking : $1 64 | # Covergroup construct 65 | snippet cg 66 | covergroup ${1:group_name} @(${2:posedge} ${3:clk}); 67 | ${0} 68 | endgroup : $1 69 | # Package declaration 70 | snippet pkg 71 | package ${1:package_name}; 72 | ${0} 73 | endpackage : $1 74 | -------------------------------------------------------------------------------- /vim/snippets/tcl.snippets: -------------------------------------------------------------------------------- 1 | # #!/usr/bin/env tclsh 2 | snippet #! 3 | #!/usr/bin/env tclsh 4 | 5 | # Process 6 | snippet pro 7 | proc ${1:function_name} {${2:args}} { 8 | ${0} 9 | } 10 | #xif 11 | snippet xif 12 | ${1:expr}? ${2:true} : ${0:false} 13 | # Conditional 14 | snippet if 15 | if {${1}} { 16 | ${0} 17 | } 18 | # Conditional if..else 19 | snippet ife 20 | if {${1}} { 21 | ${2} 22 | } else { 23 | ${0:# else...} 24 | } 25 | snippet eif 26 | elseif {${1}} { 27 | ${0} 28 | } 29 | # Conditional if..elsif..else 30 | snippet ifee 31 | if {${1}} { 32 | ${2} 33 | } elseif {${3}} { 34 | ${4:# elsif...} 35 | } else { 36 | ${0:# else...} 37 | } 38 | # If catch then 39 | snippet ifc 40 | if { [catch {${1:#do something...}} ${2:err}] } { 41 | ${0:# handle failure...} 42 | } 43 | # Catch 44 | snippet catch 45 | catch {${1}} ${2:err} ${0:options} 46 | # While Loop 47 | snippet wh 48 | while {${1}} { 49 | ${0} 50 | } 51 | # For Loop 52 | snippet for 53 | for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { 54 | ${0} 55 | } 56 | # Foreach Loop 57 | snippet fore 58 | foreach ${1:x} {${2:#list}} { 59 | ${0} 60 | } 61 | # after ms script... 62 | snippet af 63 | after ${1:ms} ${0:#do something} 64 | # after cancel id 65 | snippet afc 66 | after cancel ${0:id or script} 67 | # after idle 68 | snippet afi 69 | after idle ${0:script} 70 | # after info id 71 | snippet afin 72 | after info ${0:id} 73 | # Expr 74 | snippet exp 75 | expr {${0:#expression here}} 76 | # Switch 77 | snippet sw 78 | switch ${1:var} { 79 | ${3:pattern 1} { 80 | ${0:#do something} 81 | } 82 | default { 83 | ${2:#do something} 84 | } 85 | } 86 | # Case 87 | snippet ca 88 | ${1:pattern} { 89 | ${2:#do something} 90 | } 91 | # Namespace eval 92 | snippet ns 93 | namespace eval ${1:path} {${0:#script...}} 94 | # Namespace current 95 | snippet nsc 96 | namespace current 97 | -------------------------------------------------------------------------------- /vim/snippets/textile.snippets: -------------------------------------------------------------------------------- 1 | # Jekyll post header 2 | snippet header 3 | --- 4 | title: ${1:title} 5 | layout: post 6 | date: ${2:date} ${0:hour:minute:second} -05:00 7 | --- 8 | 9 | # Image 10 | snippet img 11 | !${1:url}(${2:title}):${0:link}! 12 | 13 | # Table 14 | snippet | 15 | |${1}| 16 | 17 | # Link 18 | snippet link 19 | "${1:link text}":${0:url} 20 | 21 | # Acronym 22 | snippet ( 23 | (${1:Expand acronym}) 24 | 25 | # Footnote 26 | snippet fn 27 | [${1:ref number}] ${0} 28 | 29 | fn$1. ${2:footnote} 30 | 31 | -------------------------------------------------------------------------------- /vim/snippets/twig.snippets: -------------------------------------------------------------------------------- 1 | snippet bl "{% block xyz %} .. {% endblock xyz %}" 2 | {% block ${1} %} 3 | ${2:${VISUAL}} 4 | {% endblock $1 %} 5 | snippet js "{% javascripts 'xyz' %} .. {% endjavascripts %}" 6 | {% javascripts '${1}' %} 7 | 8 | {% endjavascripts %} 9 | snippet css "{% stylesheets 'xyz' %} .. {% endstylesheets %}" 10 | {% stylesheets '${1}' %} 11 | 12 | {% endstylesheets %} 13 | snippet if "{% if %} .. {% endif %}" 14 | {% if ${1} %} 15 | ${2:${VISUAL}} 16 | {% endif %} 17 | snippet ife "{% if %} .. {% else %} .. {% endif %}" 18 | {% if ${1} %} 19 | ${2:${VISUAL}} 20 | {% else %} 21 | ${0} 22 | {% endif %} 23 | snippet el "{% else %}" 24 | {% else %} 25 | ${0:${VISUAL}} 26 | snippet eif "{% elseif %}" 27 | {% elseif ${1} %} 28 | ${0} 29 | snippet for "{% for x in y %} .. {% endfor %}" 30 | {% for ${1} in ${2} %} 31 | ${3} 32 | {% endfor %} 33 | snippet ext "{% extends xyz %}" 34 | {% extends ${1} %} 35 | -------------------------------------------------------------------------------- /vim/snippets/typescript.snippets: -------------------------------------------------------------------------------- 1 | extends javascript 2 | -------------------------------------------------------------------------------- /vim/snippets/verilog.snippets: -------------------------------------------------------------------------------- 1 | # if statement 2 | snippet if 3 | if (${1}) begin 4 | ${0} 5 | end 6 | # If/else statements 7 | snippet ife 8 | if (${1}) begin 9 | ${2} 10 | end 11 | else begin 12 | ${1} 13 | end 14 | # Else if statement 15 | snippet eif 16 | else if (${1}) begin 17 | ${0} 18 | end 19 | #Else statement 20 | snippet el 21 | else begin 22 | ${0} 23 | end 24 | # While statement 25 | snippet wh 26 | while (${1}) begin 27 | ${0} 28 | end 29 | # Repeat Loop 30 | snippet rep 31 | repeat (${1}) begin 32 | ${0} 33 | end 34 | # Case statement 35 | snippet case 36 | case (${1:/* variable */}) 37 | ${2:/* value */}: begin 38 | ${3} 39 | end 40 | default: begin 41 | ${4} 42 | end 43 | endcase 44 | # CaseZ statement 45 | snippet casez 46 | casez (${1:/* variable */}) 47 | ${2:/* value */}: begin 48 | ${3} 49 | end 50 | default: begin 51 | ${4} 52 | end 53 | endcase 54 | # Always block 55 | snippet al 56 | always @(${1:/* sensitive list */}) begin 57 | ${0} 58 | end 59 | # Module block 60 | snippet mod 61 | module ${1:module_name} (${2}); 62 | ${0} 63 | endmodule 64 | -------------------------------------------------------------------------------- /vim/snippets/vhdl.snippets: -------------------------------------------------------------------------------- 1 | # 2 | ## Libraries 3 | 4 | snippet lib 5 | library ${1} 6 | use ${1}.${2} 7 | 8 | # Standard Libraries 9 | snippet libs 10 | library IEEE; 11 | use IEEE.std_logic_1164.ALL; 12 | use IEEE.numeric_std.ALL; 13 | 14 | # Xilinx Library 15 | snippet libx 16 | library UNISIM; 17 | use UNISIM.VCOMPONENTS.ALL; 18 | 19 | ## Entity Declaration 20 | snippet ent 21 | entity ${1:`vim_snippets#Filename()`} is 22 | generic ( 23 | ${2} 24 | ); 25 | port ( 26 | ${3} 27 | ); 28 | end entity $1; 29 | 30 | ## Architecture 31 | snippet arc 32 | architecture ${1:behav} of ${2:`vim_snippets#Filename()`} is 33 | 34 | ${3} 35 | 36 | begin 37 | 38 | 39 | end $1; 40 | 41 | ## Declarations 42 | # std_logic 43 | snippet st 44 | signal ${1} : std_logic; 45 | # std_logic_vector 46 | snippet sv 47 | signal ${1} : std_logic_vector (${2} downto 0); 48 | # std_logic in 49 | snippet ist 50 | ${1} : in std_logic; 51 | # std_logic_vector in 52 | snippet isv 53 | ${1} : in std_logic_vector (${2} downto 0); 54 | # std_logic out 55 | snippet ost 56 | ${1} : out std_logic; 57 | # std_logic_vector out 58 | snippet osv 59 | ${1} : out std_logic_vector (${2} downto 0); 60 | # unsigned 61 | snippet un 62 | signal ${1} : unsigned (${2} downto 0); 63 | ## Process Statements 64 | # process 65 | snippet pr 66 | process (${1}) 67 | begin 68 | ${2} 69 | end process; 70 | # process with clock 71 | snippet prc 72 | process (${1:clk}) 73 | begin 74 | if rising_edge ($1) then 75 | ${2} 76 | end if; 77 | end process; 78 | # process all 79 | snippet pra 80 | process (${1:all}) 81 | begin 82 | ${2} 83 | end process; 84 | ## Control Statements 85 | # if 86 | snippet if 87 | if ${1} then 88 | ${2} 89 | end if; 90 | # if 91 | snippet ife 92 | if ${1} then 93 | ${2} 94 | else 95 | ${3} 96 | end if; 97 | # else 98 | snippet el 99 | else 100 | ${1} 101 | # if 102 | snippet eif 103 | elsif ${1} then 104 | ${2} 105 | # case 106 | snippet ca 107 | case ${1} is 108 | ${2} 109 | end case; 110 | # when 111 | snippet wh 112 | when ${1} => 113 | ${2} 114 | # for 115 | snippet for 116 | for ${1:i} in ${2} ${3:to} ${4} loop 117 | ${5} 118 | end loop; 119 | # while 120 | snippet wh 121 | while ${1} loop 122 | ${2} 123 | end loop; 124 | ## Misc 125 | # others 126 | snippet oth 127 | (others => '${1:0}'); 128 | -------------------------------------------------------------------------------- /vim/snippets/vim.snippets: -------------------------------------------------------------------------------- 1 | snippet header standard Vim script file header 2 | " File: ${1:`expand('%:t')`} 3 | " Author: ${2:`g:snips_author`} 4 | " Description: ${3} 5 | ${0:" Last Modified: `strftime("%B %d, %Y")`} 6 | snippet guard script reload guard 7 | if exists('${1:did_`vim_snippets#Filename()`}') || &cp${2: || version < 700} 8 | finish 9 | endif 10 | let $1 = 1${0} 11 | snippet f function 12 | fun! ${1:`expand('%') =~ 'autoload' ? substitute(matchstr(expand('%:p'),'autoload/\zs.*\ze.vim'),'[/\\]','#','g').'#' : ''`}${2:function_name}(${3}) 13 | ${0} 14 | endf 15 | snippet t try ... catch statement 16 | try 17 | ${1:${VISUAL}} 18 | catch ${2} 19 | ${0} 20 | endtry 21 | snippet for for ... in loop 22 | for ${1} in ${2} 23 | ${0:${VISUAL}} 24 | endfor 25 | snippet forkv for [key, value] in loop 26 | for [${1},${2}] in items(${3}) 27 | ${0} 28 | unlet $1 $2 29 | endfor 30 | snippet wh while loop 31 | while ${1} 32 | ${0:${VISUAL}} 33 | endw 34 | snippet if if statement 35 | if ${1} 36 | ${0:${VISUAL}} 37 | endif 38 | snippet ife if ... else statement 39 | if ${1} 40 | ${2:${VISUAL}} 41 | else 42 | ${0} 43 | endif 44 | snippet au augroup ... autocmd block 45 | augroup ${1:AU_NAME} 46 | " this one is which you're most likely to use? 47 | autocmd ${2:BufRead,BufNewFile} ${3:*.ext,*.ext3|} ${0} 48 | augroup end 49 | snippet bun Vundle.vim Plugin definition 50 | Plugin '${0}' 51 | snippet plug Vundle.vim Plugin definition 52 | Plugin '${0}' 53 | snippet let 54 | let ${1:variable} = ${0: value} 55 | snippet se 56 | set ${1:setting}; 57 | snippet set 58 | set ${1:setting} = ${0:value} 59 | snippet nn 60 | nnoremap ${1} ${2} 61 | snippet no 62 | noremap ${1} ${2} 63 | snippet vm 64 | vmap ${1} ${2} 65 | snippet im 66 | imap ${1} ${2} 67 | snippet exe 68 | execute ${1} 69 | -------------------------------------------------------------------------------- /vim/snippets/xml.snippets: -------------------------------------------------------------------------------- 1 | # xml declaration 2 | snippet xml 3 | 4 | # tag 5 | snippet t 6 | <${1:}> 7 | ${2} 8 | 9 | # inline tag 10 | snippet ti 11 | <${1:}>${2} 12 | 13 | -------------------------------------------------------------------------------- /vim/snippets/xslt.snippets: -------------------------------------------------------------------------------- 1 | snippet apply-templates with-param 2 | 3 | ${3}${4} 4 | 5 | 6 | snippet apply-templates sort-by 7 | 8 | ${5} 9 | 10 | 11 | snippet apply-templates plain 12 | 13 | 14 | snippet attribute blank 15 | ${2} 16 | 17 | snippet attribute value-of 18 | 19 | 20 | 21 | 22 | snippet call-template 23 | 24 | 25 | snippet call-template with-param 26 | 27 | ${3}${4} 28 | 29 | 30 | snippet choose 31 | 32 | 33 | ${2} 34 | 35 | 36 | 37 | snippet copy-of 38 | 39 | 40 | snippet for-each 41 | ${2} 42 | 43 | 44 | snippet if 45 | ${2} 46 | 47 | 48 | snippet import 49 | 50 | 51 | snippet include 52 | 53 | 54 | snippet otherwise 55 | ${0} 56 | 57 | 58 | snippet param 59 | ${2} 60 | 61 | 62 | snippet stylesheet 63 | ${0} 65 | 66 | 67 | snippet template 68 | ${0} 69 | 70 | 71 | snippet template named 72 | ${0} 73 | 74 | 75 | snippet text 76 | ${0} 77 | 78 | snippet value-of 79 | 80 | 81 | snippet variable blank 82 | ${0} 83 | 84 | 85 | snippet variable select 86 | 87 | 88 | snippet when 89 | ${0} 90 | 91 | 92 | snippet with-param 93 | ${0} 94 | 95 | snippet with-param select 96 | 97 | 98 | -------------------------------------------------------------------------------- /vim/snippets/zsh.snippets: -------------------------------------------------------------------------------- 1 | # #!/bin/zsh 2 | snippet #! 3 | #!/bin/zsh 4 | 5 | snippet if 6 | if ${1:condition}; then 7 | ${0:${VISUAL}} 8 | fi 9 | snippet ife 10 | if ${1:condition}; then 11 | ${2:${VISUAL}} 12 | else 13 | ${0:# statements} 14 | fi 15 | snippet eif 16 | elif ${1:condition}; then 17 | ${0:${VISUAL}} 18 | snippet for 19 | for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do 20 | ${0:${VISUAL}} 21 | done 22 | snippet fori 23 | for ${1:needle} in ${2:haystack}; do 24 | ${0:${VISUAL}} 25 | done 26 | snippet fore 27 | for ${1:item} in ${2:list}; do 28 | ${0:${VISUAL}} 29 | done 30 | snippet wh 31 | while ${1:condition}; do 32 | ${0:${VISUAL}} 33 | done 34 | snippet until 35 | until ${1:condition}; do 36 | ${0:${VISUAL}} 37 | done 38 | snippet repeat 39 | repeat ${1:integer}; do 40 | ${0:${VISUAL}} 41 | done 42 | snippet case 43 | case ${1:word} in 44 | ${2:pattern}) 45 | ${0};; 46 | esac 47 | snippet select 48 | select ${1:answer} in ${2:choices}; do 49 | ${0:${VISUAL}} 50 | done 51 | snippet ( 52 | ( ${0:#statements} ) 53 | snippet { 54 | { ${0:#statements} } 55 | snippet [ 56 | [[ ${0:test} ]] 57 | snippet always 58 | { ${1:try} } always { ${0:always} } 59 | snippet fun 60 | ${1:function_name}() { 61 | ${0:# function_body} 62 | } 63 | snippet ffun 64 | function ${1:function_name}() { 65 | ${0:# function_body} 66 | } 67 | -------------------------------------------------------------------------------- /vim/syntax/tagbar.vim: -------------------------------------------------------------------------------- 1 | " File: tagbar.vim 2 | " Description: Tagbar syntax settings 3 | " Author: Jan Larres 4 | " Licence: Vim licence 5 | " Website: http://majutsushi.github.com/tagbar/ 6 | " Version: 2.6.1 7 | 8 | scriptencoding utf-8 9 | 10 | if exists("b:current_syntax") 11 | finish 12 | endif 13 | 14 | let s:ics = escape(join(g:tagbar_iconchars, ''), ']^\-') 15 | let s:pattern = '\(^[' . s:ics . '] \?\)\@<=[^-+: ]\+[^:]\+$' 16 | execute "syntax match TagbarKind '" . s:pattern . "'" 17 | 18 | let s:pattern = '\(\S\@