Compare commits

...

341 Commits

Author SHA1 Message Date
55e4af4e6c Change backgroup highlight of cursor line 2018-08-24 11:10:45 +01:00
4285de795b Improve cpp template snippet 2018-08-24 11:10:24 +01:00
bbb936c474 Show cursor line with different highlight group 2018-08-22 13:46:47 +01:00
1aba96025b Add TODO's for :LStripLines 2018-08-10 10:00:16 +01:00
f207ff13e2 Add new C++ feature to syntax highlighting 2018-08-07 12:33:23 +01:00
e24e9f70fa Add a lit named ID match snippet 2018-07-16 10:46:24 +01:00
cf8ab27b10 Improve vim-spirv ID match highlights 2018-07-16 10:46:24 +01:00
da33d472b8 Add delimiter highlighting to zsh 2018-06-06 20:08:56 +01:00
f263832c64 Use signcolumn when available 2018-06-06 20:08:56 +01:00
47820a1701 Set lit[.local].cfg to Python & disable ALE 2018-06-04 11:25:57 +01:00
39d6eab8a3 Don't highlight markdown errors 2018-04-26 12:49:30 +01:00
8711db6248 Make .test files llvm filetype 2018-04-26 12:49:11 +01:00
d6950e1a95 Actually enable relative number when available 2018-04-26 12:48:51 +01:00
5f80d0d878 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-04-20 10:12:14 +01:00
63a4131a09 Add vim-projectionist plugin 2018-04-13 23:52:00 +01:00
3441037464 Don't match non conflict markers 2018-04-13 23:23:31 +01:00
cdb521d9be Use own fork for vim-cmake-completion 2018-04-13 18:06:29 +01:00
082ecd9d49 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-03-29 21:22:26 +01:00
021f24a4ee Remove relativenumber autocmds
These kept disabling relativenumber when editing which was annoying.
2018-03-29 21:21:36 +01:00
4774842d5c Improve Jenkins groovy syntax highlights 2018-03-28 15:31:56 +01:00
95d04abef8 Add Doxygen @retval snippet & other improvements 2018-03-28 15:30:38 +01:00
6f1485ac04 Add extern "C" block snippet 2018-03-15 16:18:31 +00:00
fa46536e16 Add bool to C string snippet 2018-03-14 17:39:31 +00:00
51205fdf35 Add string_view c++ printf snippet 2018-03-13 12:54:51 +00:00
d18e8545cc Cleanup vim dictionary syntax 2018-03-01 17:00:47 +00:00
160967b428 Change netrw highlight group 2018-02-23 22:08:12 +00:00
d7995347fb 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-02-09 15:08:53 +00:00
e29a326d45 Add the linter code to ale messages 2018-02-09 15:05:29 +00:00
903767da78 Add TODO for Python syntax folding bug 2018-01-21 20:30:13 +00:00
79fe323599 Add improved sentence text object 2018-01-21 20:29:00 +00:00
09e180e257 Disable airline git integration 2018-01-19 20:44:35 +00:00
09e6372540 Replace matchit.vim with vim-matchup 2018-01-16 16:00:05 +00:00
9416de3c3c 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-01-16 15:57:08 +00:00
c554be33e3 Support changing cursor shape for iTerm2 in tmux 2018-01-02 16:23:18 +00:00
b63f7e3955 Add another variant of GitHub checkbox snip 2017-12-28 12:51:24 +00:00
c5ab503b66 Add make filetype config 2017-12-28 12:51:05 +00:00
352b159a8d Add more intuitive GitHub checkbox snippet 2017-12-12 14:32:01 +00:00
1346f41f46 Set commentstring for OpenCL files 2017-12-11 15:24:47 +00:00
a8325c4a4a Clean up documentation 2017-12-11 15:24:25 +00:00
a04aafd6eb Fix vim cursor shape after tmux terminal-overrides 2017-12-06 11:28:15 +00:00
a344d13c93 Use tmux terminal-override for cursor shape on VTE 2017-12-06 11:08:01 +00:00
94701f50d7 Use 4 space tabs in YAML files 2017-12-06 11:06:49 +00:00
93f5a8f9d1 Add more Doxygen snippets for C/C++ 2017-12-06 11:06:26 +00:00
746543cfbf Move relevant settings closer together 2017-12-05 21:29:48 +00:00
7b7a6c5d94 Enable cursor shape changes by default 2017-12-01 11:17:03 +00:00
c4519d7310 Add do#cursor_escape_sequences()
Control the cursor shape based on the current mode.
2017-12-01 10:44:43 +00:00
ed157ca238 Move mouse setting 2017-11-23 22:27:56 +00:00
71c7d91082 Extend enabled listchars, enable showbreak 2017-11-23 22:27:08 +00:00
836d91ad11 Guard relativenumber setting 2017-11-23 21:42:11 +00:00
b59b937b6a Update Codeplay Software Ltd. license snippet 2017-11-23 21:40:32 +00:00
7d086a3328 Remove cruft and add TODO's 2017-11-20 22:40:18 +00:00
a4ea4c1d91 Move rarely used functions to autoload 2017-11-20 22:35:27 +00:00
261a846874 Enable visual highlight of trail spaces and tabs 2017-11-20 21:28:44 +00:00
16c4b2c523 Remove autocmd to right string white space 2017-11-20 21:17:30 +00:00
5f9f84e0d8 Add highlight group for SpecialKey 2017-11-20 21:16:17 +00:00
5d130aad95 Fix Markdown fenced code block snippet 2017-11-17 20:17:33 +00:00
1c131c2152 Add groovy syntax support for keyword args 2017-11-09 18:18:50 +00:00
496047014e Add python snippet to insert ipdb breakpoint 2017-11-09 18:18:50 +00:00
56a1a5c70e Add CMake debug snippet 2017-10-10 14:49:56 +01:00
98aa19cc86 Add fprintf debug snippet for C/C++ files 2017-09-29 14:40:19 +01:00
fe40eb137c Add asciidoc refpage snippet 2017-09-26 14:48:03 +01:00
b633a32ff2 Enable spelling for asciidoc filetype 2017-09-26 14:47:40 +01:00
23ee710981 Add :ISort vim command 2017-09-20 12:00:00 -05:00
3fd1440251 Add vim command snippet 2017-09-20 11:59:41 -05:00
5c82ffbb32 Add .env/.out filetype autocmds 2017-09-18 18:38:40 -05:00
d8d631ce23 Add augroup vim snippet 2017-09-18 18:38:26 -05:00
618df81cbf Update gitconfig filetype to use tabstop=8 2017-09-01 12:18:50 +01:00
b18a9ddbea Remove lexima because it broke vim-endwise
Also change to fork of vim-endwise with CMake support
2017-08-31 21:20:15 +01:00
320f5668e8 Only match = default when ends on word boundary 2017-08-23 21:05:06 +01:00
2f36f831f2 Add GitGutter next/prev hunk mappings 2017-08-09 12:13:45 +01:00
44c0605d8f Use global setting for Python highlights 2017-08-08 13:55:41 +01:00
dfb360fb00 Obey cpp options in c syntax file 2017-07-26 00:30:13 +01:00
ffdb5e1f4c Add cpp explicit function template highlight 2017-07-26 00:27:57 +01:00
3b99d333b2 Add more vim colorschemes 2017-07-25 17:21:07 +01:00
17fdcca35c Add main Python snippet 2017-07-25 17:20:42 +01:00
8c95be2700 Add mapping for :Ag <cword> 2017-07-21 13:24:25 +01:00
3442bce196 Add missing zsh option keyword to vim syntax 2017-06-14 00:41:54 +01:00
daf8434e84 Add function folding to zsh filetype 2017-06-14 00:14:22 +01:00
cce7a8dc4a Make fresh colors less garish
Make SpellBad and Underlined readable and make SpellCap purple.
2017-06-12 00:23:21 +01:00
fc6526825e Add % and . to llvm iskeyword list 2017-06-08 12:15:27 +01:00
b73c4d158e Use default tab width in markdown
Also check if +syntax is available before enabling spell.
2017-06-08 11:40:33 +01:00
6c3b83fada Add zsh snippets 2017-06-01 00:31:10 +01:00
226cadc726 Add std::printf and std::fprintf snippets 2017-05-24 21:37:51 +01:00
b578ca68ff Improve groovy syntax highlighting 2017-05-24 10:37:30 +01:00
3bfe40688e Enable folding is sh filetype 2017-05-18 11:23:47 +01:00
dc7373b128 Don't set global settings in ftplugin 2017-05-09 17:44:51 +01:00
fe01a2d0b3 Update vim-plug 2017-05-05 21:23:33 +01:00
f0ba36cfe2 Fix vint warning and errors in functions.vim 2017-05-04 00:20:12 +01:00
8d28972e42 Update mappings to {i,n,v}noremap 2017-05-03 23:52:33 +01:00
64229d93c9 Use existing windows/tabs when jumping to errors 2017-05-03 23:38:11 +01:00
55ab473a15 Check features are available before using them 2017-05-03 23:23:24 +01:00
7e58cfd1d2 Add syntax folding for cmake 2017-05-03 22:56:30 +01:00
04f872cf5f Document indent options & check they exist 2017-05-03 22:17:09 +01:00
3a5caa8287 Add vim-khr plugin 2017-04-24 10:24:35 +02:00
c344bf997a Add comment text object plugin 2017-04-22 17:06:25 +01:00
810bad8403 Add ; to do/while snippet 2017-04-19 22:01:27 +01:00
ed635ec63e Use setlocal in TabWidth command 2017-04-12 17:02:10 +01:00
d869fac388 Add URI text object plugin 2017-03-31 22:18:56 +01:00
64f1ee0128 Allow C++ lambda snippet to be inline 2017-03-30 22:42:01 +01:00
e7bf9a29cf Tweet json filetype & syntax settings 2017-03-27 12:42:17 +01:00
39acb121e2 Add preview window mappings 2017-03-27 12:41:39 +01:00
4e41cb6642 Add C inline comment surround mapping 2017-03-27 12:40:54 +01:00
b4110c8a1b Fix vint warnings in vimrc 2017-03-09 00:15:13 +00:00
7294d2cbed Use '' not "" in fresh colorscheme 2017-03-09 00:14:50 +00:00
06cef2373d Override groovy syntax 2017-02-17 21:45:13 +00:00
204447631c Enable clang-tidy ale checker 2017-02-17 21:44:52 +00:00
c4b553f433 Revert to default json syntax 2017-02-17 21:44:25 +00:00
4164c874ee Improve ale echo message 2017-02-09 14:45:33 +00:00
f4fd5fd25c Make YCM goto buffer command split horizontally 2017-02-08 23:19:26 +00:00
b0a92dbbe9 Remove dev hack for format.vim loading 2017-02-07 21:50:26 +00:00
349ad5277d Load local plugins first 2017-02-07 21:43:18 +00:00
1b7fdbca36 Replace syntastic with ale 2017-02-06 11:44:15 +00:00
ae317c8009 Add LLVM IR syntax 2017-02-06 11:44:15 +00:00
2219bf1b91 Move plugins to .vim/bundle 2017-02-04 22:30:48 +00:00
cb4feafe2f Simplify xterm256-color detection 2017-02-03 14:38:41 +00:00
4290c56fcb Add missing <CR> from :lfirst mapping 2017-02-02 16:33:23 +00:00
6c65876ca2 Change markdown comment string to html 2017-02-01 23:24:15 +00:00
1c6695c712 Conceal on cursor hover normal mode for markdown 2017-01-28 09:23:11 -08:00
3cddc6ac9e Improve doxygen header snippet 2017-01-27 22:49:14 -08:00
14ba45942d Remove vim-instant-markdown 2017-01-28 05:37:27 +00:00
f84a56e2fa Enable folding in xml 2017-01-28 05:37:27 +00:00
dc3698774e Improve fzf mappings 2017-01-28 05:37:27 +00:00
98e2e6fb5f Namespace syntax match 2017-01-28 05:37:27 +00:00
f897c0213f Change relativenumber behaviour 2017-01-28 05:37:27 +00:00
2dd3d4d297 Match operator on word boundary only 2017-01-22 09:26:17 -08:00
05e9f2184e Update vim TERM checks 2017-01-11 20:27:30 +00:00
900f4a375b Increase syntax syn minlines to 500 2017-01-11 20:23:07 +00:00
52c623a2a3 Only flip relativenumber for cpp files 2017-01-11 20:17:26 +00:00
b3d4884ac7 Enabling folding in javascript files 2017-01-11 20:11:34 +00:00
ad3d0039e1 Add vim Caddyfile syntax 2017-01-11 20:11:05 +00:00
784fddd758 Change markdown fenced code block snippet trigger 2017-01-10 20:48:26 +00:00
294c915d0b Add markdown frontmatter snippet 2017-01-10 20:48:26 +00:00
ae2e5e2110 Add markdown link snippet 2017-01-08 23:58:50 +00:00
9a819ebd5b Add utc date time snippet 2017-01-08 11:51:06 +00:00
a2c1ae9c2e Make json syntax embed aware 2017-01-08 11:02:58 +00:00
d396a23316 Change div snippet, add nav snippet for html 2017-01-08 11:02:58 +00:00
c733ae1206 Extend html, css, and javascript syntaxes 2017-01-08 11:02:58 +00:00
0a62877cdc Add yaml frontmatter support to markdown 2017-01-08 11:02:58 +00:00
5649efe7e3 Add javascript function snippet 2017-01-08 11:02:58 +00:00
407794c5a1 Fix C ternary operator match 2017-01-03 12:59:46 +00:00
15dcb1d141 Update Codeplay copyright to use current year 2017-01-03 12:57:48 +00:00
d8bf0b8148 Customize json syntax highlights 2016-12-30 21:46:18 +00:00
fcb96c62af More cleanup let statements 2016-12-30 16:31:59 +00:00
12e739e1cf Swap autopairs.vim for leima.vim 2016-12-30 16:28:13 +00:00
597f3eb255 Change setting leader 2016-12-30 16:27:46 +00:00
2818217b8a Cleanup C/C++ syntax files 2016-12-29 20:55:47 +00:00
844990847a Improve markdown GitHub checkbox highlights 2016-12-26 12:28:19 +00:00
da48dc37d8 Fix cpp syntax match 2016-12-26 12:15:42 +00:00
67e1e5e564 Fix end of multi-line doxygen highlight 2016-12-26 12:12:32 +00:00
9b3699d4f4 Enable Doxygen mapping only for c, cpp filetypes 2016-12-26 12:10:13 +00:00
459e415a48 Add :Syntack command to view syntax group stack 2016-12-24 13:20:22 +00:00
1b5f88c2ca Add function to clone highlight groups with attrs 2016-12-24 13:19:32 +00:00
cd9ab97cae Change name of checkbox toggle functionality 2016-12-24 13:18:52 +00:00
b45fce4aa4 Simplify fold text 2016-12-24 13:16:51 +00:00
b571fe2416 Remap <C-L> to <C-W>L to get redraw back 2016-12-24 13:11:30 +00:00
f8a5c6553a Refactor and optimize C/C++ syntax highlights 2016-12-23 22:39:31 +00:00
0d72aef5ec Change show highlight mapping to use <leader> 2016-12-23 15:52:12 +00:00
78e90ff6d1 Improve GitHub checkbox highlighting 2016-12-23 15:19:53 +00:00
55826256d1 Set all.snippets to -1 priority 2016-12-23 15:08:48 +00:00
62b36d56f4 Add std::enable_if snippet 2016-12-23 15:01:03 +00:00
d5ba0b229d Remove macro_mode functions, use vim-replace 2016-12-23 15:00:15 +00:00
346083c91f Add vim-endwise 2016-12-13 18:28:29 +00:00
ab23df36e0 Add doxygen @see snippet 2016-12-01 15:31:17 +00:00
768dacf721 Default to a space in * [ ] snippet 2016-11-24 19:23:09 +00:00
09ae758457 Move json highlight overrides to after/syntax 2016-11-24 14:22:15 +00:00
e68fe08941 Add vim replay plugin for easy macro replay 2016-11-20 00:27:27 +00:00
9b755ff7f9 Improve doxygen markdown highlighting 2016-11-19 19:26:38 +00:00
14d99b15fa Improve YouCompleteMe/syntastic error/warning symbols 2016-11-19 17:38:45 +00:00
745df3394f Move .local_plugins.vim to .vim/local.vim 2016-11-19 17:38:45 +00:00
c0f824c95f Add vim-spirv plugin 2016-11-17 20:09:43 +00:00
2e7ab617e5 Replace vim-notes with note.vim 2016-11-16 21:01:26 +00:00
cd5b62dfb9 Add vim colorscheme morning-white for presentations 2016-11-16 21:01:26 +00:00
8ee3192f4f Update syntastic URL 2016-11-15 20:15:26 +00:00
c864d372c8 Make sign column color match number column 2016-11-15 20:14:49 +00:00
b9ef55b3a0 Improve some CMake snippets 2016-11-10 18:42:37 +00:00
ff9680cc42 Add vim-gitgutter plugin 2016-11-10 11:04:56 +00:00
b139533605 Add CMake generator expression snippet 2016-11-10 11:04:38 +00:00
498b759c44 Improve GitHub markdown checkbox snippet 2016-11-07 13:34:57 +00:00
64adef6480 Improve C++ namespace snippet 2016-11-04 23:22:33 +00:00
3f6aba0e4b Improve Doxygen snippets 2016-11-04 23:13:53 +00:00
16c84622b7 De-noise c pre-processor snippets 2016-11-04 22:23:00 +00:00
602a22eeb8 Shorten /// @copydoc snippet 2016-11-02 20:49:53 +00:00
61be83c00a Add asciidoc filetype plugin 2016-10-28 10:40:52 +09:00
dfa5ce172e Add TODO surround mapping for C/C++ 2016-10-28 10:36:11 +09:00
8d2d75a931 Improve XML attribute snippet, add XML comment snippet 2016-10-28 10:35:07 +09:00
ed26f9d53c Add todo's to investigate interesting vim settings 2016-10-25 08:43:16 +09:00
41eb5a17e6 Improve support for GitHub style checkboxes 2016-10-25 08:43:16 +09:00
740ab2776c Add highlighting of ternary operator in C/C++ 2016-10-25 08:43:16 +09:00
1d29d509ec Add GitHub check box to markdown syntax 2016-10-18 19:37:19 +01:00
6ac9f12eda Add Google Test snippets 2016-10-07 19:59:26 +01:00
f586dd76c6 Move doxygen snippets to separate file 2016-10-07 19:59:26 +01:00
96f203c276 Add noisy struct snippet 2016-10-07 19:59:26 +01:00
714ef293e0 Change diff highlight groups 2016-10-07 17:25:58 +01:00
080da93e51 Add googletest snippets 2016-09-30 17:20:08 +01:00
dd5557d518 Allow C++ casts to be substring 2016-09-30 17:20:08 +01:00
7839684186 Change template snippet to use class not typename 2016-09-30 17:20:08 +01:00
2903c4e78e Improve C main snippet 2016-09-30 17:20:08 +01:00
bb7bec892d Improve C++ for loop snippet 2016-09-27 13:42:36 +01:00
363fa8af7e Improve doxygen param snippet at brief snippet 2016-09-27 13:42:36 +01:00
5416bad1cf Update todo snippet 2016-09-27 00:30:37 +01:00
ead0ec3a0c Add static_assert snippet 2016-09-25 00:25:31 +01:00
df4d1c6dac Add macro mode helpers
* Easily {un}map <CR> to @@
* Add macro_mode#{en,dis}able autoload functions
* Add MacroMode{En,Dis}able commands
2016-09-20 21:56:32 +01:00
610ba4bc11 Switch to vim-table-mode from Tabular 2016-09-20 21:56:02 +01:00
bb971c068f Use <Space> in mappings instead of exec 2016-09-20 20:10:26 +01:00
1710c05777 Add comprehensive mappings for QuickFix and Location lists 2016-09-20 20:10:26 +01:00
deddfe1fff Move mapping into mappings.vim 2016-09-20 20:10:26 +01:00
b2cd4246b8 Add statement highlight for = delete in C/C++ 2016-09-20 20:10:26 +01:00
ec7826a9fc Fix bug in Doxygen highlighting 2016-09-20 20:10:26 +01:00
c30804c20d Add image link snippet for markdown 2016-09-20 20:10:26 +01:00
0d9cd0cf9d Change highlight group of nested name specifiers 2016-09-20 20:10:26 +01:00
f93ae6926c Highlight new/delete as operators 2016-09-20 20:10:26 +01:00
b13a1676ed Conditionally enable plugins on Windows 2016-09-14 10:05:04 +01:00
e5dde09c43 Add ignore file 2016-09-14 10:04:44 +01:00
d7a6ec3166 Improve C Doxygen highlights 2016-09-12 10:07:57 +01:00
eb326f945a Disabled annoying airline features 2016-09-11 17:16:58 +01:00
b40235313c Don't show mode in command line 2016-09-11 16:57:41 +01:00
9941bd120f Fix Python tab error highlighting 2016-09-11 14:42:56 +01:00
3f745ddbf1 Swap <C-f>c from :Commits to :Colors 2016-09-11 14:42:29 +01:00
7c56630037 Use K for YouCompleteMe GetDoc in C/C++ files 2016-09-11 14:42:01 +01:00
89fb6fc077 Document weird behaviour in gitcommit files 2016-09-11 13:18:03 +01:00
5abc94e1d9 Override groovy syntax file 2016-09-11 13:12:14 +01:00
5b37cf8d32 Change Folded foreground highlight 2016-09-11 13:04:59 +01:00
0a8d3b2293 Add support for folding python blocks in vim files 2016-09-11 13:02:20 +01:00
f1705c62a7 Move notes highlight overrides to ftplugin 2016-09-11 13:01:05 +01:00
872f4426ef Add custom fold functions for json 2016-09-11 13:00:08 +01:00
f9f07c120e Remove {{{ markers }}} from vimrc 2016-09-11 12:56:19 +01:00
fe7487b950 Remove vim-flake8 plugin 2016-09-11 11:45:35 +01:00
cc3f3cac56 Rename options.vim to settings.vim 2016-09-11 11:30:44 +01:00
8572ccea16 Reorder fileformats 2016-09-11 11:29:49 +01:00
258fecb2c1 Remove groovy.vim plugin 2016-09-11 11:27:31 +01:00
3a621270a5 Only load vim-cmake-completion for cmake files 2016-09-11 11:26:42 +01:00
c61d85e3f9 Improve custom vim fold expression 2016-09-08 22:57:01 +01:00
ca2451bab0 Improve Python folding behaviour 2016-09-08 22:10:31 +01:00
0fbffa38a2 Simplify C/C++ {} matching 2016-09-08 10:46:53 +01:00
a8b20931bb Improve DiffText highlight color 2016-09-08 09:43:36 +01:00
f0e3bb4fd8 Rename option to enable Doxygen comment highlights 2016-09-08 09:43:36 +01:00
d365c6f5dd Enable folding {} in C/C++ & delimiter highlights 2016-09-08 09:43:36 +01:00
ad61b378f3 Extend groovy syntax with Jenkins DSL tweeks 2016-09-08 00:15:49 +01:00
e9a9a35a97 Improve markdown folding & syntax highlights 2016-09-08 00:03:17 +01:00
1f101401f2 Simplify C param snippet 2016-09-06 11:20:53 +01:00
9b2571f774 Escape - cOperator match 2016-09-05 22:29:55 +01:00
7097922c9a Specialize << and >> highlight matches 2016-09-04 23:24:45 +01:00
edc81175c1 Add ? to C operator highlighting 2016-09-04 23:24:14 +01:00
1ecf23e555 Add C++ lambda function snippet 2016-09-04 22:47:01 +01:00
17881fb52a Add alignas, alignof, decltype to cppOperator group 2016-09-04 22:46:14 +01:00
0232fdcc4c Update fresh colorscheme 2016-09-04 21:47:32 +01:00
b0ad0bd67e Improve C/C++ syntax highlighting 2016-09-04 21:46:46 +01:00
da48bea4de Refactor C/C++ snippets 2016-09-04 21:43:53 +01:00
816e23a83a Add C++ cast snippets 2016-09-04 21:42:55 +01:00
487def5773 Simplify C++ class snippet 2016-09-04 21:42:27 +01:00
4f72cfdc94 Add date snippet to display Month DD, YYYY 2016-09-04 21:40:38 +01:00
ff94cf3002 Update me snippet to include nickname 2016-09-04 21:40:04 +01:00
1e9814b5ae Add improved additional C++ syntax highlighting 2016-09-02 22:37:51 +01:00
4788bc2f82 Remove plugin vim-native-syntax 2016-09-02 22:37:51 +01:00
e6a20d0edc User nicer blue for Vim Type highlight group 2016-09-02 22:37:51 +01:00
14bf703db1 Make it easier to repeat vim macros 2016-08-26 14:35:36 +01:00
8844fb0b35 Remove autocmd from custom surround variables 2016-08-23 20:15:50 +01:00
a54eabce92 Add vim-surround cmake mapping to make a variable 2016-08-23 10:51:46 +01:00
d94a960022 Change vim leader key to space 2016-08-17 17:28:32 +01:00
ddd0941057 Change surround mapping for creating markdown link 2016-08-11 11:14:24 +01:00
6d18e490c5 Enable tmux mouse support & add open, urlview 2016-08-10 15:36:04 +01:00
d8d6146119 Add K mapping for Python docs 2016-08-03 23:45:31 +01:00
e4a1a13465 Customise vim-surround for markdown link syntax 2016-07-24 13:53:52 -07:00
7867b5faed Load local vim plugins from non git file 2016-07-22 12:31:55 +01:00
ff7bcf3c90 Add syntastic vim plugin 2016-07-21 20:54:27 +01:00
fa28829854 Remove some markers after adding vim foldexpr 2016-07-17 23:41:06 +01:00
71759afba0 Improve the vim fold text, line content first 2016-07-17 23:33:12 +01:00
c8ad4f5427 Improve vim script fold with custom foldexpr 2016-07-17 23:32:11 +01:00
5675713d49 Make K mapping no remap for vim script 2016-07-17 23:30:24 +01:00
06edec0673 Add vim-jdaddy json plugin 2016-07-14 00:11:27 +01:00
e7b07ab0d7 Optionally load ~/Sandbox/format.vim if available 2016-07-10 23:06:51 +01:00
16ba7788d4 Improve gitcommit ftplugin settings 2016-07-06 21:24:33 +01:00
b246b42526 Remove ftdetect/python.vim due to wrong location 2016-07-06 21:20:58 +01:00
9441439d55 Remove <tab> from YouCompleteMe menu mappings 2016-07-06 20:50:48 +01:00
1bed3d319a Improve vmap 0 to play nice with comments 2016-07-06 20:48:14 +01:00
a1a60899bd Move fzf mappings to plugin/mappings.vim 2016-07-05 22:19:39 +01:00
94f46755d3 Restructure vim config 2016-07-05 21:29:27 +01:00
fd80755feb Remove clang-format.py script 2016-07-05 20:19:47 +01:00
efabe4051c Move vim color settings to .vim/plugin/color.vim 2016-07-05 20:15:22 +01:00
3bc143ac83 Move vim GUI options to .vim/gvimrc 2016-07-05 20:00:30 +01:00
2a73c446e3 Change <C-f>l to use :BLines 2016-07-05 19:35:24 +01:00
2b83e8c9a7 Move .vimrc to .vim/vimrc split platform detection 2016-07-05 19:35:11 +01:00
9fb1c4cbdd Fix xml snippet for api generator 2016-06-22 17:21:24 +01:00
707fac109f Rename and move GitHub style checkboxes snippet 2016-06-19 16:30:44 +01:00
b2c7df1757 Update vim WarningMsg highlight group 2016-06-16 22:37:04 +01:00
f532a55695 Add get vim function snippet 2016-06-16 22:37:04 +01:00
a464837924 Add me snippet for my name and email address 2016-06-16 22:37:04 +01:00
b9cd402371 Add vim normal mode filetype mapping K opens help 2016-06-16 22:37:04 +01:00
de2db13c5c Add noexpandtag for tags filetype 2016-06-11 21:39:36 +01:00
1f92cbcff7 Add vim-flake8 & don't use textwidth=80 in Python 2016-06-08 09:33:39 +01:00
38f1923462 Add vim if snippet 2016-05-29 21:16:19 +01:00
f449b7b23d Don't expand tabs in gitconfig files 2016-05-25 22:35:40 +01:00
157c8d1212 Add snippet for vim function 2016-05-25 21:01:21 +01:00
c78ed0546b Improve TODO and NOTE snippets when in comments 2016-05-21 00:55:43 +01:00
a06cf9b6eb Add Error and Question highlights to fresh.vim 2016-05-20 13:31:26 +01:00
a18af25107 Disable open on left and scroll off for help 2016-05-06 10:21:23 +01:00
7341fa2b18 Update fresh.vim 2016-05-03 20:47:31 +01:00
8b08a3140a Add GitHub markdown checklist snippet 2016-04-29 22:35:47 +02:00
f1ca0bb4b6 Add API snippets 2016-04-21 10:14:54 +01:00
f69b063bb8 Update vim-plug 2016-04-20 00:15:00 +01:00
0dbdc5e3f4 Final tweak vim-airline theme 2016-04-19 23:30:32 +01:00
e590df6267 Tweak colors for vim-airline fresh theme 2016-04-19 23:27:43 +01:00
baf5257763 Add StatusLine & WildMenu highlights 2016-04-19 23:26:56 +01:00
2cd7558056 Add fresh vim-airline theme 2016-04-19 22:57:17 +01:00
949dad6fc3 Improve vim python filetype settings 2016-04-17 20:03:00 +01:00
f79ac29a9e Tweek vim gitcommit settings 2016-04-17 16:06:45 +01:00
b27f73c53d Add more snippets 2016-04-17 15:12:20 +01:00
b561fefef5 Add generic TODO snippet using commentstring 2016-04-17 13:04:34 +01:00
86f595a25c Fix typo in copyright snippet! 2016-04-12 15:32:20 +01:00
2ec49b5814 Add vim mappings around yapf python formatter 2016-04-03 13:49:50 +01:00
87237e61ce Add python formatting options 2016-04-01 22:54:48 +01:00
2e8580f2ec Add TODO snippet for CMake 2016-03-21 16:41:26 +00:00
568e508a55 Simplify .vimrc layout & folds 2016-03-12 21:30:39 +00:00
35ef7b7a3d Move vim autocommands into ftdetect or ftplugin 2016-03-12 20:35:11 +00:00
0ae7a306c1 Add vim-plug script & update .vimrc 2016-03-09 08:07:00 +00:00
5b75570016 Remove Vundle submodule 2016-03-09 06:55:15 +00:00
88c7679944 Complete CMake snippets targeting version 3.0 2016-02-26 22:22:35 +00:00
e0e02a4246 Add remaining CMake string() snippets 2016-02-26 18:15:47 +00:00
3c57ab7859 Add more CMake snippets 2016-02-24 21:25:08 +00:00
e95959c20a Add more CMake snippets 2016-02-24 00:55:54 +00:00
80ff00f00f Make TODO and NOTE C snippets more general 2016-02-24 00:55:20 +00:00
d5118f31a0 Updates to fresh.vim colorscheme 2016-02-20 19:01:12 +00:00
6faab559cf Merge commit '5aaacb96c0a93d4f7a48c2fb7c80a65840810876' 2016-02-18 14:38:05 +00:00
e7674c6dcd Add '.vim/UltiSnips/' from commit '84cd9817817a28d58e92eb715273479509e51187'
git-subtree-dir: .vim/UltiSnips
git-subtree-mainline: f258dd00078a9aebb235c358b6048aac250d445a
git-subtree-split: 84cd9817817a28d58e92eb715273479509e51187
2016-02-11 14:35:59 +00:00
090b6e6dd1 Remove Ultisnips submodule 2016-02-11 14:35:19 +00:00
8bce293ed3 Update UltiSnips submodule 2016-02-11 14:06:08 +00:00
52ebb7df9c Update UltiSnips submodule 2016-02-11 11:35:28 +00:00
c3e92b474e Update UltiSnips submodule 2016-02-09 11:54:32 +00:00
65091e5326 Update UltiSnips submodule 2016-02-07 12:30:21 +00:00
48b5899390 Update UltiSnips submodule 2016-02-01 14:28:39 +00:00
c3a14abf10 Update UltiSnips submodule with some cmake snippets 2016-02-01 12:53:57 +00:00
376763a14a Add UltiSnips submodule 2016-01-23 00:10:55 +00:00
89830c579e Remove redmine.snippets 2016-01-23 00:09:49 +00:00
3424e872aa Update vim clang-format.py 2015-11-18 23:18:35 +00:00
b0b2d05a56 Update Vundle.vim 2015-11-10 11:21:39 +00:00
2e9e9e948b Match vim status colour to tmux 2015-11-07 22:13:35 +00:00
2843472fa1 Add vim snippets for redmine filetype 2015-10-14 17:34:34 +01:00
d07d95cfa7 Use vim after/ftplugin/c.vim to support '///' doxygen comments 2015-10-08 21:40:30 +01:00
b66a1c4767 Add submodule Vundle.vim replacing unmaintained vundle 2015-08-23 22:44:51 +01:00
55112fe034 Remove submodule vundle 2015-08-23 22:41:09 +01:00
6bc24c53e1 Update vim submodule vundle 2015-06-29 19:31:11 +01:00
78 changed files with 6803 additions and 186 deletions

