Compare commits

...

528 Commits

Author SHA1 Message Date
a9316971f1 temp! 2022-11-08 11:21:35 +00:00
ee5110efd8 Remove minpac in preparation for using Ansible 2022-11-08 11:21:08 +00:00
330329ef2b Replace ad hoc conflict markers with plugin 2022-11-07 14:27:13 +00:00
32610db521 Make gx work in WSL 2022-11-06 11:21:32 +00:00
4c142d2fa5 Only setup cursor shape in vim, not nvim
Neovim already changes cursor shape by default, there's no need to
override it.
2022-11-06 11:12:06 +00:00
cde38c5469 Make CocInlayHint look like Comment 2022-10-31 11:48:44 +00:00
dfc26e9c40 Disable coc-powershell integrated console 2022-10-29 11:44:15 +01:00
5476d9ec86 Fix coc.nvim change of default first selection 2022-10-25 11:08:25 +01:00
78ae575efe Disable clangd inlay type hints 2022-10-13 10:45:01 +01:00
3577aa13bc Drop some coc-yaml schemas 2022-09-09 22:49:07 +01:00
2ce3d322ca Add coc-powershell on Windows only 2022-06-15 22:15:23 +01:00
27c42a6a92 Don't use GUI tabs in neovim-qt 2022-06-15 22:15:23 +01:00
61ce53bfd3 Don't conceal things in json 2022-06-08 13:56:37 +01:00
d0af1c7116 Fix Doxygen @param highlight
There are two forms of `@param`:

* `@param <name> <description>`
* `@param[<use>] <name> <description>`

Prior to this patch only the latter was highlighting `<name>` as a
special comment, now both forms do this.
2022-05-31 10:59:28 +01:00
ec2b973fc0 Update schemastore URLs 2022-05-22 15:57:11 +01:00
98b48377cd Add GitLab CI schema paths 2022-05-04 14:14:03 +01:00
eb9579e1b6 Add more ansible tasks lsp matches 2022-04-30 13:31:29 +01:00
a689039ae2 Add yaml.schemas not matches by default 2022-04-30 09:38:25 +01:00
3da17559e9 Update minpac submodule 2022-04-29 21:58:31 +01:00
68c699882d Use Source Code Pro 10 on Windows GUI 2022-04-29 21:57:05 +01:00
51c56a8633 Fix glitch in StatusLineTerm highlight group 2022-04-22 15:53:01 +01:00
14d34e0b6b Don't set formatexpr globally, only in specific filetypes 2022-04-14 10:50:52 +01:00
fd31549a32 Add coc-docker to list of global extensions 2022-02-26 17:25:09 +00:00
d66ff687d4 Install node.js dependency for coc.nvim 2022-02-19 14:39:20 +00:00
db5ebc701d Bump unmap Y version check 2022-02-18 19:51:29 +00:00
e6e3a10c87 Don't unmap Y before nvim 0.5
This version check might need some refinement, not actually sure when it
was introduced but it's deffo not in 0.4.4.
2022-02-15 10:53:58 +00:00
8277ad04ab Add <> to % matches in cpp filetype 2022-02-03 14:25:41 +00:00
caa83e88d2 Undo neovims default mapping of Y to y$ 2022-01-14 20:03:07 +00:00
177dbad101 Use ! to silence font warning on Windows
See https://github.com/equalsraf/neovim-qt/issues/732 for more context.
2021-12-22 12:05:16 +00:00
d7c1bdd27c Fix bug in #tmux#isOption()
Actually use `a:option` instead of `'set-clipboard'` string when
comparing the tmux option value. This hasn't been an issue because the
only use of the function happens to be checking the value of
`'set-clipboard'`.
2021-12-16 23:06:03 +00:00
775d07414c Use package name lists 2021-12-15 00:31:50 +00:00
49051cff43 Only install clangd-12 on Ubuntu 20.04 2021-11-19 22:34:46 +00:00
8ffdfd41cd Move main.yaml to tasks.yaml 2021-11-19 21:49:13 +00:00
aa2190daec Install clangd language server on Debian 2021-11-11 21:52:42 +00:00
b2cf9ace96 Install cmake-language-server 2021-11-11 21:35:29 +00:00
a46b128741 Start using Ansible for config management 2021-11-05 14:13:41 +00:00
c06b56115a Add minpac as a submodule 2021-07-27 23:04:35 +01:00
e1bc4428c5 Disable coc.nvim semantic highlights 2021-07-18 16:19:48 +01:00
c9711deade Only display coc#status() in regular active buffer
The statusline is only dynamically updated for the active buffer, thus
when there are multiple splits the statusline for inactive buffers may
include non-updated output of `coc#status()`. This patch adds a boolean
flag to `statusline#generic()` which enables `statusline#active()` and
`statusline#inactive()` to control when `coc#status()` is included in
the statusline.
2021-07-14 17:33:54 +01:00
0961c13316 Use compdb to post-process compile_commands.json
When selecting a `:BuildDir` for the `clangd` LSP use `compdb` to
post-process the `compile_commands.json` to also include flags for
stand alone header files.
2021-07-14 11:38:21 +01:00
eabec4e9b6 Add build#dir() popup_menu() fallback
When `popup_menu()` is not available, i.e. neovim or old version of vim,
fallback to using `inputlist()` instead.
2021-07-13 21:00:48 +01:00
7491736987 Don't set nospell in requirements.txt 2021-07-12 13:47:00 +01:00
c26d837047 Add init.vim as a regular file 2021-07-12 13:41:26 +01:00
38b8ab2fae Remove init.vim symlink 2021-07-12 13:41:04 +01:00
30c601e8b3 Add pip requirements.txt syntax highlighting 2021-07-12 13:36:44 +01:00
2188095b2f Always use fresh colorscheme on Windows
Windows Terminal has support for 256 color so there is not need to
restrict where to use `fresh` as the `colorscheme`.
2021-07-11 16:53:22 +01:00
a881d3e62a Add nvim-qt configuration
Set font and colorscheme for `nvim-qt`.
2021-07-10 14:49:16 +01:00
2ab332db65 Don't use tmux navigation mappings on Windows
Since `tmux` integration is not enabled on Windows, don't use the
`vim-tmux-natigation` command mappings for movingin between splits.
2021-07-10 14:46:52 +01:00
dbff00b6fc Make init.vim work on Windows
Symbolic links committed to Git repositories do not work on Windows.
Repalce the `init.vim` symbolic link with a regular file which loads
`vimrc`, this should work on all platforms.
2021-07-10 14:43:39 +01:00
9cc1ac8d87 Fix statusline background higlights in gui 2021-07-10 14:42:12 +01:00
34073608c8 Update Python main snippet 2021-05-30 20:51:55 +01:00
06335a18da Change vim-signify changed sign from ! to ~ 2021-05-22 17:02:04 +01:00
4a47908717 Customize coc.nvim highlights in fresh colorscheme 2021-04-27 23:37:06 +01:00
6053174173 Don't let coc.nvim highlight the number column 2021-04-27 23:36:49 +01:00
0315c070f5 Customise coc.nvim signcolumn signs 2021-04-27 18:01:33 +01:00
05b047f374 Add coc.nvim next/previous diagnostic mappings 2021-04-27 17:34:54 +01:00
455c1f1b94 Move statusline truncation market after mode 2021-04-20 23:20:51 +01:00
46283e3b95 Remove unused vim-gitgutter mappings 2021-04-19 20:28:08 +01:00
0f1b35eda3 Don't call coc#status() if it doesn't exist 2021-04-19 20:10:29 +01:00
9aa45a4df5 Use coc-jedi and coc-pyright instead of coc-pyls 2021-04-19 20:10:29 +01:00
78e821e386 Add a call to coc#status() in statusline
Don't miss out on the status of coc.nvim by insuring updates are
rendered in the statusline.
2021-04-19 20:10:29 +01:00
2b02d0ae81 Ignore compiled python files 2021-04-19 20:10:29 +01:00
f00eb38200 Fix coc.nvim mappings in C/C++ files 2021-04-19 20:10:29 +01:00
46d27c17fd Move formatexpr config in-tree, out of plugin
Introduces the `format` Python module which provides `clang_format()`
and `yapf()` functions which efficiently (compared to vimscript) invoke
`clang-format` or `yapf` respectively then apply the minimal number of
changes using `difflib.SequenceMatcher`.

Additionally, in order to invoke these Python functions add |autoload|
functions `format#clang_format()` and `format#yapf()` which can be
directly used by the 'formatexpr' setting.

