Compare commits
552 Commits
a1eb99019b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 00e30facd3 | |||
| e378b83549 | |||
| 1de326471c | |||
| aab402fa73 | |||
| 586141cb14 | |||
| f8407f959f | |||
| 97c7c974cf | |||
| 35acaa6cb2 | |||
| 3334451c2a | |||
| d29cfc6aab | |||
| 024268db74 | |||
| 0c515161b0 | |||
| 525f6c2a5f | |||
| 0d4dab892e | |||
| 24de16b587 | |||
| 226765f88a | |||
| 20c3c27bd7 | |||
| 877d90dd90 | |||
| 8f578862ef | |||
| 9cc65d5e1f | |||
| 86659d8db6 | |||
| e066388627 | |||
| 5457b54a3a | |||
| 5972ec6aa8 | |||
| 2694c76a67 | |||
| ee5110efd8 | |||
| 330329ef2b | |||
| 32610db521 | |||
| 4c142d2fa5 | |||
| cde38c5469 | |||
| dfc26e9c40 | |||
| 5476d9ec86 | |||
| 78ae575efe | |||
| 3577aa13bc | |||
| 2ce3d322ca | |||
| 27c42a6a92 | |||
| 61ce53bfd3 | |||
| d0af1c7116 | |||
| ec2b973fc0 | |||
| 98b48377cd | |||
| eb9579e1b6 | |||
| a689039ae2 | |||
| 3da17559e9 | |||
| 68c699882d | |||
| 51c56a8633 | |||
| 14d34e0b6b | |||
| fd31549a32 | |||
| d66ff687d4 | |||
| db5ebc701d | |||
| e6e3a10c87 | |||
| 8277ad04ab | |||
| caa83e88d2 | |||
| 177dbad101 | |||
| d7c1bdd27c | |||
| 775d07414c | |||
| 49051cff43 | |||
| 8ffdfd41cd | |||
| aa2190daec | |||
| b2cf9ace96 | |||
| a46b128741 | |||
| c06b56115a | |||
| e1bc4428c5 | |||
| c9711deade | |||
| 0961c13316 | |||
| eabec4e9b6 | |||
| 7491736987 | |||
| c26d837047 | |||
| 38b8ab2fae | |||
| 30c601e8b3 | |||
| 2188095b2f | |||
| a881d3e62a | |||
| 2ab332db65 | |||
| dbff00b6fc | |||
| 9cc1ac8d87 | |||
| 34073608c8 | |||
| 06335a18da | |||
| 4a47908717 | |||
| 6053174173 | |||
| 0315c070f5 | |||
| 05b047f374 | |||
| 455c1f1b94 | |||
| 46283e3b95 | |||
| 0f1b35eda3 | |||
| 9aa45a4df5 | |||
| 78e821e386 | |||
| 2b02d0ae81 | |||
| f00eb38200 | |||
| 46d27c17fd | |||
| 4e00e225d4 | |||
| 3a44fa1e48 | |||
| 96ff72433d | |||
| 837aa12f9f | |||
| 41a0658cf2 | |||
| 3a2337cd63 | |||
| ecd8659df7 | |||
| d6106bac84 | |||
| 873acacaa6 | |||
| c284486540 | |||
| 587aeef5d7 | |||
| c67f11a8f5 | |||
| cef963d805 | |||
| dc6a8b0032 | |||
| 9a1b1ed2fc | |||
| bee751201d | |||
| eb1a4a71d8 | |||
| bf6deaf1ed | |||
| 8a2ca8c53f | |||
| 824aeb431a | |||
| 4a99f582f3 | |||
| 3b3121aa28 | |||
| 82303f075e | |||
| 92a23103e3 | |||
| 9c64158445 | |||
| eac02b26d3 | |||
| aaa8acf5a2 | |||
| c94bc3ba90 | |||
| a0df92852a | |||
| 0cd93f1823 | |||
| db2079994a | |||
| c17f7ea0d9 | |||
| 76acb9cd90 | |||
| 48913e09c3 | |||
| e4a11a2ffe | |||
| 3cc1e3d2d8 | |||
| 6435ed4c4d | |||
| d063e60559 | |||
| bc1de2d37f | |||
| 9e6169695d | |||
| 80c1b8653e | |||
| 445ca8d6fd | |||
| d960053dfc | |||
| b148f9fb68 | |||
| 529867b475 | |||
| 3449b3f815 | |||
| 67b9c6b45a | |||
| 01059ac01a | |||
| 858677ef79 | |||
| 22b969c989 | |||
| 158a6f5585 | |||
| 3ffda34a29 | |||
| 3e639c4936 | |||
| b40a9abb59 | |||
| 8fac5fb74f | |||
| 72316785d5 | |||
| b3a2208b42 | |||
| a93489efe9 | |||
| 489e6db231 | |||
| 2bef425dee | |||
| 7e79b97933 | |||
| aa3ae7df35 | |||
| 7fb1352108 | |||
| 23b9bf1f1b | |||
| cdcbab062e | |||
| 3bbbbe2a63 | |||
| b69f2d889d | |||
| 65d3e645b1 | |||
| 0d0e69a2ec | |||
| 2ee41bb80f | |||
| 57257c1c9a | |||
| c1d167f2e3 | |||
| 92d88b623d | |||
| f85d59197a | |||
| 27c77881a3 | |||
| 28804faf21 | |||
| e2e2be6e44 | |||
| 7af8660355 | |||
| 1f07473b57 | |||
| 10eb5fffea | |||
| 5f93199735 | |||
| 1e47926465 | |||
| 6f653e8ad9 | |||
| 2faa156aae | |||
| 856c66e150 | |||
| 51b95acf90 | |||
| 054507cdff | |||
| 5f7b05aab0 | |||
| bf9276aa1b | |||
| ef0f39b780 | |||
| 6d2fbc2ac5 | |||
| 72fe59ffaa | |||
| bdea77f86a | |||
| 01b027b5ac | |||
| 65c219c98d | |||
| baff9ae3fd | |||
| 9d6a9925e5 | |||
| ab0b81b6de | |||
| 3576ca02fe | |||
| 91c85da67b | |||
| e9051dc246 | |||
| 84e310a28f | |||
| ce6ec3d410 | |||
| f730d382bc | |||
| c8ac5496ca | |||
| 74c73066f4 | |||
| aff61cd8a8 | |||
| 709408fdeb | |||
| d0ce0a66ad | |||
| b493ad17e5 | |||
| d555afe61e | |||
| 65a6178bec | |||
| 8a10516961 | |||
| e3886d08f8 | |||
| eab3090da7 | |||
| 5f4e6c7636 | |||
| bdb9504aec | |||
| 97904dd47e | |||
| 34ba64980a | |||
| 8fc26f9227 | |||
| 51621e8134 | |||
| 971d510f22 | |||
| 3a60c0abcf | |||
| 446063c2e3 | |||
| 91dc036e8f | |||
| d3a8920bf7 | |||
| 61599e0b05 | |||
| 64c8bc6b40 | |||
| c326a04f70 | |||
| 992096a2a0 | |||
| 2414a94684 | |||
| c80ddd3617 | |||
| 25c18763bc | |||
| 53c971b802 | |||
| 6fb2f7a01c | |||
| 6c818dd2d7 | |||
| e745c6ebdf | |||
| 5f7ba84ce6 | |||
| 531502633f | |||
| c714c43e65 | |||
| 9d850aa457 | |||
| 825b947de6 | |||
| c019ce9d67 | |||
| c9ae77e5a2 | |||
| 9cf385ee95 | |||
| 72dec6009d | |||
| 10fd48a703 | |||
| 3777a990f2 | |||
| f7d07f23da | |||
| eabffa9354 | |||
| 6cc8627c97 | |||
| 3757da8e96 | |||
| 91eeee13bc | |||
| 0db9d470ee | |||
| 970c674381 | |||
| 1be7ef4250 | |||
| ab5428e7fa | |||
| ca84ee59ed | |||
| 456e52467a | |||
| e7c20a3cc5 | |||
| 7ace086458 | |||
| 5391645629 | |||
| fe197a4c76 | |||
| 5380ea7c78 | |||
| 1c114b7135 | |||
| 2c842cea09 | |||
| 83114d25a9 | |||
| 287e52fb2a | |||
| f4915efffd | |||
| 1d3d06bf0d | |||
| d225180985 | |||
| 3f36156521 | |||
| a2c59d8ca3 | |||
| 02370ce6e7 | |||
| 0fe8e5dfed | |||
| d13bf0bd81 | |||
| b3ba84fa4c | |||
| bc014309ef | |||
| 0416a42e08 | |||
| ec0ad0ae00 | |||
| f75b723ec6 | |||
| ce97e935a8 | |||
| 3dedbaf1c4 | |||
| 6b6b44e43d | |||
| eebe101050 | |||
| d8ad04297b | |||
| 47bc7f0eb3 | |||
| d4239e2dc3 | |||
| 87d78f9c7a | |||
| 1db9ea30ee | |||
| 4c2d9b8089 | |||
| 603ed76994 | |||
| b46d172e02 | |||
| 1ace437587 | |||
| e32c6824f6 | |||
| 4040dc7508 | |||
| e292b937d0 | |||
| e049445284 | |||
| d494a0f543 | |||
| 5f2c083d7b | |||
| b059c48b2f | |||
| 07c093e9e0 | |||
| 08f3f8d38f | |||
| 0f852b0518 | |||
| 2dea77ba81 | |||
| 946c5bc252 | |||
| 981cb46c7c | |||
| c2799dd5de | |||
| 0e419ee514 | |||
| aecdb9a11a | |||
| e8a6098bd6 | |||
| f9115f0495 | |||
| 3b528fcb19 | |||
| ac0f5b0b93 | |||
| 67257ebb98 | |||
| 5f08372d83 | |||
| 4f232a0f2d | |||
| e032ced9f4 | |||
| bd2301e3e8 | |||
| 87d9693973 | |||
| 3dd8259c01 | |||
| b5f51c0542 | |||
| c4dcb5668d | |||
| f90b63d30d | |||
| fbba77dede | |||
| c2040731f2 | |||
| 60664eaa16 | |||
| ccc214436c | |||
| 7f63041695 | |||
| 939e5e0599 | |||
| be47e8ec7b | |||
| c953ae7dbf | |||
| 384a4dc236 | |||
| 0d66f1acec | |||
| c28e93210e | |||
| df48f1f607 | |||
| 7df1cb7b26 | |||
| 22a36a177a | |||
| c3bca15641 | |||
| 06633f3394 | |||
| e2be2de00b | |||
| f6892126df | |||
| c727e7647a | |||
| 919c3e6b88 | |||
| aac31f7831 | |||
| 12755c630b | |||
| 13acc08b4f | |||
| b0c7eafb4a | |||
| 090ffcbcc8 | |||
| a2c1476bba | |||
| dcea5ede4a | |||
| bef689ae13 | |||
| cea38efd76 | |||
| 07764831ba | |||
| 607157b004 | |||
| 4038e95d4f | |||
| eeca17ad49 | |||
| 62380deefc | |||
| 5651bb8b03 | |||
| f19f507833 | |||
| b5772a3821 | |||
| 53b0bfb646 | |||
| 6736b8d8a3 | |||
| e48cd16f23 | |||
| c6d13d85f6 | |||
| d02030b9af | |||
| 504b7f110f | |||
| e635d62e0c | |||
| 8355c9e571 | |||
| a8c012881a | |||
| 1059eb7259 | |||
| 03de858c9b | |||
| ab8e113145 | |||
| 8185da77a6 | |||
| 27110ff0ea | |||
| 53782a0213 | |||
| b6ae985dd2 | |||
| c513b908dc | |||
| 6cd3e58b14 | |||
| b27cee4756 | |||
| 5f5ecde607 | |||
| c0a2bb9bb2 | |||
| f851feb40d | |||
| a97e9a4589 | |||
| 5076be4792 | |||
| 54ce7c0767 | |||
| 9c5b193efd | |||
| 0ac64c7215 | |||
| 3651e021a5 | |||
| a8a1666ff0 | |||
| ff6d949028 | |||
| a9ad1f0543 | |||
| 567b93b256 | |||
| bd7dcb738f | |||
| 9fbe25fee7 | |||
| dda5ee4e8b | |||
| 41aa424a57 | |||
| 80f6215530 | |||
| 3d43c5460c | |||
| ddc24d7fda | |||
| 4ac2924f7b | |||
| e8af28bc59 | |||
| 1a2f732259 | |||
| 927889ce74 | |||
| a78356bdb4 | |||
| dd257d069d | |||
| d730b5b7d9 | |||
| 239ffea954 | |||
| b0b66de642 | |||
| ee1b482762 | |||
| 7623fc8706 | |||
| f6302d03bd | |||
| 9e1b0c9ddd | |||
| 80b16bfb41 | |||
| 98708c1ee4 | |||
| 6b0bb3e128 | |||
| 4e8d2294f7 | |||
| 804c05e3e1 | |||
| 93c8302e99 | |||
| 2c0d66ffe1 | |||
| 54a85a5911 | |||
| d0019fdc0d | |||
| 7c9b97ef82 | |||
| 11b71bc1e0 | |||
| 23b7aeb64d | |||
| bcd7877df0 | |||
| e4a8ba61b1 | |||
| 4297e753eb | |||
| 9a07c179fa | |||
| 4a9d8df177 | |||
| 20ca44e2ff | |||
| d9374ba8ac | |||
| d1fc400a90 | |||
| dab43be08c | |||
| c63b47517d | |||
| cc04761f21 | |||
| aaf73e3988 | |||
| b2f9c43e6a | |||
| 277210751c | |||
| 1c08e92063 | |||
| 4af3c4acd5 | |||
| b297bb2491 | |||
| 69b97dc3d8 | |||
| ce1d85c7b4 | |||
| 4fafc13487 | |||
| d67e7cd062 | |||
| 1c9dae7b20 | |||
| 48d3f26a8a | |||
| fc9af59d2b | |||
| ca656087ed | |||
| e9ef5c3138 | |||
| f5afcc4cc2 | |||
| d080f003d4 | |||
| f86447e378 | |||
| f68769accf | |||
| 0aa63ffb34 | |||
| 659bcc73e8 | |||
| 7202a5c6a9 | |||
| 48e53ccd0c | |||
| 2a159c8f5b | |||
| 4adb4d22fe | |||
| d3ee7b2c73 | |||
| c7eea18cf4 | |||
| 4180ce4d69 | |||
| 99f64f8a47 | |||
| 6c95bd94ee | |||
| 7bfa6da603 | |||
| 5dda38ebeb | |||
| 972cc60236 | |||
| 8b29d0bebb | |||
| 6156a95cc4 | |||
| baac442996 | |||
| 4bb91a7cb2 | |||
| 641d3a514a | |||
| e5b886be58 | |||
| d6fafcf4c2 | |||
| 39d8230c75 | |||
| a4f997c1e1 | |||
| 657a029acc | |||
| 0bc30ad5c9 | |||
| 2c2ed3c099 | |||
| 042b8fb304 | |||
| b8bd9729d7 | |||
| e4cd16ff5b | |||
| d04bb01d16 | |||
| 8ed09b1597 | |||
| ce0402522c | |||
| d4102cb636 | |||
| a7630ace55 | |||
| b1af2d0eff | |||
| 8fb6507c1c | |||
| 02520a6a20 | |||
| 68bf0a0618 | |||
| 3079e450bf | |||
| 47b8b5861b | |||
| b5c24ed587 | |||
| d54535c639 | |||
| e09f187c82 | |||
| 265c851f37 | |||
| eb3550a197 | |||
| ad59766ace | |||
| 20e4ab57e5 | |||
| 5299184d0b | |||
| 48306a25ed | |||
| 9c4caee646 | |||
| edce545a0e | |||
| b4ef88d28c | |||
| c742b7281f | |||
| a32264fcd8 | |||
| 8eb08c17a6 | |||
| 61e47dac00 | |||
| af4e0ecd8a | |||
| 2eeab947c8 | |||
| bcea0d1ffd | |||
| d713dd4619 | |||
| 4e38d2f43f | |||
| ebc5941b52 | |||
| 2d90a55ddd | |||
| e26b13c742 | |||
| 5465bef85d | |||
| 3a63738fa1 | |||
| c57679dbb7 | |||
| 5b2a04a499 | |||
| 5b27fcdbb1 | |||
| 8bde17924c | |||
| 6a27676b8c | |||
| e31952ea5d | |||
| a72bd9b03e | |||
| e233973f4c | |||
| 46aa25f6be | |||
| 77735726d9 | |||
| e8f642dfc0 | |||
| af6705736c | |||
| c77fbe9b59 | |||
| 318de00d36 | |||
| b03ff98e4d | |||
| 02de482df9 | |||
| 3cbbe22ac6 | |||
| 60621989e1 | |||
| 91e4ae9983 | |||
| b0210e4f5c | |||
| 4cf7ce0d32 | |||
| e7b011c367 | |||
| 1a43d6e810 | |||
| cfec8fd3e6 | |||
| e3ba637473 | |||
| 9ed2d9cc48 | |||
| cdd1a8d959 | |||
| be94e9f9db | |||
| 9ff37a4055 | |||
| 437476694c | |||
| 6363c75535 | |||
| e4c2c59a63 | |||
| 1d80cbb679 | |||
| 277de97a36 | |||
| 3b1d816705 | |||
| 19aa697862 | |||
| f57e1a9fb7 | |||
| 5a72231b97 | |||
| 947a20746b | |||
| bef1581105 | |||
| 371432423e | |||
| 837fd5cef3 | |||
| 9d0a0f85f7 |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
local.vim
|
||||
.netrwhist
|
||||
pack/*
|
||||
spell/*
|
||||
*.pyc
|
||||
186
README.md
Normal file
186
README.md
Normal 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
|
||||
104
UltiSnips/all.snippets
Normal file
104
UltiSnips/all.snippets
Normal file
@@ -0,0 +1,104 @@
|
||||
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
|
||||
10
UltiSnips/asciidoc.snippets
Normal file
10
UltiSnips/asciidoc.snippets
Normal 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
176
UltiSnips/c.snippets
Normal 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
59
UltiSnips/c_ansi.snippets
Normal 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
|
||||
89
UltiSnips/c_doxygen.snippets
Normal file
89
UltiSnips/c_doxygen.snippets
Normal 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
834
UltiSnips/cmake.snippets
Normal 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
114
UltiSnips/cpp.snippets
Normal 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
|
||||
228
UltiSnips/cpp_googletest.snippets
Normal file
228
UltiSnips/cpp_googletest.snippets
Normal 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
1
UltiSnips/glsl.snippets
Normal file
@@ -0,0 +1 @@
|
||||
extends lit
|
||||
14
UltiSnips/help.snippets
Normal file
14
UltiSnips/help.snippets
Normal file
@@ -0,0 +1,14 @@
|
||||
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
64
UltiSnips/html.snippets
Normal 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
|
||||
56
UltiSnips/html_reveal.js.snippets
Normal file
56
UltiSnips/html_reveal.js.snippets
Normal 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
|
||||
5
UltiSnips/javascript.snippets
Normal file
5
UltiSnips/javascript.snippets
Normal file
@@ -0,0 +1,5 @@
|
||||
snippet function "JS function"
|
||||
function $1($2) {
|
||||
$3
|
||||
}
|
||||
endsnippet
|
||||
3
UltiSnips/jinja.snippets
Normal file
3
UltiSnips/jinja.snippets
Normal file
@@ -0,0 +1,3 @@
|
||||
extends html
|
||||
|
||||
priority 1
|
||||
15
UltiSnips/lit.snippets
Normal file
15
UltiSnips/lit.snippets
Normal 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
1
UltiSnips/llvm.snippets
Normal file
@@ -0,0 +1 @@
|
||||
extends lit
|
||||
23
UltiSnips/markdown.snippets
Normal file
23
UltiSnips/markdown.snippets
Normal file
@@ -0,0 +1,23 @@
|
||||
snippet ``` "code section"
|
||||
\`\`\`${1:language}
|
||||
$0
|
||||
\`\`\`
|
||||
endsnippet
|
||||
|
||||
snippet [] "url link"
|
||||
[$1]($2)$0
|
||||
endsnippet
|
||||
|
||||
snippet ! "image link"
|
||||

|
||||
endsnippet
|
||||
|
||||
snippet --- "frontmatter" b
|
||||
---
|
||||
$0
|
||||
---
|
||||
endsnippet
|
||||
|
||||
snippet shrug "¯\_(ツ)_/¯" i
|
||||
¯\_(ツ)_/¯
|
||||
endsnippet
|
||||
7
UltiSnips/notes.snippets
Normal file
7
UltiSnips/notes.snippets
Normal file
@@ -0,0 +1,7 @@
|
||||
snippet * "bullet point" b
|
||||
* $0
|
||||
endsnippet
|
||||
|
||||
snippet shrug "¯\_(ツ)_/¯" i
|
||||
¯\_(ツ)_/¯
|
||||
endsnippet
|
||||
1
UltiSnips/opencl.snippets
Normal file
1
UltiSnips/opencl.snippets
Normal file
@@ -0,0 +1 @@
|
||||
extends lit
|
||||
23
UltiSnips/python.snippets
Normal file
23
UltiSnips/python.snippets
Normal file
@@ -0,0 +1,23 @@
|
||||
snippet #! "Shebang"
|
||||
#!/usr/bin/env python
|
||||
endsnippet
|
||||
|
||||
snippet main "Python main stub"
|
||||
def main():
|
||||
${0:pass}
|
||||
|
||||
|
||||
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
144
UltiSnips/redmine.snippets
Normal 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
61
UltiSnips/rst.snippets
Normal 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
1
UltiSnips/spirv.snippets
Normal file
@@ -0,0 +1 @@
|
||||
extends lit
|
||||
3
UltiSnips/text.snippets
Normal file
3
UltiSnips/text.snippets
Normal file
@@ -0,0 +1,3 @@
|
||||
snippet shrug "¯\_(ツ)_/¯" i
|
||||
¯\_(ツ)_/¯
|
||||
endsnippet
|
||||
31
UltiSnips/vim.snippets
Normal file
31
UltiSnips/vim.snippets
Normal 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
21
UltiSnips/xml.snippets
Normal 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
|
||||
38
UltiSnips/xml_api.snippets
Normal file
38
UltiSnips/xml_api.snippets
Normal 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
7
UltiSnips/zsh.snippets
Normal 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
2
after/ftdetect/cpp.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
" Force *.def to C++ filetype for LLVM
|
||||
au BufNewFile,BufReadPost *.def set filetype=cpp
|
||||
3
after/ftdetect/markdown.vim
Normal file
3
after/ftdetect/markdown.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
" Force *.md to markdown filetype
|
||||
au BufNewFile,BufReadPost *.md set filetype=markdown
|
||||
au BufNewFile,BufReadPost *.ronn set filetype=markdown
|
||||
2
after/ftdetect/opencl.vim
Normal file
2
after/ftdetect/opencl.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
" Force *.cl to OpenCL C filetype
|
||||
au BufNewFile,BufReadPost *.cl set filetype=opencl
|
||||
6
after/ftdetect/python.vim
Normal file
6
after/ftdetect/python.vim
Normal file
@@ -0,0 +1,6 @@
|
||||
function! s:set_lit_cfg_filetype()
|
||||
set filetype=python
|
||||
endfunction
|
||||
|
||||
au BufNewFile,BufReadPost lit.cfg call s:set_lit_cfg_filetype()
|
||||
au BufNewFile,BufReadPost lit.local.cfg call s:set_lit_cfg_filetype()
|
||||
2
after/ftdetect/tablegen.vim
Normal file
2
after/ftdetect/tablegen.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
" Force *.td to tablegen filetype
|
||||
au BufNewFile,BufReadPost *.td set filetype=tablegen
|
||||
2
after/ftdetect/zsh.vim
Normal file
2
after/ftdetect/zsh.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
au BufNewFile,BufReadPost .enter set filetype=zsh
|
||||
au BufNewFile,BufReadPost .exit set filetype=zsh
|
||||
3
after/ftplugin/asciidoc.vim
Normal file
3
after/ftplugin/asciidoc.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
setlocal textwidth=76
|
||||
setlocal formatoptions+=n
|
||||
setlocal spell
|
||||
@@ -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
15
after/ftplugin/cmake.vim
Normal 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>"
|
||||
1
after/ftplugin/cpp.lua
Normal file
1
after/ftplugin/cpp.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.bo.commentstring = '//%s'
|
||||
3
after/ftplugin/cpp.vim
Normal file
3
after/ftplugin/cpp.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
" Add Doxygen documentation generation plugin.
|
||||
packadd DoxygenToolkit.vim
|
||||
nnoremap <leader>d :Dox<CR>
|
||||
17
after/ftplugin/gitcommit.vim
Normal file
17
after/ftplugin/gitcommit.vim
Normal 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\+"
|
||||
5
after/ftplugin/gitconfig.vim
Normal file
5
after/ftplugin/gitconfig.vim
Normal file
@@ -0,0 +1,5 @@
|
||||
" Setup tabs
|
||||
setlocal noexpandtab
|
||||
setlocal tabstop=8
|
||||
setlocal shiftwidth=8
|
||||
setlocal softtabstop=8
|
||||
3
after/ftplugin/groovy.vim
Normal file
3
after/ftplugin/groovy.vim
Normal 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
8
after/ftplugin/help.vim
Normal 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
2
after/ftplugin/html.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
" Set text and tab width for certain file types
|
||||
setlocal textwidth=80
|
||||
1
after/ftplugin/json.vim
Normal file
1
after/ftplugin/json.vim
Normal file
@@ -0,0 +1 @@
|
||||
setlocal conceallevel=2
|
||||
3
after/ftplugin/llvm.vim
Normal file
3
after/ftplugin/llvm.vim
Normal 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
2
after/ftplugin/make.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
" Set up tabs
|
||||
setlocal tabstop=8
|
||||
2
after/ftplugin/man.vim
Normal file
2
after/ftplugin/man.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
setlocal showbreak=
|
||||
set signcolumn=no
|
||||
63
after/ftplugin/markdown.vim
Normal file
63
after/ftplugin/markdown.vim
Normal 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
4
after/ftplugin/notes.vim
Normal file
@@ -0,0 +1,4 @@
|
||||
" Override default hightlight groups
|
||||
hi link notesTodo Todo
|
||||
hi link notesDoneMarker Note
|
||||
hi link notesXXX Important
|
||||
1
after/ftplugin/opencl.vim
Normal file
1
after/ftplugin/opencl.vim
Normal file
@@ -0,0 +1 @@
|
||||
setlocal commentstring=//%s
|
||||
27
after/ftplugin/python.vim
Normal file
27
after/ftplugin/python.vim
Normal 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
|
||||
5
after/ftplugin/snippets.vim
Normal file
5
after/ftplugin/snippets.vim
Normal 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
1
after/ftplugin/tags.vim
Normal file
@@ -0,0 +1 @@
|
||||
setlocal noexpandtab
|
||||
4
after/ftplugin/text.vim
Normal file
4
after/ftplugin/text.vim
Normal file
@@ -0,0 +1,4 @@
|
||||
if !has("win32") || has("gui_running")
|
||||
setlocal spell
|
||||
endif
|
||||
setlocal textwidth=80
|
||||
43
after/ftplugin/vim.vim
Normal file
43
after/ftplugin/vim.vim
Normal 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
5
after/ftplugin/yaml.vim
Normal 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
2
after/gitcommit.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
set formatoptions+=tnqo
|
||||
set formatlistpat="^\s*\d\+\.\s\+\|^[-*+]\s\+"
|
||||
@@ -1,11 +1,23 @@
|
||||
" Tabs
|
||||
set expandtab
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
|
||||
set smartindent
|
||||
if has('smartindent')
|
||||
" Do smart autoindenting when starting a new line
|
||||
set smartindent
|
||||
endif
|
||||
" Copy indent from current line when starting a new line
|
||||
set autoindent
|
||||
|
||||
" Code
|
||||
set cino=N-sg1h1l1(0
|
||||
if has('cindent')
|
||||
" The 'cinoptions' affect the way 'cindent' re-indents lines in a C program.
|
||||
" * N-s - don't indent inside C++ namespace
|
||||
" * E-s - don't indent inside C++ extern "C"
|
||||
" * g1 - indent scope declarations {public,private,protected} 1 space
|
||||
" * h1 - indent statements after scope declarations 1 space more
|
||||
" * l1 - indent case statement scopes with the case label
|
||||
" * (0,W4 - indent inside unclosed parenthesis
|
||||
" * i2 - indent C++ class base declarations and constructor initializers
|
||||
set cinoptions=N-sE-sg1h1l1(0,W4i2
|
||||
endif
|
||||
|
||||
8
after/plugin/mappings.vim
Normal file
8
after/plugin/mappings.vim
Normal 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
87
after/syntax/c.vim
Normal 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
8
after/syntax/cmake.vim
Normal 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
2
after/syntax/css.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
hi link cssBlock Delimiter
|
||||
hi link cssNoise Delimiter
|
||||
9
after/syntax/diff.vim
Normal file
9
after/syntax/diff.vim
Normal 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
6
after/syntax/gdb.vim
Normal 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'
|
||||
4
after/syntax/javascript.vim
Normal file
4
after/syntax/javascript.vim
Normal 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
4
after/syntax/json.vim
Normal 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
29
after/syntax/llvm.vim
Normal 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
52
after/syntax/markdown.vim
Normal 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
1
after/syntax/netrw.vim
Normal file
@@ -0,0 +1 @@
|
||||
hi link netrwSuffixes SpecialComment
|
||||
2
after/syntax/python.vim
Normal file
2
after/syntax/python.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
highlight link pythonException Conditional
|
||||
highlight link pythonExceptions Keyword
|
||||
7
after/syntax/yaml.vim
Normal file
7
after/syntax/yaml.vim
Normal 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
6
after/syntax/zsh.vim
Normal 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
110
autoload/build.vim
Normal 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
113
autoload/do.vim
Normal 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
11
autoload/echo.vim
Normal 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
14
autoload/format.vim
Normal 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
27
autoload/osc52.vim
Normal 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
25
autoload/platform.vim
Normal 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
|
||||
21
autoload/tmux.vim
Normal file
21
autoload/tmux.vim
Normal 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
3
autoload/wsl.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
function! wsl#isDetected() abort
|
||||
return $WSLENV !=# ''
|
||||
endfunction
|
||||
Submodule bundle/Vundle.vim deleted from 5f70ae6025
106
clang-format.py
106
clang-format.py
@@ -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()
|
||||
81
coc-settings.json
Normal file
81
coc-settings.json
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"cmake.lsp.enable": true,
|
||||
"diagnostic.enableHighlightLineNumber": false,
|
||||
"diagnostic.errorSign": "▸",
|
||||
"diagnostic.hintSign": "▸",
|
||||
"diagnostic.infoSign": "▸",
|
||||
"diagnostic.warningSign": "▸",
|
||||
"inlayHint.enable": false,
|
||||
"powershell.integratedConsole.showOnStartup": false,
|
||||
"snippets.priority": 100,
|
||||
"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",
|
||||
".gitlab/ci/*.yml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible-lint-config.json": [
|
||||
".ansible-lint",
|
||||
".config/ansible-lint.yml",
|
||||
".config/ansible-lint.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible-navigator.json": [
|
||||
"ansible-navigator.yml",
|
||||
"ansible-navigator.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/execution-environment.json": [
|
||||
"execution-environment.yml",
|
||||
"execution-environment.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/galaxy.json": [
|
||||
"galaxy.yml",
|
||||
"galaxy.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/inventory.json": [
|
||||
"inventory.yaml",
|
||||
"inventory.yml",
|
||||
"inventory/*.yml",
|
||||
"inventory/*.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/meta-runtime.json": [
|
||||
"meta/runtime.yml",
|
||||
"meta/runtime.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/molecule.json": [
|
||||
"molecule/*/molecule.yml",
|
||||
"molecule/*/molecule.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/playbook.json": [
|
||||
"playbooks/*.yml",
|
||||
"playbooks/*.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/requirements.json": [
|
||||
"requirements.yml",
|
||||
"requirements.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/rulebook.json": [
|
||||
"rulebooks/*.yml",
|
||||
"rulebooks/*.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/tasks.json": [
|
||||
"tasks/*.yml",
|
||||
"tasks/*.yaml",
|
||||
"handlers/*.yml",
|
||||
"handlers/*.yaml"
|
||||
],
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/vars.json": [
|
||||
"playbooks/vars/*.yml",
|
||||
"playbooks/vars/*.yaml",
|
||||
"vars/*.yml",
|
||||
"vars/*.yaml",
|
||||
"defaults/*.yml",
|
||||
"defaults/*.yaml",
|
||||
"host_vars/*.yml",
|
||||
"host_vars/*.yaml",
|
||||
"group_vars/*.yml",
|
||||
"group_vars/*.yaml"
|
||||
]
|
||||
},
|
||||
"snippets.ultisnips.pythonPrompt": false
|
||||
}
|
||||
394
colors/basic-light.vim
Normal file
394
colors/basic-light.vim
Normal 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
|
||||
231
colors/fresh.vim
231
colors/fresh.vim
@@ -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,151 @@ 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('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
56
colors/morning-white.vim
Normal 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
301
colors/wwdc17.vim
Normal 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
1
ftdetect/cmakecache.vim
Normal file
@@ -0,0 +1 @@
|
||||
autocmd BufNewFile,BufReadPost CMakeCache.txt set filetype=cmakecache
|
||||
3
ftdetect/llvm.vim
Normal file
3
ftdetect/llvm.vim
Normal 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
|
||||
1
ftdetect/requirements.vim
Normal file
1
ftdetect/requirements.vim
Normal file
@@ -0,0 +1 @@
|
||||
autocmd BufNewFile,BufReadPost */requirements.txt set filetype=requirements
|
||||
3
ftplugin/c.vim
Normal file
3
ftplugin/c.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
1
ftplugin/cmakecache.vim
Normal file
1
ftplugin/cmakecache.vim
Normal file
@@ -0,0 +1 @@
|
||||
setlocal nospell
|
||||
6
ftplugin/cpp.vim
Normal file
6
ftplugin/cpp.vim
Normal 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
3
ftplugin/java.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
3
ftplugin/javascript.vim
Normal file
3
ftplugin/javascript.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
3
ftplugin/objc.vim
Normal file
3
ftplugin/objc.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
3
ftplugin/objcpp.vim
Normal file
3
ftplugin/objcpp.vim
Normal 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
Reference in New Issue
Block a user