2
.gitignore vendored Normal file
View File

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

92
UltiSnips/all.snippets Normal file
View File

@ -0,0 +1,92 @@
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 codeplay "Codeplay Software Ltd. copywrite"
`!p snip.rv=commentbefore()`Copyright (C) Codeplay Software Limited. All Rights Reserved.`!p snip.rv=commentafter()`
$0
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

167
UltiSnips/c.snippets Normal file
View File

@ -0,0 +1,167 @@
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 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,85 @@
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 "/// 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

18
after/ftplugin/c.vim Normal file
View File

@ -0,0 +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
set smartindent
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 0b28e334e65b6628b0a61c412fcb45204a2f2bab

View File

@ -1,79 +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> <ESC>:pyf <path-to-this-file>/clang-format.py<CR>i
#
# 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.
#
# 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
# Change this to the full path if clang-format is not on the path.
binary = 'clang-format'
# 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'
# Get the current text.
buf = vim.current.buffer
text = '\n'.join(buf)
# Determine range to format.
cursor = int(vim.eval('line2byte(line("."))+col(".")')) - 2
lines = '%s:%s' % (vim.current.range.start + 1, vim.current.range.end + 1)
# 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, '-lines', lines, '-style', style, '-cursor', str(cursor)]
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:
message = stderr.splitlines()[0]
parts = message.split(' ', 2)
if len(parts) > 2:
message = parts[2]
print 'Formatting failed: %s (total %d warnings, %d errors)' % (
message, stderr.count('warning:'), stderr.count('error:'))
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]]
vim.command('goto %d' % (output['Cursor'] + 1))

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", "235", "235", "")
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()