Finally, add |ftplugin| files which set 'formatexpr' when the |autoload|
functions are available.
2021-04-19 20:10:29 +01:00
4e00e225d4 Don't show signcolumn when filetype man 2021-04-18 14:42:33 +01:00
3a44fa1e48 Fix vim :terminal window mappings 2021-04-18 14:42:33 +01:00
96ff72433d Change yaml default syntax highlights 2021-04-18 14:42:33 +01:00
837aa12f9f Replace osc52yank.vim with autoload script 2021-04-18 14:42:33 +01:00
41a0658cf2 Always enable signcolum except in nvim terminal 2021-04-18 14:42:33 +01:00
3a2337cd63 Add do#show_documentation() using coc.nvim
Change the `K` normal mode overrides to use the example given in the
coc.nvim README file which uses Vim's builtin help when in `vim` or
`help` files, or checks if coc.nvim is ready and invokes
`CocActionAsync('doHover')`, otherwise fallback to using `keywordprg`.
2021-04-18 14:42:33 +01:00
ecd8659df7 Use tab width of 2 in yaml files 2021-04-18 14:42:33 +01:00
d6106bac84 Add statusline support for nvim's man pager filetype 2021-04-18 14:42:33 +01:00
873acacaa6 Make terminal mode feel like insert mode statusline 2021-04-18 14:42:33 +01:00
c284486540 Make nvim :terminal more consistent with vim
Vim's :terminal feels much more ergonomic, adding various mappings to
make the experience more similar, mainly by adding a few `<C-w>`
mappings for the most common actions.

Additionally, disable vim-tmux-navigators default mappings and setup
both normal and terminal mode mappings for `<C-w>{h,j,k,l}` in addition
to the normal mode mappings for `<C-{h,j,j,l}>` to make the pane
switching experience more consistent across all buffer types.
2021-04-18 14:42:33 +01:00
587aeef5d7 Use signcolumn=number when available 2021-04-18 14:42:33 +01:00
c67f11a8f5 Fix statusline l:mode map indentation 2021-04-18 14:42:33 +01:00
cef963d805 Remove a unused scriptencoding
There are no utf-8 special characters in the file anymore.
2021-04-18 14:42:33 +01:00
dc6a8b0032 Get rid of scrolloff 2021-04-18 14:42:33 +01:00
9a1b1ed2fc Replace vim-airline with a custom statusline
Finally got round to making a custom statusline after being inspired by
https://pastebin.com/Fm1NEgBf
2021-04-18 14:42:33 +01:00
bee751201d Add list of global coc extensions 2021-04-18 14:42:33 +01:00
eb1a4a71d8 Check if .vim directory exists before use
Update `build#dir()` to check for the existence of the `.vim` directory
containing `coc_settings.json` before attempting to read the file. If it
doesn't exist then create it.
2021-04-18 14:42:33 +01:00
bf6deaf1ed Configure cmake-language-server and coc-cmake
Utilises the following Python package:

```console
$ pip3 install --user cmake-language-server
```
2021-04-18 14:42:33 +01:00
8a2ca8c53f Update build#dir() to configure coc-clangd 2021-04-18 14:42:33 +01:00
824aeb431a Replace remaining YouCompleteMe mappings 2021-04-18 14:42:33 +01:00
4a99f582f3 Replace YouCompleteMe with coc.nvim 2021-04-18 14:42:33 +01:00
3b3121aa28 fresh: NonText as SpecialKey
Don't use `set highlight` to highlight `NonText` like `SpecialKey`,
instead simply set the color of `NonText` in the colorscheme.
2021-04-18 14:42:33 +01:00
82303f075e Move RST settings together 2021-02-06 11:05:23 +00:00
92a23103e3 Fix vim-tmux-focus-events errors in command-line
When changing focus away and back to vim while in the middle of editing
the command-line, vim-tmux-focus-events emits errors from the function
called by the `:cnoremap` mappings. This patch replaces these mappings
with a call to `do#sink()` which does nothing. Simply removing the
mappings will result in `<F24><F25>` being inserted on the command-line
since tmux will send this text when `tmux set-option -g focus-events
on`, this is why `do#sink()` is needed.
2021-01-27 19:23:13 +00:00
9c64158445 Replace vim-gitgutter with vim-signify
vim-gitgutter is buggy. vim-signify might be better, it does allow
configuration of which events trigger a sign column update and this
patch takes advantage of that. Firstly, the `CursorHold` and
`CursorHoldI` events are disabled and replaced with `InsertLeave` and
`TextChanged` events. This makes the sign column updates immediate, and
since vim-signify is asynchronous it's faster too.
2021-01-26 23:45:49 +00:00
eac02b26d3 Add xterm-kitty to list of supported $TERM values 2021-01-25 21:37:09 +00:00
aaa8acf5a2 Update build#dir() to open a popup_menu()
Use `popup_menu()` in `build#dir()` when the `:BuildDir` command is uses
without an argument to specify a build directory. If there are no build
directories, print an error message. If there is a single build
directory, use it. If there are multiple build directories use
`popup_menu()` to prompt the user to select the desired build directory.

Update `build#targets()` and `build#run()` with comments and error
messages.
2021-01-06 00:23:32 +00:00
c94bc3ba90 Add autoloaded echomsg utility functions
* `echo#warning({message})` sets `echohl WarningMsg` and echos the message
* `echo#error({message})` sets `echohl ErrorMsg` and echos the message
2021-01-06 00:23:19 +00:00
a0df92852a Add :Build command to invoke ninja or make
The `:Build [<target> ...]` command utilises the `$BUILD_DIR` variable set
by `:BuildDir {directory}` to invoke `ninja` or `make` based on the
existence of `$BUILD_DIR/build.ninja` or `$BUILD_DIR/Makefile`
respectively. The following commands are invoked in a new `:terminal`
window.

* `ninja -C $BUILD_DIR [<target> ...]` when `$BUILD_DIR/build.ninja` exists
* `make -C $BUILD_DIR [<target> ...]` when `$BUILD_DIR/Makefile` exists

