Compare commits

...

319 Commits

Author SHA1 Message Date
72dec6009d Change backgroup highlight of cursor line 2018-08-26 10:51:11 +01:00
10fd48a703 Improve cpp template snippet 2018-08-26 10:51:11 +01:00
3777a990f2 Show cursor line with different highlight group 2018-08-26 10:51:11 +01:00
f7d07f23da Add TODO's for :LStripLines 2018-08-26 10:51:11 +01:00
eabffa9354 Add new C++ feature to syntax highlighting 2018-08-26 10:51:11 +01:00
6cc8627c97 Add a lit named ID match snippet 2018-08-26 10:51:11 +01:00
3757da8e96 Improve vim-spirv ID match highlights 2018-08-26 10:51:11 +01:00
91eeee13bc Add delimiter highlighting to zsh 2018-08-26 10:51:11 +01:00
0db9d470ee Use signcolumn when available 2018-08-26 10:51:11 +01:00
970c674381 Set lit[.local].cfg to Python & disable ALE 2018-08-26 10:51:11 +01:00
1be7ef4250 Don't highlight markdown errors 2018-08-26 10:51:11 +01:00
ab5428e7fa Make .test files llvm filetype 2018-08-26 10:51:11 +01:00
ca84ee59ed Actually enable relative number when available 2018-08-26 10:51:11 +01:00
456e52467a Update C++ namespace snippet to match clang-format
New snippet outputs this

```cpp
namespace {
}  // namespace
```

instead of

```cpp
namespace {
}  // anonymous
```

and this

```cpp
namespace foo {
}  // namespace foo
```

instead of