In the case of `ninja`, completion for the targets supplied to the
`:Build` command is made available by the `build#targets()` function.
The list of targets returned by `ninja -C $BUILD_DIR -t targets` is
processed to generate the list of targets. Support for `make` target
completion is less straight forwards so has been omitted for now.
2021-01-05 21:45:43 +00:00
0cd93f1823 Generalise tmux option check 2020-12-31 18:22:37 +00:00
db2079994a Disable some cmakelint checks in ale
Some of `cmakelint`s opinions around convention don't provide a benefit.
2020-12-14 15:14:24 +00:00
c17f7ea0d9 Refactor tmux and set-clipboard detection
Move logic to `autoload/tmux.vim` to detect the `vim` is being run
inside a `tmux` sessions and if the `set-clipboard` option is enabled.
This cleans up adding the optional `oscyank.vim` plugin when needed.
2020-12-10 18:07:24 +00:00
76acb9cd90 Once again fix minpac initialization 2020-12-10 17:41:17 +00:00
48913e09c3 Fix isdirectory() uses with relative paths
After upgrading VIM 8.2 (2019 Dec 12, compiled Oct 24 2020 16:26:37)
uses of `isdirectory()` with relative paths in `$MYVIMRC` stopped
working. These must now be absolute paths.
2020-12-10 17:38:58 +00:00
e4a11a2ffe Fix package load init order bugs
* Move calls to `minpac#init()` into commands which use minpac
* Check if optional package directories exist before using `packadd`
2020-11-28 17:16:11 +00:00
3cc1e3d2d8 Change some Python highlight groups 2020-10-26 13:33:43 +00:00
6435ed4c4d Add TODO to cpp syntax 2020-10-26 13:33:14 +00:00
d063e60559 Make explicit more implicit (and changed) hl groups 2020-10-26 13:32:47 +00:00
bc1de2d37f Change Markdown default conceallevel 2020-10-07 11:31:08 +01:00
9e6169695d Use the patience diff method 2020-10-07 11:30:48 +01:00
80c1b8653e Highlight Exception group as Conditional 2020-10-07 11:30:08 +01:00
445ca8d6fd Highlight the delimiter group 2020-10-06 17:17:13 +01:00
d960053dfc Add :BuildDir to select YouCompleteMe build directory 2020-10-06 17:12:06 +01:00
b148f9fb68 Make sure CMake statements are highlighted as statements 2020-10-06 17:11:17 +01:00
529867b475 conduit: Don't automatically install/update packs 2020-08-04 13:59:08 +01:00
3449b3f815 Disable automatic hover in YouCompleteMe 2020-07-21 12:01:41 +01:00
67b9c6b45a Check tmux exists before loading osc52 2020-07-19 20:25:29 +01:00
01059ac01a Enable YouCompleteMe on Windows 2020-07-19 20:25:29 +01:00
858677ef79 Add jinja snippets inheriting from html 2020-07-18 13:54:22 +01:00
22b969c989 Add README file 2020-06-04 17:36:18 +01:00
158a6f5585 Don't let vim-matchup overwrite statusline 2020-05-14 12:53:21 +01:00
3ffda34a29 Remove Markdown todo highlights 2020-04-07 13:23:16 +01:00
3e639c4936 Remove extra HTML syntax todo highlights 2020-04-07 13:22:35 +01:00
b40a9abb59 Only load YouCompleteMe when :TermDebug isn't 2020-04-02 12:14:13 +01:00
8fac5fb74f Add OSC 52 escape sequence yank
If the `tmux` `set-clipboard` option is set to `on` add the `osc52yank`
plugin and change `<leader>y` mapping to use it.
2020-04-02 12:12:57 +01:00
72316785d5 Add CMake reStructuredText block snippet 2020-04-02 12:11:46 +01:00
b3a2208b42 Don't gate Python plugins on has('python') 2020-01-28 10:48:28 +00:00
a93489efe9 Add console filetype for Markdown/RST code blocks 2020-01-28 10:48:22 +00:00
489e6db231 Use tip YouCompleteMe from ycm-core org
Update to latest, community maintained, YouCompleteMe version and use
the same version on all platforms.
2020-01-16 23:27:15 +00:00
2bef425dee Enable fzf plugins on Windows 2020-01-14 10:41:49 +00:00
7e79b97933 Add POC sanitizer filetype 2019-12-10 13:28:06 +00:00
aa3ae7df35 Don't use clangd with YouCompleteMe 2019-11-07 20:43:05 +00:00
7fb1352108 Improve C++ template snippet 2019-11-07 20:43:05 +00:00
23b9bf1f1b Limit rst code block highlighting 2019-11-05 16:19:31 +00:00
cdcbab062e Fix Doxygen retval highlights 2019-10-14 22:45:35 +01:00
3bbbbe2a63 Enable reStructuredText style option 2019-10-14 21:49:38 +01:00
b69f2d889d Allow white space in cmake region matches 2019-10-09 16:53:41 +01:00
65d3e645b1 Add cmakecache filetype for CMakeCache.txt files 2019-10-04 20:30:04 +01:00
0d0e69a2ec Add ANTLR filetype syntax 2019-09-08 17:09:59 +01:00
2ee41bb80f Don't use array syntax in C main snippet 2019-09-07 23:41:05 +01:00
57257c1c9a Add generic admonition snippet for rst files 2019-09-05 11:17:25 +01:00
c1d167f2e3 Add rst code-block snippet 2019-08-29 14:58:21 +01:00
92d88b623d Disable airline word-count
When editing `rst` filetypes for longer periods airline started
producing errors when attempting to count the number of words in the
document, so disable this feature.
2019-08-29 14:57:11 +01:00
f85d59197a Add reStructuredText admonition snippets 2019-08-26 15:22:00 +01:00
27c77881a3 Silent call tmux navigation flag functions 2019-08-21 14:57:43 +01:00
28804faf21 Add todo highlights to llvm syntax 2019-08-21 10:08:22 +01:00
e2e2be6e44 Don't syntax highlight text after #{warning,error} 2019-08-17 15:00:27 +01:00
7af8660355 Also set tmux navigation flag on FocusGained
Make using the `@vim$TMUX_PANE` window flag much more robust by
unsetting it every time the zsh prompt is drawn and setting it again
using a `FocusGained` `autocmd` in vim. This removes the need for the
hacky check for zsh in the conditional defined in the `in_vim` variable.
2019-08-16 21:58:38 +01:00
1f07473b57 Use tmux window option for pane change detection
Improve tmux integration when changing buffers or panes when vim was
invoked by another process so that seamless navigation works when the
`vim$TMUX_PANE` window option has been set, not only when the pane's
command matches a simple regex.
2019-08-11 18:58:55 +01:00
10eb5fffea Add TODO highlights to groovy 2019-08-07 15:01:37 +01:00
5f93199735 Improve the list of indent keys for cmake filetype 2019-07-24 13:57:22 +01:00
1e47926465 Don't add conflict marker highlight in help files 2019-07-24 13:57:22 +01:00
6f653e8ad9 Add C comment block snippet 2019-07-14 21:14:43 +01:00
2faa156aae Only add help autocmd's in help buffers 2019-06-10 10:23:34 +01:00
856c66e150 Add :TodoFile command to find TODOs
Find all TODOs in the current file and populate the location list with
the results.
2019-06-05 11:32:59 +01:00
51b95acf90 Improve Python snippets 2019-05-15 11:56:39 +01:00
054507cdff Fix formatting of C/C++ debug snippet 2019-05-03 11:02:05 +01:00
5f7b05aab0 Fix not loading packages from ~/.config/work 2019-05-02 12:01:43 +01:00
bf9276aa1b Customize termdebug highlight groups 2019-04-11 16:11:07 +01:00
ef0f39b780 Make add ! to function PythonIndent 2019-04-05 17:40:07 +01:00
6d2fbc2ac5 Add cmake surround for generator expressions 2019-04-04 17:24:32 +01:00
72fe59ffaa Only invoke last change substitution in help files
Previously the `autocmd` to replace the date on the first line if `Last
change: ` was present resulted in the cursor being moved in non `help`
filetypes due to the substitution failing. Now the substitution is only
attempted if the current file is a `help` file.
2019-04-04 16:53:46 +01:00
bdea77f86a Auto update Last change in vim help files 2019-03-31 23:17:02 +01:00
01b027b5ac Support snippet templates and add help snippets
Add `autocmd` to automatically expand the `_template` snippet on the
`BufNewFile` event, if the expansion fails because the `_template`
snippet does not exist for the current `filetype` undo the changes. Do
the same thing when the `filetype` changes to `help`, since these are
`text` files to begin with the first `autocmd` has no effect.
2019-03-31 15:04:08 +01:00
65c219c98d Add todo.md template 2019-03-30 20:13:28 +00:00
baff9ae3fd Improve global snippets
* `todo`, `note` now do not add comment strings when in a comment line
* `fixme` added to match `todo` and `note
* `date` renamed `datetime` and updated to match the unix `date` command
* `date`, `time` added inserting only the date or time now
* `utc` updated, no longer spitting the timezone offset
2019-03-30 17:07:29 +00:00
9d6a9925e5 Copy default GetPythonIndent 2019-03-28 20:58:39 +00:00
ab0b81b6de Remove .env/.out filetype detection 2019-03-27 14:51:57 +00:00
3576ca02fe Update fresh DiffChange fg color to yellow 2019-03-27 10:23:01 +00:00
91c85da67b Add C ANSI color escape sequence snippets 2019-03-27 10:01:55 +00:00
e9051dc246 Override default Python indent settings 2019-03-23 23:40:17 +00:00
84e310a28f Fix Python 3 issue in todo snippet 2019-03-23 23:15:13 +00:00
ce6ec3d410 Improve vim function snippet 2019-03-23 21:06:45 +00:00
f730d382bc Highlight *.ronn as markdown 2019-03-17 16:03:33 +00:00
c8ac5496ca Add Python raw string snippet 2019-03-17 14:56:25 +00:00
74c73066f4 Escape ¯\_(ツ)_/¯ snippet except in text documents 2019-03-08 15:48:54 +00:00
aff61cd8a8 Change *x snippet to mark the checkbox checked 2019-02-27 09:40:42 +00:00
709408fdeb Add lit global ID regex snippet 2019-02-27 09:40:34 +00:00
d0ce0a66ad Add more flexible lit regex snippets 2019-02-26 16:19:22 +00:00
b493ad17e5 Make minpac commands have consistent format 2019-02-21 11:47:23 +00:00
d555afe61e Move minpac command into plugin/commands.vim 2019-02-21 11:46:28 +00:00
65a6178bec Add ansi filetype for handling escape sequences
Based on [AnsiEsc.vim](https://github.com/vim-scripts/AnsiEsc.vim)
separate out the syntax highlighting into a separate `ansi` filetype.
This conceals escape sequences and highlights ansi color escape
sequences in text files so that they have the same appearance as in the
terminal.
2019-02-16 09:51:38 +00:00
8a10516961 Extend syntax/llvm.vim for better highlighting 2018-12-13 16:19:46 +00:00
e3886d08f8 Only install fzf as a plugin, not the cli tool 2018-12-13 16:18:58 +00:00
eab3090da7 Add termdebug window selection mappings 2018-12-13 16:13:12 +00:00
5f4e6c7636 Remove bundle/* from ignore file 2018-12-03 11:49:29 +00:00
bdb9504aec Use selected YouCompleteMe repo 2018-12-03 11:44:41 +00:00
97904dd47e Add shrug and tableflip snippets 2018-12-03 11:39:51 +00:00
34ba64980a Change main C snippet to an array of const char* 2018-12-03 11:39:51 +00:00
8fc26f9227 Add python highlight blocks to gdbinit syntax 2018-12-03 11:39:51 +00:00
51621e8134 Remove vim-plug and use minpac
* Add `Pack`, `PackUpdate`, `PackStatus` and `PackClean` commands to
  manage plugins.
* Don't load `minpac` by default.
* Remove `vim-plug` completely.
2018-11-30 19:41:21 +00:00
971d510f22 Add pack/* to ignore file 2018-11-30 17:49:07 +00:00
3a60c0abcf Improve static_assert snippet & increase sync minlines 2018-11-30 17:46:46 +00:00
446063c2e3 Add sizeof, decltype, and declval snippets 2018-11-30 17:46:46 +00:00
91dc036e8f Open *.def has cpp filetype 2018-10-25 19:06:00 +01:00
d3a8920bf7 Set viminfofile to ~/.cache/vim/info 2018-10-19 12:01:03 +01:00
61599e0b05 Disable experimental C++ syntax highlighting 2018-10-05 17:59:15 +01:00
64c8bc6b40 Use upstream YouCompleteMe on macOS
The oblitum fork of YouCompleteMe is getting dated and uses LLVM 4.0 on
macOS, this results in erroneous errors in the system headers on macOS
since it's not been updated to match upstream. Use Valloric's repo to
avoid these errors on macOS.
2018-10-04 10:20:02 +01:00
c326a04f70 Don't use normal mode mappings in vimscript 2018-09-14 16:37:14 +01:00
992096a2a0 Add :Debug command
The :Debug command quickly starts a new debugging sessions.

* adds the `termdebug` package
* invokes `TermdebugCommand` with the given arguments
2018-09-14 16:17:09 +01:00
2414a94684 Update llvm syntax file 2018-09-12 16:05:52 +01:00
c80ddd3617 Add mapping to rename include guards in c/cpp 2018-09-07 22:13:29 +01:00
25c18763bc Move ale highlight groups to fresh colorscheme 2018-09-05 19:08:19 +01:00
53c971b802 Use vim-coiled-snake instead of custom Python fold 2018-09-03 22:16:40 +01:00
6fb2f7a01c Remove cursorline option 2018-08-30 23:37:28 +01:00
6c818dd2d7 Remove duplicate Doxygen snippets 2018-08-28 11:11:56 +01:00
e745c6ebdf Improve C/C++ intent settings 2018-08-28 11:10:40 +01:00
5f7ba84ce6 Don't highlight cursor line 2018-08-26 19:14:59 +01:00
531502633f Add ~/.config/work to runtimepath
Enable using work specific config from a separate repository.
2018-08-26 13:25:37 +01:00
c714c43e65 Update ignore file 2018-08-26 12:50:18 +01:00
9d850aa457 Add linters to conduit file 2018-08-26 12:01:42 +01:00
825b947de6 Fix switch case statement indentation 2018-08-26 11:49:11 +01:00
c019ce9d67 Use default tabstop width 2018-08-26 11:48:55 +01:00
c9ae77e5a2 Open .enter and .exit as zsh filetype 2018-08-26 11:25:41 +01:00
9cf385ee95 Add conduit file 2018-08-26 11:25:03 +01:00
72dec6009d Change backgroup highlight of cursor line 2018-08-26 10:51:11 +01:00
10fd48a703 Improve cpp template snippet 2018-08-26 10:51:11 +01:00
3777a990f2 Show cursor line with different highlight group 2018-08-26 10:51:11 +01:00
f7d07f23da Add TODO's for :LStripLines 2018-08-26 10:51:11 +01:00
eabffa9354 Add new C++ feature to syntax highlighting 2018-08-26 10:51:11 +01:00
6cc8627c97 Add a lit named ID match snippet 2018-08-26 10:51:11 +01:00
3757da8e96 Improve vim-spirv ID match highlights 2018-08-26 10:51:11 +01:00
91eeee13bc Add delimiter highlighting to zsh 2018-08-26 10:51:11 +01:00
0db9d470ee Use signcolumn when available 2018-08-26 10:51:11 +01:00
970c674381 Set lit[.local].cfg to Python & disable ALE 2018-08-26 10:51:11 +01:00
1be7ef4250 Don't highlight markdown errors 2018-08-26 10:51:11 +01:00
ab5428e7fa Make .test files llvm filetype 2018-08-26 10:51:11 +01:00
ca84ee59ed Actually enable relative number when available 2018-08-26 10:51:11 +01:00
456e52467a Update C++ namespace snippet to match clang-format
New snippet outputs this

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

instead of

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

and this

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

instead of

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

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
local.vim
.netrwhist
pack/*
spell/*
*.pyc

186
README.md Normal file
View File

@@ -0,0 +1,186 @@
# Vim Configuration
## Plugins
### [YouCompleteMe][ycm]
The plugin is cloned to `~/.vim/pack/minpac/opt/YouCompleteMe` recursively using
[minpac][minpac]. Making the plugin optional can be useful when completion is
not desired and for fast Vim loading times, when completion is desired it can be
loaded with Vim command:
```console
$ :packadd YouCompleteMe
```
Post clone the compiled C++ components must be built before completion can be
used, run the following command from the root of the [YouCompleteMe][ycm]
repository:
```console
$ ./install --clang-completer
```
This uses the older `libclang.so` based completer despite [YouCompleteMe][ycm]
recommending the use of `clangd` due to working on projects which predate the
newer completer and the migration overhead of switching to it. To completely
disable the `clangd` completer this must also be present in `~/.vim/vimrc`:
```vim
let g:ycm_use_clangd = 0
```
The following two options are for customising bindings for cycling through the
completion menu when multiple completions are available.
* [g:ycm_key_list_select_completion](https://github.com/ycm-core/YouCompleteMe#the-gycm_key_list_select_completion-option)
* [g:ycm_key_list_previous_completion](https://github.com/ycm-core/YouCompleteMe#the-gycm_key_list_previous_completion-option)
```vim
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
```
The next options enable populating the list of potential completions beyond
those suggested by the semantic language completer.
* [g:ycm_collect_identifiers_from_comments_and_strings](https://github.com/ycm-core/YouCompleteMe#the-gycm_collect_identifiers_from_comments_and_strings-option)
* [g:ycm_seed_identifiers_with_syntax](https://github.com/ycm-core/YouCompleteMe#the-gycm_seed_identifiers_with_syntax-option)
```vim
let g:ycm_collect_identifiers_from_comments_and_strings = 1
let g:ycm_seed_identifiers_with_syntax = 1
```
These options enable completions inside comments and strings.
* [g:ycm_complete_in_comments](https://github.com/ycm-core/YouCompleteMe#the-gycm_complete_in_comments-option)
* [g:ycm_complete_in_strings](https://github.com/ycm-core/YouCompleteMe#the-gycm_complete_in_strings-option)
```vim
let g:ycm_complete_in_comments = 1
let g:ycm_complete_in_strings = 1
```
Trigger the completion menu after entering a single character.
* [g:ycm_min_num_of_chars_for_completion](https://github.com/ycm-core/YouCompleteMe#the-gycm_min_num_of_chars_for_completion-option)
```vim
let g:ycm_min_num_of_chars_for_completion = 1
```
Populating the location list with warnings and errors in the current buffer is
very useful for jumping to those source locations, especially when using
[mappings][location-list-mappings].
* [g:ycm_always_populate_location_list](https://github.com/ycm-core/YouCompleteMe#the-gycm_always_populate_location_list-option)
```vim
let g:ycm_always_populate_location_list = 1
```
When a completion is selected the signature, and help comments if there is any
available, are displayed in a separate buffer. This option enables
automatically closing that buffer.
* [g:ycm_autoclose_preview_window_after_insertion](https://github.com/ycm-core/YouCompleteMe#the-gycm_autoclose_preview_window_after_insertion-option)
```vim
let g:ycm_autoclose_preview_window_after_insertion = 1
```
Control how a split is created when using the `:YcmCompleter Goto` command.
* [g:ycm_goto_buffer_command](https://github.com/ycm-core/YouCompleteMe#the-gycm_goto_buffer_command-option)
```vim
let g:ycm_goto_buffer_command = 'horizontal-split'
```
Warnings and errors are displayed in the Vim gutter, to the left of line
numbers, these override the default characters used to display them.
* [g:ycm_error_symbol](https://github.com/ycm-core/YouCompleteMe#the-gycm_error_symbol-option)
* [g:ycm_warning_symbol](https://github.com/ycm-core/YouCompleteMe#the-gycm_warning_symbol-option)
```vim
let g:ycm_error_symbol = '▸'
let g:ycm_warning_symbol = '▸'
```
## Mappings
### [YouCompleteMe][ycm] Mappings
Apply the compilers suggestion to fix a warning or error.
```vim
nnoremap <leader>fi :YcmCompleter FixIt<CR>
```
Go to the declaration of the symbol under the cursor.
```vim
nnoremap <leader>gd :YcmCompleter GoTo<CR>
```
Get the type of the symbol under the cursor.
```vim
nnoremap <leader>gt :YcmCompleter GetType<CR>
```
Display the full compiler diagnostic output for the warning or error on the
line under the cursor.
```vim
nnoremap <leader>sd :YcmShowDetailedDiagnostic<CR>
```
### Location List Mappings
Open the location list buffer.
```vim
nnoremap <leader>lo :lopen<CR>
```
Close the location list buffer.
```vim
nnoremap <leader>lc :lclose<CR>
```
Jump to the current location in the location list.
```vim
nnoremap <leader>ll :ll<CR>
```
Jump to the next location in the location list.
```vim
nnoremap <leader>ln :lnext<CR>
```
Jump to the previous location in the location list.
```vim
nnoremap <leader>lp :lprevious<CR>
```
Jump to the first location in the location list.
```vim
nnoremap <leader>lf :lfirst<CR>
```
Jump to the last location in the location list.
```vim
nnoremap <leader>la :llast<CR>
```
[ycm]: https://github.com/ycm-core/YouCompleteMe
[minpac]: https://github.com/k-takata/minpac

107
UltiSnips/all.snippets Normal file
View File

@@ -0,0 +1,107 @@
priority -1
snippet me "Identify me"
Kenneth Benzie (Benie) <k.benzie83@gmail.com>
endsnippet
global !p
class Comment(object):
def __init__(self):
# Get the commentstring.
commentstring = snip.opt('&commentstring').strip()
# Slipt it into before and after parts.
commentparts = [part.strip() for part in commentstring.split('%s')]
self.commentbefore = commentparts[0] + ' '
self.commentafter = ' ' + commentparts[1] if commentparts[1] else ''
# Determine if we are in an existing comment.
line = vim.current.buffer[vim.current.window.cursor[0] - 1].strip()
# If interpolation has not occcured and the current line starts with the
# comment leader, we are in a comment.
self.incomment = not snip.c and line.startswith(commentparts[0])
def before(self):
return '' if self.incomment else self.commentbefore
def after(self):
return '' if self.incomment else self.commentafter
endglobal
snippet todo "TODO commment"
`!p comment=Comment()
snip.rv=comment.before()`TODO${1/.+/(/}$1${1/.+/)/}: $0`!p snip.rv=comment.after()`
endsnippet
snippet fixme "FIXME comment"
`!p comment=Comment()
snip.rv=comment.before()`FIXME${1/.+/(/}$1${1/.+/)/}: $0`!p snip.rv=comment.after()`
endsnippet
snippet note "NOTE comment"
`!p comment=Comment()
snip.rv=comment.before()`NOTE: $0`!p snip.rv=comment.after()`
endsnippet
global !p
from datetime import datetime, timedelta, tzinfo
from time import daylight, gmtime, localtime, timezone, tzname
class LocalTZ(tzinfo):
"""Query OS for local timezone offset."""
def __init__(self):
"""Initialize LocalTZ."""
tzinfo.__init__(self)
self.unixEpochOrdinal = datetime.utcfromtimestamp(
0).toordinal()
def dst(self, _):
return timedelta(0)
def utcoffset(self, dt):
t = ((dt.toordinal() - self.unixEpochOrdinal) * 86400 + dt.hour * 3600
+ dt.second + timezone)
utc = datetime(*gmtime(t)[:6])
local = datetime(*localtime(t)[:6])
return local - utc
def tzname(self, dt):
if daylight and localtime().tm_isdst:
return tzname[daylight]
return tzname[0]
endglobal
snippet date "date now"
`!p snip.rv=datetime.now().strftime('%a %d %b %Y')`
endsnippet
snippet time "time now"
`!p snip.rv=datetime.now().strftime('%H:%M:%S')`
endsnippet
snippet datetime "date and time now"
`!p snip.rv=datetime.now(LocalTZ()).strftime('%a %d %b %Y %H:%M:%S %Z')`
endsnippet
snippet utc "UTC date time now" i
`!p snip.rv=datetime.now(LocalTZ()).strftime('%Y-%m-%dT%H:%M:%S%z')`
endsnippet
snippet *x "GitHub style checkbox"
* [${1:x}] $0
endsnippet
snippet "* [" "GitHub style checkbox"
* [${1: }] $0
endsnippet
snippet *[ "GitHub style checkbox"
* [${1: }] $0
endsnippet
snippet shrug "¯\\_(ツ)_/¯" i
¯\_(ツ)_/¯
endsnippet
snippet tableflip "(╯°▪°)╯︵┻━┻" i
(╯°▪°)╯︵┻━┻
endsnippet

View File

@@ -0,0 +1,10 @@
snippet refpage "Vulkan Spec refpage"
[open,refpage='${1:symbol}',desc='${2:description}',type='${3:type}']
--
$0
endsnippet
snippet shrug "¯\_(ツ)_/¯" i
¯\_(ツ)_/¯
endsnippet

176
UltiSnips/c.snippets Normal file
View File

@@ -0,0 +1,176 @@
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 /* "comment block"
/* $0
*/
endsnippet
snippet sizeof "sizeof" i
sizeof($1)$0
endsnippet
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, const 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

59
UltiSnips/c_ansi.snippets Normal file
View File

@@ -0,0 +1,59 @@
snippet esc "ANSI escape sequence" i
\x1b$1m
endsnippet
snippet black "ANSI escape black" i
\x1b[0;30m
endsnippet
snippet red "ANSI escape red" i
\x1b[0;31m
endsnippet
snippet green "ANSI escape green" i
\x1b[0;32m
endsnippet
snippet yellow "ANSI escape yellow" i
\x1b[0;33m
endsnippet
snippet blue "ANSI escape blue" i
\x1b[0;34m
endsnippet
snippet magenta "ANSI escape magenta" i
\x1b[0;35m
endsnippet
snippet cyan "ANSI escape cyan" i
\x1b[0;36m
endsnippet
snippet bblack "ANSI escape bright black" i
\x1b[0;30m
endsnippet
snippet bred "ANSI escape bright red" i
\x1b[0;31m
endsnippet
snippet bgreen "ANSI escape bright green" i
\x1b[0;32m
endsnippet
snippet byellow "ANSI escape bright yellow" i
\x1b[0;33m
endsnippet
snippet bblue "ANSI escape bright blue" i
\x1b[0;34m
endsnippet
snippet bmagenta "ANSI escape bright magenta" i
\x1b[0;35m
endsnippet
snippet reset "ANSI escape reset" i
\x1b[0m
endsnippet

View File

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

834
UltiSnips/cmake.snippets Normal file
View File

@@ -0,0 +1,834 @@
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 rst
#[=======================================================================[.rst:
$0
#]=======================================================================]
endsnippet
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

114
UltiSnips/cpp.snippets Normal file
View File

@@ -0,0 +1,114 @@
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 <${1:class} ${2:T}$3>$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:, "$3"});
endsnippet
snippet decltype "decltype" i
decltype($1)$0
endsnippet
snippet declval "declval" i
declval<$1>()$0
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

1
UltiSnips/glsl.snippets Normal file
View File

@@ -0,0 +1 @@
extends lit

24
UltiSnips/help.snippets Normal file
View File

@@ -0,0 +1,24 @@
snippet _template "help file template"
*`!p snip.rv = snip.fn`* For Vim version 8.0 Last change: `!p
from datetime import datetime
snip.rv = datetime.now().strftime('%B %d, %Y')`
$0
vim:tw=78:ts=8:ft=help:norl:
endsnippet
snippet s "help section"
==============================================================================
${1:1}. ${2:Section}`!p
spaces = 78 - len(t[1]) - len(snip.basename) - (2 * len(t[2])) - 3
snip.rv = spaces * ' ' + '*' + snip.basename + '-' + t[2].lower() + '*'`
$0
endsnippet
snippet d "help detail"
`!p spaces = 78 - len(t[1])
snip.rv = spaces * ' '`*${1:}*
$0
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

3
UltiSnips/jinja.snippets Normal file
View File

@@ -0,0 +1,3 @@
extends html
priority 1

15
UltiSnips/lit.snippets Normal file
View File

@@ -0,0 +1,15 @@
snippet [[ "lit named regex" i
[[${1:name}${2::${3:regex}}]]
endsnippet
snippet {{ "lit regex" i
{{${1:regex}}}
endsnippet
snippet gid "lit global ID regex" i
@[a-zA-Z0-9_]+
endsnippet
snippet id "lit ID regex" i
%[a-zA-Z0-9_]+
endsnippet

1
UltiSnips/llvm.snippets Normal file
View File

@@ -0,0 +1 @@
extends lit

View File

@@ -0,0 +1,23 @@
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
snippet shrug "¯\_(ツ)_/¯" i
¯\_(ツ)_/¯
endsnippet

7
UltiSnips/notes.snippets Normal file
View File

@@ -0,0 +1,7 @@
snippet * "bullet point" b
* $0
endsnippet
snippet shrug "¯\_(ツ)_/¯" i
¯\_(ツ)_/¯
endsnippet

View File

@@ -0,0 +1 @@
extends lit

28
UltiSnips/python.snippets Normal file
View File

@@ -0,0 +1,28 @@
snippet #! "Shebang"
#!/usr/bin/env python
endsnippet
snippet main "Python main stub"
from argparse import ArgumentParser
def main():
parser = ArgumentParser()
$0
args = parser.parse_args()
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
exit(130)
endsnippet
snippet debug "Set ipdb breakpoint"
import ipdb; ipdb.set_trace()
endsnippet
snippet ''' "Triple quote string" i
'''$1'''$0
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

61
UltiSnips/rst.snippets Normal file
View File

@@ -0,0 +1,61 @@
snippet admon "generic admonition"
.. admonition:: ${1:title}
$0
endsnippet
snippet todo "todo admonition"
.. todo::
$0
endsnippet
snippet attention "attention admonition"
.. attention::
$0
endsnippet
snippet caution "caution admonition"
.. caution::
$0
endsnippet
snippet danger "danger admonition"
.. danger::
$0
endsnippet
snippet error "error admonition"
.. error::
$0
endsnippet
snippet hint "hint admonition"
.. hint::
$0
endsnippet
snippet important "important admonition"
.. important::
$0
endsnippet
snippet note "note admonition"
.. note::
$0
endsnippet
snippet tip "tip admonition"
.. tip::
$0
endsnippet
snippet warning "warning admonition"
.. warning::
$0
endsnippet
snippet code "code-block"
.. code-block:: ${1:lang}
$0
endsnippet

1
UltiSnips/spirv.snippets Normal file
View File

@@ -0,0 +1 @@
extends lit

3
UltiSnips/text.snippets Normal file
View File

@@ -0,0 +1,3 @@
snippet shrug "¯\_(ツ)_/¯" i
¯\_(ツ)_/¯
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) ${3:abort}
$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

2
after/ftdetect/cpp.vim Normal file
View File

@@ -0,0 +1,2 @@
" Force *.def to C++ filetype for LLVM
au BufNewFile,BufReadPost *.def set filetype=cpp

View File

@@ -0,0 +1,3 @@
" Force *.md to markdown filetype
au BufNewFile,BufReadPost *.md set filetype=markdown
au BufNewFile,BufReadPost *.ronn 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

2
after/ftdetect/zsh.vim Normal file
View File

@@ -0,0 +1,2 @@
au BufNewFile,BufReadPost .enter set filetype=zsh
au BufNewFile,BufReadPost .exit set filetype=zsh

View File

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

View File

@@ -1,2 +1,15 @@
" Add Doxygen documentation generation plugin.
packadd DoxygenToolkit.vim
nnoremap <leader>d :Dox<CR>
" 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
" "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*/"

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

@@ -0,0 +1,15 @@
" Enable syntax folding, see .vim/after/syntax/cmake.vim
setlocal foldmethod=syntax
" Set comment string
setlocal commentstring=#%s
" setlocal indentkeys=0{,0},:,0#,!^F,o,O,e,=ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
setlocal indentkeys=:,!^F,o,O,e,=endif(,=ENDIF(,endforeach(,ENDFOREACH(,endmacro(,ENDMACRO(,else(,ELSE(,elseif(,ELSEIF(,endwhile(,ENDWHILE(
" 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}"
" Custom surround for createing a CMake generator expression from a test object.
" "ys{motion}g" makes a generator expression out of "text-obj" -> "$<text-obj>"
let b:surround_{char2nr("g")} = "$<\r>"

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

@@ -0,0 +1,3 @@
" Add Doxygen documentation generation plugin.
packadd DoxygenToolkit.vim
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 signcolumn=no

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

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

@@ -0,0 +1,2 @@
setlocal showbreak=
set signcolumn=no

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

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

@@ -0,0 +1,27 @@
" 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

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 @@
" Add omnifunc completion package.
packadd vimomni
" 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

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

View File

@@ -0,0 +1,8 @@
if get(g:, 'loaded_tmux_focus_events', 0)
" Override vim-tmux-focue-events command-line mappings when tmux send <F24>
" FocusLost and <F25> FocusLost instead of to call do#sink() which does
" nothing. This is required due to errors emitted from the
" vim-tmux-focus-events plugin when chaning focus.
cnoremap <silent> <F24> <C-\>edo#sink()<CR>
cnoremap <silent> <F25> <C-\>edo#sink()<CR>
endif

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

@@ -0,0 +1,87 @@
" Language: C
" Description: Additional C syntax file.
" Don't syntax highlight text after #warning or #error
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend
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. @retval name description.
" ^^^^ ^^^^
syn region cDoxygenSpecial matchgroup=cDoxygenComment start='@\(param\(\[\(\|in\|out\|in,out\)\]\)\?\|retval\)\=\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

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

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

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\+$"

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

@@ -0,0 +1,6 @@
unlet b:current_syntax
syntax include @gdbPythonSyntax syntax/python.vim
syntax region gdbPythonBlock matchgroup=gdbStatement start='^python' keepend end='^end' contains=@gdbPythonSyntax
let b:current_syntax = 'gdb'

View File

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

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

@@ -0,0 +1,4 @@
hi link jsonKeyword Function
hi link jsonNull Constant
hi link jsonQuote Delimiter
setlocal conceallevel=0

29
after/syntax/llvm.vim Normal file
View File

@@ -0,0 +1,29 @@
" Highlight: %"constant string"
" ^----------------^
syntax region llvmIdentifier start=+%"+ end=+"+ oneline
" Highlight: { ... }
" ^ ^
syntax region llvmScope matchgroup=llvmDelimiter start="{" end="}" transparent
" Highlight: ( ... )
" ^ ^
syntax region llvmScope matchgroup=llvmDelimiter start="(" end=")" transparent
" Highlight: < ... x ... >
" ^ ^ ^
syntax match llvmVectorDelimiter " \zsx\ze " contained
syntax region llvmScope matchgroup=llvmDelimiter start="<" end=">" transparent oneline contains=llvmDelimiter,llvmVectorDelimiter,llvmType,llvmNumber,llvmFloat,llvmBoolean,llvmConstant
syntax match llvmDelimiter ","
" Named metadata and specialized metadata keywords.
syn match llvmMetadata /![-a-zA-Z$._][-a-zA-Z$._0-9]*\ze\s*$/
syn match llvmMetadata /![-a-zA-Z$._][-a-zA-Z$._0-9]*\ze\s*[=!]/
" syn match llvmType /!\zs\a\+\ze\s*(/
syn match llvmMetadata /!\(\d\+\>\|\ze{\|\ze\".*"\)/
" Define extended highlight groups
highlight default link llvmDelimiter Delimiter
highlight default link llvmVectorDelimiter llvmDelimiter
highlight default link llvmMetadata Include

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

@@ -0,0 +1,52 @@
" 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')
setlocal conceallevel=0
if get(g:, 'markdown_syntax_conceal', 1) == 1
let s:concealends = ' concealends'
endif
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
" 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

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

@@ -0,0 +1,2 @@
highlight link pythonException Conditional
highlight link pythonExceptions Keyword

7
after/syntax/yaml.vim Normal file
View File

@@ -0,0 +1,7 @@
setlocal tabstop=2
setlocal shiftwidth=2
setlocal softtabstop=2
highlight link yamlBlockMappingKey Keyword
highlight link yamlAnchor PreProc
highlight link yamlAlias PreProc

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

110
autoload/build.vim Normal file
View File

@@ -0,0 +1,110 @@
function! build#dir(...) abort
if a:0 == 0
" No arguments, find build directories.
let s:dirs = split(substitute(globpath('.', 'build*'), '\.\/', '', 'g'), '\n')
let l:len = len(s:dirs)
if l:len == 0
echoerr 'no build directories found'
elseif l:len == 1
" One build directory found, use it.
let l:dir = s:dirs[0]
unlet s:dirs
else
" Multiple build directories found, select one.
if exists('*popup_menu')
" Create popup menu to select the build directory. Callback to this
" function on completion, handled in the else branch below.
call popup_menu(s:dirs, #{
\ filter: 'popup_filter_menu',
\ callback: 'build#dir',
\ })
else
" Fallback to inputlist when popup_menu is not available.
let l:choices = []
let l:index = 1
for l:dir in s:dirs
call add(l:choices, string(l:index).': '.l:dir)
let l:index += 1
endfor
let l:index = inputlist(l:choices)
let l:dir = s:dirs[l:index - 1]
echomsg ' '.l:dir
endif
endif
else
if a:0 == 1
" Single argument, invoked by :BuildDir.
let l:dir = a:1
elseif a:0 == 2
" Two arguments, called back by popup_menu().
let l:dirs = s:dirs
unlet s:dirs
if a:2 == -1
" Selection in popup_menu() was cancelled.
return
endif
let l:dir = l:dirs[a:2 - 1]
else
echoerr 'build#dir called with too many arguments'
endif
endif
if exists('l:dir')
" Set build directory.
let l:cwd = substitute(getcwd(), '\\', '\/', 'g')
let $BUILD_DIR = l:cwd.'/'.substitute(l:dir, '\/$', '', '')
if executable('compdb')
" Post-process compile_commands.json with compdb, adds header files to
" missing compile_commands.json for more accurate diagnostics.
let l:database_dir = l:cwd.'/.vim'
let l:compile_commands = l:database_dir.'/compile_commands.json'
call systemlist('compdb -p '.$BUILD_DIR.' list > '.l:compile_commands)
else
let l:database_dir = $BUILD_DIR
endif
" Read/create .vim/coc-settings.json
let l:coc_settings = {}
if isdirectory('.vim')
let l:coc_settings = json_decode(join(readfile('.vim/coc-settings.json'), ''))
else
call mkdir('.vim')
endif
" Update .vim/coc-settings.json with new build directory.
let l:coc_settings['clangd.compilationDatabasePath'] = l:database_dir
let l:coc_settings['cmake.lsp.buildDirectory'] = $BUILD_DIR
call writefile([json_encode(l:coc_settings)], '.vim/coc-settings.json')
" Finally restart coc.nvim with new config.
CocRestart
endif
endfunction
function! build#targets(ArgLead, CmdLine, CursorPos) abort
if !exists('$BUILD_DIR')
echoerr 'build directory not set'
return ''
endif
let l:targets = []
if filereadable($BUILD_DIR.'/build.ninja')
" Ask ninja for the list of targets and prepare for returning.
for l:target in split(system('ninja -C '.$BUILD_DIR.' -t targets'), '\n')
call add(l:targets, substitute(l:target, ':.*$', '', ''))
endfor
elseif filereadable($BUILD_DIR.'/Makefile')
" TODO: Support make, it's much less straight forwards than ninja.
endif
return join(l:targets, "\n")
endfunction
function! build#run(...) abort
if !exists('$BUILD_DIR')
call echo#error('build directory not set')
return
endif
let l:build_dir = $BUILD_DIR
if filereadable($BUILD_DIR.'/build.ninja')
" Execute ninja in a terminal window.
execute 'terminal ninja -C '.l:build_dir.' '.join(a:000, ' ')
elseif filereadable($BUILD_DIR.'/Makefile')
" Execute make in a terminal window.
execute 'terminal make -C '.l:build_dir.' '.join(a:000, ' ')
endif
endfunction

113
autoload/do.vim Normal file
View File

@@ -0,0 +1,113 @@
" 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
" Rename C/C++ include guard
function! do#rename_include_guard(old)
" Prompt for new guard name
let l:new = input('Rename include guard: ', a:old)
" Get the current position
let l:pos = getpos('.')
" Replace the old guard name with the new one
exec '%s/\(#ifndef\|#define\|#endif\s\+\/\/\)\s\+\zs'.a:old.'/'.l:new.'/g'
" Stop highlighting search results
nohlsearch
" Jump back to the start position
call setpos('.', l:pos)
endfunction
" Setup and start a debugging command
function! do#debug(...)
packadd termdebug
let l:command = 'TermdebugCommand'
for l:arg in a:000
let l:command = l:command.' '.l:arg
endfor
exec l:command
endfunction
function! do#last_change()
if &filetype ==# 'help'
" vint: next-line -ProhibitCommandRelyOnUser -ProhibitCommandWithUnintendedSideEffect
1s/Last change: \zs.*$/\=strftime('%Y %b %d')/e
norm!``
endif
endfunction
" Augment vim-signify update events
function! do#signify() abort
" Disable update on cursor hold
autocmd! signify CursorHold,CursorHoldI
" Enable updates on leaving insert mode
autocmd signify InsertLeave,TextChanged <buffer> call sy#start()
" Enable update on text change e.g. undo/redo
autocmd signify TextChanged <buffer> call sy#start()
endfunction
" A sink for mappings to do nothing
function! do#sink() abort
endfunction
" Used by normal mode K mapping to show documentation
function! do#show_documentation()
if index(['vim','help'], &filetype) >= 0
execute 'help '.expand('<cword>')
elseif coc#rpc#ready() " TODO: Check if the LS supports doHover
call CocActionAsync('doHover')
else
execute '!'.&keywordprg.' '.expand('<cword>')
endif
endfunction

11
autoload/echo.vim Normal file
View File

@@ -0,0 +1,11 @@
function! echo#warning(message) abort
echohl WarningMsg
echomsg a:message
echohl None
endfunction
function! echo#error(message) abort
echohl ErrorMsg
echomsg a:message
echohl None
endfunction

14
autoload/format.vim Normal file
View File

@@ -0,0 +1,14 @@
if !has('pythonx')
finish
endif
" set debug=msg,throw
pythonx import format
function! format#clang_format() abort
pythonx format.clang_format()
endfunction
function! format#yapf() abort
pythonx format.yapf()
endfunction

27
autoload/osc52.vim Normal file
View File

@@ -0,0 +1,27 @@
" Use the OSC 52 escape sequence to copy text to the local system clipboard
" when connected to a remote machine.
" Add an autocmd to run after text is yanked.
function! osc52#autocmd()
augroup osc52
autocmd!
autocmd TextYankPost * call osc52#copy()
augroup END
endfunction
function! osc52#copy()
" Only use OSC 52 when text is yanked with the z register.
if v:event['regname'] ==# 'z'
" Get the register contents and join the list into a string.
let l:content = join(v:event['regcontents'], "\n")
if v:event['regtype'] ==# 'V'
" Append a new line in linewise-visual mode to avoid surprises.
let l:content = l:content."\n"
endif
" Get the parent tty while being compatible with vim and neovim, originally
" from https://github.com/greymd/oscyank.vim
let l:tty = system('(tty || tty < /proc/$PPID/fd/0) 2> /dev/null | grep /dev/')
" Base 64 encode the content, and print OSC 52 escape sequence to the tty.
call system('base64 | xargs -0 printf "\\033]52;c;%s\\a" > '.l:tty, l:content)
endif
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

16
autoload/snippet.vim Normal file
View File

@@ -0,0 +1,16 @@
" Description: Expand snippet on file creation.
" Attempt to expand the _template snippet if this is a new file.
" https://noahfrederick.com/log/vim-templates-with-ultisnips-and-projectionist
function! snippet#template() abort
" Return if non-empty buffer or file exists.
if !(line('$') == 1 && getline('$') ==# '') || filereadable(expand('%'))
return
endif
" Attempt to expand the _template snippet.
execute "normal! i_template\<C-r>=UltiSnips#ExpandSnippet()\<CR>"
if g:ulti_expand_res == 0
" Expansions failed, undo insert.
silent! undo
endif
endfunction

21
autoload/tmux.vim Normal file
View File

@@ -0,0 +1,21 @@
let s:tmux_option = '@vim'.substitute($TMUX_PANE, '%', '\\%', 'g')
function! tmux#inSession() abort
return $TMUX !=# ''
endfunction
function! tmux#setNavigationFlag() abort
call system('tmux set-window-option '.s:tmux_option.' 1')
endfunction
function! tmux#unsetNavigationFlag() abort
call system('tmux set-window-option -u '.s:tmux_option)
endfunction
function! tmux#isOption(option, value) abort
if !tmux#inSession()
return 0
endif
let l:option = trim(system('tmux show-options -g '.a:option))
return l:option ==# a:option.' '.a:value
endfunction

3
autoload/wsl.vim Normal file
View File

@@ -0,0 +1,3 @@
function! wsl#isDetected() abort
return $WSLENV !=# ''
endfunction

Submodule bundle/Vundle.vim deleted from 5f70ae6025

View File

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

17
coc-settings.json Normal file
View File

@@ -0,0 +1,17 @@
{
"clangd.inlayHints.enable": false,
"cmake.lsp.enable": true,
"diagnostic.enableHighlightLineNumber": false,
"diagnostic.errorSign": "▸",
"diagnostic.hintSign": "▸",
"diagnostic.infoSign": "▸",
"diagnostic.warningSign": "▸",
"powershell.integratedConsole.showOnStartup": false,
"suggest.noselect": true,
"yaml.schemas": {
"https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json": [
".gitlab-ci.yml",
".gitlab/ci/*.yml"
]
}
}

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,156 @@ if has("gui_running") || &t_Co == 256
"" Functions {{{
function! s:hi(group, fg, bg, attr)
exec "hi clear ".a:group
if a:fg != ""
exec "hi ".a:group." ctermfg=".a:fg." guifg="s:color_map[a:fg]
exec 'hi clear '.a:group
if a:fg !=# ''
exec 'hi '.a:group.' ctermfg='.a:fg.' guifg='s:color_map[a:fg]
endif
if a:bg != ""
exec "hi ".a:group." ctermbg=".a:bg." guibg=".s:color_map[a:bg]
if a:bg !=# ''
exec 'hi '.a:group.' ctermbg='.a:bg.' guibg='.s:color_map[a:bg]
endif
if a:attr != ""
exec "hi ".a:group." cterm=".a:attr." gui=".a:attr
if a:attr !=# ''
exec 'hi '.a:group.' cterm='.a:attr.' gui='.a:attr
endif
endfunction
"" }}}
"" Highlight Groups {{{
call s:hi("ColorColumn", "", "", "")
call s:hi("Conceal", "", "", "")
call s:hi("Cursor", "", "", "reverse")
call s:hi("CursorIM", "", "", "")
call s:hi("CursorColumn", "235", "", "")
call s:hi("CursorLine", "", "", "")
call s:hi("Directory", "", "", "")
call s:hi("DiffAdd", "2", "236", "")
call s:hi("DiffChange", "", "", "")
call s:hi("DiffDelete", "1", "236", "")
call s:hi("DiffText", "200", "236", "")
call s:hi("ErrorMsg", "1", "", "")
call s:hi("VertSplit", "235", "235", "")
call s:hi("Folded", "35", "233", "")
call s:hi("FoldColumn", "", "", "")
call s:hi("SignColumn", "", "", "")
call s:hi("IncSearch", "", "", "reverse")
call s:hi("LineNr", "240", "233", "")
call s:hi("CursorLineNr", "34", "233", "")
call s:hi("MatchParen", "", "", "")
call s:hi("ModeMsg", "", "", "")
call s:hi("MoreMsg", "12", "", "")
call s:hi("NonText", "", "", "")
call s:hi("Normal", "7", "232", "")
call s:hi("Pmenu", "", "235", "")
call s:hi("PmenuSel", "", "", "reverse")
call s:hi("PmenuSbar", "", "", "")
call s:hi("PmenuThumb", "", "", "")
call s:hi("Question", "", "", "")
call s:hi("Search", "11", "", "")
call s:hi("SpecialKey", "", "", "")
call s:hi("SpellBad", "160", "", "")
call s:hi("SpellCap", "12", "", "")
call s:hi("SpellLocal", "5", "", "")
call s:hi("SpellRare", "3", "", "")
call s:hi("StatusLine", "233", "233", "")
call s:hi("StatusLineNC", "", "235", "")
call s:hi("TabLine", "246", "235", "bold")
call s:hi("TabLineFill", "", "235", "")
call s:hi("TabLineSel", "248", "", "bold")
call s:hi("Title", "", "", "bold")
call s:hi("Visual", "", "235", "")
call s:hi("VisualNOS", "", "", "")
call s:hi("WarningMsg", "5", "", "")
call s:hi("WildMenu", "", "", "")
call s:hi("Menu", "", "", "")
call s:hi("Scrollbar", "", "", "")
call s:hi("Tooltip", "", "", "")
call s:hi('ColorColumn', '', '', '')
call s:hi('Conceal', '', '', '')
call s:hi('Cursor', '', '', 'reverse')
call s:hi('CursorIM', '', '', '')
call s:hi('CursorColumn', '235', '', '')
call s:hi('CursorLine', '', '', '')
call s:hi('Directory', '', '', '')
call s:hi('DiffAdd', '2', '', '')
call s:hi('DiffChange', '3', '', '')
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', '238', '', '')
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('StatusLineTerm', '15', '233', '')
call s:hi('StatusLineNC', '', '235', '')
call s:hi('StatusLineTermNC', '', '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', '72', '', '')
call s:hi('Exception', '69', '', '')
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', '102', '', '')
call s:hi('Macro', '102', '', '')
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', '179', '', '')
call s:hi('Tag', '', '', '')
call s:hi('Delimiter', '179', '', '')
call s:hi('SpecialComment', '246', '', '')
call s:hi('Debug', '179', '', '')
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')
"" }}}
"" NVIM Groups {{
call s:hi('NormalFloat', '', '235', '')
"" }}
"" Terminal Groups {{{
call s:hi('debugBreakpoint', '1', '', 'reverse')
call s:hi('debugPC', '25', '', 'reverse')
""}}}
"" 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('ALEError', '160', '', '')
call s:hi('ALEWarning', '129', '', '')
call s:hi('ALEErrorSign', '160', '233', 'bold')
call s:hi('ALEWarningSign', '129', '233', 'bold')
call s:hi('CocErrorSign', '160', '233', '')
call s:hi('CocErrorFloat', '160', '235', '')
call s:hi('CocWarningSign', '129', '233', '')
call s:hi('CocWarningFloat', '129', '235', '')
call s:hi('CocInfoSign', '8', '233', '')
call s:hi('CocInfoFloat', '8', '235', '')
call s:hi('CocHintSign', '33', '233', '')
call s:hi('CocHintFloat', '33', '235', '')
call s:hi('CocInlayHint', '8', '', '')
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', '', '')
call s:hi('SignifySignAdd', '2', '233', '')
call s:hi('SignifySignChange', '3', '233', '')
call s:hi('SignifySignDelete', '1', '233', '')
"" }}}
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

1
ftdetect/cmakecache.vim Normal file
View File

@@ -0,0 +1 @@
autocmd BufNewFile,BufReadPost CMakeCache.txt set filetype=cmakecache

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

View File

@@ -0,0 +1 @@
autocmd BufNewFile,BufReadPost */requirements.txt set filetype=requirements

3
ftplugin/c.vim Normal file
View File

@@ -0,0 +1,3 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

1
ftplugin/cmakecache.vim Normal file
View File

@@ -0,0 +1 @@
setlocal nospell

6
ftplugin/cpp.vim Normal file
View File

@@ -0,0 +1,6 @@
" Add <> to % matches
setlocal matchpairs+=<:>
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

3
ftplugin/java.vim Normal file
View File

@@ -0,0 +1,3 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

3
ftplugin/javascript.vim Normal file
View File

@@ -0,0 +1,3 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

3
ftplugin/objc.vim Normal file
View File

@@ -0,0 +1,3 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

3
ftplugin/objcpp.vim Normal file
View File

@@ -0,0 +1,3 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

Some files were not shown because too many files have changed in this diff Show More