```cpp
namespace foo {
}  // foo
```
2018-08-26 10:51:11 +01:00
e7c20a3cc5 Add vim-projectionist plugin 2018-08-26 10:51:11 +01:00
7ace086458 Don't match non conflict markers 2018-08-26 10:51:11 +01:00
5391645629 Use own fork for vim-cmake-completion 2018-08-26 10:51:11 +01:00
fe197a4c76 Add conflict marker highlights as TODO's
For all filetype's highlight conflict markers with the Todo highlight
group and leave trailing text as before. This makes conflict markers
very obvious, in C/C++ where I have operator highlighting conflict
markers are not longer highlighted as operators.
2018-08-26 10:51:11 +01:00
5380ea7c78 Remove relativenumber autocmds
These kept disabling relativenumber when editing which was annoying.
2018-08-26 10:51:11 +01:00
1c114b7135 Improve Jenkins groovy syntax highlights 2018-08-26 10:51:11 +01:00
2c842cea09 Add Doxygen @retval snippet & other improvements 2018-08-26 10:51:11 +01:00
83114d25a9 Add extern "C" block snippet 2018-08-26 10:51:11 +01:00
287e52fb2a Add bool to C string snippet 2018-08-26 10:51:11 +01:00
f4915efffd Add string_view c++ printf snippet 2018-08-26 10:51:11 +01:00
1d3d06bf0d Cleanup vim dictionary syntax 2018-08-26 10:51:11 +01:00
d225180985 Change netrw highlight group 2018-08-26 10:51:11 +01:00
3f36156521 Always load vim-cmake-syntax
Avoid the cmake syntax highlighting being different when a file is
loaded and when it is reloaded. This was cause by the plugin not being
enabled until after a buffer with the cmake filetype was loaded
causing the builtin cmake syntax highlighting to show on initial load
then the plugins syntax highlighting to show on reload.
2018-08-26 10:51:11 +01:00
a2c59d8ca3 Add the linter code to ale messages 2018-08-26 10:51:11 +01:00
02370ce6e7 Add TODO for Python syntax folding bug 2018-08-26 10:51:11 +01:00
0fe8e5dfed Add improved sentence text object 2018-08-26 10:51:11 +01:00
d13bf0bd81 Disable airline git integration 2018-08-26 10:51:11 +01:00
b3ba84fa4c Replace matchit.vim with vim-matchup 2018-08-26 10:51:11 +01:00
bc014309ef Remove vim-sensible
vim-sensible includes and old matchit.vim which interfears with
vim-matchup and sets some defaults which are then overridden in
plugins/settings.vim. Remove vim-sensible and document the retained
settings.
2018-08-26 10:51:11 +01:00
0416a42e08 Support changing cursor shape for iTerm2 in tmux 2018-08-26 10:51:11 +01:00
ec0ad0ae00 Add another variant of GitHub checkbox snip 2018-08-26 10:51:11 +01:00
f75b723ec6 Add make filetype config 2018-08-26 10:51:11 +01:00
ce97e935a8 Add more intuitive GitHub checkbox snippet 2018-08-26 10:51:11 +01:00
3dedbaf1c4 Set commentstring for OpenCL files 2018-08-26 10:51:11 +01:00
6b6b44e43d Clean up documentation 2018-08-26 10:51:11 +01:00
eebe101050 Fix vim cursor shape after tmux terminal-overrides 2018-08-26 10:51:11 +01:00
d8ad04297b Use tmux terminal-override for cursor shape on VTE 2018-08-26 10:51:11 +01:00
47bc7f0eb3 Use 4 space tabs in YAML files 2018-08-26 10:51:11 +01:00
d4239e2dc3 Add more Doxygen snippets for C/C++ 2018-08-26 10:51:09 +01:00
87d78f9c7a Move relevant settings closer together 2018-08-26 10:50:08 +01:00
1db9ea30ee Enable cursor shape changes by default 2018-08-26 10:50:08 +01:00
4c2d9b8089 Add do#cursor_escape_sequences()
Control the cursor shape based on the current mode.
2018-08-26 10:50:08 +01:00
603ed76994 Move mouse setting 2018-08-26 10:50:08 +01:00
b46d172e02 Extend enabled listchars, enable showbreak 2018-08-26 10:50:08 +01:00
1ace437587 Guard relativenumber setting 2018-08-26 10:50:08 +01:00
e32c6824f6 Remove cruft and add TODO's 2018-08-26 10:50:08 +01:00
4040dc7508 Move rarely used functions to autoload 2018-08-26 10:50:08 +01:00
e292b937d0 Enable visual highlight of trail spaces and tabs 2018-08-26 10:50:08 +01:00
e049445284 Remove autocmd to right string white space 2018-08-26 10:50:08 +01:00
d494a0f543 Add highlight group for SpecialKey 2018-08-26 10:50:08 +01:00
5f2c083d7b Fix Markdown fenced code block snippet 2018-08-26 10:50:08 +01:00
b059c48b2f Add groovy syntax support for keyword args 2018-08-26 10:50:08 +01:00
07c093e9e0 Add python snippet to insert ipdb breakpoint 2018-08-26 10:50:08 +01:00
08f3f8d38f Add CMake debug snippet 2018-08-26 10:50:08 +01:00
0f852b0518 Add fprintf debug snippet for C/C++ files 2018-08-26 10:50:08 +01:00
2dea77ba81 Add asciidoc refpage snippet 2018-08-26 10:50:08 +01:00
946c5bc252 Enable spelling for asciidoc filetype 2018-08-26 10:50:08 +01:00
981cb46c7c Add :ISort vim command 2018-08-26 10:50:08 +01:00
c2799dd5de Add vim command snippet 2018-08-26 10:50:08 +01:00
0e419ee514 Add .env/.out filetype autocmds 2018-08-26 10:50:08 +01:00
aecdb9a11a Add augroup vim snippet 2018-08-26 10:50:08 +01:00
e8a6098bd6 Update gitconfig filetype to use tabstop=8 2018-08-26 10:50:08 +01:00
f9115f0495 Remove lexima because it broke vim-endwise
Also change to fork of vim-endwise with CMake support
2018-08-26 10:50:08 +01:00
3b528fcb19 Only match = default when ends on word boundary 2018-08-26 10:50:08 +01:00
ac0f5b0b93 Add GitGutter next/prev hunk mappings 2018-08-26 10:50:07 +01:00
67257ebb98 Use global setting for Python highlights 2018-08-26 10:50:07 +01:00
5f08372d83 Obey cpp options in c syntax file 2018-08-26 10:50:07 +01:00
4f232a0f2d Add cpp explicit function template highlight 2018-08-26 10:50:07 +01:00
e032ced9f4 Add more vim colorschemes 2018-08-26 10:50:07 +01:00
bd2301e3e8 Add main Python snippet 2018-08-26 10:50:07 +01:00
87d9693973 Add mapping for :Ag <cword> 2018-08-26 10:50:07 +01:00
3dd8259c01 Add missing zsh option keyword to vim syntax 2018-08-26 10:50:07 +01:00
b5f51c0542 Add function folding to zsh filetype 2018-08-26 10:50:07 +01:00
c4dcb5668d Make fresh colors less garish
Make SpellBad and Underlined readable and make SpellCap purple.
2018-08-26 10:50:07 +01:00
f90b63d30d Add % and . to llvm iskeyword list 2018-08-26 10:50:07 +01:00
fbba77dede Use default tab width in markdown
Also check if +syntax is available before enabling spell.
2018-08-26 10:50:07 +01:00
c2040731f2 Add zsh snippets 2018-08-26 10:50:07 +01:00
60664eaa16 Add std::printf and std::fprintf snippets 2018-08-26 10:50:07 +01:00
ccc214436c Improve groovy syntax highlighting 2018-08-26 10:50:07 +01:00
7f63041695 Enable folding is sh filetype 2018-08-26 10:50:07 +01:00
939e5e0599 Don't set global settings in ftplugin 2018-08-26 10:50:07 +01:00
be47e8ec7b Update vim-plug 2018-08-26 10:50:07 +01:00
c953ae7dbf Fix vint warning and errors in functions.vim 2018-08-26 10:50:07 +01:00
384a4dc236 Update mappings to {i,n,v}noremap 2018-08-26 10:50:07 +01:00
0d66f1acec Use existing windows/tabs when jumping to errors 2018-08-26 10:50:07 +01:00
c28e93210e Check features are available before using them 2018-08-26 10:50:07 +01:00
df48f1f607 Add syntax folding for cmake 2018-08-26 10:50:07 +01:00
7df1cb7b26 Document indent options & check they exist 2018-08-26 10:50:07 +01:00
22a36a177a Add vim-khr plugin 2018-08-26 10:50:07 +01:00
c3bca15641 Add comment text object plugin 2018-08-26 10:50:07 +01:00
06633f3394 Add ; to do/while snippet 2018-08-26 10:50:07 +01:00
e2be2de00b Use setlocal in TabWidth command 2018-08-26 10:50:07 +01:00
f6892126df Add URI text object plugin 2018-08-26 10:50:07 +01:00
c727e7647a Allow C++ lambda snippet to be inline 2018-08-26 10:50:07 +01:00
919c3e6b88 Tweet json filetype & syntax settings 2018-08-26 10:50:07 +01:00
aac31f7831 Add preview window mappings 2018-08-26 10:50:07 +01:00
12755c630b Add C inline comment surround mapping 2018-08-26 10:50:07 +01:00
13acc08b4f Fix vint warnings in vimrc 2018-08-26 10:50:07 +01:00
b0c7eafb4a Use '' not "" in fresh colorscheme 2018-08-26 10:50:07 +01:00
090ffcbcc8 Override groovy syntax 2018-08-26 10:50:07 +01:00
a2c1476bba Enable clang-tidy ale checker 2018-08-26 10:50:07 +01:00
dcea5ede4a Revert to default json syntax 2018-08-26 10:50:07 +01:00
bef689ae13 Improve ale echo message 2018-08-26 10:50:07 +01:00
cea38efd76 Make YCM goto buffer command split horizontally 2018-08-26 10:50:07 +01:00
07764831ba Remove dev hack for format.vim loading 2018-08-26 10:50:07 +01:00
607157b004 Load local plugins first 2018-08-26 10:50:07 +01:00
4038e95d4f Replace syntastic with ale 2018-08-26 10:50:07 +01:00
eeca17ad49 Add LLVM IR syntax 2018-08-26 10:50:07 +01:00
62380deefc Move plugins to .vim/bundle 2018-08-26 10:50:07 +01:00
5651bb8b03 Simplify xterm256-color detection 2018-08-26 10:50:07 +01:00
f19f507833 Add missing <CR> from :lfirst mapping 2018-08-26 10:50:07 +01:00
b5772a3821 Change markdown comment string to html 2018-08-26 10:50:07 +01:00
53b0bfb646 Conceal on cursor hover normal mode for markdown 2018-08-26 10:50:07 +01:00
6736b8d8a3 Improve doxygen header snippet 2018-08-26 10:50:05 +01:00
e48cd16f23 Remove vim-instant-markdown 2018-08-26 10:49:14 +01:00
c6d13d85f6 Enable folding in xml 2018-08-26 10:49:14 +01:00
d02030b9af Improve fzf mappings 2018-08-26 10:49:14 +01:00
504b7f110f Namespace syntax match 2018-08-26 10:49:14 +01:00
e635d62e0c Change relativenumber behaviour 2018-08-26 10:49:14 +01:00
8355c9e571 Match operator on word boundary only 2018-08-26 10:49:14 +01:00
a8c012881a Update vim TERM checks 2018-08-26 10:49:14 +01:00
1059eb7259 Increase syntax syn minlines to 500 2018-08-26 10:49:14 +01:00
03de858c9b Only flip relativenumber for cpp files 2018-08-26 10:49:14 +01:00
ab8e113145 Enabling folding in javascript files 2018-08-26 10:49:14 +01:00
8185da77a6 Add vim Caddyfile syntax 2018-08-26 10:49:14 +01:00
27110ff0ea Change markdown fenced code block snippet trigger 2018-08-26 10:49:14 +01:00
53782a0213 Add markdown frontmatter snippet 2018-08-26 10:49:14 +01:00
b6ae985dd2 Add markdown link snippet 2018-08-26 10:49:14 +01:00
c513b908dc Add utc date time snippet 2018-08-26 10:49:14 +01:00
6cd3e58b14 Make json syntax embed aware 2018-08-26 10:49:14 +01:00
b27cee4756 Change div snippet, add nav snippet for html 2018-08-26 10:49:14 +01:00
5f5ecde607 Extend html, css, and javascript syntaxes 2018-08-26 10:49:14 +01:00
c0a2bb9bb2 Add yaml frontmatter support to markdown 2018-08-26 10:49:14 +01:00
f851feb40d Add javascript function snippet 2018-08-26 10:49:14 +01:00
a97e9a4589 Fix C ternary operator match 2018-08-26 10:49:14 +01:00
5076be4792 Customize json syntax highlights 2018-08-26 10:49:14 +01:00
54ce7c0767 More cleanup let statements 2018-08-26 10:49:14 +01:00
9c5b193efd Swap autopairs.vim for leima.vim 2018-08-26 10:49:14 +01:00
0ac64c7215 Change setting leader 2018-08-26 10:49:14 +01:00
3651e021a5 Cleanup C/C++ syntax files 2018-08-26 10:49:14 +01:00
a8a1666ff0 Improve markdown GitHub checkbox highlights 2018-08-26 10:49:14 +01:00
ff6d949028 Fix cpp syntax match 2018-08-26 10:49:14 +01:00
a9ad1f0543 Fix end of multi-line doxygen highlight 2018-08-26 10:49:14 +01:00
567b93b256 Enable Doxygen mapping only for c, cpp filetypes 2018-08-26 10:49:14 +01:00
bd7dcb738f Add :Syntack command to view syntax group stack 2018-08-26 10:49:14 +01:00
9fbe25fee7 Add function to clone highlight groups with attrs 2018-08-26 10:49:14 +01:00
dda5ee4e8b Change name of checkbox toggle functionality 2018-08-26 10:49:14 +01:00
41aa424a57 Simplify fold text 2018-08-26 10:49:14 +01:00
80f6215530 Remap <C-L> to <C-W>L to get redraw back 2018-08-26 10:49:14 +01:00
3d43c5460c Refactor and optimize C/C++ syntax highlights 2018-08-26 10:49:14 +01:00
ddc24d7fda Change show highlight mapping to use <leader> 2018-08-26 10:49:14 +01:00
4ac2924f7b Improve GitHub checkbox highlighting 2018-08-26 10:49:14 +01:00
e8af28bc59 Set all.snippets to -1 priority 2018-08-26 10:49:14 +01:00
1a2f732259 Add std::enable_if snippet 2018-08-26 10:49:14 +01:00
927889ce74 Remove macro_mode functions, use vim-replace 2018-08-26 10:49:14 +01:00
a78356bdb4 Add vim-endwise 2018-08-26 10:49:14 +01:00
dd257d069d Add doxygen @see snippet 2018-08-26 10:49:13 +01:00
d730b5b7d9 Default to a space in * [ ] snippet 2018-08-26 10:48:16 +01:00
239ffea954 Move json highlight overrides to after/syntax 2018-08-26 10:48:16 +01:00
b0b66de642 Add vim replay plugin for easy macro replay 2018-08-26 10:48:16 +01:00
ee1b482762 Improve doxygen markdown highlighting 2018-08-26 10:48:16 +01:00
7623fc8706 Improve YouCompleteMe/syntastic error/warning symbols 2018-08-26 10:48:16 +01:00
f6302d03bd Move .local_plugins.vim to .vim/local.vim 2018-08-26 10:48:16 +01:00
9e1b0c9ddd Add vim-spirv plugin 2018-08-26 10:48:16 +01:00
80b16bfb41 Replace vim-notes with note.vim 2018-08-26 10:48:16 +01:00
98708c1ee4 Add vim colorscheme morning-white for presentations 2018-08-26 10:48:16 +01:00
6b0bb3e128 Update syntastic URL 2018-08-26 10:48:16 +01:00
4e8d2294f7 Make sign column color match number column 2018-08-26 10:48:16 +01:00
804c05e3e1 Improve some CMake snippets 2018-08-26 10:48:16 +01:00
93c8302e99 Add vim-gitgutter plugin 2018-08-26 10:48:16 +01:00
2c0d66ffe1 Add CMake generator expression snippet 2018-08-26 10:48:16 +01:00
54a85a5911 Improve GitHub markdown checkbox snippet 2018-08-26 10:48:16 +01:00
d0019fdc0d Improve C++ namespace snippet 2018-08-26 10:48:16 +01:00
7c9b97ef82 Improve Doxygen snippets 2018-08-26 10:48:14 +01:00
11b71bc1e0 De-noise c pre-processor snippets 2018-08-26 10:46:20 +01:00
23b7aeb64d Add asciidoc filetype plugin 2018-08-26 10:45:25 +01:00
bcd7877df0 Add TODO surround mapping for C/C++ 2018-08-26 10:45:25 +01:00
e4a8ba61b1 Improve XML attribute snippet, add XML comment snippet 2018-08-26 10:45:25 +01:00
4297e753eb Add todo's to investigate interesting vim settings 2018-08-26 10:45:25 +01:00
9a07c179fa Improve support for GitHub style checkboxes 2018-08-26 10:45:25 +01:00
4a9d8df177 Add highlighting of ternary operator in C/C++ 2018-08-26 10:45:25 +01:00
20ca44e2ff Add GitHub check box to markdown syntax 2018-08-26 10:45:25 +01:00
d9374ba8ac Add Google Test snippets 2018-08-26 10:45:25 +01:00
d1fc400a90 Move doxygen snippets to separate file 2018-08-26 10:45:20 +01:00
dab43be08c Add noisy struct snippet 2018-08-26 10:42:42 +01:00
c63b47517d Change diff highlight groups 2018-08-26 10:42:42 +01:00
cc04761f21 Add googletest snippets 2018-08-26 10:42:42 +01:00
aaf73e3988 Allow C++ casts to be substring 2018-08-26 10:42:42 +01:00
b2f9c43e6a Change template snippet to use class not typename 2018-08-26 10:42:42 +01:00
277210751c Improve C main snippet 2018-08-26 10:42:42 +01:00
1c08e92063 Improve C++ for loop snippet 2018-08-26 10:42:42 +01:00
4af3c4acd5 Improve doxygen param snippet at brief snippet 2018-08-26 10:42:42 +01:00
b297bb2491 Update todo snippet 2018-08-26 10:42:42 +01:00
69b97dc3d8 Add static_assert snippet 2018-08-26 10:42:41 +01:00
ce1d85c7b4 Add macro mode helpers
* Easily {un}map <CR> to @@
* Add macro_mode#{en,dis}able autoload functions
* Add MacroMode{En,Dis}able commands
2018-08-26 10:42:41 +01:00
4fafc13487 Switch to vim-table-mode from Tabular 2018-08-26 10:42:41 +01:00
d67e7cd062 Use <Space> in mappings instead of exec 2018-08-26 10:42:41 +01:00
1c9dae7b20 Add comprehensive mappings for QuickFix and Location lists 2018-08-26 10:42:41 +01:00
48d3f26a8a Move mapping into mappings.vim 2018-08-26 10:42:41 +01:00
fc9af59d2b Add statement highlight for = delete in C/C++ 2018-08-26 10:42:41 +01:00
ca656087ed Fix bug in Doxygen highlighting 2018-08-26 10:42:41 +01:00
e9ef5c3138 Add image link snippet for markdown 2018-08-26 10:42:41 +01:00
f5afcc4cc2 Change highlight group of nested name specifiers 2018-08-26 10:42:41 +01:00
d080f003d4 Highlight new/delete as operators 2018-08-26 10:42:41 +01:00
f86447e378 Conditionally enable plugins on Windows 2018-08-26 10:42:41 +01:00
f68769accf Add ignore file 2018-08-26 10:42:41 +01:00
0aa63ffb34 Improve C Doxygen highlights 2018-08-26 10:42:41 +01:00
659bcc73e8 Disabled annoying airline features 2018-08-26 10:42:41 +01:00
7202a5c6a9 Don't show mode in command line 2018-08-26 10:42:41 +01:00
48e53ccd0c Fix Python tab error highlighting 2018-08-26 10:42:41 +01:00
2a159c8f5b Swap <C-f>c from :Commits to :Colors 2018-08-26 10:42:41 +01:00
4adb4d22fe Use K for YouCompleteMe GetDoc in C/C++ files 2018-08-26 10:42:41 +01:00
d3ee7b2c73 Document weird behaviour in gitcommit files 2018-08-26 10:42:41 +01:00
c7eea18cf4 Override groovy syntax file 2018-08-26 10:42:41 +01:00
4180ce4d69 Change Folded foreground highlight 2018-08-26 10:42:41 +01:00
99f64f8a47 Add support for folding python blocks in vim files 2018-08-26 10:42:41 +01:00
6c95bd94ee Move notes highlight overrides to ftplugin 2018-08-26 10:42:41 +01:00
7bfa6da603 Add custom fold functions for json 2018-08-26 10:42:41 +01:00
5dda38ebeb Remove {{{ markers }}} from vimrc 2018-08-26 10:42:41 +01:00
972cc60236 Remove vim-flake8 plugin 2018-08-26 10:42:41 +01:00
8b29d0bebb Rename options.vim to settings.vim 2018-08-26 10:42:41 +01:00
6156a95cc4 Reorder fileformats 2018-08-26 10:42:41 +01:00
baac442996 Remove groovy.vim plugin 2018-08-26 10:42:41 +01:00
4bb91a7cb2 Only load vim-cmake-completion for cmake files 2018-08-26 10:42:41 +01:00
641d3a514a Improve custom vim fold expression 2018-08-26 10:42:41 +01:00
e5b886be58 Improve Python folding behaviour 2018-08-26 10:42:41 +01:00
d6fafcf4c2 Simplify C/C++ {} matching 2018-08-26 10:42:41 +01:00
39d8230c75 Improve DiffText highlight color 2018-08-26 10:42:41 +01:00
a4f997c1e1 Rename option to enable Doxygen comment highlights 2018-08-26 10:42:41 +01:00
657a029acc Enable folding {} in C/C++ & delimiter highlights 2018-08-26 10:42:41 +01:00
0bc30ad5c9 Extend groovy syntax with Jenkins DSL tweeks 2018-08-26 10:42:41 +01:00
2c2ed3c099 Improve markdown folding & syntax highlights 2018-08-26 10:42:41 +01:00
042b8fb304 Simplify C param snippet 2018-08-26 10:42:41 +01:00
b8bd9729d7 Escape - cOperator match 2018-08-26 10:42:41 +01:00
e4cd16ff5b Specialize << and >> highlight matches 2018-08-26 10:42:41 +01:00
d04bb01d16 Add ? to C operator highlighting 2018-08-26 10:42:41 +01:00
8ed09b1597 Add C++ lambda function snippet 2018-08-26 10:42:41 +01:00
ce0402522c Add alignas, alignof, decltype to cppOperator group 2018-08-26 10:42:41 +01:00
d4102cb636 Update fresh colorscheme 2018-08-26 10:42:41 +01:00
a7630ace55 Improve C/C++ syntax highlighting 2018-08-26 10:42:41 +01:00
b1af2d0eff Refactor C/C++ snippets 2018-08-26 10:42:41 +01:00
8fb6507c1c Add C++ cast snippets 2018-08-26 10:42:41 +01:00
02520a6a20 Simplify C++ class snippet 2018-08-26 10:42:41 +01:00
68bf0a0618 Add date snippet to display Month DD, YYYY 2018-08-26 10:42:39 +01:00
3079e450bf Update me snippet to include nickname 2018-08-26 10:40:44 +01:00
47b8b5861b Add improved additional C++ syntax highlighting 2018-08-26 10:40:44 +01:00
b5c24ed587 Remove plugin vim-native-syntax 2018-08-26 10:40:44 +01:00
d54535c639 User nicer blue for Vim Type highlight group 2018-08-26 10:40:44 +01:00
e09f187c82 Make it easier to repeat vim macros 2018-08-26 10:40:44 +01:00
265c851f37 Remove autocmd from custom surround variables 2018-08-26 10:40:44 +01:00
eb3550a197 Add vim-surround cmake mapping to make a variable 2018-08-26 10:40:44 +01:00
ad59766ace Change vim leader key to space 2018-08-26 10:40:44 +01:00
20e4ab57e5 Change surround mapping for creating markdown link 2018-08-26 10:40:44 +01:00
5299184d0b Enable tmux mouse support & add open, urlview 2018-08-26 10:40:44 +01:00
48306a25ed Add K mapping for Python docs 2018-08-26 10:40:44 +01:00
9c4caee646 Customise vim-surround for markdown link syntax 2018-08-26 10:40:44 +01:00
edce545a0e Load local vim plugins from non git file 2018-08-26 10:40:44 +01:00
b4ef88d28c Add syntastic vim plugin 2018-08-26 10:40:44 +01:00
c742b7281f Remove some markers after adding vim foldexpr 2018-08-26 10:40:44 +01:00
a32264fcd8 Improve the vim fold text, line content first 2018-08-26 10:40:44 +01:00
8eb08c17a6 Improve vim script fold with custom foldexpr 2018-08-26 10:40:44 +01:00
61e47dac00 Make K mapping no remap for vim script 2018-08-26 10:40:44 +01:00
af4e0ecd8a Add vim-jdaddy json plugin 2018-08-26 10:40:44 +01:00
2eeab947c8 Optionally load ~/Sandbox/format.vim if available 2018-08-26 10:40:44 +01:00
bcea0d1ffd Improve gitcommit ftplugin settings 2018-08-26 10:40:44 +01:00
d713dd4619 Remove ftdetect/python.vim due to wrong location 2018-08-26 10:40:44 +01:00
4e38d2f43f Remove <tab> from YouCompleteMe menu mappings 2018-08-26 10:40:44 +01:00
ebc5941b52 Improve vmap 0 to play nice with comments 2018-08-26 10:40:44 +01:00
2d90a55ddd Move fzf mappings to plugin/mappings.vim 2018-08-26 10:40:44 +01:00
e26b13c742 Restructure vim config 2018-08-26 10:40:44 +01:00
5465bef85d Remove clang-format.py script 2018-08-26 10:40:44 +01:00
3a63738fa1 Move vim color settings to .vim/plugin/color.vim 2018-08-26 10:40:44 +01:00
c57679dbb7 Move vim GUI options to .vim/gvimrc 2018-08-26 10:40:44 +01:00
5b2a04a499 Change <C-f>l to use :BLines 2018-08-26 10:40:44 +01:00
5b27fcdbb1 Move .vimrc to .vim/vimrc split platform detection 2018-08-26 10:40:44 +01:00
8bde17924c Fix xml snippet for api generator 2018-08-26 10:40:44 +01:00
6a27676b8c Rename and move GitHub style checkboxes snippet 2018-08-26 10:40:44 +01:00
e31952ea5d Update vim WarningMsg highlight group 2018-08-26 10:40:44 +01:00
a72bd9b03e Add get vim function snippet 2018-08-26 10:40:44 +01:00
e233973f4c Add me snippet for my name and email address 2018-08-26 10:40:44 +01:00
46aa25f6be Add vim normal mode filetype mapping K opens help 2018-08-26 10:40:44 +01:00
77735726d9 Add noexpandtag for tags filetype 2018-08-26 10:40:44 +01:00
e8f642dfc0 Add vim-flake8 & don't use textwidth=80 in Python 2018-08-26 10:40:44 +01:00
af6705736c Add vim if snippet 2018-08-26 10:40:44 +01:00
c77fbe9b59 Don't expand tabs in gitconfig files 2018-08-26 10:40:44 +01:00
318de00d36 Add snippet for vim function 2018-08-26 10:40:44 +01:00
b03ff98e4d Improve TODO and NOTE snippets when in comments 2018-08-26 10:40:44 +01:00
02de482df9 Add Error and Question highlights to fresh.vim 2018-08-26 10:40:44 +01:00
3cbbe22ac6 Disable open on left and scroll off for help 2018-08-26 10:40:44 +01:00
60621989e1 Update fresh.vim 2018-08-26 10:40:44 +01:00
91e4ae9983 Add GitHub markdown checklist snippet 2018-08-26 10:40:44 +01:00
b0210e4f5c Add API snippets 2018-08-26 10:40:44 +01:00
4cf7ce0d32 Update vim-plug 2018-08-26 10:40:44 +01:00
e7b011c367 Final tweak vim-airline theme 2018-08-26 10:40:44 +01:00
1a43d6e810 Tweak colors for vim-airline fresh theme 2018-08-26 10:40:44 +01:00
cfec8fd3e6 Add StatusLine & WildMenu highlights 2018-08-26 10:40:44 +01:00
e3ba637473 Add fresh vim-airline theme 2018-08-26 10:40:44 +01:00
9ed2d9cc48 Improve vim python filetype settings 2018-08-26 10:40:44 +01:00
cdd1a8d959 Tweek vim gitcommit settings 2018-08-26 10:40:44 +01:00
be94e9f9db Add more snippets 2018-08-26 10:40:44 +01:00
9ff37a4055 Add generic TODO snippet using commentstring 2018-08-26 10:40:34 +01:00
437476694c Add vim mappings around yapf python formatter 2018-08-26 10:36:10 +01:00
6363c75535 Add python formatting options 2018-08-26 10:36:10 +01:00
e4c2c59a63 Add TODO snippet for CMake 2018-08-26 10:36:10 +01:00
1d80cbb679 Simplify .vimrc layout & folds 2018-08-26 10:36:10 +01:00
277de97a36 Move vim autocommands into ftdetect or ftplugin 2018-08-26 10:36:10 +01:00
3b1d816705 Add vim-plug script & update .vimrc 2018-08-26 10:36:10 +01:00
19aa697862 Remove Vundle submodule 2018-08-26 10:36:10 +01:00
f57e1a9fb7 Complete CMake snippets targeting version 3.0 2018-08-26 10:36:10 +01:00
5a72231b97 Add remaining CMake string() snippets 2018-08-26 10:36:10 +01:00
947a20746b Add more CMake snippets 2018-08-26 10:36:10 +01:00
bef1581105 Add more CMake snippets 2018-08-26 10:36:10 +01:00
371432423e Make TODO and NOTE C snippets more general 2018-08-26 10:36:10 +01:00
837fd5cef3 Updates to fresh.vim colorscheme 2018-08-26 10:36:10 +01:00
9d0a0f85f7 Add UltiSnips snippets 2018-08-26 10:36:05 +01:00
78 changed files with 6812 additions and 213 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.netrwhist
plugs/*

87
UltiSnips/all.snippets Normal file
View File

@ -0,0 +1,87 @@
priority -1
snippet me "Identify me"
Kenneth Benzie (Benie) <k.benzie83@gmail.com>
endsnippet
global !p
comment=vim.current.buffer.options['commentstring'].strip()
def commentbefore():
commentbefore = comment[0:comment.find('%s')].strip()
row, col = vim.current.window.cursor
row -= 1
col -= 1
line = vim.current.buffer[row]
if (col - 1) >= 0 and commentbefore == line[col - 1:len(commentbefore)]:
return ''
return commentbefore + ' '
def commentafter():
after=comment[comment.find('%s')+2:].strip()
if 0 < len(after):
return ' ' + after
return ''
import datetime
import time
def date():
return datetime.datetime.now().strftime('%B %d, %Y')
class LocalTZ(datetime.tzinfo):
"""Query OS for local timezone offset."""
def __init__(self):
"""Initialize LocalTZ."""
datetime.tzinfo.__init__(self)
self._unixEpochOrdinal = datetime.datetime.utcfromtimestamp(
0).toordinal()
def dst(self, _):
return datetime.timedelta(0)
def utcoffset(self, dt):
t = ((dt.toordinal() - self._unixEpochOrdinal) * 86400 + dt.hour * 3600
+ dt.second + time.timezone)
utc = datetime.datetime(*time.gmtime(t)[:6])
local = datetime.datetime(*time.localtime(t)[:6])
return local - utc
def utc():
value = datetime.datetime.strftime(
datetime.datetime.now(LocalTZ()), '%Y-%m-%dT%H:%M:%S%z')
return '%s:%s' % (value[:-2], value[-2:])
endglobal
snippet date "Today's date"
`!p snip.rv=date()`
endsnippet
snippet utc "UTC date time now" i
`!p snip.rv=utc()`
endsnippet
snippet todo "TODO commment"
`!p snip.rv=commentbefore()`TODO${1/.+/(/}$1${1/.+/)/}: $0`!p snip.rv=commentafter()`
endsnippet
snippet note "NOTE comment"
`!p snip.rv=commentbefore()`NOTE: $0`!p snip.rv=commentafter()`
endsnippet
snippet *x "GitHub style checkbox"
* [${1: }] $0
endsnippet
snippet "* [" "GitHub style checkbox"
* [${1: }] $0
endsnippet
snippet *[ "GitHub style checkbox"
* [${1: }] $0
endsnippet
snippet [[ "lit named ID match" i
[[${1:name}:%[a-zA-Z0-9]+]]
endsnippet

View File

@ -0,0 +1,6 @@
snippet refpage "Vulkan Spec refpage"
[open,refpage='${1:symbol}',desc='${2:description}',type='${3:type}']
--
$0
endsnippet

179
UltiSnips/c.snippets Normal file
View File

@ -0,0 +1,179 @@
priority 0
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
elif len(opts) == 0:
return "-error"
return '(' + '|'.join(opts) + ')'
endglobal
snippet i8 "int8_t" i
int8_t
endsnippet
snippet u8 "uint8_t" i
uint8_t
endsnippet
snippet i16 "int16_t" i
int16_t
endsnippet
snippet u16 "uint16_t" i
uint16_t
endsnippet
snippet i32 "int32_t" i
int32_t
endsnippet
snippet u32 "uint32_t" i
uint32_t
endsnippet
snippet i64 "int64_t" i
int64_t
endsnippet
snippet u64 "uint64_t" i
uint64_t
endsnippet
# TODO: include
# 1. Default should be '#include <filename.h>'.
# 2. Relative paths should only allow inserting a single '"'.
snippet #include "Include directive"
#include <${1:header}>
endsnippet
snippet #define "Macro definition"
#define ${1:SYMBOL} $0
endsnippet
snippet #ifndef "Guarded macro definition"
#ifndef ${1/([A-Za-z0-9_]+).*/$1/}
#define ${1:SYMBOL} ${0:VALUE}
#endif
endsnippet
snippet #if "#if block"
#if ${1:SYMBOL}
$0
#endif
endsnippet
snippet #ifdef "#if defined(...) block"
#ifdef ${1:SYMBOL}
$0
#endif
endsnippet
snippet once "Include guard"
#ifndef ${2/([A-Za-z_]){1}([A-Za-z0-9_]+).*/$1$2/}$1
#define $2${1:`!p import string
snip.rv = re.sub(r'[^A-Za-z0-9]+','_', snip.fn).upper()`_INCLUDED}
$0
#endif // ${2/([A-Za-z_]){1}([A-Za-z0-9_]+).*/$1$2/}$1
endsnippet
snippet typedef "Typedef"
typedef ${1:type} ${2:custom_type};$0
endsnippet
snippet enum "Typedef enumeration"
typedef enum ${1:name} {
$0
} $1;
endsnippet
snippet struct "Typedef struct"
typedef struct ${1:name} {
$0
} $1;
endsnippet
snippet if "If statement"
if (${1:condition}) {
$0
}
endsnippet
snippet else "Else continuation"
else {
$0
}
endsnippet
snippet elif "Else if continuation"
else if (${1:condition}) {
$0
}
endsnippet
snippet for "For loop"
for (${1:int} ${2:index} = ${3:0}; $2 ${4:<} ${5:count}; $2${6:++}) {
$0
}
endsnippet
snippet while "While loop"
while (${1:condition}) {
$0
}
endsnippet
snippet do "Do while loop"
do {
$0
} while (${1:condition});
endsnippet
snippet switch "Switch statement"
switch (${1:expression}) {
$0
}
endsnippet
snippet case "Switch case"
case ${1:constant}: {
$0
} break;
endsnippet
snippet default "Switch default case"
default: {
$0
} break;
endsnippet
snippet main "Main function stub"
int main(${1:int argc, char **argv}) {
$0
}
endsnippet
snippet "/// p" "Doxygen param tag"
/// @param${1/.+/[/}$1${1/.+/]/} $0
endsnippet
snippet "/// b" "Doxygen brief tag"
/// @brief $0
endsnippet
snippet copydoc "Doxygen copydoc block"
/// @copydoc $0
endsnippet
snippet debug "Debug fprintf"
fprintf(stderr, "%s: %d: %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);
endsnippet
snippet bs "bool string"
${1:value} ? "true" : "false"
endsnippet

View File

@ -0,0 +1,89 @@
snippet "/// p" "Doxygen parameter block"
/// @param${1/.+/[/}$1${1/.+/]/} ${2:name} $0
endsnippet
snippet "/// t" "Doxygen template parameter block"
/// @tparam ${1:name} $0
endsnippet
snippet "/// b" "Doxygen brief block"
/// @brief $0
endsnippet
snippet "/// d" "Doxygen define block"
/// @def $1
/// $0
endsnippet
snippet "/// r" "Doxygen return block"
/// @return $0
endsnippet
snippet "/// rv" "Doxygen retval block"
/// @retval \`${1:name}\` $0
endsnippet
snippet "/// n" "Doxygen note block"
/// @note $0
endsnippet
snippet copydoc "Doxygen copydoc block"
/// @copydoc $0
endsnippet
snippet "/// s" "Doxygen see block"
/// @see $0
endsnippet
snippet "/// a" "Doxygen attention block"
/// @attention $0
endsnippet
snippet "/// g" "Doxygen addtogroup"
/// @addtogroup ${1:group}
endsnippet
snippet "/// {" "Doxygen group scope"
/// @{
$0/// @}
endsnippet
snippet header "Header noise" b
$1
/// @file
///
/// @brief $2
///
/// @copyright
/$1
#ifndef ${4/([A-Za-z_]){1}([A-Za-z0-9_]+).*/$1$2/}$3
#define $4${3:`!p import string
snip.rv = re.sub(r'[^A-Za-z0-9]+','_', snip.fn).upper()`_INCLUDED}
$0
#endif // ${4/([A-Za-z_]){1}([A-Za-z0-9_]+).*/$1$2/}$3
endsnippet
snippet "/// cp" "Doxygen copydoc block"
/// @copydoc $0
endsnippet
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
elif len(opts) == 0:
return ""
return '|'.join(opts)
endglobal
snippet "/// dot" "Doxygen dot graph block"
/// @dot${1: "${2:caption}"}
/// $3`!p snip.rv=complete(t[3], ['graph', 'digraph'])` ${4:name} {
/// $0
/// }
/// @enddot
endsnippet

828
UltiSnips/cmake.snippets Normal file
View File

@ -0,0 +1,828 @@
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
elif len(opts) == 0:
return ""
return '|'.join(opts)
endglobal
snippet add_compile_options
add_compile_options($1)
endsnippet
snippet add_custom_command "output"
add_custom_command(OUTPUT ${1:outputs}
COMMAND ${2:command}${3:
COMMAND ${4:command}}${5:
MAIN_DEPENDENCY ${6:depend}}${7:
DEPENDS ${8:depends}}${9:
IMPLICIT_DEPENDS ${10:lang} ${11:depend}}${12:
WORKING_DIRECTORY ${13:dir}}${14:
COMMENT "${15:comment}"}${16: VERBATIM}${17: APPEND})
endsnippet
snippet add_custom_command "target"
add_custom_command(TARGET ${1:target} $2`!p snip.rv=complete(t[2], ['PRE_BUILD', 'PRE_LINK', 'POST_BUILD'])`
COMMAND ${3:command}${4:
COMMAND ${5:command}}${6:
WORKING_DIRECTORY ${7:directory}}${8:
COMMENT "${9:comment}"}${10: VERBATIM})
endsnippet
snippet add_custom_target
add_custom_target(${1:target} ${2:ALL}
${3:command}${4:
COMMAND ${5:command}}${6:
DEPENDS ${7:depends}}${8:
WORKING_DIRECTORY ${9:directory}}${10:
COMMENT "${11:comment}"}${12: VERBATIM}${13:
SOURCES ${14:sources}})
endsnippet
snippet add_definitions
add_definitions(-D${1:MACRO}$2)
endsnippet
snippet add_dependencies
add_dependencies(${1:target} ${2:dependencies})
endsnippet
snippet add_executable
add_executable(${1:target}${2: WIN32}${3: MACOSX_BUNDLE}${4:
EXCLUDE_FROM_ALL}
${0:sources})
endsnippet
snippet add_library
add_library(${1:target} $2`!p snip.rv=complete(t[2], ['STATIC', 'SHARED', 'MODULE'])`${4:
EXCLUDE_FROM_ALL}
${0:sources})
endsnippet
snippet add_subdirectory
add_subdirectory(${1:source_dir} ${2:binary_dir}${3: EXCLUDE_FROM_ALL})
endsnippet
snippet add_test
add_test(NAME ${1:name}
COMMAND ${2:command}${3:
CONFIGURATIONS ${4:config}}${5:
WORKING_DIRECTORY ${6:directory}})
endsnippet
snippet aux_source_directory
aux_source_directory(${1:directory} ${2:variable})
endsnippet
snippet break
break()
endsnippet
snippet build_command
build_command(${1:variable}${2:
CONFIGURATION ${3:config}}${4:
TARGET ${6:target}})
endsnippet
snippet cmake_host_system_information
cmake_host_system_information(RESULT ${1:variable} QUERY $2`!p snip.rv=complete(t[2], ['NUMBER_OF_LOGICAL_CORES', 'NUMBER_OF_PHYSICAL_CORES', 'HOSTNAME', 'FQDN', 'TOTAL_VIRTUAL_MEMORY', 'AVAILABLE_VIRTUAL_MEMORY', 'TOTAL_PHYSICAL_MEMORY', 'AVAILABLE_PHYSICAL_MEMORY'])`)
endsnippet
snippet cmake_minimum_required
cmake_minimum_required(VERSION ${1:version}${2: FATAL_ERROR})
endsnippet
snippet cmake_policy "version"
cmake_policy(VERSION ${1:version})
endsnippet
snippet cmake_policy "set"
cmake_policy(SET CMP${1:0000} $2`!p snip.rv=complete(t[2], ['OLD', 'NEW'])`)
endsnippet
snippet cmake_policy "get"
cmake_policy(GET CMP${1:0000} ${2:variable})
endsnippet
snippet cmake_policy "push/pop"
cmake_policy($1`!p snip.rv=complete(t[1], ['PUSH', 'POP'])`)
endsnippet
snippet configure_file
configure_file(${1:input} ${2:output}${3: COPYONLY}${4: ESCAPE_QUOTES}${5: @ONLY}${6: NEWLINE_STYLE $7`!p snip.rv=complete(t[7], ['UNIX','DOS','WIN32','LF','CRLF'])`})
endsnippet
snippet create_test_sourcelist
create_test_sourcelist(
${1:sourceListName}
${2:driverName}
${3:tests}
EXTRA_INCLUDE ${4:include}
FUNCTION ${5:function})
endsnippet
snippet define_property
define_property($1`!p snip.rv=complete(t[1], ['GLOBAL','DIRECTORY','TARGET','SOURCE','TEST','VARIABLE','CACHED_VARIABLE'])`
PROPERTY ${2:name}${3: INHERITED}
BRIEF_DOCS ${4:brief-docs}
FULL_DOCS ${5:full-docs})
endsnippet
snippet elseif
elseif(${1:condition})
$0
endsnippet
snippet enable_language
enable_language($1`!p snip.rv=complete(t[1], ['C', 'CXX', 'FORTRAN'])`${2: OPTIONAL})
endsnippet
snippet enable_testing
enable_testing()
endsnippet
snippet execute_process
execute_process(
COMMAND ${1:commands}${2:
WORKING_DIRECTORY ${3:directory}}${4:
TIMEOUT ${5:seconds}}${6:
RESULT_VARIABLE ${7:variable}}${8:
OUTPUT_VARIABLE ${9:variable}}${10:
ERROR_VARIABLE ${11:variable}}${12:
INPUT_FILE ${13:file}}${14:
OUTPUT_FILE ${15:file}}${16:
ERROR_FILE ${17:file}}${18:
OUTPUT_QUIET}${19:
ERROR_QUIET}${20:
OUTPUT_STRIP_TRAILING_WHITESPACE}${21:
ERROR_STRIP_TRAILING_WHITESPACE})
endsnippet
snippet export
export(EXPORT ${1:export-name}${2: NAMESPACE ${3:namespace}}${4: FILE ${5:filename}})
endsnippet
snippet file "write"
file(WRITE ${1:filename} "${2:message to write}")
endsnippet
snippet file "append"
file(APPEND ${1:filename} "${2:message to write}")
endsnippet
snippet file "read"
file(READ ${1:filename} ${2:variable}${3: LIMIT ${4:numBytes}}${5: OFFSET ${6:offset}}${7: HEX})
endsnippet
snippet file "hash"
file($1`!p snip.rv=complete(t[1], ['MD5','SHA1','SHA224','SHA256','SHA384','SHA512'])` ${2:filename} ${3:variable})
endsnippet
snippet file "strings"
file(STRINGS ${1:filename} ${2:variable}${3: LIMIT_COUNT ${4:number}}${5:
${6:LIMIT_INPUT ${7:numBytes}}${8: LIMIT_OUTPUT ${9:numBytes}}}${10:
${11:LENGTH_MINIMUM ${12:numBytes}}${13: LENGTH_MAXIMUM ${14:numBytes}}}${15:
NEWLINE_CONSUME}${16:
REGEX "${17:regex}"}${18:
NO_HEX_CONVERSION})
endsnippet
snippet file "glob"
file(GLOB ${1:variable}${2: RELATIVE ${3:path}}${4: ${5:globbing expressions}})
endsnippet
snippet file "glob recursive"
le(GLOB_RECURSE ${1:variable}${2: RELATIVE ${3:path}}${4:
FOLLOW_SYMLINKS}${5: ${6:globbing expressions}})
endsnippet
snippet file "rename"
file(RENAME ${1:oldname} ${2:newname})
endsnippet
snippet REMOVE "remove"
file(REMOVE ${1:files})
endsnippet
snippet file "remove recursive"
file(REMOVE_RECURSE ${1:files})
endsnippet
snippet file "make directory"
file(MAKE_DIRECTORY ${1:directories})
endsnippet
snippet file "relative path"
file(RELATIVE_PATH ${1:variable} ${2:directory} ${3:file})
endsnippet
snippet file "to cmake path"
file(TO_CMAKE_PATH ${1:path} ${2:result})
endsnippet
snippet file "to native path"
file(TO_NATIVE_PATH ${1:path} ${2:result})
endsnippet
snippet file "download"
file(DOWNLOAD ${1:url} ${2:file}${3:
INACTIVITY_TIMEOUT ${4:timeout}}${5:
TIMEOUT ${6:timeout}}${7:
STATUS ${8:status}}${9:
LOG ${10:log}}${11:
SHOW_PROGRESS}${12:
EXPECTED_HASH ALGO=${13:value}}${14:
EXPECTED_MD5 ${15:sum}}${16:
TLS_VERIFY $17`!p snip.rv=complete(t[17], ['on', 'off'])`}${18:
TLS_CAINFO ${19:file}})
endsnippet
snippet file "upload"
file(UPLOAD ${1:filename} ${2:url}${3:
INACTIVITY_TIMEOUT ${4:timeout}}${5:
TIMEOUT ${6:timeout}}${7:
STATUS ${8:status}}${9:
LOG ${10:log}}${11:
SHOW_PROGRESS})
endsnippet
snippet file "timestamp"
file(TIMESTAMP ${1:filename} ${2:variable}${3: ${4:format string}}${5: ${6:UTC}})
endsnippet
snippet file "generate output"
file(GENERATE OUTPUT ${1:output_file}
$2`!p snip.rv=complete(t[2], ['INPUT', 'CONTENT'])` ${3:input}${4:
CONDITION ${5:expression}})
endsnippet
snippet find_file "shorthand"
find_file(${1:variable} ${2:paths})
endsnippet
snippet find_file "general"
find_file(${1:variable}
NAMES ${2:names}${3:
HINTS ${4:paths}${5: ENV ${6:variable}}}${7:
PATHS ${8:paths}${9: ENV ${10:variable}}}${11:
PATH_SUFFIXES ${12:suffixes}}${13:
DOC "${14:doc string}"}${15:${16:
NO_DEFAULT_PATH}${17:
NO_CMAKE_ENVIRONMENT_PATH}${18:
NO_CMAKE_PATH}${19:
NO_SYSTEM_ENVIRONMENT_PATH}${20:
NO_CMAKE_SYSTEM_PATH}${21:
$22`!p snip.rv=complete(t[22], ['CMAKE_FIND_ROOT_PATH_BOTH', 'ONLY_CMAKE_FIND_ROOT_PATH', 'NO_CMAKE_FIND_ROOT_PATH'])`}})
endsnippet
snippet find_package "simple"
find_package(${1:package}${2: version}${3: EXACT}${4: QUIET}${5: MODULE}${6: REQUIRED}${7: COMPONENTS ${8:components}}${9: OPTIONAL_COMPONENTS ${10:components}}${11: NO_POLICY_SCOPE})
endsnippet
snippet find_package "config"
find_package(${1:package} ${2:version}${3: EXACT}${4: QUIET}${5: REQUIRED}${6:
COMPONENTS ${7:components}}${8:
$9`!p snip.rv=complete(t[9], ['CONFIG', 'NO_MODULE'])`}${10:
NO_POLICY_SCOPE}${11:
NAMES ${12:names}}${13:
CONFIGS ${14:configs}}${15:
HINTS ${16:paths}}${17:
PATHS ${18:paths}}${19:
PATH_SUFFIXES ${20:suffixs}}${21:${22:
NO_DEFAULT_PATH}${23:
NO_CMAKE_ENVIRONMENT_PATH}${24:
NO_CMAKE_PATH}${25:
NO_SYSTEM_ENVIRONMENT_PATH}${26:
NO_CMAKE_PACKAGE_REGISTRY}${27:
NO_CMAKE_BUILDS_PATH}${28:
NO_CMAKE_SYSTEM_PATH}${29:
NO_CMAKE_SYSTEM_PACKAGE_REGISTRY}}${30:
$31`!p snip.rv=complete(t[31], ['CMAKE_FIND_ROOT_PATH_BOTH', 'ONLY_CMAKE_FIND_ROOT_PATH', 'NO_CMAKE_FIND_ROOT_PATH'])`})
endsnippet
snippet find_path "shorthand"
find_path(${1:variable} ${1:names})
endsnippet
snippet find_path "general"
find_path(${1:variable}
NAMES ${2:names}${3:
HINTS ${4:paths}${5: ENV ${6:variable}}}${7:
PATHS ${8:paths}${9: ENV ${10:variable}}}${11:
PATH_SUFFIXES ${12:suffixes}}${13:
DOC "${14:doc string}"}${15:${16:
NO_DEFAULT_PATH}${17:
NO_CMAKE_ENVIRONMENT_PATH}${18:
NO_CMAKE_PATH}${19:
NO_SYSTEM_ENVIRONMENT_PATH}${20:
NO_CMAKE_SYSTEM_PATH}${21:
$22`!p snip.rv=complete(t[22], ['CMAKE_FIND_ROOT_PATH_BOTH', 'ONLY_CMAKE_FIND_ROOT_PATH', 'NO_CMAKE_FIND_ROOT_PATH'])`}})
endsnippet
snippet find_program "shorthand"
find_program(${1:variable} ${2:name}${3: ${4:paths}})
endsnippet
snippet find_program "general"
find_program(${1:variable}
NAMES ${2:names}${3:
HINTS ${4:paths}${5: ENV ${6:variable}}}${7:
PATHS ${8:paths}${9: ENV ${10:variable}}}${11:
PATH_SUFFIXES ${12:suffixes}}${13:
DOC "${14:doc string}"}${15:${16:
NO_DEFAULT_PATH}${17:
NO_CMAKE_ENVIRONMENT_PATH}${18:
NO_CMAKE_PATH}${19:
NO_SYSTEM_ENVIRONMENT_PATH}${20:
NO_CMAKE_SYSTEM_PATH}${21:
$22`!p snip.rv=complete(t[22], ['CMAKE_FIND_ROOT_PATH_BOTH', 'ONLY_CMAKE_FIND_ROOT_PATH', 'NO_CMAKE_FIND_ROOT_PATH'])`}})
endsnippet
snippet fltk_wrap_ui
fltk_wrap_ui(${1:resulting_library_name} ${2:sources})
endsnippet
snippet foreach
foreach(${1:item} \$\{${2:list}\})
$0
endforeach()
endsnippet
snippet function
function(${1:name} ${2:arguments})
$0
endfunction()
endsnippet
snippet get_cmake_property
get_cmake_property(${1:variable} $2`!p snip.rv=complete(t[2], ['VARIABLES', 'CACHE_VARIABLES', 'COMMANDS', 'MACROS', 'COMPONENTS'])`)
endsnippet
global !p
DIRECTORY_PROPERTIES=[
'ADDITIONAL_MAKE_CLEAN_FILES', 'CACHE_VARIABLES', 'CLEAN_NO_CUSTOM',
'CMAKE_CONFIGURE_DEPENDS', 'COMPILE_DEFINITIONS_<CONFIG>',
'COMPILE_DEFINITIONS', 'COMPILE_OPTIONS', 'DEFINITIONS', 'EXCLUDE_FROM_ALL',
'IMPLICIT_DEPENDS_INCLUDE_TRANSFORM', 'INCLUDE_DIRECTORIES',
'INCLUDE_REGULAR_EXPRESSION', 'INTERPROCEDURAL_OPTIMIZATION_<CONFIG>',
'INTERPROCEDURAL_OPTIMIZATION', 'LINK_DIRECTORIES', 'LISTFILE_STACK',
'MACROS', 'PARENT_DIRECTORY', 'RULE_LAUNCH_COMPILE', 'RULE_LAUNCH_CUSTOM',
'RULE_LAUNCH_LINK', 'TEST_INCLUDE_FILE', 'VARIABLES',
'VS_GLOBAL_SECTION_POST_<section>', 'VS_GLOBAL_SECTION_PRE_<section>',
]
endglobal
snippet get_directory_property "property"
get_directory_property(${1:variable}${2: DIRECTORY ${3:directory}} $4`!p snip.rv=complete(t[4], DIRECTORY_PROPERTIES)`)
endsnippet
snippet get_directory_property "definition"
get_directory_property(${1:variable}${2: DIRECTORY ${3:directory}} DEFINITION ${4:name})
endsnippet
snippet get_filename_component "full"
get_filename_component(${1:variable} ${2:filename} $3`!p snip.rv=complete(t[3], ['DIRECTORY', 'NAME', 'EXT', 'NAME_WE', 'ABSOLUTE', 'REALPATH', 'PATH'])`${4: ${5:CACHE}})
endsnippet
snippet get_filename_component "system"
get_filename_component(${1:variable} ${2:filename} PROGRAM${3: PROGRAM_ARGS ${4:{arguments}}}${5: CACHE})
endsnippet
global !p
PROPERTY_OPTIONS=['SET', 'DEFINED', 'BRIEF_DOCS', 'FULL_DOCS']
GLOBAL_PROPERTIES=['ALLOW_DUPLICATE_CUSTOM_TARGETS', 'AUTOGEN_TARGETS_FOLDER',
'AUTOMOC_TARGETS_FOLDER', 'DEBUG_CONFIGURATIONS', 'DISABLED_FEATURES',
'ENABLED_FEATURES', 'ENABLED_LANGUAGES', 'FIND_LIBRARY_USE_LIB64_PATHS',
'FIND_LIBRARY_USE_OPENBSD_VERSIONING', 'GLOBAL_DEPENDS_DEBUG_MODE',
'GLOBAL_DEPENDS_NO_CYCLES', 'IN_TRY_COMPILE', 'PACKAGES_FOUND',
'PACKAGES_NOT_FOUND', 'JOB_POOLS', 'PREDEFINED_TARGETS_FOLDER',
'ECLIPSE_EXTRA_NATURES', 'REPORT_UNDEFINED_PROPERTIES',
'RULE_LAUNCH_COMPILE', 'RULE_LAUNCH_CUSTOM', 'RULE_LAUNCH_LINK',
'RULE_MESSAGES', 'TARGET_ARCHIVES_MAY_BE_SHARED_LIBS',
'TARGET_SUPPORTS_SHARED_LIBS', 'USE_FOLDERS']
endglobal
snippet get_property "global"
get_property(${1:variable} GLOBAL PROPERTY $2`!p snip.rv=complete(t[2], GLOBAL_PROPERTIES)` $3`!p snip.rv=complete(t[3], PROPERTY_OPTIONS)`)
endsnippet
snippet get_property "directory"
get_property(${1:variable} DIRECTORY ${2:directory} PROPERTY $3`!p snip.rv=complete(t[3], DIRECTORY_PROPERTIES)` $4`!p snip.rv=complete(t[4], PROPERTY_OPTIONS)`)
endsnippet
snippet get_property "target"
get_property(${1:variable} TARGET ${2:target} PROPERTY $3`!p snip.rv=complete(t[3], TARGET_PROPERTIES)` $4`!p snip.rv=complete(t[4], PROPERTY_OPTIONS)`)
endsnippet
snippet get_property "source"
get_property(${1:variable} SOURCE ${2:source} PROPERTY $3`!p snip.rv=complete(t[3], SOURCE_FILE_PROPERTIES)` $4`!p snip.rv=complete(t[4], PROPERTY_OPTIONS)`)
endsnippet
global !p
CACHE_PROPERTIES=[ 'ADVANCED', 'HELPSTRING', 'MODIFIED', 'STRINGS', 'TYPE', 'VALUE']
endglobal
snippet get_property "cache"
get_property(${1:variable} CACHE ${2:entry} PROPERTY $3`!p snip.rv=complete(t[3], CACHE_PROPERTIES)` $4`!p snip.rv=complete(t[4], PROPERTY_OPTIONS)`)
endsnippet
snippet get_property "variable"
get_property(${1:variable} VARIABLE PROPERTY ${2:name} $3`!p snip.rv=complete(t[4], PROPERTY_OPTIONS)`)
endsnippet
global !p
SOURCE_FILE_PROPERTIES=['ABSTRACT', 'AUTOUIC_OPTIONS', 'AUTORCC_OPTIONS',
'COMPILE_DEFINITIONS_<CONFIG>', 'COMPILE_DEFINITIONS', 'COMPILE_FLAGS',
'EXTERNAL_OBJECT', 'Fortran_FORMAT', 'GENERATED', 'HEADER_FILE_ONLY',
'KEEP_EXTENSION', 'LABELS', 'LANGUAGE', 'LOCATION', 'MACOSX_PACKAGE_LOCATION',
'OBJECT_DEPENDS', 'OBJECT_OUTPUTS', 'SYMBOLIC', 'WRAP_EXCLUDE']
endglobal
snippet get_source_file_property
get_source_file_property(${1:variable} ${2:file} $3`!p snip.rv=complete(t[3], SOURCE_FILE_PROPERTIES)`)
endsnippet
global !p
TARGET_PROPERTIES=['ALIASED_TARGET', 'ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>',
'ARCHIVE_OUTPUT_DIRECTORY', 'ARCHIVE_OUTPUT_NAME_<CONFIG>',
'ARCHIVE_OUTPUT_NAME', 'AUTOGEN_TARGET_DEPENDS', 'AUTOMOC_MOC_OPTIONS',
'AUTOMOC', 'AUTOUIC', 'AUTOUIC_OPTIONS', 'AUTORCC', 'AUTORCC_OPTIONS',
'BUILD_WITH_INSTALL_RPATH', 'BUNDLE_EXTENSION', 'BUNDLE',
'COMPATIBLE_INTERFACE_BOOL', 'COMPATIBLE_INTERFACE_NUMBER_MAX',
'COMPATIBLE_INTERFACE_NUMBER_MIN', 'COMPATIBLE_INTERFACE_STRING',
'COMPILE_DEFINITIONS_<CONFIG>', 'COMPILE_DEFINITIONS', 'COMPILE_FLAGS',
'COMPILE_OPTIONS', '<CONFIG>_OUTPUT_NAME', '<CONFIG>_POSTFIX', 'DEBUG_POSTFIX',
'DEFINE_SYMBOL', 'EchoString', 'ENABLE_EXPORTS', 'EXCLUDE_FROM_ALL',
'EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>', 'EXCLUDE_FROM_DEFAULT_BUILD',
'EXPORT_NAME', 'FOLDER', 'Fortran_FORMAT', 'Fortran_MODULE_DIRECTORY',
'FRAMEWORK', 'GENERATOR_FILE_NAME', 'GNUtoMS', 'HAS_CXX',
'IMPLICIT_DEPENDS_INCLUDE_TRANSFORM', 'IMPORTED_CONFIGURATIONS',
'IMPORTED_IMPLIB_<CONFIG>', 'IMPORTED_IMPLIB',
'IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG>',
'IMPORTED_LINK_DEPENDENT_LIBRARIES',
'IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>',
'IMPORTED_LINK_INTERFACE_LANGUAGES',
'IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG>',
'IMPORTED_LINK_INTERFACE_LIBRARIES',
'IMPORTED_LINK_INTERFACE_MULTIPLICITY_<CONFIG>',
'IMPORTED_LINK_INTERFACE_MULTIPLICITY',
'IMPORTED_LOCATION_<CONFIG>', 'IMPORTED_LOCATION',
'IMPORTED_NO_SONAME_<CONFIG>', 'IMPORTED_NO_SONAME', 'IMPORTED',
'IMPORTED_SONAME_<CONFIG>', 'IMPORTED_SONAME', 'IMPORT_PREFIX',
'IMPORT_SUFFIX', 'INCLUDE_DIRECTORIES', 'INSTALL_NAME_DIR',
'INSTALL_RPATH', 'INSTALL_RPATH_USE_LINK_PATH', 'INTERFACE_AUTOUIC_OPTIONS',
'INTERFACE_COMPILE_DEFINITIONS', 'INTERFACE_COMPILE_OPTIONS',
'INTERFACE_INCLUDE_DIRECTORIES', 'INTERFACE_LINK_LIBRARIES',
'INTERFACE_POSITION_INDEPENDENT_CODE', 'INTERFACE_SYSTEM_INCLUDE_DIRECTORIES',
'INTERPROCEDURAL_OPTIMIZATION_<CONFIG>', 'INTERPROCEDURAL_OPTIMIZATION',
'JOB_POOL_COMPILE', 'JOB_POOL_LINK', 'LABELS', '<LANG>_VISIBILITY_PRESET',
'LIBRARY_OUTPUT_DIRECTORY_<CONFIG>', 'LIBRARY_OUTPUT_DIRECTORY',
'LIBRARY_OUTPUT_NAME_<CONFIG>', 'LIBRARY_OUTPUT_NAME',
'LINK_DEPENDS_NO_SHARED', 'LINK_DEPENDS', 'LINKER_LANGUAGE',
'LINK_FLAGS_<CONFIG>', 'LINK_FLAGS', 'LINK_INTERFACE_LIBRARIES_<CONFIG>',
'LINK_INTERFACE_LIBRARIES', 'LINK_INTERFACE_MULTIPLICITY_<CONFIG>',
'LINK_INTERFACE_MULTIPLICITY', 'LINK_LIBRARIES', 'LINK_SEARCH_END_STATIC',
'LINK_SEARCH_START_STATIC', 'LOCATION_<CONFIG>', 'LOCATION',
'MACOSX_BUNDLE_INFO_PLIST', 'MACOSX_BUNDLE', 'MACOSX_FRAMEWORK_INFO_PLIST',
'MACOSX_RPATH', 'MAP_IMPORTED_CONFIG_<CONFIG>', 'NAME', 'NO_SONAME',
'NO_SYSTEM_FROM_IMPORTED', 'OSX_ARCHITECTURES_<CONFIG>', 'OSX_ARCHITECTURES',
'OUTPUT_NAME_<CONFIG>', 'OUTPUT_NAME', 'PDB_NAME_<CONFIG>', 'PDB_NAME',
'PDB_OUTPUT_DIRECTORY_<CONFIG>', 'PDB_OUTPUT_DIRECTORY',
'POSITION_INDEPENDENT_CODE', 'POST_INSTALL_SCRIPT', 'PREFIX',
'PRE_INSTALL_SCRIPT', 'PRIVATE_HEADER', 'PROJECT_LABEL', 'PUBLIC_HEADER',
'RESOURCE', 'RULE_LAUNCH_COMPILE', 'RULE_LAUNCH_CUSTOM', 'RULE_LAUNCH_LINK',
'RUNTIME_OUTPUT_DIRECTORY_<CONFIG>', 'RUNTIME_OUTPUT_DIRECTORY',
'RUNTIME_OUTPUT_NAME_<CONFIG>', 'RUNTIME_OUTPUT_NAME', 'SKIP_BUILD_RPATH',
'SOURCES', 'SOVERSION', 'STATIC_LIBRARY_FLAGS_<CONFIG>',
'STATIC_LIBRARY_FLAGS', 'SUFFIX', 'TYPE', 'VERSION',
'VISIBILITY_INLINES_HIDDEN', 'VS_DOTNET_REFERENCES',
'VS_DOTNET_TARGET_FRAMEWORK_VERSION', 'VS_GLOBAL_KEYWORD',
'VS_GLOBAL_PROJECT_TYPES', 'VS_GLOBAL_ROOTNAMESPACE', 'VS_GLOBAL_<variable>',
'VS_KEYWORD', 'VS_SCC_AUXPATH', 'VS_SCC_LOCALPATH', 'VS_SCC_PROJECTNAME',
'VS_SCC_PROVIDER', 'VS_WINRT_EXTENSIONS', 'VS_WINRT_REFERENCES',
'WIN32_EXECUTABLE', 'XCODE_ATTRIBUTE_<an-attribute>']
endglobal
snippet get_target_property
get_target_property(${1:variable} ${2:target} $3`!p snip.rv=complete(t[3], TARGET_PROPERTIES)`)
endsnippet
global !p
TEST_PROPERTIES=['ATTACHED_FILES_ON_FAIL', 'ATTACHED_FILES', 'COST', 'DEPENDS',
'ENVIRONMENT', 'FAIL_REGULAR_EXPRESSION', 'LABELS', 'MEASUREMENT',
'PASS_REGULAR_EXPRESSION', 'PROCESSORS', 'REQUIRED_FILES', 'RESOURCE_LOCK',
'RUN_SERIAL', 'SKIP_RETURN_CODE', 'TIMEOUT', 'WILL_FAIL', 'WORKING_DIRECTORY']
endglobal
snippet get_test_property
get_test_property(${1:test} ${2:property} $3`!p snip.rv=complete(t[3], TEST_PROPERTIES)`)
endsnippet
snippet if
if(${1:condition})
$0
endif()
endsnippet
snippet include_directories
include_directories(${1:SYSTEM }$3)
endsnippet
snippet include_external_msproject "include_external_msproject"
include_external_msproject(${1:projectname} ${2:location}${3:
TYPE ${4:projectTypeGUID}}${5:
GUID ${6:projectGUID}}${7:
PLATFORM ${8:platformName}}
${9:dependencies})
endsnippet
snippet include_regular_expression "include_regular_expression"
include_regular_expression(${1:regex_match}${2: ${3:regex_complain}})
endsnippet
snippet include
include(${1:file|module}${2: ${3:OPTIONAL}}${4: ${5:RESULT_VARIABLE} ${6:variable}}${7: NO_POLICY_SCOPE})
endsnippet
snippet install "targets"
install(TARGETS ${1:targets}${2: EXPORT ${3:export-name}}${4:
$5`!p snip.rv=complete(t[5], ['ARCHIVE', 'LIBRARY', 'RUNTIME', 'FRAMEWORK', 'BUNDLE', 'PRIVATE_HEADER', 'PUBLIC_HEADER', 'RESOURCE'])` DESTINATION ${6:directory}${7:
INCLUDES DESTINATION ${8:directory}}${9:
PERMISSIONS ${10:permissions}}${11:
CONFIGURATIONS $12`!p snip.rv=complete(t[12], ['Debug', 'Release', 'RelMinSize', 'RelWithDebInfo'])`}${13:
COMPONENT ${14:component}}${15:
OPTIONAL}${16:
$17`!p snip.rv=complete(t[17], ['NAMELINK_ONLY', 'NAMELINK_SKIP'])`}})
endsnippet
snippet install "files or programs"
install($1`!p snip.rv=complete(t[1], ['FILES', 'PROGRAMS'])`
DESTINATION ${2:directory}${3:
PERMISSIONS ${4:permissions}}${5:
CONFIGURATIONS $6`!p snip.rv=complete(t[6], ['Debug', 'Release', 'RelMinSize', 'RelWithDebInfo'])`}${7:
COMPONENT ${8:component}}${9:
RENAME ${10:name}}${11:
OPTIONAL})
endsnippet
snippet install "directories"
install(DIRECTORY ${1:directories}
DESTINATION ${2:directory}${3:
FILE_PERMISSIONS ${4:permissions}}${5:
DIRECTORY_PERMISSIONS ${6:permissions}}${7:
USE_SOURCE_PERMISSIONS}${8:
OPTIONAL}${9:
CONFIGURATIONS $10`!p snip.rv=complete(t[10], ['Debug', 'Release', 'RelMinSize', 'RelWithDebInfo'])`}${11:
COMPONENT ${12:component}}${13:
FILES_MATCHING}${14:${15:
$16`!p snip.rv=complete(t[16], ['PATTERN', 'REGEX'])` ${17:pattern|regex}}${18:
EXCLUDE}${19:
PERMISSIONS ${20:permissions}}})
endsnippet
snippet install "script"
install(SCRIPT ${1:file})
endsnippet
snippet install "code"
install(CODE ${1:code})
endsnippet
snippet install "export"
install(EXPORT ${1:export-name}
DESTINATION ${2:directory}${3:
NAMESPACE ${4:namespace}}${5:
FILE ${6:name}.cmake}${7:
PERMISSIONS ${8:permissions}}${9:
CONFIGURATIONS $10`!p snip.rv=complete(t[10], ['Debug', 'Release', 'RelMinSize', 'RelWithDebInfo'])`}${11:
EXPORT_LINK_INTERFACE_LIBRARIES}${12:
COMPONENT ${13:component}})
endsnippet
snippet link_directories
link_directories(${1:directories})
endsnippet
snippet list
list(APPEND ${1:list} ${2:elements})
endsnippet
snippet load_cache "prefix"
load_cache(${1:path_to_cache_file} READ_WITH_PREFIX ${2:prefix} ${3:entries})
endsnippet
snippet load_cache "internal"
load_cache(${1:path_to_cache_file}${2: EXCLUDE ${3:entries}}${4:
INCLUDE_INTERNALS ${5:entries}})
endsnippet
snippet load_command
load_command(COMMAND_NAME ${1:locations})
endsnippet
snippet macro
macro(${1:name} ${2:arguments})
$0
endmacro()
endsnippet
snippet mark_as_advanced
mark_as_advanced($1`!p snip.rv=complete(t[1], ['CLEAR', 'FORCE'])` ${2:variables})
endsnippet
snippet math
math(EXPR ${1:output} ${2:expression})
endsnippet
snippet message
message($1`!p snip.rv=complete(t[1], ['STATUS', 'WARNING', 'AUTHOR_WARNING', 'SEND_ERROR', 'FATAL_ERROR', 'DEPRECATION'])` "$2")
endsnippet
snippet debug "Description" b
message($1`!p snip.rv=complete(t[1], ['STATUS', 'FATAL_ERROR'])` "${2:$3: ${${3:var}}}")
endsnippet
snippet option
option(${1:option} "${2:description}." $3`!p snip.rv=complete(t[3], ['ON', 'OFF'])`)
endsnippet
snippet project
project(${1:name}${2: VERSION ${4:version}}${5: LANGUAGES ${6:languages}})
endsnippet
snippet qt_wrap_cpp
qt_wrap_cpp(${1:resulting_library_name} ${2:destination_name}
${3:source_lists})
endsnippet
snippet qt_wrap_ui
qt_wrap_ui(${1:resulting_library_name} ${2:header_destination_name}
${3:sources_destination_name} ${4:source_lists})
endsnippet
snippet remove_definitions
remove_definitions(${1:definitions})
endsnippet
snippet return
return()
endsnippet
snippet separate_arguments
separate_arguments(${1:variable} $2`!p snip.rv=complete(t[2], ['UNIX_COMMAND', 'WINDOWS_COMMAND'])` "${3:arguments}")
endsnippet
snippet set_directory_properties
set_directory_properties(PROPERTIES $1`!p snip.rv=complete(t[1], DIRECTORY_PROPERTIES)` ${2:value})
endsnippet
snippet set_property "global"
set_property(GLOBAL${1: ${2:APPEND}}${3: ${4:APPEND_STRING}}
PROPERTY $5`!p snip.rv=complete(t[5], GLOBAL_PROPERTIES)`${6: ${7:values}})
endsnippet
snippet set_property "directory"
set_property(DIRECTORY ${1:directory}${2: ${3:APPEND}}${4: ${5:APPEND_STRING}}
PROPERTY $6`!p snip.rv=complete(t[6], DIRECTORY_PROPERTIES)`${7: ${8:values}})
endsnippet
snippet set_property "target"
set_property(TARGET ${1:targets}${2: ${3:APPEND}}${4: ${5:APPEND_STRING}}
PROPERTY $6`!p snip.rv=complete(t[6], TARGET_PROPERTIES)`${7: ${8:values}})
endsnippet
snippet set_property "source"
set_property(SOURCE ${1:sources}${2: ${3:APPEND}}${4: ${5:APPEND_STRING}}
PROPERTY $6`!p snip.rv=complete(t[6], SOURCE_FILE_PROPERTIES)`${7: ${8:values}})
endsnippet
snippet set_property "test"
set_property(TEST ${1:tests}${2: ${3:APPEND}}${4: ${5:APPEND_STRING}}
PROPERTY $6`!p snip.rv=complete(t[6], TEST_PROPERTIES)`${7: ${8:values}})
endsnippet
snippet set_property "cache"
set_property(CACHE ${1:entries}${2: ${3:APPEND}}${4: ${5:APPEND_STRING}}
PROPERTY $6`!p snip.rv=complete(t[6], CACHE_PROPERTIES)`${7: ${8:values}})
endsnippet
snippet set "simple"
set(${1:variable} ${2:value})
endsnippet
snippet set "cache"
set(${1:variable} ${2:value} CACHE $3`!p snip.rv=complete(t[3], ['FILEPATH', 'PATH', 'STRING', 'BOOL', 'INTERNAL'])` "${4:description}"${5: FORCE})
endsnippet
snippet set "parent scope"
set(${1:variable} ${2:value} PARENT_SCOPE)
endsnippet
snippet set "environment"
set(ENV{${1:variable}} ${2:value})
endsnippet
snippet set_source_files_properties
set_source_files_properties(${1:files} PROPERTIES $2`!p snip.rv=complete(t[2], SOURCE_FILE_PROPERTIES)` ${3:value})
endsnippet
snippet set_target_properties
set_target_properties(${1:targets} PROPERTIES $2`!p snip.rv=complete(t[2], TARGET_PROPERTIES)` ${3:value})
endsnippet
snippet set_tests_properties
set_tests_properties(${1:tests} PROPERTIES $2`!p snip.rv=complete(t[2], TEST_PROPERTIES)` ${3:value})
endsnippet
snippet site_name
site_name(${1:variable})
endsnippet
snippet source_group
source_group(${1:name}${2:
FILES ${3:sources}}${4:
REGULAR_EXPRESSION "${5:regex}"})
endsnippet
snippet string "regex match"
string(REGEX MATCH ${1:regex} ${2:output} ${3:inputs})
endsnippet
snippet string "regex match all"
string(REGEX MATCHALL ${1:regex} ${2:output} ${3:inputs})
endsnippet
snippet string "regex replace"
string(REGEX MATCHALL ${1:regex} ${2:replace} ${3:output} ${4:inputs})
endsnippet
snippet string "replace"
string(REPLACE ${1:match} ${2:replace} ${3:output} ${4:inputs})
endsnippet
snippet string "concatinate"
string(CONCAT ${1:output}${2: ${3:inputs}})
endsnippet
snippet string "hash"
string($1`!p snip.rv=complete(t[1], ['MD5', 'SHA1', 'SHA224', 'SHA256', 'SHA384', 'SHA512'])` ${2:output} ${3:input})
endsnippet
snippet string "compare equal"
string(COMPARE EQUAL ${1:string1} ${2:string2} ${3:output})
endsnippet
snippet string "compare not equal"
string(COMPARE NOTEQUAL ${1:string1} ${2:string2} ${3:output})
endsnippet
snippet string "compare less"
string(COMPARE LESS ${1:string1} ${2:string2} ${3:output})
endsnippet
snippet string "compare greater"
string(COMPARE GREATER ${1:string1} ${2:string2} ${3:output})
endsnippet
snippet string "ASCII"
string(ASCII ${1:number}${2: ${3:numbers}} ${4:output})
endsnippet
snippet string "configure"
string(CONFIGURE ${1:string} ${2:output}${3: @ONLY}${4: ESCAPE_QUOTES})
endsnippet
snippet string "to upper"
string(TOUPPER ${1:string} ${2:output})
endsnippet
snippet string "to lower"
string(TOLOWER ${1:string} ${2:output})
endsnippet
snippet string "length"
string(LENGTH ${1:string} ${2:output})
endsnippet
snippet string "sub string"
string(LENGTH ${1:string} ${2:begin} ${3:length} ${4:output})
endsnippet
snippet string "strip"
string(STRIP ${1:string} ${2:output})
endsnippet
snippet string "random"
string(RANDOM${1: LENGTH ${2:length}}${3: ALPHABET ${4:alphabet}}${5: RANDOM_SEED ${6:seed}} ${7:output})
endsnippet
snippet string "find"
string(FIND ${1:string} ${2:substring} ${3:output}${4: REVERSE})
endsnippet
snippet string "timestamp"
string(TIMESTAMP ${1:output}${2: ${3:format}}${4: UTC})
endsnippet
snippet string "make C identifier"
string(MAKE_C_IDENTIFIER ${1:input} ${2:output})
endsnippet
snippet target_compile_definitions
target_compile_definitions(${1:target} $2`!p
snip.rv=complete(t[2], ['INTERFACE', 'PUBLIC', 'PRIVATE'])`
${4:definitions})
endsnippet
snippet target_compile_options
target_compile_options(${1:target}${2: BEFORE} $3`!p
snip.rv=complete(t[3], ['INTERFACE', 'PUBLIC', 'PRIVATE'])`
${4:options})
endsnippet
snippet target_include_directories
target_include_directories(${1:target}${2: SYSTEM}${3: BEFORE} $4`!p
snip.rv=complete(t[4], ['INTERFACE', 'PUBLIC', 'PRIVATE'])`
${5:includes})
endsnippet
snippet target_link_libraries
target_link_libraries(${1:target} $2`!p
snip.rv=complete(t[2], ['PRIVATE', 'PUBLIC', 'INTERFACE'])`
${3:libraries})
endsnippet
snippet try_compile "cmake"
try_compile(${1:result} ${2:binary_dir} ${3:source_dir}
${4:project_name}${5: ${6:target_name}}${7: CMAKE_FLAGS ${8:flags}}${9:
OUTPUT_VARIABLE ${10:variable}})
endsnippet
snippet try_compile "raw"
try_compile(${1:result} ${2:binary_dir}${3: SOURCES} ${4:source_files}${5:
CMAKE_FLAGS ${6:flags}}${7:
COMPILE_DEFINITIONS ${8:flags}}${9:
LINK_LIBRARIES ${10:libs}}${11:
OUTPUT_VARIABLE ${12:output}}${13:
COPY_FILE ${14:file_name} COPY_FILE_ERROR ${15:copy_result}})
endsnippet
snippet try_run
try_run(${1:run_result} ${2:compile_result}
${3:binary_dir} ${4:source_file}${5: CMAKE_FLAGS ${6:flags}}${7:
COMPILE_DEFINITIONS ${8:flags}}${9:
COMPILE_OUTPUT_VARIABLE ${10:compile_output}}${11:
RUN_OUTPUT_VARIABLE ${12:run_output}}${13:
OUTPUT_VARIABLE ${14:output}}${15:
ARGS ${16:arguments}})
endsnippet
snippet unset
unset(${1:variable}${2: $3`!p snip.rv=complete(t[3], ['CACHE', 'PARENT_SCOPE'])`})
endsnippet
snippet variable_watch
variable_watch(${1:variable}${2: ${3:command}})
endsnippet
snippet while
while(${1:condition})
$0
endwhile()
endsnippet
snippet $< "Generator expression" i
$<$1:$0>
endsnippet

106
UltiSnips/cpp.snippets Normal file
View File

@ -0,0 +1,106 @@
extends c
priority 1
snippet enum "Enumeration"
enum ${1:name} {
$0
};
endsnippet
snippet for "For loop, index or range"
for (${1:auto} ${2:index} ${4/(.*;.*)|(\w*)/(?1:=:\:)/} ${4:${3:0}; $2 < ${5:count}; $2${6:++}}) {
$0
}
endsnippet
snippet struct "Structure"
struct ${1:name} {
$0
};
endsnippet
snippet class "Class"
class ${1:name} {
public:
${1/(\w+)\s.*/$1/}();
~${1/(\w+)\s.*/$1/}();
$0
};
endsnippet
snippet template "Template"
template <class ${1:T}$2>$0
endsnippet
snippet namespace "Named or anonymous namespace"
namespace $1${1/(\w+)/ /}{
$0
} // namespace${1/(\w*)/(?1: $1:)/}
endsnippet
snippet const_cast "Const cast" i
const_cast<$1>($2)$0
endsnippet
snippet dynamic_cast "Dynamic cast" i
dynamic_cast<$1>($2)$0
endsnippet
snippet static_cast "Static cast" i
static_cast<$1>($2)$0
endsnippet
snippet reinterpret_cast "Reinterpret case" i
reinterpret_cast<$1>($2)$0
endsnippet
snippet [] "Labmda function" i
[$1]($2)${3/(.*)/(?1: -> ::)/}$3 {$0}
endsnippet
snippet static_assert "Static assert"
static_assert($1, "$2");
endsnippet
snippet noisy "A noise class"
class noisy_t {
public:
noisy_t() { puts(__PRETTY_FUNCTION__); }
noisy_t(const noisy_t &) { puts(__PRETTY_FUNCTION__); }
noisy_t(noisy_t &&) { puts(__PRETTY_FUNCTION__); }
noisy_t &operator=(const noisy_t &) { puts(__PRETTY_FUNCTION__); return *this; }
noisy_t &operator=(noisy_t &&) { puts(__PRETTY_FUNCTION__); return *this; }
~noisy_t() { puts(__PRETTY_FUNCTION__); }
};
endsnippet
snippet std::enable_if "Enable if"
typename std::enable_if<${1:condition}${2:, ${3:type}}>::type
endsnippet
snippet std::fprintf "std::fprintf ..."
std::fprintf(${1:stderr}, "${2:%s}\n"${2/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$3${2/([^%]|%%)*(%.)?.*/(?2:\);)/}
endsnippet
snippet std::printf "std::printf ..."
std::printf("${1:%s}\n"${1/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$2${1/([^%]|%%)*(%.)?.*/(?2:\);)/}
endsnippet
snippet printf_sv "printf for std::string_view"
printf("$1: %.*s\n", static_cast<int>(${1:view}.size()), $1.data());$0
endsnippet
snippet externc "extern C block"
#ifdef __cplusplus
extern "C" {
#endif
$0
#ifdef __cplusplus
}
#endif
endsnippet

View File

@ -0,0 +1,228 @@
snippet gtest "Google Test main function"
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
endsnippet
snippet TEST "Google Test TEST" b
TEST(${1:test_case_name}, ${2:test_name}) {
$0
}
endsnippet
snippet fixture "Google Test fixture class"
class ${1:test_case_name} : public ${2:::testing::Test} {
protected:
virtual void SetUp() override {
}
virtual void TearDown() override {
}
$0
};
endsnippet
snippet TEST_F "Google Test TEST_F" b
TEST_F(${1:test_case_name}, ${2:test_name}) {
$0
}
endsnippet
snippet ASSERT_EQ "Google Test ASSERT_EQ"
ASSERT_EQ($1, $2);
endsnippet
snippet EXPECT_EQ "Google Test EXPECT_EQ"
EXPECT_EQ($1, $2);
endsnippet
snippet ASSERT_NE "Google Test ASSERT_NE"
ASSERT_NE($1, $2);
endsnippet
snippet EXPECT_NE "Google Test EXPECT_NE"
EXPECT_NE($1, $2);
endsnippet
snippet ASSERT_LT "Google Test ASSERT_LT"
ASSERT_LT($1, $2);
endsnippet
snippet EXPECT_LT "Google Test EXPECT_LT"
EXPECT_LT($1, $2);
endsnippet
snippet ASSERT_LE "Goolge Test ASSERT_LE"
ASSERT_LE($1, $2);
endsnippet
snippet EXPECT_LE "Goolge Test EXPECT_LE"
EXPECT_LE($1, $2);
endsnippet
snippet ASSERT_GT "Google Test ASSERT_GT"
ASSERT_GT($1, $2);
endsnippet
snippet EXPECT_GT "Google Test EXPECT_GT"
EXPECT_GT($1, $2);
endsnippet
snippet ASSERT_GE "Google Test ASSERT_GE"
ASSERT_GE($1, $2);
endsnippet
snippet EXPECT_GE "Google Test EXPECT_GE"
EXPECT_GE($1, $2);
endsnippet
snippet ASSERT_STREQ "Google Test ASSERT_STREQ"
ASSERT_STREQ($1, $2);
endsnippet
snippet EXPECT_STREQ "Google Test EXPECT_STREQ"
EXPECT_STREQ($1, $2);
endsnippet
snippet ASSERT_STRNE "Google Test ASSERT_STRNE"
ASSERT_STRNE($1, $2);
endsnippet
snippet EXPECT_STRNE "Google Test EXPECT_STRNE"
EXPECT_STRNE($1, $2);
endsnippet
snippet ASSERT_STRCASEEQ "Google Test ASSERT_STRCASEEQ"
ASSERT_STRCASEEQ($1, $2);
endsnippet
snippet EXPECT_STRCASEEQ "Google Test EXPECT_STRCASEEQ"
EXPECT_STRCASEEQ($1, $2);
endsnippet
snippet ASSERT_STRCASENE "Google Test ASSERT_STRCASENE"
ASSERT_STRCASENE($1, $2);
endsnippet
snippet EXPECT_STRCASENE "Google Test EXPECT_STRCASENE"
EXPECT_STRCASENE($1, $2);
endsnippet
snippet ASSERT_TRUE "Google Test ASSERT_TRUE"
ASSERT_TRUE($1);$0
endsnippet
snippet EXPECT_TRUE "Google Test EXPECT_TRUE"
EXPECT_TRUE($1);$0
endsnippet
snippet ASSERT_FALSE "Google Test ASSERT_FALSE"
ASSERT_FALSE($1);$0
endsnippet
snippet EXPECT_FALSE "Google Test EXPECT_FALSE"
EXPECT_FALSE($1);$0
endsnippet
snippet ASSERT_THROW "Google Test ASSERT_THROW"
ASSERT_THROW(${1:statement}, ${2:exception_type});
endsnippet
snippet EXPECT_THROW "Google Test EXPECT_THROW"
EXPECT_THROW(${1:statement}, ${2:exception_type});
endsnippet
snippet ASSERT_ANY_THROW "Google Test ASSERT_ANY_THROW"
ASSERT_ANY_THROW(${1:statement});
endsnippet
snippet EXPECT_ANY_THROW "Google Test EXPECT_ANY_THROW"
EXPECT_ANY_THROW(${1:statement});
endsnippet
snippet ASSERT_NO_THROW "Google Test ASSERT_NO_THROW"
ASSERT_NO_THROW(${1:statement});
endsnippet
snippet EXPECT_NO_THROW "Google Test EXPECT_NO_THROW"
EXPECT_NO_THROW(${1:statement});
endsnippet
snippet ASSERT_PRED1 "Google Test ASSERT_PRED1"
ASSERT_PRED1(${1:predicate}, ${2:value});
endsnippet
snippet EXPECT_PRED1 "Google Test EXPECT_PRED1"
EXPECT_PRED1(${1:predicate}, ${2:value});
endsnippet
snippet ASSERT_PRED2 "Google Test ASSERT_PRED1"
ASSERT_PRED2(${1:predicate}, ${2:first}, ${3:second});
endsnippet
snippet EXPECT_PRED2 "Google Test EXPECT_PRED1"
EXPECT_PRED2(${1:predicate}, ${2:first}, ${3:second});
endsnippet
snippet ASSERT_PRED_FORMAT1 "Google Test ASSERT_PRED_FORMAT1"
ASSERT_PRED_FORMAT1(${1:predicate}, ${2:value});
endsnippet
snippet EXPECT_PRED1 "Google Test EXPECT_PRED_FORMAT1"
EXPECT_PRED_FORMAT1(${1:predicate}, ${2:value});
endsnippet
snippet ASSERT_PRED_FORMAT2 "Google Test ASSERT_PRED_FORMAT1"
ASSERT_PRED_FORMAT2(${1:predicate}, ${2:first}, ${3:second});
endsnippet
snippet EXPECT_PRED_FORMAT2 "Google Test EXPECT_PRED_FORMAT1"
EXPECT_PRED_FORMAT2(${1:predicate}, ${2:first}, ${3:second});
endsnippet
snippet ASSERT_FLOAT_EQ "Google Test ASSERT_FLOAT_EQ"
ASSERT_FLOAT_EQ(${1:expected}, ${2:actual});
endsnippet
snippet EXPECT_FLOAT_EQ "Google Test EXPECT_FLOAT_EQ"
EXPECT_FLOAT_EQ(${1:expected}, ${2:actual});
endsnippet
snippet ASSERT_DOUBLE_EQ "Google Test ASSERT_DOUBLE_EQ"
ASSERT_DOUBLE_EQ(${1:expected}, ${2:actual});
endsnippet
snippet EXPECT_DOUBLE_EQ "Google Test EXPECT_DOUBLE_EQ"
EXPECT_DOUBLE_EQ(${1:expected}, ${2:actual});
endsnippet
snippet ASSERT_NEAR "Google Test ASSERT_NEAR"
ASSERT_NEAR(${1:value1}, ${2:value2}, ${3:abs_error});
endsnippet
snippet EXPECT_NEAR "Google Test EXPECT_NEAR"
EXPECT_NEAR(${1:value1}, ${2:value2}, ${3:abs_error});
endsnippet
snippet ASSERT_DEATH "Google Test ASSERT_DEATH"
ASSERT_DEATH(${1:statement}, ${2:regex});
endsnippet
snippet EXPECT_DEATH "Google Test EXPECT_DEATH"
EXPECT_DEATH(${1:statement}, ${2:regex});
endsnippet
snippet ASSERT_DEATH_IF_SUPPORTED "Google Test ASSERT_DEATH_IF_SUPPORTED"
ASSERT_DEATH_IF_SUPPORTED(${1:statement}, ${2:regex});
endsnippet
snippet EXPECT_DEATH_IF_SUPPORTED "Google Test EXPECT_DEATH_IF_SUPPORTED"
EXPECT_DEATH_IF_SUPPORTED(${1:statement}, ${2:regex});
endsnippet
snippet ASSERT_EXIT "Google Test ASSERT_EXIT"
ASSERT_EXIT(${1:statement}, ${2:predicate}, ${3:regex});
endsnippet
snippet EXPECT_EXIT "Google Test EXPECT_EXIT"
EXPECT_EXIT(${1:statement}, ${2:predicate}, ${3:regex});
endsnippet
snippet SCOPED_TRACE "Google Test SCOPED_TRACE"
SCOPED_TRACE("${1:message}");
endsnippet
snippet ASSERT_NO_FATAL_FAILURE "Google Test ASSERT_NO_FATAL_FAILURE"
ASSERT_NO_FATAL_FAILURE(${1:statement});
endsnippet
snippet EXPECT_NO_FATAL_FAILURE "Google Test EXPECT_NO_FATAL_FAILURE"
EXPECT_NO_FATAL_FAILURE(${1:statement});
endsnippet
snippet SUCCEED "Google Test SUCCEED"
SUCCEED();
endsnippet
snippet FAIL "Google Test FAIL"
FAIL();
endsnippet
snippet ADD_FAILURE "Google Test ADD_FAILURE"
ADD_FAILURE();
endsnippet
snippet ADD_FAILURE_AT "Google test ADD_FAILURE_AT"
ADD_FAILURE_AT("${1:file_path}", ${2:line_number});
endsnippet

64
UltiSnips/html.snippets Normal file
View File

@ -0,0 +1,64 @@
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
elif len(opts) == 0:
return "-error"
return '(' + '|'.join(opts) + ')'
endglobal
# html snippets
snippet div "HTML div tag"
<div$1>
$0
</div>
endsnippet
snippet nav "HTML nav tag"
<nav$1>
$0
</nav>
endsnippet
snippet class "HTML class tag"
class="$1"$0
endsnippet
snippet img "HTML img tag"
<img src="$1"${2: alt="$3"}/>
endsnippet
snippet span "HTML span tag" i
<span>$0</span>
endsnippet
snippet code "HTML code tab" i
<code>$0</code>
endsnippet
snippet section "HTML section tag"
<section$1>
$0
</section>
endsnippet
snippet table "HTML table"
<table>
<thead>
<tr>
<th>$1</th>
</tr>
</thead>
<tbody>
<tr>
<td>$0</td>
</tr>
</tbody>
</table>
endsnippet
snippet text-align "CSS text-align"
style="text-align:$1`!p snip.rv=complete(t[1], ['left', 'center', 'right'])`"
endsnippet

View File

@ -0,0 +1,56 @@
# snippet completion function
global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
elif len(opts) == 0:
return "-error"
return '(' + '|'.join(opts) + ')'
endglobal
# shared fragment style completion list
global !p
def fragments():
return ['grow', 'shrink', 'fade-in', 'fade-out', 'current-visible',
'highlight-current-blue', 'highlight-red', 'highlight-green',
'highlight-blue']
endglobal
# reveal.js html snippets
snippet frag "reveal.js fragment class" i
fragment $1`!p snip.rv=complete(t[1], fragments())`
endsnippet
snippet bg "reveal.js data-background"
data-background="$1"$0
endsnippet
snippet trans "reveal.js data-transition"
data-transition="$1`!p snip.rv=complete(t[1], ['slide', 'none', 'fade',
'convex', 'concave', 'zoom'])`"
endsnippet
snippet index "reveal.js data-fragment-index"
data-fragment-index="$1"$0
endsnippet
snippet notes "reveal.js speaker notes"
<aside class="notes">
$0
</aside>
endsnippet
# reveal.js markdown section snippets
snippet mdsec "Reveal.js markdown section"
<section data-markdown>
<script type="text/template">
$0
</script>
</section>
endsnippet
snippet mdelem "reveal.js markdown element"
<!-- .element: class="$1"$2 -->$0
endsnippet

View File

@ -0,0 +1,5 @@
snippet function "JS function"
function $1($2) {
$3
}
endsnippet

View File

@ -0,0 +1,19 @@
snippet ``` "code section"
\`\`\`${1:language}
$0
\`\`\`
endsnippet
snippet [] "url link"
[$1]($2)$0
endsnippet
snippet ! "image link"
![${1:alt}](${2:src}${3: "${4:title}"})
endsnippet
snippet --- "frontmatter" b
---
$0
---
endsnippet

3
UltiSnips/notes.snippets Normal file
View File

@ -0,0 +1,3 @@
snippet * "bullet point" b
* $0
endsnippet

24
UltiSnips/python.snippets Normal file
View File

@ -0,0 +1,24 @@
snippet main "Python main stub"
#!/usr/bin/env python
"""${1:docstring}"""
from argparse import ArgumentParser
def main():
"""Main entry point."""
parser = ArgumentParser(description='${2:description}')
parser.add_argument('${3:argument}')
args = parser.parse_args()$0
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
pass
endsnippet
snippet debug "Set ipdb breakpoint"
import ipdb; ipdb.set_trace()
endsnippet

144
UltiSnips/redmine.snippets Normal file
View File

@ -0,0 +1,144 @@
snippet issue "Issue Link"
#${1:id}${2:!#note-${3:id}}$0
endsnippet
snippet link "Link"
"${2:name}":${3:url}$0
endsnippet
snippet email "Email Link"
"${1:name}":mailto:${2:email}$0
endsnippet
snippet acronym "Acronym"
${1:acronym}(${2:meaning})$0
endsnippet
snippet acr "Acronym"
${1:acronym}(${2:meaning})$0
endsnippet
snippet bold "Bold"
*$1*$0
endsnippet
snippet b "Bold"
*$1*$0
endsnippet
snippet italic "Italic"
_$1_$0
endsnippet
snippet i "Italic"
_$1_$0
endsnippet
snippet bolditalic "Bold Italic"
*_$1_*$0
endsnippet
snippet bi "Bold Italic"
*_$1_*$0
endsnippet
snippet strike "Strike-through"
-$1-$0
endsnippet
snippet super "Superscript"
^$1^$0
endsnippet
snippet sub "Supscript"
~$1~$0
endsnippet
snippet mono "Inline Monospace"
@$1@$0
endsnippet
snippet m "Inline Monospace"
@$1@$0
endsnippet
snippet f "Inline Monospace"
@$1@$0
endsnippet
snippet red "Red Color"
%{color:red}${1:text}%$0
endsnippet
snippet lred "Red Color"
%{color:lightred}${1:text}%$0
endsnippet
snippet green "Green Color"
%{color:green}${1:text}%$0
endsnippet
snippet lgreen "Light Green Color"
%{color:green}${1:text}%$0
endsnippet
snippet blue "Blue Color"
%{color:blue}${1:text}%$0
endsnippet
snippet lblue "Light Blue Color"
%{color:lightblue}${1:text}%$0
endsnippet
snippet yellow "Yellow Color"
%{color:yellow}${1:text}%$0
endsnippet
snippet lyellow "Light Yellow Color"
%{color:lightyellow}${1:text}%$0
endsnippet
snippet bred "Red Background Color"
%{background:red}${1:text}%$0
endsnippet
snippet lbred "Light Red Background Color"
%{background:red}${1:text}%$0
endsnippet
snippet bgreen "Green Background Color"
%{background:green}${1:text}%$0
endsnippet
snippet lbgreen "Light Green Background Color"
%{background:green}${1:text}%$0
endsnippet
snippet bblue "Blue Background Color"
%{background:blue}${1:text}%$0
endsnippet
snippet lbblue "Light Blue Background Color"
%{background:lightblue}${1:text}%$0
endsnippet
snippet byellow "Yellow Background Color"
%{background:yellow}${1:text}%$0
endsnippet
snippet blyellow "Light Yellow Background Color"
%{background:lightyellow}${1:text}%$0
endsnippet
snippet # "Heading 1" b
h1. $0
endsnippet
snippet ## "Heading 2" b
h2. $0
endsnippet
snippet ### "Heading 3" b
h3. $0
endsnippet
snippet rule "Horizontal Rule" b
----
$0
endsnippet
snippet pre "Predefined Block" b
<pre>$0</pre>
endsnippet
snippet code "Monospace Block" b
<pre><code class="${1:cpp}">
$0
</code></pre>
endsnippet

31
UltiSnips/vim.snippets Normal file
View File

@ -0,0 +1,31 @@
snippet command "VIM command"
command! $1${2:cmd} ${3:rep}$0
endsnippet
snippet function "VIM function"
function! ${1:name}($2)
$0
endfunction
endsnippet
snippet if "VIM if statement"
if ${1:condition}
$0
endif
endsnippet
snippet py "Python block" b
python << endpython
$0
endpython
endsnippet
snippet get "VIM get function"
get(${1:g:}, "${2:name}", ${3:default})$0
endsnippet
snippet augroup "autocmd group"
augroup ${1:name}
$0
augroup END
endsnippet

21
UltiSnips/xml.snippets Normal file
View File

@ -0,0 +1,21 @@
snippet t "XML inline tag" i
<${1:tag}>${2:content}</${1/([\w:._-]+).*/$1/}>
endsnippet
snippet a "XML attribute" i
${1:attrib}="${2:value}"$0
endsnippet
snippet < "XML inline tag" i
<${1:tag}>${2:content}</${1/([\w:._-]+).*/$1/}>
endsnippet
snippet tb "XML inline tag" i
<${1:tag}>
${2:content}
</${1/([\w:._-]+).*/$1/}>
endsnippet
snippet <! "XML comment" i
<!-- $1 -->$0
endsnippet

View File

@ -0,0 +1,38 @@
snippet function "api <function> block"
<function>${1:name}
<return>${3:type}
<doxygen><return>${4:description}</return></doxygen></return>$0
<doxygen><brief>${2:description}</brief></doxygen>
</function>
endsnippet
snippet param "api <param> block"
<param>${1:variable}<type>${2:type>}</type>
<doxygen><param form="${3:[in|out|inout]}">${4:description}</param></doxygen></param>$0
endsnippet
snippet struct "api <struct> block"
<struct>${1:name}<scope>
<member>${3:name}<type>${4:type}</type>
<doxygen><brief>${5:description}</brief></doxygen></member>$0
</scope>
<doxygen><brief>${2:description}</brief></doxygen>
</struct>
endsnippet
snippet member "api struct <member> block"
<member>${1:name}<type>${2:type}</type>
<doxygen><brief>${3:description}</brief></doxygen></member>
endsnippet
snippet enum "api <enum> block"
<typedef>${1:name}<type>
<enum>$1<scope>
<constant>${3:name}${4:<value>${5:value}</value>}
<doxygen><brief>${6:description}</brief></doxygen></constant>$0
</scope></enum></type>
<doxygen><brief>${2:description}</brief></doxygen>
</typedef>
endsnippet
snippet constant "api enum <constant> block"
<constant>${1:name}${2:<value>${3:value}</value>}
<doxygen><brief>${4:description}</brief></doxygen></constant>$0
endsnippet

7
UltiSnips/zsh.snippets Normal file
View File

@ -0,0 +1,7 @@
snippet % "Non-visible prompt span" i
%{$1%}$0
endsnippet
snippet %F "256 color code span" i
%F{$1}$0
endsnippet

View File

@ -0,0 +1,2 @@
" Force *.md to markdown filetype
au BufNewFile,BufReadPost *.md set filetype=markdown

View File

@ -0,0 +1,2 @@
" Force *.cl to OpenCL C filetype
au BufNewFile,BufReadPost *.cl set filetype=opencl

View File

@ -0,0 +1,7 @@
function! s:set_lit_cfg_filetype()
set filetype=python
ALEDisableBuffer
endfunction
au BufNewFile,BufReadPost lit.cfg call s:set_lit_cfg_filetype()
au BufNewFile,BufReadPost lit.local.cfg call s:set_lit_cfg_filetype()

View File

@ -0,0 +1,2 @@
" Force *.td to tablegen filetype
au BufNewFile,BufReadPost *.td set filetype=tablegen

View File

@ -0,0 +1,3 @@
setlocal textwidth=76
setlocal formatoptions+=n
setlocal spell

View File

@ -1,2 +1,18 @@
" Surround visual block in #if 0 block
vmap 0 V'<[ ki#if 0<Esc>'>o#endif<Esc>
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
" Set 'commentstring' to single line comment style.
setlocal commentstring=//%s
" Stop automatic new lines which typing long single liners
setlocal textwidth=0
" Map K to get YouCompleteMe documentation
nnoremap K :YcmCompleter GetDoc<CR>
" "ys{motion}t" turns "word" -> "TODO(word):"
let b:surround_{char2nr("t")} = "TODO(\r):"
" "ys{motion}/" turns "text" into "/*text*/"
let b:surround_{char2nr("/")} = "/*\r*/"
" Map K to get YouCompleteMe documentation
nnoremap K :YcmCompleter GetDoc<CR>
" DoxygenToolkit
nnoremap <leader>d :Dox<CR>

8
after/ftplugin/cmake.vim Normal file
View File

@ -0,0 +1,8 @@
" Enable syntax folding, see .vim/after/syntax/cmake.vim
setlocal foldmethod=syntax
" Set comment string
setlocal commentstring=#%s
" Custon surround for creating a CMake variable from a text object.
" "ys{motion}v" makes a variable out of "<text-obj>" - > "${<text-obj>}"
let b:surround_{char2nr("v")} = "${\r}"

4
after/ftplugin/cpp.vim Normal file
View File

@ -0,0 +1,4 @@
" Map K to get YouCompleteMe documentation
nnoremap K :YcmCompleter GetDoc<CR>
" DoxygenToolkit
nnoremap <leader>d :Dox<CR>

View File

@ -0,0 +1,17 @@
if !has("win32") || has("gui_running")
" Enable spell check when available
setlocal spell
endif
" TODO: Auto-wrap doesn't work properly with the list format pattern
" Set up format options
" t - Auto-wrap text using textwidth
" n - When formatting text, recognize numbered lists
" q - Allow formatting of comments with 'gq'
" o - Automatically insert the current comment leader after hitting 'o' or
" 'O' in Normal mode
set formatoptions+=tnqo
" A pattern that is used to recognize a list header
set formatlistpat="^\s*\d\+\.\s\+\|^[-*+]\s\+"

View File

@ -0,0 +1,5 @@
" Setup tabs
setlocal noexpandtab
setlocal tabstop=8
setlocal shiftwidth=8
setlocal softtabstop=8

View File

@ -0,0 +1,3 @@
setlocal commentstring=//%s
" "ys{motion}/" turns "text" into "/*text*/"
let b:surround_{char2nr("/")} = "/*\r*/"

8
after/ftplugin/help.vim Normal file
View File

@ -0,0 +1,8 @@
" Disable spell checking which is enabled for text files
setlocal nospell
" Don't keep cursor from buffer edges
setlocal scrolloff=0
" Don't display line numbers
setlocal nonumber norelativenumber

2
after/ftplugin/html.vim Normal file
View File

@ -0,0 +1,2 @@
" Set text and tab width for certain file types
setlocal textwidth=80

1
after/ftplugin/json.vim Normal file
View File

@ -0,0 +1 @@
setlocal conceallevel=2

3
after/ftplugin/llvm.vim Normal file
View File

@ -0,0 +1,3 @@
" Include % and . in keywords for easier navigation of ID's
setlocal iskeyword+=%
setlocal iskeyword+=.

2
after/ftplugin/make.vim Normal file
View File

@ -0,0 +1,2 @@
" Set up tabs
setlocal tabstop=8

View File

@ -0,0 +1,63 @@
" Enable spelling except in Windows terminal vim.
if has('syntax') && (!has('win32') || has('gui_running'))
setlocal spell
endif
setlocal foldmethod=expr
setlocal foldexpr=MarkdownFold(v:lnum)
setlocal conceallevel=2
setlocal concealcursor=n
setlocal commentstring=<!--%s-->
function! MarkdownFold(lnum)
let l:line = getline(a:lnum)
if match(l:line, '^######.*$') == 0
return '>6'
elseif match(l:line, '^#####.*$') == 0
return '>5'
elseif match(l:line, '^####.*$') == 0
return '>4'
elseif match(l:line, '^###.*$') == 0
return '>3'
elseif match(l:line, '^##.*$') == 0
return '>2'
elseif match(l:line, '^#.*$') == 0
return '>1'
endif
return '='
endfunction
" Max 80 chars wide.
setlocal textwidth=80
" Custom surround for markdown link syntax.
" "ys{motion}l" makes link out of "word" -> "[word]()"
let b:surround_{char2nr("l")} = "[\r]()"
" "ys{motion}L" makes link out of "url" -> "[](url)"
let b:surround_{char2nr("L")} = "[](\r)"
finish " Experiment functionality (disabled). {{{
nnoremap yh :<C-U>set opfunc=<SID>yh<CR>g@
function! <SID>yh(type, ...)
let save_reg_h = getreg('h')
" Mark positions
let begin = getpos("'[")[1:2]
let end = getpos("']")[1:2]
" Append after the end mark.
call cursor(end)
call setreg('h', ']()')
normal "hp
" Prepend before the begin mark.
call cursor(begin)
call setreg('h', '[')
normal "hP
" Place cursor at final )
call cursor(end)
normal f)
call setreg('h', save_reg_h)
endfunction
" }}}

4
after/ftplugin/notes.vim Normal file
View File

@ -0,0 +1,4 @@
" Override default hightlight groups
hi link notesTodo Todo
hi link notesDoneMarker Note
hi link notesXXX Important

View File

@ -0,0 +1 @@
setlocal commentstring=//%s

78
after/ftplugin/python.vim Normal file
View File

@ -0,0 +1,78 @@
" Set up tabs
setlocal expandtab
setlocal tabstop=8
setlocal shiftwidth=4
setlocal softtabstop=4
" Set up text width
setlocal textwidth=0
" Set up format options
" c - Auto-wrap comments using textwidth
" r - Automatically insert the current comment leader after hitting <Enter>
" in Insert mode
" o - Automatically insert the current comment leader after hitting 'o' or
" 'O' in Normal mode.
setlocal formatoptions+=cro
" Highlight erroneous tabs
syn match pythonTabError '\t\+'
hi pythonTabError ctermbg=red guibg=red
" Set up file encoding
setlocal encoding=utf-8
" Set up file format
setlocal fileformat=unix
let g:python_highlight_all=1
" Mappings
nnoremap K :YcmCompleter GetDoc<CR>
" Set custom fold expression
setlocal foldmethod=expr
setlocal foldexpr=PythonFold(v:lnum)
" Custom fold function greedyily matches following blank lines
function! PythonFold(lnum)
let l:line = getline(a:lnum)
" TODO: Folding breaks around method decorators:
" class Class(object):
" @property
" def method(self):
" pass
" Blank lines, comments, and docstrings use previous fold level
if l:line =~ '^\(\s*\|#.*\|"\(""\)\=.*\)$'
return '='
" Keywords beginning indented blocks start a fold
elseif l:line =~ '^\s*class\s\+\w*(\w*)\s*:\s*$'
\ || l:line =~ '^\s*def\s\+\w\+\s*(.*)\s*:\s*$'
\ || l:line =~ '^\s*if\s\+.*:\s*$'
\ || l:line =~ '^\s*elif\s\+.*:\s*$'
\ || l:line =~ '^\s*else\s*:\s*$'
\ || l:line =~ '^\s*for\s\+.*:\s*$'
\ || l:line =~ '^\s*while\s\+.*:\s*$'
\ || l:line =~ '^\s*try\s*:\s*$'
\ || l:line =~ '^\s*except\s*.*:\s*$'
return '>'.string((indent(a:lnum) / &shiftwidth) + 1)
" Opening curly braces, not in a string, add a fold level
elseif l:line =~ '{' && l:line !~ '}' && l:line !~ "'.*{.*'" && l:line !~ '".*{.*"'
return 'a1'
" Closing curly braces, not in a string, substract a fold level
elseif l:line =~ '}' && l:line !~ '{' && l:line !~ "'.*}.*'" && l:line !~ '".*}.*"'
return 's1'
" Opening square braces, not in a string, add a fold level
elseif l:line =~ '[' && l:line !~ ']' && l:line !~ "'.*[.*'" && l:line !~ '".*].*"'
return 'a1'
" Closing square braces, not in a string, substract a fold level
elseif l:line =~ ']' && l:line !~ '[' && l:line !~ "'.*].*'" && l:line !~ '".*[.*"'
return 's1'
" Calculate lines with a lower indent than the previous line
elseif indent(a:lnum) < indent(a:lnum - 1)
return string((indent(a:lnum) / &shiftwidth))
endif
" Finally all unmatched lines use fold level from previous line
return '='
endfunction

View File

@ -0,0 +1,5 @@
" Disable expansion of tabs in snippet files as snippets must correctly insert
" the current filetypes tab settings.
setlocal noexpandtab
" Set tab width to 4 spaces as UltiSnips supports inline python.
setlocal tabstop=4 shiftwidth=4 softtabstop=4

1
after/ftplugin/tags.vim Normal file
View File

@ -0,0 +1 @@
setlocal noexpandtab

4
after/ftplugin/text.vim Normal file
View File

@ -0,0 +1,4 @@
if !has("win32") || has("gui_running")
setlocal spell
endif
setlocal textwidth=80

43
after/ftplugin/vim.vim Normal file
View File

@ -0,0 +1,43 @@
" Mapping for Vim help of the word under cursor.
nnoremap K :help <C-r><C-w><CR>
" Set custom fold expression
setlocal foldmethod=expr
setlocal foldexpr=VimFold(v:lnum)
" Custom fold expresson folds control flow keywords and fold markers
function! VimFold(lnum)
let l:line = getline(a:lnum)
if l:line =~ '^python\s\+<<\s\+\w\+\s*$'
let b:vim_python_end = substitute(l:line, '^python\s\+<<\s\+\(\w\+\)\s*$', '\1', '')
return 'a1'
endif
if exists('b:vim_python_end')
if l:line =~ '^'.b:vim_python_end.'\s*$'
unlet b:vim_python_end
return 's1'
endif
else
if l:line =~ '^\s*fun\(c\(tion\)\=\)\=!\=\s\+.*#\=\w*(.*).*$'
\ || l:line =~ '^\s*if\s*.*$'
\ || l:line =~ '^\s*el\(se\)\=\s*.*$'
\ || l:line =~ '^\s*elseif\=\s*.*$'
\ || l:line =~ '^\s*wh\(ile\)\=\s*.*$'
\ || l:line =~ '^\s*for\s*.*$'
\ || l:line =~ '^\s*try\s*$'
\ || l:line =~ '^\s*cat\(ch\)\=\s*.*$'
\ || l:line =~ '^\s*fina\(lly\)\=\s*$'
return '>'.string((indent(a:lnum) / &shiftwidth) + 1)
elseif l:line =~ '^\s*endfun\(c\(tion\)\=\)\=\s*$'
\ || l:line =~ '^\s*en\(dif\)\=\s*$'
\ || l:line =~ '^\s*endw\(hile\)\=\s*$'
\ || l:line =~ '^\s*endfor\=\s*$'
\ || l:line =~ '^\s*endt\(ry\)\=\s*$'
return '<'.string((indent(a:lnum) / &shiftwidth) + 1)
endif
endif
return '='
endfunction

5
after/ftplugin/yaml.vim Normal file
View File

@ -0,0 +1,5 @@
" Set up tabs
setlocal expandtab
setlocal tabstop=8
setlocal shiftwidth=4
setlocal softtabstop=4

2
after/gitcommit.vim Normal file
View File

@ -0,0 +1,2 @@
set formatoptions+=tnqo
set formatlistpat="^\s*\d\+\.\s\+\|^[-*+]\s\+"

View File

@ -4,8 +4,21 @@ set tabstop=2
set shiftwidth=2
set softtabstop=2
if has('smartindent')
" Do smart autoindenting when starting a new line
set smartindent
endif
" Copy indent from current line when starting a new line
set autoindent
" Code
set cino=N-sg1h1l1(0
if has('cindent')
" The 'cinoptions' affect the way 'cindent' re-indents lines in a C program.
" * N-s - don't indent inside C++ namespace
" * E-s - don't indent inside C++ extern "C"
" * g1 - indent scope declarations {public,private,protected} 1 space
" * h1 - indent statements after scope declarations 1 space more
" * l1 - indent case statement scopes with the case label
" * (0 - don't indent inside unclosed parenthesis
" * i4 - indent C++ class base declarations and constructor initializers
set cinoptions=N-sE-sg1h1l(01i4
endif

84
after/syntax/c.vim Normal file
View File

@ -0,0 +1,84 @@
" Language: C
" Description: Additional C syntax file.
if !exists('c_no_function') && !exists('cpp_no_function')
" Match function expressions: expr()
" ^^^^
syn match cFunction '\h\w*\ze\s*(' display
hi default link cFunction Function
endif
if !exists('c_no_delimiters') && !exists('cpp_no_delimiters')
" Match delimiter expressions: (expr) {expr} ;
" ^ ^ ^ ^ ^
syn match cDelimiter '[()\[\];:]' display
" Match curly braces with cDelimiter highlight group
syn region cBlock matchgroup=cDelimiter start="{" end="}" transparent fold
hi link cUserCont Delimiter
hi default link cDelimiter cUserCont
endif
if !exists('c_no_operators') && !exists('cpp_no_operators')
" Match: * - . ^ ~ + - , & | ! % ? < > order is important
" ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
syn match cOperator '[\*=\.\^\~+\-,&|!%?><]' display
" Match: / don't override // or /* or */
" ^
syn match cOperator '[\*\/]\@<!\/[\*\/]\@!' display
" Match: (expr) ? true : false;
" ^ ^
syn region cOperatorTernary matchgroup=cOperator start='?' end='::\@!' transparent display
endif
let g:c_doxygen = get(g:, 'c_doxygen', 1)
if exists('g:c_doxygen') && g:c_doxygen
" Match: comment leader
syn match cDoxygenLeader '^\s*\/\/\/' contained display
" Match: @param name description.
" ^^^^
syn region cDoxygenSpecial matchgroup=cDoxygenComment start='@param\(\[\(\|in\|out\|in,out\)\]\)\=\s\+' end='\(\s\|$\)' contained display
" Match: @tparam name description.
" ^^^^
syn region cDoxygenSpecial matchgroup=cDoxygenComment start='@tparam\s\+' end='\(\s\|$\)' contained display
" Match: `markdown monospace`
" ^^^^^^^^^^^^^^^^^^^^
syn region cDoxygenSpecial start='`' end='`' contained contains=@NoSpell,cDoxygenLeader
" Match: @brief Description. @return Description.
" ^^^^^^^^^^^^ ^^^^^^^^^^^^
syn region cDoxygenSpecial matchgroup=cDoxygenComment start='@\(brief\|return[s]\?\|attention\)' end='\(^\s*\/\/\/\s*$\|^\(\s*\/\/\/\)\@!\|^\s*\/\/\/\s*\ze@\)' contained contains=@Spell,cDoxygenLeader,cDoxygenSpecial display
" Match: @def MACRO
" ^^^^^
syn region cDoxygenSpecial matchgroup=cDoxygenComment start='@def' end='$' contained display
" Match: something ///< description.
" ^^^^^^^^^^^^
syn region cDoxygenSpecial matchgroup=cDoxygenComment oneline start='\/\/\/<' end='$' display
" Match: @todo description.
" ^^^^
syn match cDoxygenTodo '@\zstodo' contained display
" Match: http://some.url
" ^^^^^^^^^^^^^^^
syn match cDoxygenUrl /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*/ contained display
" Match: /// Description.
" ^^^^^^^^^^^^^^^^
syn region cDoxygenComment fold start='^\s*\/\/\/' end='^\(\s*\/\/\/\)\@!' contains=@Spell,cDoxygenSpecial,cDoxygenTodo,cDoxygenUrl
hi default link cDoxygenComment cComment
hi default link cDoxygenLeader cDoxygenComment
hi default link cDoxygenSpecial SpecialComment
hi default link cDoxygenTodo Todo
hi default link cDoxygenUrl Underlined
endif

6
after/syntax/cmake.vim Normal file
View File

@ -0,0 +1,6 @@
" Transparent regions to enable syntax based folding.
syntax region cmakeIfBlock start='if(.*)' end='endif(.*)' fold transparent keepend
syntax region cmakeFunctionBlock start='function(.*)' end='endfunction(.*)' fold transparent keepend
syntax region cmakeMacroBlock start='macro(.*)' end='endmacro(.*)' fold transparent keepend
syntax region cmakeForeachBlock start='foreach(.*)' end='endforeach(.*)' fold transparent keepend
syntax region cmakeWhileBlock start='while(.*)' end='endwhile(.*)' fold transparent keepend

2
after/syntax/css.vim Normal file
View File

@ -0,0 +1,2 @@
hi link cssBlock Delimiter
hi link cssNoise Delimiter

9
after/syntax/diff.vim Normal file
View File

@ -0,0 +1,9 @@
" Change diff highlight groups
hi default diffBold term=bold cterm=bold gui=bold
hi link diffType diffBold
hi link diffFile diffBold
hi link diffSubname None
hi link diffNewFile diffBold
hi link diffAdded DiffAdd
hi link diffRemoved DiffDelete
syn match diffBold "^index\s\w\+\.\.\w\+\s\w\+$"

4
after/syntax/html.vim Normal file
View File

@ -0,0 +1,4 @@
syn keyword htmlTodo TODO
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=htmlTodo,@htmlPreProc,@Spell
hi default link htmlTodo Todo

View File

@ -0,0 +1,4 @@
syn region javaScriptBlock matchgroup=javaScriptParens start="{" end="}" transparent fold
hi link javaScriptBraces Delimiter
hi link javaScriptParens Delimiter

3
after/syntax/json.vim Normal file
View File

@ -0,0 +1,3 @@
hi link jsonKeyword Function
hi link jsonNull Constant
hi link jsonQuote Delimiter

56
after/syntax/markdown.vim Normal file
View File

@ -0,0 +1,56 @@
" Customize highlight groups
hi link markdownCode Special
hi link markdownCodeDelimiter PreProc
hi link markdownHeadingDelimiter PreProc
hi link markdownLinkDelimiter PreProc
hi link markdownLinkTextDelimiter PreProc
hi link markdownUrl Include
hi link markdownError None
" Add match for GitHub style check boxes
syn match markdownCheckboxTick '\[\zsx\ze\]' contained
syn match markdownCheckboxDelimiter '\[[ x]\]' contained contains=markdownCheckboxTick
syn match markdownCheckbox '\s*\* \[[ x]\] ' contains=markdownCheckboxDelimiter,markdownListMarker
syn region markdownCheckboxDone start='\s*\* \ze\[x\] ' keepend end='\ze\(\n^\s*\*\|\n^\s*\n\)' contains=markdownCheckbox,@markdownCheckboxDoneInline
if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1
let s:concealends = ' concealends'
endif
exe 'syn region markdownCheckboxItalic matchgroup=markdownCheckboxItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart,@Spell contained' . s:concealends
exe 'syn region markdownCheckboxItalic matchgroup=markdownCheckboxItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart,@Spell contained' . s:concealends
exe 'syn region markdownCheckboxBold matchgroup=markdownCheckboxBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic,@Spell contained' . s:concealends
exe 'syn region markdownCheckboxBold matchgroup=markdownCheckboxBoldDelimiter start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic,@Spell contained' . s:concealends
exe 'syn region markdownCheckboxBoldItalic matchgroup=markdownCheckboxBoldItalicDelimiter start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart,@Spell contained' . s:concealends
exe 'syn region markdownCheckboxBoldItalic matchgroup=markdownCheckboxBoldItalicDelimiter start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart,@Spell contained' . s:concealends
syn region markdownCheckboxCode matchgroup=markdownCheckboxCodeDelimiter start="`" end="`" keepend contains=markdownLineStart contained
syn region markdownCheckboxCode matchgroup=markdownCheckboxCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart contained
syn cluster markdownInline contains=markdownLineBreak,markdownLinkText,markdownItalic,markdownBold,markdownCode,markdownEscape,@htmlTop,markdownError
syn cluster markdownCheckboxDoneInline contains=markdownLineBreak,markdownLinkText,markdownCheckboxItalic,markdownCheckboxBold,markdownCheckboxBoldItalic,markdownCheckboxCode,markdownEscape,@htmlTop,markdownError
hi link markdownCheckboxTick markdownListMarker
hi link markdownCheckboxDelimiter PreProc
hi link markdownCheckboxDone Comment
call CloneHighlightGroupWithAttributes('markdownCheckboxDone',
\ 'markdownCheckboxItalic', 'italic')
hi link markdownCheckboxItalicDelimiter markdownCheckboxItalic
call CloneHighlightGroupWithAttributes('markdownCheckboxDone',
\ 'markdownCheckboxBold', 'bold')
hi link markdownCheckboxBoldDelimiter markdownCheckboxBold
call CloneHighlightGroupWithAttributes('markdownCheckboxDone',
\ 'markdownCheckboxBoldItalic', 'bold,italic')
hi link markdownCheckboxBoldItalicDelimiter markdownCheckboxBoldItalic
hi link markdownCheckboxCode SpecialComment
hi link markdownCheckboxCodeDelimiter PreProc
" Add match for TODO
syn match markdownTodo 'TODO'
hi link markdownTodo Todo
syn cluster markdownInline add=markdownTodo
" yaml frontmatter
syn region markdownFrontmatter matchgroup=markdownFrontmatterDelimiter start='\%^---' keepend end='^---' contains=@markdownHighlightyaml
hi default link markdownFrontmatterDelimiter Special

1
after/syntax/netrw.vim Normal file
View File

@ -0,0 +1 @@
hi link netrwSuffixes SpecialComment

6
after/syntax/zsh.vim Normal file
View File

@ -0,0 +1,6 @@
syn region zshParentheses matchgroup=Delimiter start='(' skip='\\)' end=')' transparent fold
syn region zshParentheses matchgroup=Delimiter start="{" end="}" transparent fold
" TODO: Correctly highlight associative array assignment, see zshVariableDef.
hi link zshOperator Operator

View File

@ -0,0 +1,73 @@
" fresh palette
let g:airline#themes#fresh#palette = {}
" NORMAL mode
let s:N1 = ['#005f00', '#afdf00', 22, 148, '']
let s:N2 = ['#ffffff', '#005f00', 15, 22, '']
let s:N3 = ['#ffffff', '#121212', 15, 233, 'bold']
let s:W = ['#000000', '#8700df', 232, 92, '']
let s:E = ['#000000', '#990000', 232, 160]
let g:airline#themes#fresh#palette.normal =
\ airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#fresh#palette.normal.airline_warning = s:W
let g:airline#themes#fresh#palette.normal.airline_error = s:E
let g:airline#themes#fresh#palette.normal_modified = {
\ 'airline_c': ['#ffffff', '#5f0087', 15, 53, 'bold'], }
" INSERT mode
let s:I1 = ['#0000df', '#00dfff', 20, 45, '']
let s:I2 = ['#ffffff', '#005fdf', 15, 26, '']
let s:I3 = ['#ffffff', '#121212', 15, 233, 'bold']
let g:airline#themes#fresh#palette.insert =
\ airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#fresh#palette.insert.airline_warning = s:W
let g:airline#themes#fresh#palette.insert.airline_error = s:E
let g:airline#themes#fresh#palette.insert_modified =
\ g:airline#themes#fresh#palette.normal_modified
let g:airline#themes#fresh#palette.insert_paste = {
\ 'airline_a': [s:I1[0], '#ffff00', s:I1[2], 11, ''], }
" REPLACE mode
let s:R1 = [s:I2[0], '#af0000', s:I2[2], 124, '']
let s:R2 = ['#ffffff', '#5f0000', 15, 52, '']
let s:R3 = ['#ffffff', '#121212', 15, 233, 'bold']
let g:airline#themes#fresh#palette.replace =
\ airline#themes#generate_color_map(s:R1, s:R2, s:R3)
let g:airline#themes#fresh#palette.replace.airline_warning = s:W
let g:airline#themes#fresh#palette.replace.airline_error = s:E
let g:airline#themes#fresh#palette.replace_modified =
\ g:airline#themes#fresh#palette.normal_modified
" VISAUL mode
let s:V1 = ['#ff5f00', '#ff5f00', 52, 208, '']
let s:V2 = ['#ffffff', '#005f00', 15, 124, '']
let s:V3 = ['#ffffff', '#121212', 15, 233, 'bold']
let g:airline#themes#fresh#palette.visual =
\ airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#fresh#palette.visual.airline_warning = s:W
let g:airline#themes#fresh#palette.visual.airline_error = s:E
let g:airline#themes#fresh#palette.visual_modified =
\ g:airline#themes#fresh#palette.normal_modified
" INACTIVE mode
let s:IA1 = ['#4e4e4e', '#1c1c1c', 239, 234, '']
let s:IA2 = ['#4e4e4e', '#262626', 239, 235, '']
let s:IA3 = ['#ffffff', '#121212', 15, 233, 'bold']
let g:airline#themes#fresh#palette.inactive =
\ airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
let g:airline#themes#fresh#palette.inactive.airline_warning = s:IA2
let g:airline#themes#fresh#palette.inactive.airline_error = s:IA2
let g:airline#themes#fresh#palette.inactive_modified = {
\ 'airline_c': ['#875faf', '', 97, '', ''], }
let g:airline#themes#fresh#palette.accents = {
\ 'red': [ '#ff0000' , '' , 160 , '' ] }
if !get(g:, 'loaded_ctrlp', 0)
finish
endif
let g:airline#themes#fresh#palette.ctrlp =
\ airline#extensions#ctrlp#generate_color_map(
\ ['#d7d7ff', '#5f00af', 189, 55, ''],
\ ['#ffffff', '#875fd7', 231, 98, ''],
\ ['#5f00af', '#ffffff', 55, 231, 'bold'] )

56
autoload/do.vim Normal file
View File

@ -0,0 +1,56 @@
" Save, call isort on, then reload a python file.
function! do#isort()
if &filetype !=# 'python'
echohl ErrorMsg
echomsg 'isort only supports python files'
echohl None
endif
write!
call system('isort '.expand('%:p'))
edit!
endfunction
" Strip white space from right of all lines.
" TODO: Make do#rstrip_lines work on a range
function! do#rstrip_lines()
let l:line = line('.')
let l:column = col('.')
execute '%s/\s\+$//e'
nohlsearch
call cursor(l:line, l:column)
endfunction
" TODO: Strip white space from left of all lines, retains relative indentation.
" Set the tab width for the current filetype
function! do#set_tab_width(width)
execute 'setlocal tabstop='.a:width
execute 'setlocal shiftwidth='.a:width
execute 'setlocal softtabstop='.a:width
echo 'Tab width is now '.a:width
endfunction
" Toggle GitHub style bullet checkbox
function! do#toggle_checkbox()
" Get current line
let l:line = getline('.')
" Get the ' ' or 'x' character from within the task bullet
let l:pattern = '[-\*+] \[\zs[ x]\ze]'
let l:char = matchstr(l:line, l:pattern)
" Toggle the ' ' or 'x' character
if l:char ==? 'x'
let l:char = ' '
else
let l:char = 'x'
endif
" Replace the current line with a new one
call setline(line('.'), substitute(l:line, l:pattern, l:char, ''))
endfunction
" Show highlight groups under the cursor
function! do#cursor_highlight_groups()
let l:hi = synIDattr(synID(line('.'),col('.'),1),'name')
let l:trans = synIDattr(synID(line('.'),col('.'),0),'name')
let l:lo = synIDattr(synIDtrans(synID(line('.'),col('.'),1)),'name')
echo 'hi<'.l:hi.'> trans<'.l:trans.'> lo<'.l:lo.'>'
endfunction

25
autoload/platform.vim Normal file
View File

@ -0,0 +1,25 @@
let s:is_windows = 0
let s:is_mac = 0
let s:is_linux = 0
if has("win32")
let s:is_windows = 1
elseif has("unix")
if has("mac")
let s:is_mac = 1
else
let s:is_linux = 1
endif
endif
function! platform#is_windows()
return s:is_windows
endfunction
function! platform#is_mac()
return s:is_mac
endfunction
function! platform#is_linux()
return s:is_linux
endfunction

2454
autoload/plug.vim Normal file

File diff suppressed because it is too large Load Diff

@ -1 +0,0 @@
Subproject commit 5f70ae6025e951f0154e3940d123138adffa4c88

View File

@ -1,106 +0,0 @@
# This file is a minimal clang-format vim-integration. To install:
# - Change 'binary' if clang-format is not on the path (see below).
# - Add to your .vimrc:
#
# map <C-I> :pyf <path-to-this-file>/clang-format.py<cr>
# imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr>
#
# The first line enables clang-format for NORMAL and VISUAL mode, the second
# line adds support for INSERT mode. Change "C-I" to another binding if you
# need clang-format on a different key (C-I stands for Ctrl+i).
#
# With this integration you can press the bound key and clang-format will
# format the current line in NORMAL and INSERT mode or the selected region in
# VISUAL mode. The line or region is extended to the next bigger syntactic
# entity.
#
# You can also pass in the variable "l:lines" to choose the range for
# formatting. This variable can either contain "<start line>:<end line>" or
# "all" to format the full file. So, to format the full file, write a function
# like:
# :function FormatFile()
# : let l:lines="all"
# : pyf <path-to-this-file>/clang-format.py
# :endfunction
#
# It operates on the current, potentially unsaved buffer and does not create
# or save any files. To revert a formatting, just undo.
import difflib
import json
import subprocess
import sys
import vim
# set g:clang_format_path to the path to clang-format if it is not on the path
# Change this to the full path if clang-format is not on the path.
binary = 'clang-format'
if vim.eval('exists("g:clang_format_path")') == "1":
binary = vim.eval('g:clang_format_path')
# Change this to format according to other formatting styles. See the output of
# 'clang-format --help' for a list of supported styles. The default looks for
# a '.clang-format' or '_clang-format' file to indicate the style that should be
# used.
style = 'file'
fallback_style = None
if vim.eval('exists("g:clang_format_fallback_style")') == "1":
fallback_style = vim.eval('g:clang_format_fallback_style')
def main():
# Get the current text.
buf = vim.current.buffer
text = '\n'.join(buf)
# Determine range to format.
if vim.eval('exists("l:lines")') == '1':
lines = vim.eval('l:lines')
else:
lines = '%s:%s' % (vim.current.range.start + 1, vim.current.range.end + 1)
# Determine the cursor position.
cursor = int(vim.eval('line2byte(line("."))+col(".")')) - 2
if cursor < 0:
print 'Couldn\'t determine cursor position. Is your file empty?'
return
# Avoid flashing an ugly, ugly cmd prompt on Windows when invoking clang-format.
startupinfo = None
if sys.platform.startswith('win32'):
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE
# Call formatter.
command = [binary, '-style', style, '-cursor', str(cursor)]
if lines != 'all':
command.extend(['-lines', lines])
if fallback_style:
command.extend(['-fallback-style', fallback_style])
if vim.current.buffer.name:
command.extend(['-assume-filename', vim.current.buffer.name])
p = subprocess.Popen(command,
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
stdin=subprocess.PIPE, startupinfo=startupinfo)
stdout, stderr = p.communicate(input=text)
# If successful, replace buffer contents.
if stderr:
print stderr
if not stdout:
print ('No output from clang-format (crashed?).\n' +
'Please report to bugs.llvm.org.')
else:
lines = stdout.split('\n')
output = json.loads(lines[0])
lines = lines[1:]
sequence = difflib.SequenceMatcher(None, vim.current.buffer, lines)
for op in reversed(sequence.get_opcodes()):
if op[0] is not 'equal':
vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]
if output.get('IncompleteFormat'):
print 'clang-format: incomplete (syntax errors)'
vim.command('goto %d' % (output['Cursor'] + 1))
main()

394
colors/basic-light.vim Normal file
View File

@ -0,0 +1,394 @@
" basic-light -- a simple light vim theme
"
" Maintainer: zcodes <zcodes@qq.com>
" Version: 1.0
"
" the theme file original copyed from Tomorrow theme.
" see: https://github.com/chriskempson/vim-tomorrow-theme.git for it.
"
" the colors choose from Google Material Desgin and some from Sublime Text
" LAZY theme.
" default gui colors
let s:foreground = "263238"
let s:background = "fbfbfb"
let s:selection = "e3fc8d"
let s:line = "d5d5d5"
let s:comment = "7c7c7c"
let s:red = "d62a28"
let s:orange = "ff7800"
let s:yellow = "eab700"
let s:green = "409b1c"
let s:aqua = "00897b"
let s:blue = "3b5bb5"
let s:purple = "673ab7"
let s:window = "cfd8dc"
set background=light
hi clear
syntax reset
let g:colors_name = "basic-light"
if has("gui_running") || &t_Co == 88 || &t_Co == 256
" Returns an approximate grey index for the given grey level
fun <SID>grey_number(x)
if &t_Co == 88
if a:x < 23
return 0
elseif a:x < 69
return 1
elseif a:x < 103
return 2
elseif a:x < 127
return 3
elseif a:x < 150
return 4
elseif a:x < 173
return 5
elseif a:x < 196
return 6
elseif a:x < 219
return 7
elseif a:x < 243
return 8
else
return 9
endif
else
if a:x < 14
return 0
else
let l:n = (a:x - 8) / 10
let l:m = (a:x - 8) % 10
if l:m < 5
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" Returns the actual grey level represented by the grey index
fun <SID>grey_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 46
elseif a:n == 2
return 92
elseif a:n == 3
return 115
elseif a:n == 4
return 139
elseif a:n == 5
return 162
elseif a:n == 6
return 185
elseif a:n == 7
return 208
elseif a:n == 8
return 231
else
return 255
endif
else
if a:n == 0
return 0
else
return 8 + (a:n * 10)
endif
endif
endfun
" Returns the palette index for the given grey index
fun <SID>grey_colour(n)
if &t_Co == 88
if a:n == 0
return 16
elseif a:n == 9
return 79
else
return 79 + a:n
endif
else
if a:n == 0
return 16
elseif a:n == 25
return 231
else
return 231 + a:n
endif
endif
endfun
" Returns an approximate colour index for the given colour level
fun <SID>rgb_number(x)
if &t_Co == 88
if a:x < 69
return 0
elseif a:x < 172
return 1
elseif a:x < 230
return 2
else
return 3
endif
else
if a:x < 75
return 0
else
let l:n = (a:x - 55) / 40
let l:m = (a:x - 55) % 40
if l:m < 20
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" Returns the actual colour level for the given colour index
fun <SID>rgb_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 139
elseif a:n == 2
return 205
else
return 255
endif
else
if a:n == 0
return 0
else
return 55 + (a:n * 40)
endif
endif
endfun
" Returns the palette index for the given R/G/B colour indices
fun <SID>rgb_colour(x, y, z)
if &t_Co == 88
return 16 + (a:x * 16) + (a:y * 4) + a:z
else
return 16 + (a:x * 36) + (a:y * 6) + a:z
endif
endfun
" Returns the palette index to approximate the given R/G/B colour levels
fun <SID>colour(r, g, b)
" Get the closest grey
let l:gx = <SID>grey_number(a:r)
let l:gy = <SID>grey_number(a:g)
let l:gz = <SID>grey_number(a:b)
" Get the closest colour
let l:x = <SID>rgb_number(a:r)
let l:y = <SID>rgb_number(a:g)
let l:z = <SID>rgb_number(a:b)
if l:gx == l:gy && l:gy == l:gz
" There are two possibilities
let l:dgr = <SID>grey_level(l:gx) - a:r
let l:dgg = <SID>grey_level(l:gy) - a:g
let l:dgb = <SID>grey_level(l:gz) - a:b
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
let l:dr = <SID>rgb_level(l:gx) - a:r
let l:dg = <SID>rgb_level(l:gy) - a:g
let l:db = <SID>rgb_level(l:gz) - a:b
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
if l:dgrey < l:drgb
" Use the grey
return <SID>grey_colour(l:gx)
else
" Use the colour
return <SID>rgb_colour(l:x, l:y, l:z)
endif
else
" Only one possibility
return <SID>rgb_colour(l:x, l:y, l:z)
endif
endfun
" Returns the palette index to approximate the 'rrggbb' hex string
fun <SID>rgb(rgb)
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
return <SID>colour(l:r, l:g, l:b)
endfun
" Sets the highlighting for the given group
fun <SID>X(group, fg, bg, attr)
if a:fg != ""
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
endif
if a:bg != ""
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
endfun
" Vim Highlighting
call <SID>X("Normal", s:foreground, s:background, "none")
call <SID>X("LineNr", s:comment, "", "none")
call <SID>X("NonText", s:foreground, "", "none")
call <SID>X("SpecialKey", s:blue, "", "none")
call <SID>X("Search", s:foreground, s:selection, "none")
call <SID>X("TabLine", s:foreground, s:background, "reverse")
call <SID>X("StatusLine", s:window, s:foreground, "reverse")
call <SID>X("StatusLineNC", s:window, s:comment, "reverse")
call <SID>X("VertSplit", s:window, s:window, "none")
call <SID>X("Visual", "", s:selection, "none")
call <SID>X("Directory", s:blue, "", "none")
call <SID>X("ModeMsg", s:green, "", "none")
call <SID>X("MoreMsg", s:green, "", "none")
call <SID>X("Question", s:green, "", "none")
call <SID>X("WarningMsg", s:red, "", "none")
call <SID>X("MatchParen", "", s:selection, "none")
call <SID>X("Folded", s:comment, s:background, "none")
call <SID>X("FoldColumn", s:comment, s:background, "none")
if version >= 700
call <SID>X("CursorLine", "", s:line, "none")
call <SID>X("CursorColumn", "", s:line, "none")
call <SID>X("PMenu", s:foreground, s:selection, "none")
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
call <SID>X("SignColumn", "", s:background, "none")
end
if version >= 703
call <SID>X("ColorColumn", "", s:line, "none")
end
" Standard Highlighting
call <SID>X("Comment", s:comment, "", "none")
call <SID>X("Todo", s:red, s:background, "none")
call <SID>X("Title", s:comment, "", "none")
call <SID>X("Cursor", "", s:foreground, "none")
call <SID>X("Identifier", s:aqua, "", "none")
call <SID>X("Statement", s:foreground, "", "none")
call <SID>X("Conditional", s:foreground, "", "none")
call <SID>X("Repeat", s:foreground, "", "none")
call <SID>X("Structure", s:purple, "", "none")
call <SID>X("Function", s:blue, "", "none")
call <SID>X("Constant", s:foreground, "", "none")
call <SID>X("String", s:green, "", "none")
call <SID>X("Special", s:foreground, "", "none")
call <SID>X("PreProc", s:aqua, "", "none")
call <SID>X("Operator", s:foreground, "", "none")
call <SID>X("Type", s:blue, "", "none")
call <SID>X("Define", s:purple, "", "none")
call <SID>X("Include", s:blue, "", "none")
call <SID>X("Number", s:orange, "", "none")
" Vim Highlighting
call <SID>X("vimCommand", s:blue, "", "none")
" C Highlighting
call <SID>X("cType", s:blue, "", "")
call <SID>X("cStorageClass", s:blue, "", "")
call <SID>X("cConditional", s:red, "", "")
call <SID>X("cRepeat", s:red, "", "")
" PHP Highlighting
call <SID>X("phpVarSelector", s:aqua, "", "")
call <SID>X("phpKeyword", s:blue, "", "")
call <SID>X("phpRepeat", s:red, "", "")
call <SID>X("phpConditional", s:blue, "", "")
call <SID>X("phpStatement", s:blue, "", "")
call <SID>X("phpMemberSelector", s:foreground, "", "")
" Ruby Highlighting
call <SID>X("rubySymbol", s:green, "", "")
call <SID>X("rubyConstant", s:aqua, "", "")
call <SID>X("rubyAttribute", s:blue, "", "")
call <SID>X("rubyInclude", s:blue, "", "")
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
call <SID>X("rubyCurlyBlock", s:orange, "", "")
call <SID>X("rubyStringDelimiter", s:green, "", "")
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
call <SID>X("rubyConditional", s:purple, "", "")
call <SID>X("rubyRepeat", s:purple, "", "")
call <SID>X("rubyIdentifier", s:orange, "", "")
" Python Highlighting
call <SID>X("pythonInclude", s:red, "", "")
call <SID>X("pythonStatement", s:aqua, "", "")
call <SID>X("pythonConditional", s:blue, "", "")
call <SID>X("pythonRepeat", s:blue, "", "")
call <SID>X("pythonException", s:blue, "", "")
call <SID>X("pythonFunction", s:purple, "", "")
call <SID>X("pythonSelf", s:comment, "", "")
call <SID>X("pythonOperator", s:blue, "", "")
call <SID>X("pythonExtraOperator", s:blue, "", "")
call <SID>X("pythonClass", s:blue, "", "")
call <SID>X("pythonDecorator", s:yellow, "", "")
call <SID>X("pythonDocstring", s:comment, "", "")
call <SID>X("pythonBuiltinObj", s:red, "", "")
call <SID>X("pythonBuiltinType", s:orange, "", "")
call <SID>X("pythonNumber", s:orange, "", "")
" Go Highlighting
call <SID>X("goStatement", s:purple, "", "")
call <SID>X("goConditional", s:purple, "", "")
call <SID>X("goRepeat", s:purple, "", "")
call <SID>X("goException", s:purple, "", "")
call <SID>X("goDeclaration", s:blue, "", "")
call <SID>X("goConstants", s:yellow, "", "")
call <SID>X("goBuiltins", s:orange, "", "")
" CoffeeScript Highlighting
call <SID>X("coffeeKeyword", s:purple, "", "")
call <SID>X("coffeeConditional", s:purple, "", "")
" JavaScript Highlighting
call <SID>X("javaScriptBraces", s:foreground, "", "")
call <SID>X("javaScriptFunction", s:purple, "", "")
call <SID>X("javaScriptConditional", s:purple, "", "")
call <SID>X("javaScriptRepeat", s:purple, "", "")
call <SID>X("javaScriptNumber", s:orange, "", "")
call <SID>X("javaScriptMember", s:orange, "", "")
" HTML Highlighting
call <SID>X("htmlTag", s:blue, "", "")
call <SID>X("htmlTagName", s:blue, "", "")
call <SID>X("htmlArg", s:aqua, "", "")
call <SID>X("htmlScriptTag", s:blue, "", "")
" Diff Highlighting
call <SID>X("diffAdded", "", s:green, "none")
call <SID>X("diffRemoved", "", s:red, "none")
call <SID>X("diffChanged", "", s:yellow, "none")
call <SID>X("DiffAdd", s:window, s:green, "none")
call <SID>X("DiffDelete", s:window, s:red, "none")
call <SID>X("DiffChange", s:window, s:yellow, "none")
call <SID>X("DiffText", s:background, s:yellow, "none")
call <SID>X("GitGutterAdd", s:green, "", "")
call <SID>X("GitGutterDelete", s:red, "", "")
call <SID>X("GitGutterChange", s:yellow, "", "")
call <SID>X("GitGutterChangeDelete", s:orange, "", "")
" YAML
call <SID>X("yamlBlockMappingKey", s:blue, "", "")
" Delete Functions
delf <SID>X
delf <SID>rgb
delf <SID>colour
delf <SID>rgb_colour
delf <SID>rgb_level
delf <SID>rgb_number
delf <SID>grey_colour
delf <SID>grey_level
delf <SID>grey_number
endif

View File

@ -1,10 +1,10 @@
set background=dark
if exists("syntax_on")
if exists('syntax_on')
syntax reset
endif
let g:colors_name="fresh"
let g:colors_name='fresh'
if has("gui_running") || &t_Co == 256
if has('gui_running') || &t_Co == 256
"" Colors {{{
let s:color_map = {
\ '0': '#000000', '1': '#800000', '2': '#008000', '3': '#808000',
@ -76,126 +76,126 @@ if has("gui_running") || &t_Co == 256
"" Functions {{{
function! s:hi(group, fg, bg, attr)
exec "hi clear ".a:group
if a:fg != ""
exec "hi ".a:group." ctermfg=".a:fg." guifg="s:color_map[a:fg]
exec 'hi clear '.a:group
if a:fg !=# ''
exec 'hi '.a:group.' ctermfg='.a:fg.' guifg='s:color_map[a:fg]
endif
if a:bg != ""
exec "hi ".a:group." ctermbg=".a:bg." guibg=".s:color_map[a:bg]
if a:bg !=# ''
exec 'hi '.a:group.' ctermbg='.a:bg.' guibg='.s:color_map[a:bg]
endif
if a:attr != ""
exec "hi ".a:group." cterm=".a:attr." gui=".a:attr
if a:attr !=# ''
exec 'hi '.a:group.' cterm='.a:attr.' gui='.a:attr
endif
endfunction
"" }}}
"" Highlight Groups {{{
call s:hi("ColorColumn", "", "", "")
call s:hi("Conceal", "", "", "")
call s:hi("Cursor", "", "", "reverse")
call s:hi("CursorIM", "", "", "")
call s:hi("CursorColumn", "235", "", "")
call s:hi("CursorLine", "", "", "")
call s:hi("Directory", "", "", "")
call s:hi("DiffAdd", "2", "236", "")
call s:hi("DiffChange", "", "", "")
call s:hi("DiffDelete", "1", "236", "")
call s:hi("DiffText", "200", "236", "")
call s:hi("ErrorMsg", "1", "", "")
call s:hi("VertSplit", "235", "235", "")
call s:hi("Folded", "35", "233", "")
call s:hi("FoldColumn", "", "", "")
call s:hi("SignColumn", "", "", "")
call s:hi("IncSearch", "", "", "reverse")
call s:hi("LineNr", "240", "233", "")
call s:hi("CursorLineNr", "34", "233", "")
call s:hi("MatchParen", "", "", "")
call s:hi("ModeMsg", "", "", "")
call s:hi("MoreMsg", "12", "", "")
call s:hi("NonText", "", "", "")
call s:hi("Normal", "7", "232", "")
call s:hi("Pmenu", "", "235", "")
call s:hi("PmenuSel", "", "", "reverse")
call s:hi("PmenuSbar", "", "", "")
call s:hi("PmenuThumb", "", "", "")
call s:hi("Question", "", "", "")
call s:hi("Search", "11", "", "")
call s:hi("SpecialKey", "", "", "")
call s:hi("SpellBad", "160", "", "")
call s:hi("SpellCap", "12", "", "")
call s:hi("SpellLocal", "5", "", "")
call s:hi("SpellRare", "3", "", "")
call s:hi("StatusLine", "233", "233", "")
call s:hi("StatusLineNC", "", "235", "")
call s:hi("TabLine", "246", "235", "bold")
call s:hi("TabLineFill", "", "235", "")
call s:hi("TabLineSel", "248", "", "bold")
call s:hi("Title", "", "", "bold")
call s:hi("Visual", "", "235", "")
call s:hi("VisualNOS", "", "", "")
call s:hi("WarningMsg", "5", "", "")
call s:hi("WildMenu", "", "", "")
call s:hi("Menu", "", "", "")
call s:hi("Scrollbar", "", "", "")
call s:hi("Tooltip", "", "", "")
call s:hi('ColorColumn', '', '', '')
call s:hi('Conceal', '', '', '')
call s:hi('Cursor', '', '', 'reverse')
call s:hi('CursorIM', '', '', '')
call s:hi('CursorColumn', '235', '', '')
call s:hi('CursorLine', '', '0', '')
call s:hi('Directory', '', '', '')
call s:hi('DiffAdd', '2', '', '')
call s:hi('DiffChange', '', '', '')
call s:hi('DiffDelete', '1', '', '')
call s:hi('DiffText', '3', '', '')
call s:hi('ErrorMsg', '1', '', '')
call s:hi('VertSplit', '235', '235', '')
call s:hi('Folded', '8', '233', '')
call s:hi('FoldColumn', '', '', '')
call s:hi('SignColumn', '', '233', '')
call s:hi('IncSearch', '', '', 'reverse')
call s:hi('LineNr', '240', '233', '')
call s:hi('CursorLineNr', '34', '233', '')
call s:hi('MatchParen', '', '', '')
call s:hi('ModeMsg', '', '', '')
call s:hi('MoreMsg', '12', '', '')
call s:hi('NonText', '', '', '')
call s:hi('Normal', '7', '232', '')
call s:hi('Pmenu', '', '235', '')
call s:hi('PmenuSel', '', '', 'reverse')
call s:hi('PmenuSbar', '', '', '')
call s:hi('PmenuThumb', '', '', '')
call s:hi('Question', '69', '', '')
call s:hi('Search', '11', '', '')
call s:hi('SpecialKey', '238', '', '')
call s:hi('SpellBad', '166', '', '')
call s:hi('SpellCap', '132', '', '')
call s:hi('SpellLocal', '5', '', '')
call s:hi('SpellRare', '3', '', '')
call s:hi('StatusLine', '15', '233', '')
call s:hi('StatusLineNC', '', '235', '')
call s:hi('TabLine', '246', '235', 'bold')
call s:hi('TabLineFill', '', '235', '')
call s:hi('TabLineSel', '248', '', 'bold')
call s:hi('Title', '', '', 'bold')
call s:hi('Visual', '', '235', '')
call s:hi('VisualNOS', '', '', '')
call s:hi('WarningMsg', '92', '', '')
call s:hi('WildMenu', '22', '148', 'bold')
call s:hi('Menu', '', '', '')
call s:hi('Scrollbar', '', '', '')
call s:hi('Tooltip', '', '', '')
"" }}}
"" Syntax Groups {{{
call s:hi("Comment", "8", "", "")
call s:hi('Comment', '8', '', '')
call s:hi("Constant", "162", "", "")
call s:hi("String", "173", "", "")
call s:hi("Character", "221", "", "")
call s:hi("Number", "", "", "")
call s:hi("Boolean", "", "", "")
call s:hi("Float", "", "", "")
call s:hi('Constant', '168', '', '')
call s:hi('String', '173', '', '')
call s:hi('Character', '221', '', '')
call s:hi('Number', '162', '', '')
call s:hi('Boolean', '162', '', '')
call s:hi('Float', '162', '', '')
call s:hi("Identifier", "60", "", "")
call s:hi("Function", "71", "", "")
call s:hi('Identifier', '60', '', '')
call s:hi('Function', '71', '', '')
call s:hi("Statement", "30", "", "")
call s:hi("Conditional", "69", "", "")
call s:hi("Repeat", "69", "", "")
call s:hi("Label", "69", "", "")
call s:hi("Operator", "166", "", "")
call s:hi("Keyword", "", "", "")
call s:hi("Exception", "", "", "")
call s:hi('Statement', '30', '', '')
call s:hi('Conditional', '69', '', '')
call s:hi('Repeat', '69', '', '')
call s:hi('Label', '69', '', '')
call s:hi('Operator', '166', '', '')
call s:hi('Keyword', '', '', '')
call s:hi('Exception', '', '', '')
call s:hi("PreProc", "102", "", "")
call s:hi("Include", "66", "", "")
call s:hi("Define", "", "", "")
call s:hi("Macro", "", "", "")
call s:hi("PreCondit", "61", "", "")
call s:hi('PreProc', '102', '', '')
call s:hi('Include', '65', '', '')
call s:hi('Define', '', '', '')
call s:hi('Macro', '', '', '')
call s:hi('PreCondit', '61', '', '')
call s:hi("Type", "73", "", "")
call s:hi("StorageClass", "66", "", "")
call s:hi("Structure", "69", "", "")
call s:hi("Typedef", "73", "", "")
call s:hi('Type', '75', '', '')
call s:hi('StorageClass', '66', '', '')
call s:hi('Structure', '69', '', '')
call s:hi('Typedef', '75', '', '')
call s:hi("Special", "179", "", "")
call s:hi("SpecialChar", "", "", "")
call s:hi("Tag", "", "", "")
call s:hi("Delimiter", "", "", "")
call s:hi("SpecialComment", "", "", "")
call s:hi("Debug", "", "", "")
call s:hi('Special', '179', '', '')
call s:hi('SpecialChar', '', '', '')
call s:hi('Tag', '', '', '')
call s:hi('Delimiter', '', '', '')
call s:hi('SpecialComment', '246', '', '')
call s:hi('Debug', '', '', '')
call s:hi("Underlined", "33", "", "underline")
call s:hi("Ignore", "", "", "")
call s:hi("Error", "", "", "")
call s:hi("Todo", "202", "", "bold")
call s:hi('Underlined', '38', '', 'underline')
call s:hi('Ignore', '', '', '')
call s:hi('Error', '1', '', '')
call s:hi('Todo', '202', '', 'bold')
"" }}}
"" Custom Groups {{{
call s:hi("Block", "", "", "")
call s:hi("Note", "40", "", "bold")
call s:hi("Important", "220", "", "bold")
call s:hi("Research", "202", "", "bold")
call s:hi('Block', '', '', '')
call s:hi('Note', '40', '', 'bold')
call s:hi('Important', '220', '', 'bold')
call s:hi('Research', '202', '', 'bold')
call s:hi("SyntasticErrorSign", "160", "", "bold")
call s:hi("SyntasticWarningSign", "129", "", "bold")
call s:hi("SyntasticErrorLine", "", "", "")
call s:hi("SyntasticWarningLine", "", "", "")
call s:hi("SyntasticError", "160", "", "")
call s:hi("SyntasticWarning", "129", "", "")
call s:hi('SyntasticErrorSign', '160', '233', 'bold')
call s:hi('SyntasticWarningSign', '129', '233', 'bold')
call s:hi('SyntasticErrorLine', '', '', '')
call s:hi('SyntasticWarningLine', '', '', '')
call s:hi('SyntasticError', '160', '', '')
call s:hi('SyntasticWarning', '129', '', '')
"" }}}
endif

56
colors/morning-white.vim Normal file
View File

@ -0,0 +1,56 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Apr 15
" This color scheme uses a light grey background.
" First remove all existing highlighting.
set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "morning"
hi Normal ctermfg=Black ctermbg=White guifg=Black guibg=grey90
" Groups used in the 'highlight' and 'guicursor' options default value.
hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White
hi IncSearch term=reverse cterm=reverse gui=reverse
hi ModeMsg term=bold cterm=bold gui=bold
hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse ctermbg=grey guibg=grey80
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=NONE
hi lCursor guibg=Cyan guifg=NONE
hi Directory term=bold ctermfg=DarkBlue guifg=Blue
hi LineNr term=underline ctermfg=Brown guifg=Brown
hi MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi NonText term=bold ctermfg=Blue gui=bold guifg=Blue guibg=grey80
hi Question term=standout ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi Search term=reverse ctermbg=Yellow ctermfg=NONE guibg=Yellow guifg=NONE
hi SpecialKey term=bold ctermfg=DarkBlue guifg=Blue
hi Title term=bold ctermfg=DarkMagenta gui=bold guifg=Magenta
hi WarningMsg term=standout ctermfg=DarkRed guifg=Red
hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
hi Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue
hi DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue
hi DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta
hi DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi CursorLine term=underline cterm=underline guibg=grey80
hi CursorColumn term=reverse ctermbg=grey guibg=grey80
" Colors for syntax highlighting
hi Constant term=underline ctermfg=DarkRed guifg=Magenta guibg=grey95
hi Special term=bold ctermfg=DarkMagenta guifg=SlateBlue guibg=grey95
if &t_Co > 8
hi Statement term=bold cterm=bold ctermfg=Brown gui=bold guifg=Brown
endif
hi Ignore ctermfg=LightGrey guifg=grey90
" vim: sw=2

301
colors/wwdc17.vim Normal file
View File

@ -0,0 +1,301 @@
" Name: WWDC17 colorscheme
" Author: Lifepillar <lifepillar@lifepillar.me>
" License: This file is placed in the public domain
set background=light
hi clear
if exists('syntax_on')
syntax reset
endif
let colors_name = 'wwdc17'
if get(g:, 'wwdc17_high_contrast', 0)
if !has('gui_running') && get(g:, 'wwdc17_term_trans_bg', 0)
hi Normal ctermfg=8 ctermbg=NONE cterm=NONE guifg=#333333 guibg=NONE gui=NONE guisp=NONE
hi LineNr ctermfg=13 ctermbg=NONE cterm=NONE guifg=#888888 guibg=NONE gui=NONE guisp=NONE
hi CursorLineNr ctermfg=5 ctermbg=NONE cterm=NONE guifg=#db2d45 guibg=NONE gui=NONE guisp=NONE
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=NONE,underline guifg=NONE guibg=NONE gui=NONE guisp=NONE
hi Folded ctermfg=13 ctermbg=NONE cterm=NONE guifg=#888888 guibg=NONE gui=NONE,italic guisp=NONE
else
hi Normal ctermfg=8 ctermbg=15 cterm=NONE guifg=#333333 guibg=#ffffff gui=NONE guisp=NONE
hi LineNr ctermfg=13 ctermbg=14 cterm=NONE guifg=#888888 guibg=#f0f0f0 gui=NONE guisp=NONE
hi CursorLineNr ctermfg=5 ctermbg=14 cterm=NONE guifg=#db2d45 guibg=#f0f0f0 gui=NONE guisp=NONE
hi CursorLine ctermfg=NONE ctermbg=14 cterm=NONE guifg=NONE guibg=#f0f0f0 gui=NONE guisp=NONE
hi Folded ctermfg=13 ctermbg=14 cterm=NONE guifg=#888888 guibg=#f0f0f0 gui=NONE,italic guisp=NONE
endif
hi FoldColumn ctermfg=13 ctermbg=NONE cterm=NONE guifg=#888888 guibg=NONE gui=NONE guisp=NONE
else
if !has('gui_running') && get(g:, 'wwdc17_term_trans_bg', 0)
hi Normal ctermfg=0 ctermbg=NONE cterm=NONE guifg=#656567 guibg=NONE gui=NONE guisp=NONE
hi LineNr ctermfg=11 ctermbg=NONE cterm=NONE guifg=#aaaaaa guibg=NONE gui=NONE guisp=NONE
hi CursorLineNr ctermfg=9 ctermbg=NONE cterm=NONE guifg=#e4753e guibg=NONE gui=NONE guisp=NONE
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=NONE,underline guifg=NONE guibg=NONE gui=NONE guisp=NONE
hi Folded ctermfg=13 ctermbg=NONE cterm=NONE guifg=#888888 guibg=NONE gui=NONE,italic guisp=NONE
else
hi Normal ctermfg=0 ctermbg=7 cterm=NONE guifg=#656567 guibg=#f8f8f8 gui=NONE guisp=NONE
hi LineNr ctermfg=13 ctermbg=14 cterm=NONE guifg=#888888 guibg=#f0f0f0 gui=NONE guisp=NONE
hi CursorLineNr ctermfg=9 ctermbg=14 cterm=NONE guifg=#e4753e guibg=#f0f0f0 gui=NONE guisp=NONE
hi CursorLine ctermfg=NONE ctermbg=14 cterm=NONE guifg=NONE guibg=#f0f0f0 gui=NONE guisp=NONE
hi Folded ctermfg=13 ctermbg=14 cterm=NONE guifg=#888888 guibg=#f0f0f0 gui=NONE,italic guisp=NONE
endif
hi FoldColumn ctermfg=11 ctermbg=NONE cterm=NONE guifg=#aaaaaa guibg=NONE gui=NONE guisp=NONE
endif
let g:wwdc17_palette = ['#656567', '#e8503f', '#00a995', '#e1ad0b', '#3a5d6f', '#db2d45', '#1faed0', '#f8f8f8', '#333333', '#e4753e', '#afc06c', '#aaaaaa', '#8c61a6', '#888888', '#f0f0f0', '#ffffff']
hi ColorColumn ctermfg=NONE ctermbg=14 cterm=NONE guifg=NONE guibg=#f0f0f0 gui=NONE guisp=NONE
hi Conceal ctermfg=2 ctermbg=NONE cterm=NONE guifg=#00a995 guibg=NONE gui=NONE guisp=NONE
hi Cursor ctermfg=NONE ctermbg=NONE cterm=NONE,reverse guifg=NONE guibg=NONE gui=NONE,reverse guisp=NONE
hi! link lCursor Cursor
hi CursorIM ctermfg=NONE ctermbg=7 cterm=NONE guifg=NONE guibg=#f8f8f8 gui=NONE guisp=NONE
hi CursorColumn ctermfg=NONE ctermbg=14 cterm=NONE guifg=NONE guibg=#f0f0f0 gui=NONE guisp=NONE
hi DiffAdd ctermfg=10 ctermbg=0 cterm=NONE,reverse guifg=#afc06c guibg=#656567 gui=NONE,reverse guisp=NONE
hi DiffChange ctermfg=3 ctermbg=7 cterm=NONE,reverse guifg=#e1ad0b guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi DiffDelete ctermfg=1 ctermbg=7 cterm=NONE,reverse guifg=#e8503f guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi DiffText ctermfg=6 ctermbg=7 cterm=NONE,bold,reverse guifg=#1faed0 guibg=#f8f8f8 gui=NONE,bold,reverse guisp=NONE
hi Directory ctermfg=2 ctermbg=NONE cterm=NONE guifg=#00a995 guibg=NONE gui=NONE guisp=NONE
hi EndOfBuffer ctermfg=9 ctermbg=NONE cterm=NONE guifg=#e4753e guibg=NONE gui=NONE guisp=NONE
hi Error ctermfg=1 ctermbg=7 cterm=NONE,reverse guifg=#e8503f guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi ErrorMsg ctermfg=1 ctermbg=7 cterm=NONE,reverse guifg=#e8503f guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi IncSearch ctermfg=3 ctermbg=7 cterm=NONE,reverse guifg=#e1ad0b guibg=#f8f8f8 gui=NONE,standout guisp=NONE
hi MatchParen ctermfg=NONE ctermbg=NONE cterm=NONE,bold,underline guifg=NONE guibg=NONE gui=NONE,bold,underline guisp=#333333
hi ModeMsg ctermfg=0 ctermbg=NONE cterm=NONE guifg=#656567 guibg=NONE gui=NONE guisp=NONE
hi MoreMsg ctermfg=9 ctermbg=NONE cterm=NONE guifg=#e4753e guibg=NONE gui=NONE guisp=NONE
hi NonText ctermfg=11 ctermbg=NONE cterm=NONE guifg=#aaaaaa guibg=NONE gui=NONE guisp=NONE
hi Pmenu ctermfg=0 ctermbg=14 cterm=NONE guifg=#656567 guibg=#f0f0f0 gui=NONE guisp=NONE
hi PmenuSbar ctermfg=9 ctermbg=11 cterm=NONE guifg=#e4753e guibg=#aaaaaa gui=NONE guisp=NONE
hi PmenuSel ctermfg=7 ctermbg=9 cterm=NONE guifg=#f8f8f8 guibg=#e4753e gui=NONE guisp=NONE
hi PmenuThumb ctermfg=1 ctermbg=9 cterm=NONE guifg=#e8503f guibg=#e4753e gui=NONE guisp=NONE
hi Question ctermfg=0 ctermbg=NONE cterm=NONE guifg=#656567 guibg=NONE gui=NONE guisp=NONE
hi! link QuickFixLine Search
hi Search ctermfg=3 ctermbg=7 cterm=NONE,reverse guifg=#e1ad0b guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi SignColumn ctermfg=9 ctermbg=NONE cterm=NONE guifg=#e4753e guibg=NONE gui=NONE guisp=NONE
hi SpecialKey ctermfg=9 ctermbg=NONE cterm=NONE guifg=#e4753e guibg=NONE gui=NONE guisp=NONE
hi SpellBad ctermfg=NONE ctermbg=NONE cterm=NONE,underline guifg=NONE guibg=NONE gui=NONE,undercurl guisp=#db2d45
hi SpellCap ctermfg=12 ctermbg=NONE cterm=NONE,underline guifg=#8c61a6 guibg=NONE gui=NONE,undercurl guisp=#db2d45
hi SpellLocal ctermfg=12 ctermbg=NONE cterm=NONE,underline guifg=#8c61a6 guibg=NONE gui=NONE,undercurl guisp=#db2d45
hi SpellRare ctermfg=12 ctermbg=NONE cterm=NONE,underline guifg=#8c61a6 guibg=NONE gui=NONE,undercurl guisp=#db2d45
hi Title ctermfg=9 ctermbg=NONE cterm=NONE,bold guifg=#e4753e guibg=NONE gui=NONE,bold guisp=NONE
hi Visual ctermfg=4 ctermbg=7 cterm=NONE,reverse guifg=#3a5d6f guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi VisualNOS ctermfg=7 ctermbg=4 cterm=NONE guifg=#f8f8f8 guibg=#3a5d6f gui=NONE guisp=NONE
hi WarningMsg ctermfg=1 ctermbg=NONE cterm=NONE guifg=#e8503f guibg=NONE gui=NONE guisp=NONE
let s:fc = abs(get(g:, 'wwdc17_frame_color', 10)) % 16
if s:fc == 0
hi StatusLine ctermfg=0 ctermbg=7 cterm=NONE,reverse guifg=#656567 guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=0 ctermbg=11 cterm=NONE,reverse guifg=#656567 guibg=#aaaaaa gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=11 ctermbg=0 cterm=NONE guifg=#aaaaaa guibg=#656567 gui=NONE guisp=NONE
hi TabLineFill ctermfg=11 ctermbg=0 cterm=NONE guifg=#aaaaaa guibg=#656567 gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=0 cterm=NONE guifg=#f8f8f8 guibg=#656567 gui=NONE guisp=NONE
hi VertSplit ctermfg=0 ctermbg=0 cterm=NONE guifg=#656567 guibg=#656567 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 1
hi StatusLine ctermfg=1 ctermbg=7 cterm=NONE,reverse,bold guifg=#e8503f guibg=#f8f8f8 gui=NONE,reverse,bold guisp=NONE
hi StatusLineNC ctermfg=1 ctermbg=7 cterm=NONE,reverse guifg=#e8503f guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=7 ctermbg=1 cterm=NONE guifg=#f8f8f8 guibg=#e8503f gui=NONE guisp=NONE
hi TabLineFill ctermfg=7 ctermbg=1 cterm=NONE guifg=#f8f8f8 guibg=#e8503f gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=9 cterm=NONE guifg=#f8f8f8 guibg=#e4753e gui=NONE guisp=NONE
hi VertSplit ctermfg=1 ctermbg=1 cterm=NONE guifg=#e8503f guibg=#e8503f gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=10 cterm=NONE guifg=#f8f8f8 guibg=#afc06c gui=NONE guisp=NONE
elseif s:fc == 2
hi StatusLine ctermfg=2 ctermbg=7 cterm=NONE,reverse guifg=#00a995 guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=2 ctermbg=4 cterm=NONE,reverse guifg=#00a995 guibg=#3a5d6f gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=4 ctermbg=2 cterm=NONE guifg=#3a5d6f guibg=#00a995 gui=NONE guisp=NONE
hi TabLineFill ctermfg=4 ctermbg=2 cterm=NONE guifg=#3a5d6f guibg=#00a995 gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=2 cterm=NONE guifg=#f8f8f8 guibg=#00a995 gui=NONE guisp=NONE
hi VertSplit ctermfg=2 ctermbg=2 cterm=NONE guifg=#00a995 guibg=#00a995 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 3
hi StatusLine ctermfg=3 ctermbg=7 cterm=NONE,reverse guifg=#e1ad0b guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=3 ctermbg=4 cterm=NONE,reverse guifg=#e1ad0b guibg=#3a5d6f gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=4 ctermbg=3 cterm=NONE guifg=#3a5d6f guibg=#e1ad0b gui=NONE guisp=NONE
hi TabLineFill ctermfg=4 ctermbg=3 cterm=NONE guifg=#3a5d6f guibg=#e1ad0b gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=3 cterm=NONE guifg=#f8f8f8 guibg=#e1ad0b gui=NONE guisp=NONE
hi VertSplit ctermfg=3 ctermbg=3 cterm=NONE guifg=#e1ad0b guibg=#e1ad0b gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 4
hi StatusLine ctermfg=4 ctermbg=7 cterm=NONE,reverse guifg=#3a5d6f guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=4 ctermbg=11 cterm=NONE,reverse guifg=#3a5d6f guibg=#aaaaaa gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=11 ctermbg=4 cterm=NONE guifg=#aaaaaa guibg=#3a5d6f gui=NONE guisp=NONE
hi TabLineFill ctermfg=11 ctermbg=4 cterm=NONE guifg=#aaaaaa guibg=#3a5d6f gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=4 cterm=NONE guifg=#f8f8f8 guibg=#3a5d6f gui=NONE guisp=NONE
hi VertSplit ctermfg=4 ctermbg=4 cterm=NONE guifg=#3a5d6f guibg=#3a5d6f gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 5
hi StatusLine ctermfg=5 ctermbg=7 cterm=NONE,reverse guifg=#db2d45 guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=5 ctermbg=3 cterm=NONE,reverse guifg=#db2d45 guibg=#e1ad0b gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=3 ctermbg=5 cterm=NONE guifg=#e1ad0b guibg=#db2d45 gui=NONE guisp=NONE
hi TabLineFill ctermfg=3 ctermbg=5 cterm=NONE guifg=#e1ad0b guibg=#db2d45 gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
hi VertSplit ctermfg=5 ctermbg=5 cterm=NONE guifg=#db2d45 guibg=#db2d45 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=3 cterm=NONE guifg=#f8f8f8 guibg=#e1ad0b gui=NONE guisp=NONE
elseif s:fc == 6
hi StatusLine ctermfg=6 ctermbg=7 cterm=NONE,reverse guifg=#1faed0 guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=6 ctermbg=0 cterm=NONE,reverse guifg=#1faed0 guibg=#656567 gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=0 ctermbg=6 cterm=NONE guifg=#656567 guibg=#1faed0 gui=NONE guisp=NONE
hi TabLineFill ctermfg=0 ctermbg=6 cterm=NONE guifg=#656567 guibg=#1faed0 gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=6 cterm=NONE guifg=#f8f8f8 guibg=#1faed0 gui=NONE guisp=NONE
hi VertSplit ctermfg=6 ctermbg=6 cterm=NONE guifg=#1faed0 guibg=#1faed0 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 7
hi StatusLine ctermfg=7 ctermbg=0 cterm=NONE,reverse,bold guifg=#f8f8f8 guibg=#656567 gui=NONE,reverse,bold guisp=NONE
hi StatusLineNC ctermfg=7 ctermbg=13 cterm=NONE,reverse guifg=#f8f8f8 guibg=#888888 gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=13 ctermbg=7 cterm=NONE guifg=#888888 guibg=#f8f8f8 gui=NONE guisp=NONE
hi TabLineFill ctermfg=13 ctermbg=7 cterm=NONE guifg=#888888 guibg=#f8f8f8 gui=NONE guisp=NONE
hi TabLineSel ctermfg=0 ctermbg=14 cterm=NONE,bold guifg=#656567 guibg=#f0f0f0 gui=NONE,bold guisp=NONE
hi VertSplit ctermfg=7 ctermbg=7 cterm=NONE guifg=#f8f8f8 guibg=#f8f8f8 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 8
hi StatusLine ctermfg=8 ctermbg=7 cterm=NONE,reverse guifg=#333333 guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=8 ctermbg=11 cterm=NONE,reverse guifg=#333333 guibg=#aaaaaa gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=11 ctermbg=8 cterm=NONE guifg=#aaaaaa guibg=#333333 gui=NONE guisp=NONE
hi TabLineFill ctermfg=11 ctermbg=8 cterm=NONE guifg=#aaaaaa guibg=#333333 gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=8 cterm=NONE guifg=#f8f8f8 guibg=#333333 gui=NONE guisp=NONE
hi VertSplit ctermfg=8 ctermbg=8 cterm=NONE guifg=#333333 guibg=#333333 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 9
hi StatusLine ctermfg=9 ctermbg=7 cterm=NONE,reverse guifg=#e4753e guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=9 ctermbg=4 cterm=NONE,reverse guifg=#e4753e guibg=#3a5d6f gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=4 ctermbg=9 cterm=NONE guifg=#3a5d6f guibg=#e4753e gui=NONE guisp=NONE
hi TabLineFill ctermfg=4 ctermbg=9 cterm=NONE guifg=#3a5d6f guibg=#e4753e gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=9 cterm=NONE guifg=#f8f8f8 guibg=#e4753e gui=NONE guisp=NONE
hi VertSplit ctermfg=9 ctermbg=9 cterm=NONE guifg=#e4753e guibg=#e4753e gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=10 cterm=NONE guifg=#f8f8f8 guibg=#afc06c gui=NONE guisp=NONE
elseif s:fc == 10
hi StatusLine ctermfg=10 ctermbg=7 cterm=NONE,reverse guifg=#afc06c guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=10 ctermbg=13 cterm=NONE,reverse guifg=#afc06c guibg=#888888 gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=13 ctermbg=10 cterm=NONE guifg=#888888 guibg=#afc06c gui=NONE guisp=NONE
hi TabLineFill ctermfg=13 ctermbg=10 cterm=NONE guifg=#888888 guibg=#afc06c gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=10 cterm=NONE guifg=#f8f8f8 guibg=#afc06c gui=NONE guisp=NONE
hi VertSplit ctermfg=10 ctermbg=10 cterm=NONE guifg=#afc06c guibg=#afc06c gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 11
hi StatusLine ctermfg=11 ctermbg=7 cterm=NONE,reverse guifg=#aaaaaa guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=11 ctermbg=0 cterm=NONE,reverse guifg=#aaaaaa guibg=#656567 gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=0 ctermbg=11 cterm=NONE guifg=#656567 guibg=#aaaaaa gui=NONE guisp=NONE
hi TabLineFill ctermfg=0 ctermbg=11 cterm=NONE guifg=#656567 guibg=#aaaaaa gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=11 cterm=NONE guifg=#f8f8f8 guibg=#aaaaaa gui=NONE guisp=NONE
hi VertSplit ctermfg=11 ctermbg=11 cterm=NONE guifg=#aaaaaa guibg=#aaaaaa gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 12
hi StatusLine ctermfg=12 ctermbg=15 cterm=NONE,bold,reverse guifg=#8c61a6 guibg=#ffffff gui=NONE,bold,reverse guisp=NONE
hi StatusLineNC ctermfg=12 ctermbg=14 cterm=NONE,reverse guifg=#8c61a6 guibg=#f0f0f0 gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=14 ctermbg=12 cterm=NONE guifg=#f0f0f0 guibg=#8c61a6 gui=NONE guisp=NONE
hi TabLineFill ctermfg=14 ctermbg=12 cterm=NONE guifg=#f0f0f0 guibg=#8c61a6 gui=NONE guisp=NONE
hi TabLineSel ctermfg=15 ctermbg=12 cterm=NONE,bold guifg=#ffffff guibg=#8c61a6 gui=NONE,bold guisp=NONE
hi VertSplit ctermfg=12 ctermbg=12 cterm=NONE guifg=#8c61a6 guibg=#8c61a6 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 13
hi StatusLine ctermfg=13 ctermbg=7 cterm=NONE,reverse guifg=#888888 guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=13 ctermbg=8 cterm=NONE,reverse guifg=#888888 guibg=#333333 gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=8 ctermbg=13 cterm=NONE guifg=#333333 guibg=#888888 gui=NONE guisp=NONE
hi TabLineFill ctermfg=8 ctermbg=13 cterm=NONE guifg=#333333 guibg=#888888 gui=NONE guisp=NONE
hi TabLineSel ctermfg=7 ctermbg=13 cterm=NONE guifg=#f8f8f8 guibg=#888888 gui=NONE guisp=NONE
hi VertSplit ctermfg=13 ctermbg=13 cterm=NONE guifg=#888888 guibg=#888888 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 14
hi StatusLine ctermfg=14 ctermbg=0 cterm=NONE,reverse,bold guifg=#f0f0f0 guibg=#656567 gui=NONE,reverse,bold guisp=NONE
hi StatusLineNC ctermfg=14 ctermbg=13 cterm=NONE,reverse guifg=#f0f0f0 guibg=#888888 gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=13 ctermbg=14 cterm=NONE guifg=#888888 guibg=#f0f0f0 gui=NONE guisp=NONE
hi TabLineFill ctermfg=13 ctermbg=14 cterm=NONE guifg=#888888 guibg=#f0f0f0 gui=NONE guisp=NONE
hi TabLineSel ctermfg=0 ctermbg=14 cterm=NONE,bold guifg=#656567 guibg=#f0f0f0 gui=NONE,bold guisp=NONE
hi VertSplit ctermfg=14 ctermbg=14 cterm=NONE guifg=#f0f0f0 guibg=#f0f0f0 gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
elseif s:fc == 15
hi StatusLine ctermfg=15 ctermbg=0 cterm=NONE,reverse guifg=#ffffff guibg=#656567 gui=NONE,reverse guisp=NONE
hi StatusLineNC ctermfg=15 ctermbg=11 cterm=NONE,reverse guifg=#ffffff guibg=#aaaaaa gui=NONE,reverse guisp=NONE
hi TabLine ctermfg=11 ctermbg=15 cterm=NONE guifg=#aaaaaa guibg=#ffffff gui=NONE guisp=NONE
hi TabLineFill ctermfg=11 ctermbg=15 cterm=NONE guifg=#aaaaaa guibg=#ffffff gui=NONE guisp=NONE
hi TabLineSel ctermfg=0 ctermbg=15 cterm=NONE guifg=#656567 guibg=#ffffff gui=NONE guisp=NONE
hi VertSplit ctermfg=15 ctermbg=15 cterm=NONE guifg=#ffffff guibg=#ffffff gui=NONE guisp=NONE
hi WildMenu ctermfg=7 ctermbg=5 cterm=NONE guifg=#f8f8f8 guibg=#db2d45 gui=NONE guisp=NONE
endif
unlet s:fc
hi Boolean ctermfg=10 ctermbg=NONE cterm=NONE guifg=#afc06c guibg=NONE gui=NONE guisp=NONE
hi Character ctermfg=5 ctermbg=NONE cterm=NONE guifg=#db2d45 guibg=NONE gui=NONE guisp=NONE
hi Comment ctermfg=13 ctermbg=NONE cterm=NONE guifg=#888888 guibg=NONE gui=NONE,italic guisp=NONE
hi Constant ctermfg=2 ctermbg=NONE cterm=NONE guifg=#00a995 guibg=NONE gui=NONE guisp=NONE
hi Debug ctermfg=5 ctermbg=NONE cterm=NONE guifg=#db2d45 guibg=NONE gui=NONE guisp=NONE
hi Delimiter ctermfg=4 ctermbg=NONE cterm=NONE guifg=#3a5d6f guibg=NONE gui=NONE guisp=NONE
hi Float ctermfg=10 ctermbg=NONE cterm=NONE guifg=#afc06c guibg=NONE gui=NONE guisp=NONE
hi Function ctermfg=2 ctermbg=NONE cterm=NONE guifg=#00a995 guibg=NONE gui=NONE guisp=NONE
hi Identifier ctermfg=4 ctermbg=NONE cterm=NONE guifg=#3a5d6f guibg=NONE gui=NONE guisp=NONE
hi Ignore ctermfg=7 ctermbg=NONE cterm=NONE guifg=#f8f8f8 guibg=NONE gui=NONE guisp=NONE
hi Include ctermfg=12 ctermbg=NONE cterm=NONE guifg=#8c61a6 guibg=NONE gui=NONE guisp=NONE
hi Keyword ctermfg=6 ctermbg=NONE cterm=NONE guifg=#1faed0 guibg=NONE gui=NONE guisp=NONE
hi Label ctermfg=2 ctermbg=NONE cterm=NONE guifg=#00a995 guibg=NONE gui=NONE guisp=NONE
hi Number ctermfg=2 ctermbg=NONE cterm=NONE guifg=#00a995 guibg=NONE gui=NONE guisp=NONE
hi Operator ctermfg=6 ctermbg=NONE cterm=NONE guifg=#1faed0 guibg=NONE gui=NONE guisp=NONE
hi PreProc ctermfg=1 ctermbg=NONE cterm=NONE guifg=#e8503f guibg=NONE gui=NONE guisp=NONE
hi Special ctermfg=1 ctermbg=NONE cterm=NONE guifg=#e8503f guibg=NONE gui=NONE guisp=NONE
hi SpecialChar ctermfg=5 ctermbg=NONE cterm=NONE guifg=#db2d45 guibg=NONE gui=NONE guisp=NONE
hi SpecialComment ctermfg=5 ctermbg=NONE cterm=NONE guifg=#db2d45 guibg=NONE gui=NONE guisp=NONE
hi Statement ctermfg=6 ctermbg=NONE cterm=NONE guifg=#1faed0 guibg=NONE gui=NONE guisp=NONE
hi StorageClass ctermfg=6 ctermbg=NONE cterm=NONE guifg=#1faed0 guibg=NONE gui=NONE guisp=NONE
hi String ctermfg=9 ctermbg=NONE cterm=NONE guifg=#e4753e guibg=NONE gui=NONE guisp=NONE
hi Structure ctermfg=1 ctermbg=NONE cterm=NONE guifg=#e8503f guibg=NONE gui=NONE guisp=NONE
hi Todo ctermfg=5 ctermbg=NONE cterm=NONE,bold guifg=#db2d45 guibg=NONE gui=NONE,bold guisp=NONE
hi Type ctermfg=12 ctermbg=NONE cterm=NONE guifg=#8c61a6 guibg=NONE gui=NONE guisp=NONE
hi Underlined ctermfg=NONE ctermbg=NONE cterm=NONE,underline guifg=NONE guibg=NONE gui=NONE,underline guisp=NONE
hi WWDC17Black ctermfg=0 ctermbg=NONE cterm=NONE guifg=#656567 guibg=NONE gui=NONE guisp=NONE
hi WWDC17Red ctermfg=1 ctermbg=NONE cterm=NONE guifg=#e8503f guibg=NONE gui=NONE guisp=NONE
hi WWDC17Aqua ctermfg=2 ctermbg=NONE cterm=NONE guifg=#00a995 guibg=NONE gui=NONE guisp=NONE
hi WWDC17Yellow ctermfg=3 ctermbg=NONE cterm=NONE guifg=#e1ad0b guibg=NONE gui=NONE guisp=NONE
hi WWDC17Blue ctermfg=4 ctermbg=NONE cterm=NONE guifg=#3a5d6f guibg=NONE gui=NONE guisp=NONE
hi WWDC17Magenta ctermfg=5 ctermbg=NONE cterm=NONE guifg=#db2d45 guibg=NONE gui=NONE guisp=NONE
hi WWDC17Teal ctermfg=6 ctermbg=NONE cterm=NONE guifg=#1faed0 guibg=NONE gui=NONE guisp=NONE
hi WWDC17White ctermfg=7 ctermbg=NONE cterm=NONE guifg=#f8f8f8 guibg=NONE gui=NONE guisp=NONE
hi WWDC17AshGrey ctermfg=8 ctermbg=NONE cterm=NONE guifg=#333333 guibg=NONE gui=NONE guisp=NONE
hi WWDC17Orange ctermfg=9 ctermbg=NONE cterm=NONE guifg=#e4753e guibg=NONE gui=NONE guisp=NONE
hi WWDC17LemonGreen ctermfg=10 ctermbg=NONE cterm=NONE guifg=#afc06c guibg=NONE gui=NONE guisp=NONE
hi WWDC17LightGrey ctermfg=11 ctermbg=NONE cterm=NONE guifg=#aaaaaa guibg=NONE gui=NONE guisp=NONE
hi WWDC17Purple ctermfg=12 ctermbg=NONE cterm=NONE guifg=#8c61a6 guibg=NONE gui=NONE guisp=NONE
hi WWDC17Grey ctermfg=13 ctermbg=NONE cterm=NONE guifg=#888888 guibg=NONE gui=NONE guisp=NONE
hi WWDC17VeryLightGrey ctermfg=14 ctermbg=NONE cterm=NONE guifg=#f0f0f0 guibg=NONE gui=NONE guisp=NONE
hi WWDC17BrightWhite ctermfg=15 ctermbg=NONE cterm=NONE guifg=#ffffff guibg=NONE gui=NONE guisp=NONE
hi NormalMode ctermfg=13 ctermbg=7 cterm=NONE,reverse guifg=#888888 guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi InsertMode ctermfg=10 ctermbg=7 cterm=NONE,reverse guifg=#afc06c guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi ReplaceMode ctermfg=9 ctermbg=7 cterm=NONE,reverse guifg=#e4753e guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi VisualMode ctermfg=4 ctermbg=7 cterm=NONE,reverse guifg=#3a5d6f guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
hi CommandMode ctermfg=5 ctermbg=7 cterm=NONE,reverse guifg=#db2d45 guibg=#f8f8f8 gui=NONE,reverse guisp=NONE
if has('nvim')
hi! link TermCursor Cursor
hi TermCursorNC ctermfg=7 ctermbg=0 cterm=NONE guifg=#f8f8f8 guibg=#656567 gui=NONE guisp=NONE
let g:terminal_color_0='#656567'
let g:terminal_color_1='#e8503f'
let g:terminal_color_2='#00a995'
let g:terminal_color_3='#e1ad0b'
let g:terminal_color_4='#3a5d6f'
let g:terminal_color_5='#db2d45'
let g:terminal_color_6='#1faed0'
let g:terminal_color_7='#f8f8f8'
let g:terminal_color_8='#333333'
let g:terminal_color_9='#e4753e'
let g:terminal_color_10='#afc06c'
let g:terminal_color_11='#aaaaaa'
let g:terminal_color_12='#8c61a6'
let g:terminal_color_13='#888888'
let g:terminal_color_14='#f0f0f0'
let g:terminal_color_15='#ffffff'
endif
hi vimCommentTitle ctermfg=5 ctermbg=NONE cterm=NONE guifg=#db2d45 guibg=NONE gui=NONE guisp=NONE
hi vimMapModKey ctermfg=3 ctermbg=NONE cterm=NONE guifg=#e1ad0b guibg=NONE gui=NONE guisp=NONE
hi vimMapMod ctermfg=3 ctermbg=NONE cterm=NONE guifg=#e1ad0b guibg=NONE gui=NONE guisp=NONE
hi vimBracket ctermfg=6 ctermbg=NONE cterm=NONE guifg=#1faed0 guibg=NONE gui=NONE guisp=NONE
hi vimNotation ctermfg=6 ctermbg=NONE cterm=NONE guifg=#1faed0 guibg=NONE gui=NONE guisp=NONE
hi! link vimUserFunc Function
hi gitcommitComment ctermfg=13 ctermbg=NONE cterm=NONE guifg=#888888 guibg=NONE gui=NONE,italic guisp=NONE
hi markdownHeadingDelimiter ctermfg=3 ctermbg=NONE cterm=NONE guifg=#e1ad0b guibg=NONE gui=NONE guisp=NONE
hi markdownURL ctermfg=12 ctermbg=NONE cterm=NONE guifg=#8c61a6 guibg=NONE gui=NONE guisp=NONE
hi htmlItalic ctermfg=0 ctermbg=NONE cterm=NONE guifg=#656567 guibg=NONE gui=NONE,italic guisp=NONE
hi htmlBold ctermfg=0 ctermbg=NONE cterm=NONE,bold guifg=#656567 guibg=NONE gui=NONE,bold guisp=NONE
hi htmlBoldItalic ctermfg=0 ctermbg=NONE cterm=NONE,bold guifg=#656567 guibg=NONE gui=NONE,bold,italic guisp=NONE
hi! link javascriptBraces Delimiter
hi SyntasticErrorSign ctermfg=1 ctermbg=NONE cterm=NONE guifg=#e8503f guibg=NONE gui=NONE guisp=NONE
hi SyntasticWarningSign ctermfg=3 ctermbg=NONE cterm=NONE guifg=#e1ad0b guibg=NONE gui=NONE guisp=NONE
if get(g:, "wwdc17_term_italics", 0)
hi Comment cterm=italic
hi Folded cterm=italic
hi htmlItalic cterm=italic
hi htmlBoldItalic cterm=NONE,bold,italic
hi gitcommitComment cterm=italic
endif

3
ftdetect/llvm.vim Normal file
View File

@ -0,0 +1,3 @@
" Set .ll files to LLVM IR filetype
au BufNewFile,BufReadPost *.ll set filetype=llvm
au BufNewFile,BufReadPost *.test set filetype=llvm

16
gvimrc Normal file
View File

@ -0,0 +1,16 @@
" Set gui options
" - a Autoselect
" - e Add tab pages
" - g Grey menu items
" - i Use the Vim icon
set guioptions=aegi
if platform#is_windows()
set guifont=Consolas:h10:cDEFAULT
else
" Set default font
set guifont=Source\ Code\ Pro\ Medium\ 9
endif
" Allow space for line numbers
set columns=85

15
plugin/autocmds.vim Normal file
View File

@ -0,0 +1,15 @@
augroup benieAugroup
" Clear all autocmd's in this group
autocmd!
" Reopening a file at last curson position
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\ | exe "normal! g'\"" | endif
" TODO: Move this to a plugin & rename to .enter .exit
au BufRead,BufNewFile .env set filetype=zsh
au BufRead,BufNewFile .out set filetype=zsh
" Highlight conflict markers in any filefile
au FileType * :call matchadd('Todo', '^\(<<<<<<<\||||||||\|=======\|>>>>>>>\)\s\ze.*$')
augroup END

13
plugin/color.vim Normal file
View File

@ -0,0 +1,13 @@
if !platform#is_windows() &&
\ !has("gui_running") &&
\ $TERM != 'xterm-256color' &&
\ $TERM != 'screen-256color' &&
\ $TERM != 'tmux-256color'
echo "This terminal does not report 256 color support but probaly supports it"
echo "Setup the shell to do something similar on load"
echo "env TERM=xterm-256color /usr/bin/zsh"
endif
if !platform#is_windows() || has("gui_running")
colorscheme fresh
endif
syntax sync minlines=500

17
plugin/commands.vim Normal file
View File

@ -0,0 +1,17 @@
" Sort Python Imports
command! ISort call do#isort()
" Strip white space from right of all lines.
" TODO: Make RStripLines work on a range
command! RStripLines call do#rstrip_lines()
" TODO: Strip white space from left of all lines, retains relative indentation.
" Set tab width
command! -nargs=1 TabWidth call do#set_tab_width(<f-args>)
" Toggle Checkbox
command! ToggleCheckbox call do#toggle_checkbox()
" Show highlight groups under the cursor
command! CursorHighlightGroups :call do#cursor_highlight_groups()

29
plugin/functions.vim Normal file
View File

@ -0,0 +1,29 @@
" Fold Text
set foldtext=FoldText()
function! FoldText()
let l:line = getline(v:foldstart)
return l:line.' '.string(v:foldend - v:foldstart + 1).' lines '
endfunction
" Derived from http://stackoverflow.com/a/1333025
function! CloneHighlightGroupWithAttributes(group, new_group, attributes)
" Get group details, resolving group links.
redir => l:group
exe 'silent hi ' . a:group
redir END
while l:group =~? 'links to'
let l:index = stridx(l:group, 'links to') + len('links to')
let l:linked_group = strpart(l:group, l:index + 1)
redir => l:group
exe 'silent hi ' . l:linked_group
redir END
endwhile
" Get highlight parameters and existing remove attributes.
let l:parameters = matchlist(l:group, '\<xxx\>\s\+\(.*\)')[1]
let l:parameters = substitute(l:parameters, '\(c\?term\|gui\)=\w\+', '', 'g')
" Create the cloned highlight group with new attributes.
exe 'hi '.a:new_group.' '.l:parameters.
\' term='.a:attributes.' cterm='.a:attributes.' gui='.a:attributes
endfunction

93
plugin/mappings.vim Normal file
View File

@ -0,0 +1,93 @@
" YouCompleteMe
nnoremap <leader>fi :YcmCompleter FixIt<CR>
nnoremap <leader>gd :YcmCompleter GoTo<CR>
nnoremap <leader>gt :YcmCompleter GetType<CR>
nnoremap <leader>sd :YcmShowDetailedDiagnostic<CR>
" GitGutter
nnoremap <leader>gn :GitGutterNextHunk<CR>
nnoremap <leader>gp :GitGutterPrevHunk<CR>
" Quickfix list
nnoremap <leader>qo :copen<CR>
nnoremap <leader>qc :cclose<CR>
nnoremap <leader>qq :cc<CR>
nnoremap <leader>qn :cnext<CR>
nnoremap <leader>qp :cprevious<CR>
nnoremap <leader>qf :cfirst<CR>
nnoremap <leader>qa :clast<CR>
" Location list
nnoremap <leader>lo :lopen<CR>
nnoremap <leader>lc :lclose<CR>
nnoremap <leader>ll :ll<CR>
nnoremap <leader>ln :lnext<CR>
nnoremap <leader>lp :lprevious<CR>
nnoremap <leader>lf :lfirst<CR>
nnoremap <leader>la :llast<CR>
" Preview window
nnoremap <leader>pc :pclose<CR>
nnoremap <leader>pe :pedit<Space>
nnoremap <leader>ps :psearch<Space>
" fzf
nnoremap <C-f>f :Files<Space>
nnoremap <C-f>a :Ag<Space>
nnoremap <C-f>g :GitFiles<CR>
nnoremap <C-f>b :Buffers<CR>
nnoremap <C-f>l :BLines<CR>
nnoremap <C-f>c :Colors<CR>
nnoremap <C-f>h :Helptags<CR>
nnoremap <C-f>s :Snippets<CR>
" Search to the word under the cursor
nnoremap <leader>ag :Ag <C-R>=expand('<cword>')<CR><CR>
" Treat long lines as line containing breaks
nnoremap j gj
nnoremap k gk
" Quick write
nnoremap <leader>w :w!<CR>
" Switch panes
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Redraw window
nnoremap <C-w>l <C-l>
" Quick tabs
nnoremap <leader>tn :tabnew<Space>
nnoremap <leader>tc :tabclose<CR>
nnoremap <leader>to :tabonly<CR>
nnoremap <leader>tm :tabmove<Space>
" Clear search highlights
nnoremap <leader><Space> :nohlsearch<CR>
" System clipboard yank/put
noremap <leader>y "+y
noremap <leader>Y "+Y
noremap <leader>p "+p
noremap <leader>P "+P
" Quickly access spelling menu
inoremap <C-s> <C-g>u<C-X>s
nnoremap <C-s> i<C-g>u<C-X>s
" Disable 'Q' from opening Ex mode
nnoremap Q <nop>
" Disable 'K' from loading man pages
noremap K <nop>
" Split line at the cursor
nnoremap [j i<CR><Esc>
nnoremap ]j a<CR><Esc>
" Toggle Checkbox
nnoremap <leader><CR> :ToggleCheckbox<CR>
" Show highlight groups under the cursor
nnoremap <leader>hi :CursorHighlightGroups<CR>

179
plugin/settings.vim Normal file
View File

@ -0,0 +1,179 @@
" TODO: Move these settings to vimrc when after switching to vim8 packages
scriptencoding 'utf-8'
" Copy indent from current line
set autoindent
" Make <BS> work in a sane way
set backspace=indent,eol,start
" Insert blank same in front of line according to 'shiftwidth'.
set smarttab
if !has('nvim') && &ttimeoutlen == -1
" Time in miliseconds to wait for a key core or mapping
set ttimeout
set ttimeoutlen=100
endif
" TODO: These might be irrelevant with vim-airline
" Show 2 line status
set laststatus=2
" Show the line and colum number of a cursor position
set ruler
" Show the current line with different highlighting
set cursorline
" Enhanced command line completion
set wildmenu
" Command line history
if &history < 1000
set history=1000
endif
" Display as much as possible of the last line
set display+=lastline
if &listchars ==# 'eol:$'
" TODO: Review this
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
if v:version > 703 || v:version == 703 && has("patch541")
" Delete comment character when joining commented lines
set formatoptions+=j
endif
" Enable visually highlighting listchars
set list
" Non breaking space:
" * Circled Reverse Solidus (U+29B8, utf-8: E2 A6 B8)
set listchars=nbsp:⦸
" Trailing space:
" * Middle Dot (U+00B7, utf-8: C2 B7)
set listchars+=trail
" Tab stop:
" * White Right-Pointing Small Triangle (U+25B9, utf-8: E2 96 B9)
" * Box Drawings Light Triple Dash Horizontal (U+2504, utf-8: E2 94 84)
set listchars+=tab:▹┄
" Line extended beyond screen when nowrap:
" * Right-Pointing Double Angle Quotation Mark (U+00BB, utf-8: C2 BB)
set listchars+=extends
" Line preceded beyond screen when nowrap:
" * Left-Pointing Double Angle Quotation Mark (U+00AB, utf-8: C2 AB)
set listchars+=precedes
" Wrap lines which are longer than screen width
set wrap
if has('linebreak')
" Break wrapped lines at a character in breakat
set linebreak
" Downwards Arrow With Tip Rightwards (U+21B3, utf-8: E2 86 B3)
let &showbreak='↳ '
" Use same highlight group as listchars for showbreak
set highlight+=@:SpecialKey
endif
" TODO: spellcapcheck
" TODO: virtualedit=block
" TODO: whichwrap=b,h,l,s,<,>,[,],~
" Don't show completeopt preview buffer
if has('insert_expand')
set completeopt-=preview
endif
" Set window title to titlestring
if has('title')
set title
endif
" Don't show mode in command line
set noshowmode
" Show relative line numbers & current line number
set number
if exists('+relativenumber')
set relativenumber
endif
" Keep cursor from buffer edges
set scrolloff=8
set sidescrolloff=5
" Turn backup off
set nobackup noswapfile
if has('writebackup')
set nowritebackup
endif
" Use Unix as standard file type
set fileformats=unix,mac,dos
" Allow : in filenames to allow gf to specify line numbers
set isfname-=:
" Highlight search matches & show search matches while typing
set hlsearch incsearch
" Set ignore search case unless mixed
set ignorecase smartcase
" Allow buffers with changes to be hidden
set hidden
" Open new splits on the other side of the axis
if has('windows')
set splitbelow
endif
if has('vertsplit')
set splitright
endif
" Use existing windows and tabs when jumping to errors
set switchbuf=usetab
" Indicates a fast terminal connection
set ttyfast
" Set syntax as default fold method
if has('folding')
set foldmethod=syntax foldlevel=20
endif
" Automatically read/write changes to files
set autoread
set autowrite
" Don't add 2 spaces after end of sentence
set nojoinspaces
" Enable all mouse features
set mouse=a
" Format text
" r - insert comment leader on 'o' and 'O'
" q - allow formatting with 'gq'
set formatoptions+=rq
" Enable modeline
set modeline
" Don't redraw during execution macros, registers, commands, etc.
set lazyredraw
" Allow color schemes to do bright colors without forcing bold
if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
set t_Co=16
endif
" Change cursor dependant on current mode
if has('cursorshape') && has('unix') && !has('gui_running')
if $TMUX ==# '' && $ITERM_PROFILE !=# ''
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
else
let &t_SI = "\<Esc>[6 q"
let &t_EI = "\<Esc>[2 q"
endif
let &t_SR = &t_SI
endif

166
syntax/cpp.vim Normal file
View File

@ -0,0 +1,166 @@
" Language: C++
" Description: Override default C++ syntax file.
" Quit when a syntax file was already loaded
if exists('b:current_syntax')
finish
endif
" Disable C syntax options to improve performance
let b:c_no_curly_error = 1
let b:c_no_bracket_error = 1
let b:c_no_cformat = 1
let b:c_no_c11 = 1
let b:c_no_ansi = 1
let b:c_no_bsd = 1
let b:c_no_operators = 1
" Read the C syntax to start with
runtime! syntax/c.vim
unlet b:current_syntax
" C++98
syn keyword cppStatement this friend using
syn keyword cppAccess public protected private
syn keyword cppModifier inline virtual explicit export
syn keyword cppType bool wchar_t
syn keyword cppExceptions throw try catch
syn keyword cppOperator new delete typeid and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
if exists('c_no_operators')
syn keyword cppOperator operator
endif
syn keyword cppCast const_cast static_cast dynamic_cast reinterpret_cast
syn keyword cppStorageClass mutable
syn keyword cppStructure class typename template namespace
syn keyword cppBoolean true false
syn keyword cppConstant __cplusplus
" C++11
if !exists('cpp_no_cpp11')
" Identifiers with special meaning: override final
" TODO: These should not be keyword's, instead highlight based on context
" since these can be used as regular identifiers outside of those contexts.
syn keyword cppModifier override final
syn keyword cppType char16_t char32_t nullptr_t
syn keyword cppExceptions noexcept
syn keyword cppStorageClass constexpr decltype thread_local
syn keyword cppConstant nullptr
syn keyword cppOperator alignas alignof decltype static_assert
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell display
" Match: = delete; and = default;
" ^^^^^^ ^^^^^^^
" Both `delete` and `default` are keywords which normally take precidence,
" however if the match starts before the beginning of the keyword it will be
" chosen instead so we can specialze for this case.
syn match cppStatement '=\s*\(delete\|default\)\>\ze\s*;\?' contains=cOperator display
" Attribute Specifier Sequence
" Match: [[attribute-list]]
syn region cppAttributeDelimiter matchgroup=cppDelimiter start='\[\[' skip='\[\[' end='\]\]' transparent contains=cppAttribute,cppNamespace,cppAttributeUsing,cppAttributeUsingNamespace,cDelimiter,cString,cOperator,cNumber,cppFunction,cFunction
" Standard Attributes
syn keyword cppAttribute noreturn carries_dependency contained
endif
" C++14
if !exists('cpp_no_cpp14')
syn match cppNumber display '\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>'
" Standard Attributes
syn keyword cppAttribute deprecated contained
endif
" C++17
if !exists('cpp_no_cpp17')
" Attribute Specifier Sequence
" Match: [[using attribute-namespace: attribute-list]]
syn match cppAttributeUsingNamespace '\s\+\zs\w\+\ze\s*:' contained contains=cppAttributeUsing
syn keyword cppAttributeUsing using contained
" Standard Attributes
syn keyword cppAttribute fallthrough nodiscard maybe_unused contained
hi def link cppAttributeUsing cppStatement
hi def link cppAttributeUsingNamespace cInclude
hi def link cppAttributeUsingDelimiter cppDelimiter
endif
" C++20
if !exists('cpp_no_cpp20')
syn keyword cppStatement concept requires
" TODO: Attribute Specifier Sequence
" Match: [[contract-attribute-token contract-level(opt) identifier(opt): expression]]
"
" Standard Attributes
syn keyword cppAttribute likely unlikely no_unique_address contained
syn keyword cppAttribute expects ensures assert contained
" Contract Levels
syn keyword cppAttribute default audit axiom contained
"
" TODO: These should not be keyword's, instead highlight based on context
" since these can be used as regular identifiers outside of those contexts.
" These only occur inside an contracts generalised attribute.
syn keyword cppModifier audit axiom
endif
if !exists('cpp_no_function')
" Match function expressions: expr<T>()
" ^^^^
syn match cppFunction '\h\w*\ze<.*>\s*(' display
hi default link cppFunction Function
endif
if !exists('cpp_no_delimiters')
" Match: delimiter expressions: <expr>, ex::pr
" ^ ^ ^^
syn match cppDelimiter '\(<\|>\|::\)' display
" Match: nested namespace expressions: expr::
" ^^^^
syn match cppNamespace '\w\+::' display contains=cppDelimiter
" Match: label: as a Label and public: protected: private: as a Statement
" ^^^^^ ^^^^^^ ^^^^^^^^^ ^^^^^^^
syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel,cppAccess display
hi default link cppDelimiter cDelimiter
hi default link cppNamespace cInclude
endif
if !exists('cpp_no_operators') && !exists('cpp_no_delimiters')
" Match: single character operators if they are surrounded by white space: / < >
" ^ ^ ^
syn match cppOperator '\(\s\zs\/\s\ze\|\s\zs<\s\ze\|\s\zs>\s\ze\)' display
" Match: <= >= -> << >> <<= >>= ->*
" ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^
syn match cppOperator '\(<=\|>=\|->\|<<\ze\s\|\s\zs>>\|>>=\|<<=\|->\*\)' display
" Match: operator<< operator>> operator< operator> operator[]
" ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^
" operator new operator delete operator new[] operator delete[]
" ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
syn match cppOperator '\<operator\>\s*\(\/\|<<\|>>\|<\|>\|\(new\|delete\)\?\s*\[\s*\]\)\?' display
endif
" Default highlighting
hi def link cppAccess cppStatement
hi def link cppCast cppOperator
hi def link cppExceptions Exception
hi def link cppOperator Operator
hi def link cppStatement Statement
hi def link cppModifier cppStatement
hi def link cppType Type
hi def link cppStorageClass StorageClass
hi def link cppStructure Structure
hi def link cppBoolean Boolean
hi def link cppConstant Constant
hi def link cppRawStringDelimiter Delimiter
hi def link cppRawString String
hi def link cppNumber Number
hi def link cppAttribute Keyword
let b:current_syntax = 'cpp'

98
syntax/groovy.vim Normal file
View File

@ -0,0 +1,98 @@
" File: groovy.vim
" Author: Kenneth Benzie (Benie) <k.benzie83@gmail.com>
" Description: Extended groovy syntax for Jenkins DSL.
" Highlight shell('') and shell('''''') blocks with the sh filetype.
" unlet !b:current_syntax
" Highlight batchFile('') and batchFile('''''') blocks with the batch filetype.
" syn include @groovyHighlightBatch syntax/batch.vim
" syn region groovyHighlightBatch matchgroup=groovyString start="batchFile(\zs'\(''\)\=" end="\(''\)\='\ze)" contains=@groovyHighlightBatch
" keyword definitions
syn keyword groovyExternal native package
syn match groovyExternal "\<import\>\(\s\+static\>\)\?"
syn keyword groovyError goto const
syn keyword groovyConditional if else switch
syn keyword groovyRepeat while for do
syn keyword groovyBoolean true false
syn keyword groovyConstant null
syn keyword groovyTypedef this super
syn keyword groovyOperator new instanceof
syn keyword groovyType boolean char byte short int long float double void Integer Double Date Boolean Float String Array Vector List
syn keyword groovyStatement return
syn keyword groovyStorageClass static synchronized transient volatile final strictfp serializable
syn keyword groovyExceptions throw try catch finally
syn keyword groovyAssert assert
syn keyword groovyMethodDecl synchronized throws
syn keyword groovyClassDecl extends implements interface
" To differentiate the keyword class from MyClass.class we use a match here
syn match groovyTypedef "\.\s*\<class\>"ms=s+1
syn keyword groovyClassDecl enum
syn match groovyClassDecl "^class\>"
syn match groovyClassDecl "[^.]\s*\<class\>"ms=s+1
" syn keyword groovyBranch break continue nextgroup=groovyUserLabelRef skipwhite
" syn match groovyUserLabelRef "\k\+" contained
syn keyword groovyScopeDecl public protected private abstract
syn match groovyNumber "\<\(0[bB][0-1]\+\|0[0-7]*\|0[xX]\x\+\|\d\(\d\|_\d\)*\)[lL]\=\>"
syn match groovyNumber "\(\<\d\(\d\|_\d\)*\.\(\d\(\d\|_\d\)*\)\=\|\.\d\(\d\|_\d\)*\)\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\="
syn match groovyNumber "\<\d\(\d\|_\d\)*[eE][-+]\=\d\(\d\|_\d\)*[fFdD]\=\>"
syn match groovyNumber "\<\d\(\d\|_\d\)*\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\>"
syn region groovyComment start='\/\*' end='\*\/' fold
syn match groovyComment '\/\/.*$'
syn match groovyDelimiter '[()\[\]]'
syn region groovyBlock matchgroup=groovyDelimiter start='{' end='}' transparent fold
syn match groovyStructure '\w\+\ze\s*{'
syn match groovyFunction '\w\+\ze\s*('
syn region groovyIdentifier start='${' end='}' oneline
syn region groovyString start=+"+ end=+"+ oneline contains=groovyIdentifier
syn region groovyString start=+'+ end=+'+ oneline contains=groovyIdentifier
syn region groovyString start=+'''+ end=+'''+ fold contains=groovyIdentifier
syn match groovyKeywordParam "\w\+\ze\s*=\s*"
syn region groovyFunctionParams matchgroup=groovyDelimiter start='(' end=')' contains=groovyComment,groovyString,groovyIdentifier,groovyNumber,groovyBoolean,groovyKeywordParam transparent
syn cluster groovySyntax contains=groovyAssert,groovyBlock,groovyBoolean,groovyBranch,groovyClassDecl,groovyComment,groovyConditional,groovyConstant,groovyDelimiter,groovyError,groovyExceptions,groovyExternal,groovyFunction,groovyIdentifier,groovyMethodDecl,groovyNumber,groovyOperator,groovyRepeat,groovyScopeDecl,groovyStatement,groovyStorageClass,groovyString,groovyStructure,groovyType,groovyTypedef,groovyUserLabelRef
syn include @groovyShellSyntax syntax/sh.vim
unlet b:current_syntax
syn region groovyShellSyntax matchgroup=groovyString start=+\('''\|"""\)+ end=+\('''\|"""\)+ contains=@groovyShellSyntax contained
syn region groovyShell matchgroup=groovyFunction start='shell\s*\ze(' end='\ze)' fold contains=groovyShellSyntax,groovyDelimiter
syn include @groovyBatchSyntax syntax/dosbatch.vim
unlet b:current_syntax
syn region groovyBatchSyntax matchgroup=groovyString start=+\('''\|"""\)+ end=+\('''\|"""\)+ contains=@groovyBatchSyntax contained
syn region groovyBatch matchgroup=groovyFunction start='batchFile\s*\ze(' end='\ze)' fold contains=groovyBatchSyntax,groovyDelimiter
syn region groovyBuildFlowSyntax matchgroup=groovyString start=+\('''\|"""\)+ end=+\('''\|"""\)+ contained contains=groovyStructure,groovyFunction,groovyDelimiter,groovyComment,groovyBlock,groovyString,groovyIdentifier,groovyKeywords,@groovySyntax
syn region groovyBuildFlow matchgroup=groovyFunction start='buildFlow\s*\ze(' end='\ze)' fold contains=groovyBuildFlowSyntax,groovyDelimiter
hi default link groovyAssert Keyword
hi default link groovyBoolean Boolean
hi default link groovyBranch Conditional
hi default link groovyClassDecl Structure
hi default link groovyComment Comment
hi default link groovyConditional Conditional
hi default link groovyConstant Constant
hi default link groovyDelimiter Delimiter
hi default link groovyError Error
hi default link groovyExceptions Exception
hi default link groovyExternal Include
hi default link groovyFunction Function
hi default link groovyIdentifier Identifier
hi default link groovyKeywordParam Identifier
hi default link groovyMethodDecl Function
hi default link groovyNumber Number
hi default link groovyOperator Operator
hi default link groovyRepeat Repeat
hi default link groovyScopeDecl Keyword
hi default link groovyShellDelimiter groovyDelimiter
hi default link groovyStatement Statement
hi default link groovyStorageClass StorageClass
hi default link groovyString String
hi default link groovyStructure Structure
hi default link groovyType Type
hi default link groovyTypedef Typedef
hi default link groovyUserLabelRef Label
let b:current_syntax = 'groovy'

110
syntax/llvm.vim Normal file
View File

@ -0,0 +1,110 @@
" Vim syntax file
" Language: llvm
" Maintainer: The LLVM team, http://llvm.org/
" Version: $Revision: 137806 $
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case match
" Types.
" Types also include struct, array, vector, etc. but these don't
" benefit as much from having dedicated highlighting rules.
syn keyword llvmType void float double
syn keyword llvmType x86_fp80 fp128 ppc_fp128
syn keyword llvmType type label opaque
syn match llvmType /\<i\d\+\>/
" Instructions.
" The true and false tokens can be used for comparison opcodes, but it's
" much more common for these tokens to be used for boolean constants.
syn keyword llvmStatement add fadd sub fsub mul fmul
syn keyword llvmStatement sdiv udiv fdiv srem urem frem
syn keyword llvmStatement and or xor
syn keyword llvmStatement icmp fcmp
syn keyword llvmStatement eq ne ugt uge ult ule sgt sge slt sle
syn keyword llvmStatement oeq ogt oge olt ole one ord ueq ugt uge
syn keyword llvmStatement ult ule une uno
syn keyword llvmStatement nuw nsw exact inbounds
syn keyword llvmStatement phi call select shl lshr ashr va_arg
syn keyword llvmStatement trunc zext sext
syn keyword llvmStatement fptrunc fpext fptoui fptosi uitofp sitofp
syn keyword llvmStatement ptrtoint inttoptr bitcast
syn keyword llvmStatement ret br indirectbr switch invoke unwind unreachable
syn keyword llvmStatement malloc alloca free load store getelementptr
syn keyword llvmStatement extractelement insertelement shufflevector
syn keyword llvmStatement extractvalue insertvalue
" Keywords.
syn keyword llvmKeyword define declare global constant
syn keyword llvmKeyword internal external private
syn keyword llvmKeyword linkonce linkonce_odr weak weak_odr appending
syn keyword llvmKeyword common extern_weak
syn keyword llvmKeyword thread_local dllimport dllexport
syn keyword llvmKeyword hidden protected default
syn keyword llvmKeyword except deplibs
syn keyword llvmKeyword volatile fastcc coldcc cc ccc
syn keyword llvmKeyword x86_stdcallcc x86_fastcallcc
syn keyword llvmKeyword ptx_kernel ptx_device
syn keyword llvmKeyword signext zeroext inreg sret nounwind noreturn
syn keyword llvmKeyword nocapture byval nest readnone readonly noalias uwtable
syn keyword llvmKeyword inlinehint noinline alwaysinline optsize ssp sspreq
syn keyword llvmKeyword noredzone noimplicitfloat naked alignstack
syn keyword llvmKeyword module asm align tail to
syn keyword llvmKeyword addrspace section alias sideeffect c gc
syn keyword llvmKeyword target datalayout triple
syn keyword llvmKeyword blockaddress
" Obsolete keywords.
syn keyword llvmError getresult begin end
" Misc syntax.
syn match llvmNoName /[%@]\d\+\>/
syn match llvmNumber /-\?\<\d\+\>/
syn match llvmFloat /-\?\<\d\+\.\d*\(e[+-]\d\+\)\?\>/
syn match llvmFloat /\<0x\x\+\>/
syn keyword llvmBoolean true false
syn keyword llvmConstant zeroinitializer undef null
syn match llvmComment /;.*$/ contains=@Spell
syn region llvmString start=/"/ skip=/\\"/ end=/"/
syn match llvmLabel /[-a-zA-Z$._][-a-zA-Z$._0-9]*:/
syn match llvmIdentifier /[%@][-a-zA-Z$._][-a-zA-Z$._0-9]*/
" Syntax-highlight dejagnu test commands.
syn match llvmSpecialComment /;\s*RUN:.*$/
syn match llvmSpecialComment /;\s*PR\d*\s*$/
syn match llvmSpecialComment /;\s*END\.\s*$/
syn match llvmSpecialComment /;\s*XFAIL:.*$/
syn match llvmSpecialComment /;\s*XTARGET:.*$/
if version >= 508 || !exists("did_c_syn_inits")
if version < 508
let did_c_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink llvmType Type
HiLink llvmStatement Statement
HiLink llvmNumber Number
HiLink llvmComment Comment
HiLink llvmString String
HiLink llvmLabel Label
HiLink llvmKeyword Keyword
HiLink llvmBoolean Boolean
HiLink llvmFloat Float
HiLink llvmNoName Identifier
HiLink llvmConstant Constant
HiLink llvmSpecialComment SpecialComment
HiLink llvmError Error
HiLink llvmIdentifier Identifier
delcommand HiLink
endif
let b:current_syntax = "llvm"

192
vimrc Normal file
View File

@ -0,0 +1,192 @@
set encoding=utf-8
scriptencoding 'utf-8'
" Set leader to space
let g:mapleader = ' '
if has('autocmd')
filetype plugin indent on
endif
if has('syntax') && !exists('g:syntax_on')
syntax enable
endif
" Plugins
call plug#begin('~/.vim/bundle')
" Load local plugins first, allows local dev whilst also being installed.
if filereadable(expand('~/.vim/local.vim'))
source ~/.vim/local.vim
endif
" vim-airline - improved status bar
" TODO: Get rid of airline and roll your own
Plug 'vim-airline/vim-airline'
let g:airline#extensions#branch#enabled = 0
let g:airline#extensions#hunks#enabled = 0
for s:setting in ['left_sep', 'right_sep', 'section_error', 'section_warning']
exec 'let g:airline_'.s:setting.' = ""'
endfor
" tabline.vim - sanely numbered tabs
Plug 'mkitt/tabline.vim'
" YouCompleteMe
" TODO: Try out neovim completion plugins to see if they are better
if !platform#is_windows()
" YouCompleteMe with parameter completion
Plug 'oblitum/YouCompleteMe', {'do': './install.py --clang-completer'}
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:ycm_min_num_of_chars_for_completion = 1
let g:ycm_complete_in_comments = 1
let g:ycm_complete_in_strings = 1
let g:ycm_collect_identifiers_from_comments_and_strings = 1
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:ycm_always_populate_location_list = 1
let g:ycm_error_symbol = '▸'
let g:ycm_warning_symbol = '▸'
let g:ycm_goto_buffer_command = 'horizontal-split'
endif
if has('python')
" ultisnips - snippet engine
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
endif
" vim-cmake-completion - completion & help
Plug 'kbenzie/vim-cmake-completion', {'for': ['cmake']}
" vimomni - Completion for vimscript
Plug 'vim-scripts/vimomni', {'for': ['vim']}
" ale - Asynchronous Lint Engine
Plug 'w0rp/ale'
let g:ale_sign_error = '▸'
let g:ale_sign_warning = '▸'
let g:ale_echo_msg_format = '[%linter%] %s (%code%)'
let g:ale_linters = {'c': [], 'cpp': []}
hi link ALEError SyntasticError
hi link ALEWarning SyntasticWarning
hi link ALEErrorSign SyntasticErrorSign
hi link ALEWarningSign SyntasticWarningSign
" git diff in the sign column
Plug 'airblade/vim-gitgutter'
if exists('&signcolumn')
set signcolumn=yes
else
let g:gitgutter_sign_column_always = 1
endif
if has('python')
" format.vim - format with text objects
Plug 'git@bitbucket.org:infektor/format.vim.git'
endif
" vim-textobj-user - library for creating text objects
Plug 'kana/vim-textobj-user'
" vim-textobj-entire - Entire file text object
let g:textobj_entire_no_default_key_mappings = 1
Plug 'kana/vim-textobj-entire'
xmap a% <Plug>(textobj-entire-a)
omap a% <Plug>(textobj-entire-a)
xmap i% <Plug>(textobj-entire-i)
omap i% <Plug>(textobj-entire-i)
" vim-textobj-parameter - Parameter text object
Plug 'sgur/vim-textobj-parameter'
" vim-textobj-uri - URI text object
Plug 'jceb/vim-textobj-uri'
" vim-textobj-comment - Comment text object
Plug 'glts/vim-textobj-comment'
omap a/ <Plug>(textobj-comment-a)
xmap a/ <Plug>(textobj-comment-a)
omap i/ <Plug>(textobj-comment-i)
xmap i/ <Plug>(textobj-comment-i)
" vim-textobj-sentence - Improved sentence text object
Plug 'reedes/vim-textobj-sentence'
" vim-commentary - toggle comments
Plug 'tpope/vim-commentary'
" vim-surround - edit delimiters
Plug 'tpope/vim-surround'
" vim-repeat - better dot command
Plug 'tpope/vim-repeat'
" vim-fugitive - git wrapper
Plug 'tpope/vim-fugitive'
" vim-eunuch - unix command warppers
Plug 'tpope/vim-eunuch'
" vim-vinegar - improved directory browser
Plug 'tpope/vim-vinegar'
" vim-abolish - CamelCase to under_score to mixedCase
" TODO: Copy the good bit remove this plugin
Plug 'tpope/vim-abolish'
" vim-unimpaired - for pairs of tasks
Plug 'tpope/vim-unimpaired'
" vim-speeddating - sane date manipulation
Plug 'tpope/vim-speeddating'
" vim-endwise - wisely add end{if,function}, fork with cmake support
Plug 'godbyk/vim-endwise', {'branch': 'patch-1'}
" vim-jdaddy - text object & formatting for json
Plug 'tpope/vim-jdaddy'
" vim-projectionist - granular project configuration
Plug 'tpope/vim-projectionist'
" fzf.vim - Fuzzy finder
if !platform#is_windows()
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all --no-update-rc'}
Plug 'junegunn/fzf.vim'
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-s': 'split',
\ 'ctrl-v': 'vsplit'
\ }
endif
Plug 'kbenzie/note.vim'
let g:note_directory = '~/Sync/Notes'
if !platform#is_windows()
" Seemless vim/tmux pane navigation
Plug 'christoomey/vim-tmux-navigator'
" Enable focus events when in tmux session
Plug 'tmux-plugins/vim-tmux-focus-events'
endif
" replay macros with the enter key
Plug 'wincent/replay'
" vim-matchit - Improved % matching
Plug 'andymass/vim-matchup'
" vim-table-mode - Easy table manipulation
Plug 'dhruvasagar/vim-table-mode'
let g:table_mode_map_prefix = '<leader>t'
let g:table_mode_toggle_map = 'M'
" DoxygenToolkit.vim - documentation stubs
Plug 'vim-scripts/DoxygenToolkit.vim', {'for': ['cpp', 'c']}
let g:DoxygenToolkit_commentType = 'C++'
" markdown fenced code block languages
let g:markdown_fenced_languages =
\ ['cpp', 'c', 'cmake', 'sh', 'vim', 'python', 'yaml']
" Enable builtin syntax folding
let g:xml_syntax_folding = 1
let g:sh_fold_enabled = 1
" xterm-color-table.vim - view term and hex colors
Plug 'guns/xterm-color-table.vim'
" SPIR-V syntax
Plug 'kbenzie/vim-spirv'
let g:spirv_current_id_highlight = 'ctermbg=234, guibg=#1c1c1c'
" CMake, GLSL, HLSL, OpenCL C syntax
Plug 'rperier/vim-cmake-syntax'
Plug 'tikhomirov/vim-glsl'
Plug 'beyondmarc/hlsl.vim'
Plug 'frasercrmck/opencl.vim'
Plug 'asciidoc/vim-asciidoc'
Plug 'mustache/vim-mustache-handlebars'
Plug 'joshglendenning/vim-caddyfile'
Plug 'kbenzie/vim-khr'
call plug#end()