Compare commits
332 Commits
main
...
a1eb99019b
| Author | SHA1 | Date | |
|---|---|---|---|
| a1eb99019b | |||
| 9d34464d09 | |||
| ad481c49a3 | |||
| 6e16e282f8 | |||
| 08c965662c | |||
| f7876e63f2 | |||
| b932bea407 | |||
| 32086db314 | |||
| 158b1202b9 | |||
| 52be542a64 | |||
| a4eec55917 | |||
| 7b1e06642a | |||
| 1c2f258b74 | |||
| f240bc3a1f | |||
| 6a1b380200 | |||
| 4ae5b87f70 | |||
| 257eb0f39e | |||
| e91c279c87 | |||
| 9546318f67 | |||
| 6d2c80f067 | |||
| 6f875f0a0e | |||
| 1bbe5870e7 | |||
| 36bdf4d61d | |||
| 0eed4571e4 | |||
| 8ea40c0336 | |||
| 6567505b93 | |||
| 0c3ad04f8b | |||
| da7c13fa57 | |||
| d9f4c5ea18 | |||
| d55d639862 | |||
| c4ef133a37 | |||
| 698f829d0a | |||
| 98e9baa1d9 | |||
| 6899c68982 | |||
| 913dcc5028 | |||
| 5c15d86744 | |||
| 18a9b58c6e | |||
| 913b911070 | |||
| 8354509940 | |||
| de5a99dc68 | |||
| 4c13f67634 | |||
| 779f697fdf | |||
| 429229dcb7 | |||
| 6084d7802d | |||
| de7137f320 | |||
| 390ffb03a1 | |||
| dcea49e12f | |||
| e84ffbecf9 | |||
| 675a0ec7ef | |||
| 8ce6066e9c | |||
| c41edaa550 | |||
| 46a4b864e4 | |||
| 9a6f683850 | |||
| 5dcb7ccbf4 | |||
| 1376ada6ec | |||
| 8156667077 | |||
| 8190c5d8d6 | |||
| cb3209eec4 | |||
| e6be50a3af | |||
| be3492c9e9 | |||
| 501eb236ba | |||
| 13e197426a | |||
| 414ce03a80 | |||
| ab8bdcee83 | |||
| 5a151e95d8 | |||
| 0b4fcc62f3 | |||
| c0c141b365 | |||
| 45e228a776 | |||
| b2051053fb | |||
| 96e882270b | |||
| e1906cc823 | |||
| 3cce38da8c | |||
| 9b3c258e42 | |||
| 918460068e | |||
| b712930d75 | |||
| f1f0028953 | |||
| 35ae98dbbf | |||
| 67b374b0ba | |||
| d219aa1fb7 | |||
| 66de6f68fb | |||
| 3ac735edf5 | |||
| 9840dd9edb | |||
| 91237cc098 | |||
| 969f3fa0a7 | |||
| 810bcd2104 | |||
| 62477c3bd1 | |||
| bcae80d546 | |||
| 3a7eafdc0a | |||
| 0681a8651e | |||
| 00f44fe444 | |||
| 084c306fbb | |||
| 04b4c2e7b5 | |||
| d72e6d73d4 | |||
| b20e342499 | |||
| fa542cdd01 | |||
| c27a51b3ed | |||
| ac4e17ae6b | |||
| 99f7740074 | |||
| be59030566 | |||
| eb1bd9120f | |||
| 7de8caa2bf | |||
| d24788aaff | |||
| 5a1562dcc7 | |||
| 73524aa521 | |||
| 5a15007872 | |||
| 003d3ceb23 | |||
| c98ccfb77a | |||
| 19b55a2173 | |||
| 55a1a4b78d | |||
| b78ddbeeb1 | |||
| 8d4b9be95c | |||
| 973b5abe18 | |||
| 07288394d8 | |||
| f6b1a4faf6 | |||
| 53e214efd8 | |||
| 6ac867d134 | |||
| 09eed40e52 | |||
| ea95039f4e | |||
| 25788a0092 | |||
| 37423afbd7 | |||
| d325cfd47c | |||
| c140e0d056 | |||
| d24ea99394 | |||
| 49635e563a | |||
| 3ee9b6a9c1 | |||
| cf068227a9 | |||
| 6f2ab5abb3 | |||
| bf5f0c2ede | |||
| d5838afea2 | |||
| c80bb6e95b | |||
| e0e5206f7e | |||
| 05322457f6 | |||
| 06855be2c6 | |||
| 689f9bce2f | |||
| 2e43d505a4 | |||
| a135dc676d | |||
| 9916bd7d1f | |||
| 89ea4b3aa1 | |||
| 959ef7e62d | |||
| d68fa07229 | |||
| bafed0234f | |||
| 56bee4d015 | |||
| da9fff2886 | |||
| 47d42d770c | |||
| 1ccd26dbf2 | |||
| 768aefe601 | |||
| d6529e62f0 | |||
| a53f872d70 | |||
| ca00512f4d | |||
| c0d8fa9e8d | |||
| c4a598e861 | |||
| c5248647db | |||
| fce5e4bafe | |||
| 3714492068 | |||
| 50ed246b80 | |||
| ac3013e7b7 | |||
| c4aa0573c4 | |||
| 4fe7d44f95 | |||
| 712771558a | |||
| f55fae15ec | |||
| 1a425c3d9c | |||
| 35fbe68cfd | |||
| 9eccfd7e70 | |||
| 1e95a4c7dc | |||
| ae547f6454 | |||
| e207ca1e6a | |||
| 2b616fec80 | |||
| 2b8f6c83c0 | |||
| 3717b480c5 | |||
| 899e180577 | |||
| 433a28fcfb | |||
| cc18d37bb3 | |||
| 45f3f78962 | |||
| fd3f6b3344 | |||
| 1f63041179 | |||
| 2d1a676f8f | |||
| 4eda89fd50 | |||
| 213a12ac53 | |||
| 8af63e348c | |||
| 0d0b646457 | |||
| c0eb360d53 | |||
| 7a0aa96e3e | |||
| 76ce4405dc | |||
| fb1b3f8c6c | |||
| 2111a094fa | |||
| 9f51ba9293 | |||
| d322ef9fd8 | |||
| e0609ba70a | |||
| e9d9aeaa94 | |||
| fddb4d4390 | |||
| 8e1940ed8b | |||
| 8f44f19159 | |||
| 980f7f04fd | |||
| 6344d99311 | |||
| bbae97ff74 | |||
| 4e0a64e2e3 | |||
| cdde5f72e1 | |||
| cf4c93bb76 | |||
| 1a072baee4 | |||
| 0609dc02a6 | |||
| 5e10057d59 | |||
| 305cb40e52 | |||
| 8a87f8dc6c | |||
| 697275c66d | |||
| b4c4dda1da | |||
| 0dba705efc | |||
| 25039f5647 | |||
| 303c2c45b4 | |||
| c8825c5d14 | |||
| 961e154d39 | |||
| 1e2732bdc2 | |||
| a0c0d6753c | |||
| 39afac4bdd | |||
| f087b4551a | |||
| f79ab114e7 | |||
| b5f270f86c | |||
| 2b750a12fb | |||
| ec73f24be2 | |||
| 879d0b8735 | |||
| 2f354296ee | |||
| 98e29d782d | |||
| 907ba1f219 | |||
| 7304be4635 | |||
| 47e861e2f0 | |||
| e8795a5e40 | |||
| 65ed51f012 | |||
| c02b11d262 | |||
| f2b566af7a | |||
| 23d3f5d6b3 | |||
| eb79d94439 | |||
| 1a714737f4 | |||
| e7c79daa1c | |||
| 150fa9e36e | |||
| f3af0dbe41 | |||
| 6e8ceaa7f6 | |||
| f6dbb20778 | |||
| e5f40e87e6 | |||
| 47bff5ef75 | |||
| c2244d7e8e | |||
| d0632338b1 | |||
| 55e3be13da | |||
| 5cb6e924ce | |||
| c88cff7ae1 | |||
| aa9f1fdc73 | |||
| 3f486d1a83 | |||
| 62c3b1b988 | |||
| 40a6c51a12 | |||
| 9a19034ea6 | |||
| e4a54f2178 | |||
| 80dfb3a6d2 | |||
| 0db8f40e96 | |||
| 80b052bfc6 | |||
| 7d958b05b6 | |||
| 70c3052dea | |||
| d55ff04bd8 | |||
| e5c908d634 | |||
| b44d5516f4 | |||
| 832a916c55 | |||
| 9c0acc85f0 | |||
| 1d4f628fa5 | |||
| c44593a6b1 | |||
| 86295c0621 | |||
| e757d773d5 | |||
| 44097cf949 | |||
| 501b647818 | |||
| 92cb126117 | |||
| 772f24a95b | |||
| f946b60cc8 | |||
| e9f8259607 | |||
| 0ca48f9054 | |||
| a57ff47b09 | |||
| 81e98e6383 | |||
| b08bb72422 | |||
| 2f4a4ad0bb | |||
| 167daccde8 | |||
| 083da937a3 | |||
| d4753aff32 | |||
| c82f448092 | |||
| 6530874b90 | |||
| a3c29d1c5f | |||
| 1adca114c8 | |||
| d1e490e5f2 | |||
| 1420fbebc7 | |||
| 9f57bf1904 | |||
| d39c703403 | |||
| 7cb9c9d4bc | |||
| 8c36ada444 | |||
| 4049cac7c9 | |||
| a9ff2c2aa1 | |||
| 7f10a7fa1f | |||
| edd869266a | |||
| 468407cb14 | |||
| 06ad9537b5 | |||
| fecc8c980e | |||
| 6511e34e5b | |||
| 82b79dff79 | |||
| 72a3cdd0c8 | |||
| e8bce3baae | |||
| be7398294d | |||
| a487856143 | |||
| 67a72fdeeb | |||
| 7172593ee0 | |||
| afc4dbae01 | |||
| d4b7afcbf3 | |||
| 0e955bb6e2 | |||
| 5a1046adfe | |||
| e63f250376 | |||
| 2451185759 | |||
| dd26a6da13 | |||
| 12077c2d1f | |||
| b2bc4bb50d | |||
| cb5841c88d | |||
| af82af9dba | |||
| a93bb89b86 | |||
| d80aaac2fc | |||
| 3938e3d6aa | |||
| 0dd9b44b00 | |||
| fcceac6dac | |||
| 73bf75cf86 | |||
| a296852c90 | |||
| bc168694d6 | |||
| 72c04d8d13 | |||
| 6b81efb6f9 | |||
| 7091221e3c | |||
| cceeb76607 | |||
| 6e73c1529b | |||
| 20e5d878fe | |||
| cb066bad4e | |||
| 7a69e1add9 | |||
| 88c45d5399 | |||
| 565a6fef86 | |||
| 73e2119904 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,5 +1,2 @@
|
||||
local.vim
|
||||
.netrwhist
|
||||
pack/*
|
||||
spell/*
|
||||
*.pyc
|
||||
plugs/*
|
||||
|
||||
186
README.md
186
README.md
@@ -1,186 +0,0 @@
|
||||
# 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
|
||||
@@ -5,86 +5,78 @@ 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])
|
||||
comment=vim.current.buffer.options['commentstring'].strip()
|
||||
|
||||
def before(self):
|
||||
return '' if self.incomment else self.commentbefore
|
||||
def commentbefore():
|
||||
commentbefore = comment[0:comment.find('%s')].strip()
|
||||
row, col = vim.current.window.cursor
|
||||
row -= 1
|
||||
col -= 1
|
||||
line = vim.current.buffer[row]
|
||||
if (col - 1) >= 0 and commentbefore == line[col - 1:len(commentbefore)]:
|
||||
return ''
|
||||
return commentbefore + ' '
|
||||
|
||||
def after(self):
|
||||
return '' if self.incomment else self.commentafter
|
||||
endglobal
|
||||
def commentafter():
|
||||
after=comment[comment.find('%s')+2:].strip()
|
||||
if 0 < len(after):
|
||||
return ' ' + after
|
||||
return ''
|
||||
|
||||
snippet todo "TODO commment"
|
||||
`!p comment=Comment();snip.rv=comment.before()`TODO${1/.+/(/}$1${1/.+/)/}: $0`!p snip.rv=comment.after()`
|
||||
endsnippet
|
||||
import datetime
|
||||
import time
|
||||
|
||||
snippet fixme "FIXME comment"
|
||||
`!p comment=Comment();snip.rv=comment.before()`FIXME${1/.+/(/}$1${1/.+/)/}: $0`!p snip.rv=comment.after()`
|
||||
endsnippet
|
||||
def date():
|
||||
return datetime.datetime.now().strftime('%B %d, %Y')
|
||||
|
||||
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):
|
||||
class LocalTZ(datetime.tzinfo):
|
||||
"""Query OS for local timezone offset."""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize LocalTZ."""
|
||||
tzinfo.__init__(self)
|
||||
self.unixEpochOrdinal = datetime.utcfromtimestamp(
|
||||
datetime.tzinfo.__init__(self)
|
||||
self._unixEpochOrdinal = datetime.datetime.utcfromtimestamp(
|
||||
0).toordinal()
|
||||
|
||||
def dst(self, _):
|
||||
return timedelta(0)
|
||||
return datetime.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])
|
||||
t = ((dt.toordinal() - self._unixEpochOrdinal) * 86400 + dt.hour * 3600
|
||||
+ dt.second + time.timezone)
|
||||
utc = datetime.datetime(*time.gmtime(t)[:6])
|
||||
local = datetime.datetime(*time.localtime(t)[:6])
|
||||
return local - utc
|
||||
|
||||
def tzname(self, dt):
|
||||
if daylight and localtime().tm_isdst:
|
||||
return tzname[daylight]
|
||||
return tzname[0]
|
||||
def utc():
|
||||
value = datetime.datetime.strftime(
|
||||
datetime.datetime.now(LocalTZ()), '%Y-%m-%dT%H:%M:%S%z')
|
||||
return '%s:%s' % (value[:-2], value[-2:])
|
||||
endglobal
|
||||
|
||||
snippet date "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')`
|
||||
snippet date "Today's date"
|
||||
`!p snip.rv=date()`
|
||||
endsnippet
|
||||
|
||||
snippet utc "UTC date time now" i
|
||||
`!p snip.rv=datetime.now(LocalTZ()).strftime('%Y-%m-%dT%H:%M:%S%z')`
|
||||
`!p snip.rv=utc()`
|
||||
endsnippet
|
||||
|
||||
snippet codeplay "Codeplay Software Ltd. copywrite"
|
||||
`!p snip.rv=commentbefore()`Copyright (C) Codeplay Software Limited. All Rights Reserved.`!p snip.rv=commentafter()`
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet todo "TODO commment"
|
||||
`!p snip.rv=commentbefore()`TODO${1/.+/(/}$1${1/.+/)/}: $0`!p snip.rv=commentafter()`
|
||||
endsnippet
|
||||
|
||||
snippet note "NOTE comment"
|
||||
`!p snip.rv=commentbefore()`NOTE: $0`!p snip.rv=commentafter()`
|
||||
endsnippet
|
||||
|
||||
snippet *x "GitHub style checkbox"
|
||||
* [${1:x}] $0
|
||||
* [${1: }] $0
|
||||
endsnippet
|
||||
|
||||
snippet "* [" "GitHub style checkbox"
|
||||
@@ -95,10 +87,6 @@ snippet *[ "GitHub style checkbox"
|
||||
* [${1: }] $0
|
||||
endsnippet
|
||||
|
||||
snippet shrug "¯\\_(ツ)_/¯" i
|
||||
¯\_(ツ)_/¯
|
||||
endsnippet
|
||||
|
||||
snippet tableflip "(╯°▪°)╯︵┻━┻" i
|
||||
(╯°▪°)╯︵┻━┻
|
||||
snippet [[ "lit named ID match" i
|
||||
[[${1:name}:%[a-zA-Z0-9]+]]
|
||||
endsnippet
|
||||
|
||||
@@ -4,7 +4,3 @@ snippet refpage "Vulkan Spec refpage"
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet shrug "¯\_(ツ)_/¯" i
|
||||
¯\_(ツ)_/¯
|
||||
endsnippet
|
||||
|
||||
@@ -11,15 +11,6 @@ def complete(t, opts):
|
||||
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
|
||||
@@ -162,13 +153,13 @@ default: {
|
||||
endsnippet
|
||||
|
||||
snippet main "Main function stub"
|
||||
int main(${1:int argc, const char** argv}) {
|
||||
int main(${1:int argc, char **argv}) {
|
||||
$0
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet debug "Debug fprintf"
|
||||
fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);
|
||||
fprintf(stderr, "%s: %d: %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);
|
||||
endsnippet
|
||||
|
||||
snippet bs "bool string"
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
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
|
||||
@@ -27,10 +27,6 @@ snippet "/// n" "Doxygen note block"
|
||||
/// @note $0
|
||||
endsnippet
|
||||
|
||||
snippet copydoc "Doxygen copydoc block"
|
||||
/// @copydoc $0
|
||||
endsnippet
|
||||
|
||||
snippet "/// s" "Doxygen see block"
|
||||
/// @see $0
|
||||
endsnippet
|
||||
|
||||
@@ -9,12 +9,6 @@ def complete(t, opts):
|
||||
return '|'.join(opts)
|
||||
endglobal
|
||||
|
||||
snippet rst
|
||||
#[=======================================================================[.rst:
|
||||
$0
|
||||
#]=======================================================================]
|
||||
endsnippet
|
||||
|
||||
snippet add_compile_options
|
||||
add_compile_options($1)
|
||||
endsnippet
|
||||
|
||||
@@ -32,7 +32,7 @@ class ${1:name} {
|
||||
endsnippet
|
||||
|
||||
snippet template "Template"
|
||||
template <${1:class} ${2:T}$3>$0
|
||||
template <class ${1:T}$2>$0
|
||||
endsnippet
|
||||
|
||||
snippet namespace "Named or anonymous namespace"
|
||||
@@ -62,15 +62,7 @@ snippet [] "Labmda function" i
|
||||
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
|
||||
static_assert($1, "$2");
|
||||
endsnippet
|
||||
|
||||
snippet noisy "A noise class"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
extends lit
|
||||
@@ -1,14 +0,0 @@
|
||||
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
|
||||
@@ -1,3 +0,0 @@
|
||||
extends html
|
||||
|
||||
priority 1
|
||||
@@ -1,15 +0,0 @@
|
||||
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 +0,0 @@
|
||||
extends lit
|
||||
@@ -17,7 +17,3 @@ snippet --- "frontmatter" b
|
||||
$0
|
||||
---
|
||||
endsnippet
|
||||
|
||||
snippet shrug "¯\_(ツ)_/¯" i
|
||||
¯\_(ツ)_/¯
|
||||
endsnippet
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
snippet * "bullet point" b
|
||||
* $0
|
||||
endsnippet
|
||||
|
||||
snippet shrug "¯\_(ツ)_/¯" i
|
||||
¯\_(ツ)_/¯
|
||||
endsnippet
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
extends lit
|
||||
@@ -1,23 +1,24 @@
|
||||
snippet #! "Shebang"
|
||||
#!/usr/bin/env python
|
||||
endsnippet
|
||||
|
||||
snippet main "Python main stub"
|
||||
#!/usr/bin/env python
|
||||
"""${1:docstring}"""
|
||||
|
||||
from argparse import ArgumentParser
|
||||
|
||||
|
||||
def main():
|
||||
${0:pass}
|
||||
"""Main entry point."""
|
||||
parser = ArgumentParser(description='${2:description}')
|
||||
parser.add_argument('${3:argument}')
|
||||
args = parser.parse_args()$0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
exit(130)
|
||||
pass
|
||||
endsnippet
|
||||
|
||||
snippet debug "Set ipdb breakpoint"
|
||||
import ipdb; ipdb.set_trace()
|
||||
endsnippet
|
||||
|
||||
snippet ''' "Triple quote string" i
|
||||
'''$1'''$0
|
||||
endsnippet
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
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 +0,0 @@
|
||||
extends lit
|
||||
@@ -1,3 +0,0 @@
|
||||
snippet shrug "¯\_(ツ)_/¯" i
|
||||
¯\_(ツ)_/¯
|
||||
endsnippet
|
||||
@@ -3,7 +3,7 @@ command! $1${2:cmd} ${3:rep}$0
|
||||
endsnippet
|
||||
|
||||
snippet function "VIM function"
|
||||
function! ${1:name}($2) ${3:abort}
|
||||
function! ${1:name}($2)
|
||||
$0
|
||||
endfunction
|
||||
endsnippet
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
" Force *.def to C++ filetype for LLVM
|
||||
au BufNewFile,BufReadPost *.def set filetype=cpp
|
||||
@@ -1,3 +1,2 @@
|
||||
" Force *.md to markdown filetype
|
||||
au BufNewFile,BufReadPost *.md set filetype=markdown
|
||||
au BufNewFile,BufReadPost *.ronn set filetype=markdown
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
function! s:set_lit_cfg_filetype()
|
||||
set filetype=python
|
||||
ALEDisableBuffer
|
||||
endfunction
|
||||
|
||||
au BufNewFile,BufReadPost lit.cfg call s:set_lit_cfg_filetype()
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
au BufNewFile,BufReadPost .enter set filetype=zsh
|
||||
au BufNewFile,BufReadPost .exit set filetype=zsh
|
||||
@@ -1,15 +1,18 @@
|
||||
" Add Doxygen documentation generation plugin.
|
||||
packadd DoxygenToolkit.vim
|
||||
nnoremap <leader>d :Dox<CR>
|
||||
" Surround visual block in #if 0 block.
|
||||
" 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.
|
||||
" Stop automatic new lines which typing long single liners
|
||||
setlocal textwidth=0
|
||||
" Map K to get YouCompleteMe documentation
|
||||
nnoremap K :YcmCompleter GetDoc<CR>
|
||||
" "ys{motion}t" turns "word" -> "TODO(word):"
|
||||
let b:surround_{char2nr("t")} = "TODO(\r):"
|
||||
" "ys{motion}/" turns "text" into "/*text*/"
|
||||
let b:surround_{char2nr("/")} = "/*\r*/"
|
||||
" Map K to get YouCompleteMe documentation
|
||||
nnoremap K :YcmCompleter GetDoc<CR>
|
||||
" DoxygenToolkit
|
||||
nnoremap <leader>d :Dox<CR>
|
||||
|
||||
@@ -3,13 +3,6 @@ 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}"
|
||||
" "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 +0,0 @@
|
||||
vim.bo.commentstring = '//%s'
|
||||
@@ -1,3 +1,4 @@
|
||||
" Add Doxygen documentation generation plugin.
|
||||
packadd DoxygenToolkit.vim
|
||||
" Map K to get YouCompleteMe documentation
|
||||
nnoremap K :YcmCompleter GetDoc<CR>
|
||||
" DoxygenToolkit
|
||||
nnoremap <leader>d :Dox<CR>
|
||||
|
||||
@@ -5,4 +5,4 @@ setlocal nospell
|
||||
setlocal scrolloff=0
|
||||
|
||||
" Don't display line numbers
|
||||
setlocal nonumber norelativenumber signcolumn=no
|
||||
setlocal nonumber norelativenumber
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
setlocal showbreak=
|
||||
set signcolumn=no
|
||||
@@ -25,3 +25,54 @@ setlocal encoding=utf-8
|
||||
" Set up file format
|
||||
setlocal fileformat=unix
|
||||
let g:python_highlight_all=1
|
||||
|
||||
" Mappings
|
||||
nnoremap K :YcmCompleter GetDoc<CR>
|
||||
|
||||
" Set custom fold expression
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=PythonFold(v:lnum)
|
||||
|
||||
" Custom fold function greedyily matches following blank lines
|
||||
function! PythonFold(lnum)
|
||||
let l:line = getline(a:lnum)
|
||||
" TODO: Folding breaks around method decorators:
|
||||
" class Class(object):
|
||||
" @property
|
||||
" def method(self):
|
||||
" pass
|
||||
|
||||
" Blank lines, comments, and docstrings use previous fold level
|
||||
if l:line =~ '^\(\s*\|#.*\|"\(""\)\=.*\)$'
|
||||
return '='
|
||||
" Keywords beginning indented blocks start a fold
|
||||
elseif l:line =~ '^\s*class\s\+\w*(\w*)\s*:\s*$'
|
||||
\ || l:line =~ '^\s*def\s\+\w\+\s*(.*)\s*:\s*$'
|
||||
\ || l:line =~ '^\s*if\s\+.*:\s*$'
|
||||
\ || l:line =~ '^\s*elif\s\+.*:\s*$'
|
||||
\ || l:line =~ '^\s*else\s*:\s*$'
|
||||
\ || l:line =~ '^\s*for\s\+.*:\s*$'
|
||||
\ || l:line =~ '^\s*while\s\+.*:\s*$'
|
||||
\ || l:line =~ '^\s*try\s*:\s*$'
|
||||
\ || l:line =~ '^\s*except\s*.*:\s*$'
|
||||
return '>'.string((indent(a:lnum) / &shiftwidth) + 1)
|
||||
" Opening curly braces, not in a string, add a fold level
|
||||
elseif l:line =~ '{' && l:line !~ '}' && l:line !~ "'.*{.*'" && l:line !~ '".*{.*"'
|
||||
return 'a1'
|
||||
" Closing curly braces, not in a string, substract a fold level
|
||||
elseif l:line =~ '}' && l:line !~ '{' && l:line !~ "'.*}.*'" && l:line !~ '".*}.*"'
|
||||
return 's1'
|
||||
" Opening square braces, not in a string, add a fold level
|
||||
elseif l:line =~ '[' && l:line !~ ']' && l:line !~ "'.*[.*'" && l:line !~ '".*].*"'
|
||||
return 'a1'
|
||||
" Closing square braces, not in a string, substract a fold level
|
||||
elseif l:line =~ ']' && l:line !~ '[' && l:line !~ "'.*].*'" && l:line !~ '".*[.*"'
|
||||
return 's1'
|
||||
" Calculate lines with a lower indent than the previous line
|
||||
elseif indent(a:lnum) < indent(a:lnum - 1)
|
||||
return string((indent(a:lnum) / &shiftwidth))
|
||||
endif
|
||||
|
||||
" Finally all unmatched lines use fold level from previous line
|
||||
return '='
|
||||
endfunction
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Add omnifunc completion package.
|
||||
packadd vimomni
|
||||
" Mapping for Vim help of the word under cursor.
|
||||
nnoremap K :help <C-r><C-w><CR>
|
||||
|
||||
" Set custom fold expression
|
||||
setlocal foldmethod=expr
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
" Tabs
|
||||
set expandtab
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
|
||||
@@ -17,7 +18,7 @@ if has('cindent')
|
||||
" * 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
|
||||
" * (0 - don't indent inside unclosed parenthesis
|
||||
" * i4 - indent C++ class base declarations and constructor initializers
|
||||
set cinoptions=N-sE-sg1h1l(01i4
|
||||
endif
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
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
|
||||
@@ -1,9 +1,6 @@
|
||||
" 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()
|
||||
" ^^^^
|
||||
@@ -43,9 +40,9 @@ 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: @param name description.
|
||||
" ^^^^
|
||||
syn region cDoxygenSpecial matchgroup=cDoxygenComment start='@param\(\[\(\|in\|out\|in,out\)\]\)\=\s\+' end='\(\s\|$\)' contained display
|
||||
|
||||
" Match: @tparam name description.
|
||||
" ^^^^
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
" 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
|
||||
syntax region cmakeIfBlock start='if(.*)' end='endif(.*)' fold transparent keepend
|
||||
syntax region cmakeFunctionBlock start='function(.*)' end='endfunction(.*)' fold transparent keepend
|
||||
syntax region cmakeMacroBlock start='macro(.*)' end='endmacro(.*)' fold transparent keepend
|
||||
syntax region cmakeForeachBlock start='foreach(.*)' end='endforeach(.*)' fold transparent keepend
|
||||
syntax region cmakeWhileBlock start='while(.*)' end='endwhile(.*)' fold transparent keepend
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
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/html.vim
Normal file
4
after/syntax/html.vim
Normal file
@@ -0,0 +1,4 @@
|
||||
syn keyword htmlTodo TODO
|
||||
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=htmlTodo,@htmlPreProc,@Spell
|
||||
|
||||
hi default link htmlTodo Todo
|
||||
@@ -1,4 +1,3 @@
|
||||
hi link jsonKeyword Function
|
||||
hi link jsonNull Constant
|
||||
hi link jsonQuote Delimiter
|
||||
setlocal conceallevel=0
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
" 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
|
||||
@@ -13,11 +13,8 @@ syn match markdownCheckboxDelimiter '\[[ x]\]' contained contains=markdownCheckb
|
||||
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
|
||||
if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1
|
||||
let s:concealends = ' concealends'
|
||||
endif
|
||||
exe 'syn region markdownCheckboxItalic matchgroup=markdownCheckboxItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart,@Spell contained' . s:concealends
|
||||
exe 'syn region markdownCheckboxItalic matchgroup=markdownCheckboxItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart,@Spell contained' . s:concealends
|
||||
@@ -47,6 +44,13 @@ hi link markdownCheckboxBoldItalicDelimiter markdownCheckboxBoldItalic
|
||||
hi link markdownCheckboxCode SpecialComment
|
||||
hi link markdownCheckboxCodeDelimiter PreProc
|
||||
|
||||
" Add match for TODO
|
||||
syn match markdownTodo 'TODO'
|
||||
|
||||
hi link markdownTodo Todo
|
||||
syn cluster markdownInline add=markdownTodo
|
||||
|
||||
" yaml frontmatter
|
||||
syn region markdownFrontmatter matchgroup=markdownFrontmatterDelimiter start='\%^---' keepend end='^---' contains=@markdownHighlightyaml
|
||||
hi default link markdownFrontmatterDelimiter Special
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
highlight link pythonException Conditional
|
||||
highlight link pythonExceptions Keyword
|
||||
@@ -1,7 +0,0 @@
|
||||
setlocal tabstop=2
|
||||
setlocal shiftwidth=2
|
||||
setlocal softtabstop=2
|
||||
|
||||
highlight link yamlBlockMappingKey Keyword
|
||||
highlight link yamlAnchor PreProc
|
||||
highlight link yamlAlias PreProc
|
||||
73
autoload/airline/themes/fresh.vim
Normal file
73
autoload/airline/themes/fresh.vim
Normal file
@@ -0,0 +1,73 @@
|
||||
" fresh palette
|
||||
let g:airline#themes#fresh#palette = {}
|
||||
|
||||
" NORMAL mode
|
||||
let s:N1 = ['#005f00', '#afdf00', 22, 148, '']
|
||||
let s:N2 = ['#ffffff', '#005f00', 15, 22, '']
|
||||
let s:N3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
||||
let s:W = ['#000000', '#8700df', 232, 92, '']
|
||||
let s:E = ['#000000', '#990000', 232, 160]
|
||||
let g:airline#themes#fresh#palette.normal =
|
||||
\ airline#themes#generate_color_map(s:N1, s:N2, s:N3)
|
||||
let g:airline#themes#fresh#palette.normal.airline_warning = s:W
|
||||
let g:airline#themes#fresh#palette.normal.airline_error = s:E
|
||||
let g:airline#themes#fresh#palette.normal_modified = {
|
||||
\ 'airline_c': ['#ffffff', '#5f0087', 15, 53, 'bold'], }
|
||||
|
||||
" INSERT mode
|
||||
let s:I1 = ['#0000df', '#00dfff', 20, 45, '']
|
||||
let s:I2 = ['#ffffff', '#005fdf', 15, 26, '']
|
||||
let s:I3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
||||
let g:airline#themes#fresh#palette.insert =
|
||||
\ airline#themes#generate_color_map(s:I1, s:I2, s:I3)
|
||||
let g:airline#themes#fresh#palette.insert.airline_warning = s:W
|
||||
let g:airline#themes#fresh#palette.insert.airline_error = s:E
|
||||
let g:airline#themes#fresh#palette.insert_modified =
|
||||
\ g:airline#themes#fresh#palette.normal_modified
|
||||
let g:airline#themes#fresh#palette.insert_paste = {
|
||||
\ 'airline_a': [s:I1[0], '#ffff00', s:I1[2], 11, ''], }
|
||||
|
||||
" REPLACE mode
|
||||
let s:R1 = [s:I2[0], '#af0000', s:I2[2], 124, '']
|
||||
let s:R2 = ['#ffffff', '#5f0000', 15, 52, '']
|
||||
let s:R3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
||||
let g:airline#themes#fresh#palette.replace =
|
||||
\ airline#themes#generate_color_map(s:R1, s:R2, s:R3)
|
||||
let g:airline#themes#fresh#palette.replace.airline_warning = s:W
|
||||
let g:airline#themes#fresh#palette.replace.airline_error = s:E
|
||||
let g:airline#themes#fresh#palette.replace_modified =
|
||||
\ g:airline#themes#fresh#palette.normal_modified
|
||||
|
||||
" VISAUL mode
|
||||
let s:V1 = ['#ff5f00', '#ff5f00', 52, 208, '']
|
||||
let s:V2 = ['#ffffff', '#005f00', 15, 124, '']
|
||||
let s:V3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
||||
let g:airline#themes#fresh#palette.visual =
|
||||
\ airline#themes#generate_color_map(s:V1, s:V2, s:V3)
|
||||
let g:airline#themes#fresh#palette.visual.airline_warning = s:W
|
||||
let g:airline#themes#fresh#palette.visual.airline_error = s:E
|
||||
let g:airline#themes#fresh#palette.visual_modified =
|
||||
\ g:airline#themes#fresh#palette.normal_modified
|
||||
|
||||
" INACTIVE mode
|
||||
let s:IA1 = ['#4e4e4e', '#1c1c1c', 239, 234, '']
|
||||
let s:IA2 = ['#4e4e4e', '#262626', 239, 235, '']
|
||||
let s:IA3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
||||
let g:airline#themes#fresh#palette.inactive =
|
||||
\ airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
|
||||
let g:airline#themes#fresh#palette.inactive.airline_warning = s:IA2
|
||||
let g:airline#themes#fresh#palette.inactive.airline_error = s:IA2
|
||||
let g:airline#themes#fresh#palette.inactive_modified = {
|
||||
\ 'airline_c': ['#875faf', '', 97, '', ''], }
|
||||
|
||||
let g:airline#themes#fresh#palette.accents = {
|
||||
\ 'red': [ '#ff0000' , '' , 160 , '' ] }
|
||||
|
||||
if !get(g:, 'loaded_ctrlp', 0)
|
||||
finish
|
||||
endif
|
||||
let g:airline#themes#fresh#palette.ctrlp =
|
||||
\ airline#extensions#ctrlp#generate_color_map(
|
||||
\ ['#d7d7ff', '#5f00af', 189, 55, ''],
|
||||
\ ['#ffffff', '#875fd7', 231, 98, ''],
|
||||
\ ['#5f00af', '#ffffff', 55, 231, 'bold'] )
|
||||
@@ -1,110 +0,0 @@
|
||||
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
|
||||
@@ -54,60 +54,3 @@ function! do#cursor_highlight_groups()
|
||||
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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
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
|
||||
@@ -1,14 +0,0 @@
|
||||
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
|
||||
@@ -1,27 +0,0 @@
|
||||
" 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
|
||||
2454
autoload/plug.vim
Normal file
2454
autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,21 +0,0 @@
|
||||
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
|
||||
@@ -1,3 +0,0 @@
|
||||
function! wsl#isDetected() abort
|
||||
return $WSLENV !=# ''
|
||||
endfunction
|
||||
@@ -1,81 +0,0 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
@@ -95,10 +95,10 @@ if has('gui_running') || &t_Co == 256
|
||||
call s:hi('Cursor', '', '', 'reverse')
|
||||
call s:hi('CursorIM', '', '', '')
|
||||
call s:hi('CursorColumn', '235', '', '')
|
||||
call s:hi('CursorLine', '', '', '')
|
||||
call s:hi('CursorLine', '', '0', '')
|
||||
call s:hi('Directory', '', '', '')
|
||||
call s:hi('DiffAdd', '2', '', '')
|
||||
call s:hi('DiffChange', '3', '', '')
|
||||
call s:hi('DiffChange', '', '', '')
|
||||
call s:hi('DiffDelete', '1', '', '')
|
||||
call s:hi('DiffText', '3', '', '')
|
||||
call s:hi('ErrorMsg', '1', '', '')
|
||||
@@ -112,7 +112,7 @@ if has('gui_running') || &t_Co == 256
|
||||
call s:hi('MatchParen', '', '', '')
|
||||
call s:hi('ModeMsg', '', '', '')
|
||||
call s:hi('MoreMsg', '12', '', '')
|
||||
call s:hi('NonText', '238', '', '')
|
||||
call s:hi('NonText', '', '', '')
|
||||
call s:hi('Normal', '7', '232', '')
|
||||
call s:hi('Pmenu', '', '235', '')
|
||||
call s:hi('PmenuSel', '', '', 'reverse')
|
||||
@@ -126,9 +126,7 @@ if has('gui_running') || &t_Co == 256
|
||||
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')
|
||||
@@ -160,13 +158,13 @@ if has('gui_running') || &t_Co == 256
|
||||
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('Keyword', '', '', '')
|
||||
call s:hi('Exception', '', '', '')
|
||||
|
||||
call s:hi('PreProc', '102', '', '')
|
||||
call s:hi('Include', '65', '', '')
|
||||
call s:hi('Define', '102', '', '')
|
||||
call s:hi('Macro', '102', '', '')
|
||||
call s:hi('Define', '', '', '')
|
||||
call s:hi('Macro', '', '', '')
|
||||
call s:hi('PreCondit', '61', '', '')
|
||||
|
||||
call s:hi('Type', '75', '', '')
|
||||
@@ -175,11 +173,11 @@ if has('gui_running') || &t_Co == 256
|
||||
call s:hi('Typedef', '75', '', '')
|
||||
|
||||
call s:hi('Special', '179', '', '')
|
||||
call s:hi('SpecialChar', '179', '', '')
|
||||
call s:hi('SpecialChar', '', '', '')
|
||||
call s:hi('Tag', '', '', '')
|
||||
call s:hi('Delimiter', '179', '', '')
|
||||
call s:hi('Delimiter', '', '', '')
|
||||
call s:hi('SpecialComment', '246', '', '')
|
||||
call s:hi('Debug', '179', '', '')
|
||||
call s:hi('Debug', '', '', '')
|
||||
|
||||
call s:hi('Underlined', '38', '', 'underline')
|
||||
call s:hi('Ignore', '', '', '')
|
||||
@@ -187,40 +185,17 @@ if has('gui_running') || &t_Co == 256
|
||||
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('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
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
autocmd BufNewFile,BufReadPost CMakeCache.txt set filetype=cmakecache
|
||||
@@ -1 +0,0 @@
|
||||
autocmd BufNewFile,BufReadPost */requirements.txt set filetype=requirements
|
||||
@@ -1,3 +0,0 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
@@ -1 +0,0 @@
|
||||
setlocal nospell
|
||||
@@ -1,6 +0,0 @@
|
||||
" Add <> to % matches
|
||||
setlocal matchpairs+=<:>
|
||||
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
@@ -1,3 +0,0 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
@@ -1,3 +0,0 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
@@ -1,3 +0,0 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
@@ -1,3 +0,0 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
@@ -1,3 +0,0 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#clang_format()
|
||||
endif
|
||||
@@ -1,3 +0,0 @@
|
||||
if has('pythonx')
|
||||
setlocal formatexpr=format#yapf()
|
||||
endif
|
||||
@@ -1 +0,0 @@
|
||||
set commentstring=#%s
|
||||
@@ -1,8 +0,0 @@
|
||||
if exists(':GuiFont')
|
||||
GuiFont! CaskaydiaCove\ Nerd\ Font\ Mono:h9
|
||||
endif
|
||||
|
||||
if exists(':GuiTabline')
|
||||
" Don't use GUI tabline, matches terminal tabline.
|
||||
GuiTabline 0
|
||||
endif
|
||||
2
gvimrc
2
gvimrc
@@ -6,7 +6,7 @@
|
||||
set guioptions=aegi
|
||||
|
||||
if platform#is_windows()
|
||||
set guifont=Source\ Code\ Pro:h10
|
||||
set guifont=Consolas:h10:cDEFAULT
|
||||
else
|
||||
" Set default font
|
||||
set guifont=Source\ Code\ Pro\ Medium\ 9
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
" Override default Python indent file
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
" Make sure lisp indenting doesn't supersede us
|
||||
setlocal nolisp
|
||||
" indentexpr isn't much help otherwise
|
||||
setlocal autoindent
|
||||
" Use custom indent expression
|
||||
setlocal indentexpr=PythonIndent(v:lnum)
|
||||
" List of keys that trigger indentexpr in insert mode
|
||||
setlocal indentkeys+=<:>,=elif,=except
|
||||
|
||||
" Derived from the default GetPythonIndent removing deliberate use of invalid
|
||||
" expressions which show up with 'set debug=msg,throw', also remove the indent
|
||||
" config options.
|
||||
function! PythonIndent(lnum)
|
||||
" If this line is explicitly joined: If the previous line was also joined,
|
||||
" line it up with that one, otherwise add two 'shiftwidth'
|
||||
if getline(a:lnum - 1) =~# '\\$'
|
||||
if a:lnum > 1 && getline(a:lnum - 2) =~# '\\$'
|
||||
return indent(a:lnum - 1)
|
||||
endif
|
||||
return indent(a:lnum - 1) + (shiftwidth() * 2)
|
||||
endif
|
||||
|
||||
" If the start of the line is in a string don't change the indent.
|
||||
if has('syntax_items')
|
||||
\ && synIDattr(synID(a:lnum, 1, 1), 'name') =~# 'String$'
|
||||
return -1
|
||||
endif
|
||||
|
||||
" Search backwards for the previous non-empty line.
|
||||
let plnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
if plnum == 0
|
||||
" This is the first non-empty line, use zero indent.
|
||||
return 0
|
||||
endif
|
||||
|
||||
" If the previous line is inside parenthesis, use the indent of the starting
|
||||
" line.
|
||||
call cursor(plnum, 1)
|
||||
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', '', 0, 100)
|
||||
if parlnum > 0
|
||||
let plindent = indent(parlnum)
|
||||
let plnumstart = parlnum
|
||||
else
|
||||
let plindent = indent(plnum)
|
||||
let plnumstart = plnum
|
||||
endif
|
||||
|
||||
" When inside parenthesis: If at the first line below the parenthesis add
|
||||
" 'shiftwidth', otherwise same as previous line.
|
||||
" i = (a
|
||||
" + b
|
||||
" + c)
|
||||
call cursor(a:lnum, 1)
|
||||
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', '', 0, 100)
|
||||
if p > 0
|
||||
if p == plnum
|
||||
" When the start is inside parenthesis, only indent one 'shiftwidth'.
|
||||
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', '', 0, 100)
|
||||
return indent(plnum) + shiftwidth()
|
||||
endif
|
||||
if plnumstart == p
|
||||
return indent(plnum)
|
||||
endif
|
||||
return plindent
|
||||
endif
|
||||
|
||||
" Get the line and remove a trailing comment.
|
||||
" Use syntax highlighting attributes when possible.
|
||||
let pline = getline(plnum)
|
||||
let pline_len = strlen(pline)
|
||||
if has('syntax_items')
|
||||
" If the last character in the line is a comment, do a binary search for
|
||||
" the start of the comment. synID() is slow, a linear search would take
|
||||
" too long on a long line.
|
||||
if synIDattr(synID(plnum, pline_len, 1), 'name') =~# '\\(Comment\\|Todo\\)$'
|
||||
let min = 1
|
||||
let max = pline_len
|
||||
while min < max
|
||||
let col = (min + max) / 2
|
||||
if synIDattr(synID(plnum, col, 1), 'name') =~# '\\(Comment\\|Todo\\)$'
|
||||
let max = col
|
||||
else
|
||||
let min = col + 1
|
||||
endif
|
||||
endwhile
|
||||
let pline = strpart(pline, 0, min - 1)
|
||||
endif
|
||||
else
|
||||
let col = 0
|
||||
while col < pline_len
|
||||
if pline[col] ==# '#'
|
||||
let pline = strpart(pline, 0, col)
|
||||
break
|
||||
endif
|
||||
let col = col + 1
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" If the previous line ended with a colon, indent this line
|
||||
if pline =~# ':\s*$'
|
||||
return plindent + shiftwidth()
|
||||
endif
|
||||
|
||||
" If the previous line was a stop-execution statement...
|
||||
if getline(plnum) =~# '^\s*\(break\|continue\|raise\|return\|pass\)\>'
|
||||
" See if the user has already dedented
|
||||
if indent(a:lnum) > indent(plnum) - shiftwidth()
|
||||
" If not, recommend one dedent
|
||||
return indent(plnum) - shiftwidth()
|
||||
endif
|
||||
" Otherwise, trust the user
|
||||
return -1
|
||||
endif
|
||||
|
||||
" If the current line begins with a keyword that lines up with try
|
||||
if getline(a:lnum) =~# '^\s*\(except\|finally\)\>'
|
||||
let lnum = a:lnum - 1
|
||||
while lnum >= 1
|
||||
if getline(lnum) =~# '^\s*\(try\|except\)\>'
|
||||
let ind = indent(lnum)
|
||||
if ind >= indent(a:lnum)
|
||||
" indent is already less than this
|
||||
return -1
|
||||
endif
|
||||
" line up with previous try or except
|
||||
return ind
|
||||
endif
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
" no matching try!
|
||||
return -1
|
||||
endif
|
||||
|
||||
" If the current line begins with a header keyword, dedent
|
||||
if getline(a:lnum) =~# '^\s*\(elif\|else\)\>'
|
||||
|
||||
" Unless the previous line was a one-liner
|
||||
if getline(plnumstart) =~# '^\s*\(for\|if\|try\)\>'
|
||||
return plindent
|
||||
endif
|
||||
|
||||
" Or the user has already dedented
|
||||
if indent(a:lnum) <= plindent - shiftwidth()
|
||||
return -1
|
||||
endif
|
||||
|
||||
return plindent - shiftwidth()
|
||||
endif
|
||||
|
||||
" When after a () construct we probably want to go back to the start line.
|
||||
" a = (b
|
||||
" + c)
|
||||
" here
|
||||
if parlnum > 0
|
||||
return plindent
|
||||
endif
|
||||
|
||||
return -1
|
||||
endfunction
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
- name: nodejs get json containing latest version
|
||||
uri:
|
||||
url: https://nodejs.org/dist/index.json
|
||||
register: latest
|
||||
|
||||
- name: nodejs create directory for downloaded package
|
||||
file:
|
||||
state: directory
|
||||
dest: ~/.local/src
|
||||
|
||||
- name: nodejs download latest package
|
||||
get_url:
|
||||
url: 'https://nodejs.org/dist/{{latest.json[0].version}}/node-{{latest.json[0].version}}-linux-x64.tar.gz'
|
||||
dest: ~/.local/src/node.tar.gz
|
||||
|
||||
- name: nodejs extract downloaded package
|
||||
unarchive:
|
||||
src: ~/.local/src/node.tar.gz
|
||||
dest: ~/.local/src
|
||||
remote_src: true
|
||||
|
||||
- name: nodejs create symlink links
|
||||
file:
|
||||
state: link
|
||||
src: '~/.local/src/node-{{latest.json[0].version}}-linux-x64/bin/{{item}}'
|
||||
dest: '~/.local/bin/{{item}}'
|
||||
with_items: [corepack, node, npm, npx]
|
||||
@@ -1,42 +1,15 @@
|
||||
augroup benieAugroup
|
||||
" Clear all autocmd's in this group
|
||||
autocmd!
|
||||
|
||||
if tmux#inSession()
|
||||
" [Un]set tmux window option to detect when to change pane.
|
||||
call tmux#setNavigationFlag()
|
||||
au FocusGained * silent call tmux#setNavigationFlag()
|
||||
au VimLeave * silent call tmux#unsetNavigationFlag()
|
||||
endif
|
||||
|
||||
" Reopening a file at last curson position
|
||||
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
||||
\ | exe "normal! g'\"" | endif
|
||||
|
||||
" Update `Last change: <date>` on write & go back previous cursor position
|
||||
au FileType help au BufWritePre <buffer>
|
||||
\ 1s/Last change: \zs.*$/\=strftime('%Y %b %d')/e|norm!``
|
||||
" TODO: Move this to a plugin & rename to .enter .exit
|
||||
au BufRead,BufNewFile .env set filetype=zsh
|
||||
au BufRead,BufNewFile .out set filetype=zsh
|
||||
|
||||
" Read template into buffer then send line 1 to the black hold register
|
||||
au BufNewFile todo.md read ~/.vim/templates/skeleton.todo.md | 1delete _
|
||||
|
||||
" Augment vim-signify by modifying it's autocmds
|
||||
au User SignifyAutocmds call do#signify()
|
||||
|
||||
if has('nvim')
|
||||
" Start in terminal-insert mode.
|
||||
autocmd TermOpen term://* startinsert
|
||||
" Don't show the line number column in terminal-insert mode.
|
||||
autocmd TermEnter term://*
|
||||
\ set nonumber | set norelativenumber | set signcolumn=no
|
||||
" But do show the line number column in terminal-normal mode.
|
||||
autocmd TermLeave term://*
|
||||
\ set number | set relativenumber | set signcolumn=auto
|
||||
" Automatically press enter when the terminal process exits.
|
||||
autocmd TermClose term://*
|
||||
\ if (expand('<afile>') !~ "fzf") &&
|
||||
\ (expand('<afile>') !~ "ranger") &&
|
||||
\ (expand('<afile>') !~ "coc") |
|
||||
\ call nvim_input('<CR>') |
|
||||
\ endif
|
||||
endif
|
||||
" Highlight conflict markers in any filefile
|
||||
au FileType * :call matchadd('Todo', '^\(<<<<<<<\||||||||\|=======\|>>>>>>>\)\s\ze.*$')
|
||||
augroup END
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
if !platform#is_windows() &&
|
||||
\ !has("gui_running") &&
|
||||
\ $TERM != 'xterm-256color' &&
|
||||
\ $TERM != 'xterm-kitty' &&
|
||||
\ $TERM != 'screen-256color' &&
|
||||
\ $TERM != 'tmux-256color'
|
||||
echo "This terminal does not report 256 color support but probaly supports it"
|
||||
echo "Setup the shell to do something similar on load"
|
||||
echo "env TERM=xterm-256color /usr/bin/zsh"
|
||||
endif
|
||||
colorscheme fresh
|
||||
syntax sync minlines=1000
|
||||
if !platform#is_windows() || has("gui_running")
|
||||
colorscheme fresh
|
||||
endif
|
||||
syntax sync minlines=500
|
||||
|
||||
@@ -14,14 +14,4 @@ command! -nargs=1 TabWidth call do#set_tab_width(<f-args>)
|
||||
command! ToggleCheckbox call do#toggle_checkbox()
|
||||
|
||||
" Show highlight groups under the cursor
|
||||
command! CursorHighlightGroups call do#cursor_highlight_groups()
|
||||
|
||||
" Setup and invoke a :TermdebugCommand
|
||||
command! -nargs=+ -complete=file Debug call do#debug(<f-args>)
|
||||
|
||||
" Find all TODO items in the current file and populate the location list
|
||||
command! TodoFile lvimgrep /todo/ %
|
||||
|
||||
" Change build directory
|
||||
command! -nargs=? -complete=dir BuildDir call build#dir(<f-args>)
|
||||
command! -nargs=* -complete=custom,build#targets Build call build#run(<f-args>)
|
||||
command! CursorHighlightGroups :call do#cursor_highlight_groups()
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
if !has('pythonx')
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:clang_format_path = get(g:, 'clang_format_path', 'clang-format')
|
||||
let g:clang_format_style = get(g:, 'clang_format_style', 'google')
|
||||
let g:yapf_path = get(g:, 'yapf_path', 'yapf')
|
||||
let g:yapf_style = get(g:, 'yapf_style', 'pep8')
|
||||
@@ -1,28 +1,12 @@
|
||||
" coc.nvim
|
||||
inoremap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm() : "\<TAB>"
|
||||
nnoremap <silent> <leader>fi <Plug>(coc-fix-current)
|
||||
nnoremap <silent> <leader>gd <Plug>(coc-definition)
|
||||
nnoremap <silent> <leader>gt <Plug>(coc-type-definition)
|
||||
nnoremap <silent> <leader>sd <Plug>(coc-diagnostic-info)
|
||||
nnoremap <silent> <leader>gr <Plug>(coc-references)
|
||||
nnoremap <silent> <leader>gu <Plug>(coc-references-used)
|
||||
nnoremap <silent> K :call do#show_documentation()<CR>
|
||||
nnoremap <silent> <C-n> <Plug>(coc-diagnostic-next)
|
||||
nnoremap <silent> <C-p> <Plug>(coc-diagnostic-prev)
|
||||
" YouCompleteMe
|
||||
nnoremap <leader>fi :YcmCompleter FixIt<CR>
|
||||
nnoremap <leader>gd :YcmCompleter GoTo<CR>
|
||||
nnoremap <leader>gt :YcmCompleter GetType<CR>
|
||||
nnoremap <leader>sd :YcmShowDetailedDiagnostic<CR>
|
||||
|
||||
if has('nvim')
|
||||
" Make nvim :terminal more like vim :terminal
|
||||
tnoremap <C-w>N <C-\><C-n>
|
||||
endif
|
||||
|
||||
" termdebug
|
||||
" TODO: Detecet if termdebug is loaded, if not do the default action.
|
||||
nnoremap <C-W><C-G> :Gdb<CR>
|
||||
nnoremap <C-W><C-E> :Program<CR>
|
||||
nnoremap <C-W><C-S> :Source<CR>
|
||||
tnoremap <C-G> :Gdb<CR>
|
||||
tnoremap <C-E> :Program<CR>
|
||||
tnoremap <C-S> :Source<CR>
|
||||
" GitGutter
|
||||
nnoremap <leader>gn :GitGutterNextHunk<CR>
|
||||
nnoremap <leader>gp :GitGutterPrevHunk<CR>
|
||||
|
||||
" Quickfix list
|
||||
nnoremap <leader>qo :copen<CR>
|
||||
@@ -65,33 +49,14 @@ nnoremap k gk
|
||||
" Quick write
|
||||
nnoremap <leader>w :w!<CR>
|
||||
|
||||
" Switch panes in a tmux aware way
|
||||
if !tmux#inSession() || has('win32')
|
||||
nnoremap <silent> <C-h> <C-w>h
|
||||
nnoremap <silent> <C-j> <C-w>j
|
||||
nnoremap <silent> <C-k> <C-w>k
|
||||
nnoremap <silent> <C-l> <C-w>l
|
||||
else
|
||||
nnoremap <silent> <C-h> :TmuxNavigateLeft<CR>
|
||||
nnoremap <silent> <C-j> :TmuxNavigateDown<CR>
|
||||
nnoremap <silent> <C-k> :TmuxNavigateUp<CR>
|
||||
nnoremap <silent> <C-l> :TmuxNavigateRight<CR>
|
||||
nnoremap <silent> <C-w>h :TmuxNavigateLeft<CR>
|
||||
nnoremap <silent> <C-w>j :TmuxNavigateDown<CR>
|
||||
nnoremap <silent> <C-w>k :TmuxNavigateUp<CR>
|
||||
nnoremap <silent> <C-w>l :TmuxNavigateRight<CR>
|
||||
if has('nvim')
|
||||
tnoremap <silent> <C-w>h <C-\><C-n>:TmuxNavigateLeft<CR>
|
||||
tnoremap <silent> <C-w>j <C-\><C-n>:TmuxNavigateDown<CR>
|
||||
tnoremap <silent> <C-w>k <C-\><C-n>:TmuxNavigateUp<CR>
|
||||
tnoremap <silent> <C-w>l <C-\><C-n>:TmuxNavigateRight<CR>
|
||||
else
|
||||
tnoremap <silent> <C-w>h <C-w>N:TmuxNavigateLeft<CR>
|
||||
tnoremap <silent> <C-w>j <C-w>N:TmuxNavigateDown<CR>
|
||||
tnoremap <silent> <C-w>k <C-w>N:TmuxNavigateUp<CR>
|
||||
tnoremap <silent> <C-w>l <C-w>N:TmuxNavigateRight<CR>
|
||||
endif
|
||||
endif
|
||||
" Switch panes
|
||||
nnoremap <C-h> <C-w>h
|
||||
nnoremap <C-j> <C-w>j
|
||||
nnoremap <C-k> <C-w>k
|
||||
nnoremap <C-l> <C-w>l
|
||||
|
||||
" Redraw window
|
||||
nnoremap <C-w>l <C-l>
|
||||
|
||||
" Quick tabs
|
||||
nnoremap <leader>tn :tabnew<Space>
|
||||
@@ -102,25 +67,11 @@ nnoremap <leader>tm :tabmove<Space>
|
||||
" Clear search highlights
|
||||
nnoremap <leader><Space> :nohlsearch<CR>
|
||||
|
||||
if tmux#isOption('set-clipboard', 'on') || $SSH_CONNECTION !=# ''
|
||||
" When connected to a remote session the + selection register is not
|
||||
" available and the unnamed register is used instead. Add mappings using the
|
||||
" z register instead.
|
||||
noremap <leader>y "zy
|
||||
noremap <leader>Y "zY
|
||||
" Enable OSC 52 copy on yank.
|
||||
call osc52#autocmd()
|
||||
else
|
||||
" System clipboard yank/put
|
||||
noremap <leader>y "+y
|
||||
noremap <leader>Y "+Y
|
||||
noremap <leader>p "+p
|
||||
noremap <leader>P "+P
|
||||
endif
|
||||
if has('nvim-0.5.2')
|
||||
" Undo neovim's default mapping of Y to y$
|
||||
unmap Y
|
||||
endif
|
||||
" System clipboard yank/put
|
||||
noremap <leader>y "+y
|
||||
noremap <leader>Y "+Y
|
||||
noremap <leader>p "+p
|
||||
noremap <leader>P "+P
|
||||
|
||||
" Quickly access spelling menu
|
||||
inoremap <C-s> <C-g>u<C-X>s
|
||||
@@ -128,6 +79,8 @@ nnoremap <C-s> i<C-g>u<C-X>s
|
||||
|
||||
" Disable 'Q' from opening Ex mode
|
||||
nnoremap Q <nop>
|
||||
" Disable 'K' from loading man pages
|
||||
noremap K <nop>
|
||||
|
||||
" Split line at the cursor
|
||||
nnoremap [j i<CR><Esc>
|
||||
@@ -138,6 +91,3 @@ nnoremap <leader><CR> :ToggleCheckbox<CR>
|
||||
|
||||
" Show highlight groups under the cursor
|
||||
nnoremap <leader>hi :CursorHighlightGroups<CR>
|
||||
|
||||
" Rename C/C++ include guard
|
||||
nnoremap <leader>rg :call do#rename_include_guard(expand('<cword>'))<cr>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
" TODO: Move these settings to vimrc when after switching to vim8 packages
|
||||
scriptencoding 'utf-8'
|
||||
|
||||
" Copy indent from current line
|
||||
set autoindent
|
||||
|
||||
@@ -13,6 +16,14 @@ if !has('nvim') && &ttimeoutlen == -1
|
||||
set ttimeoutlen=100
|
||||
endif
|
||||
|
||||
" TODO: These might be irrelevant with vim-airline
|
||||
" Show 2 line status
|
||||
set laststatus=2
|
||||
" Show the line and colum number of a cursor position
|
||||
set ruler
|
||||
" Show the current line with different highlighting
|
||||
set cursorline
|
||||
|
||||
" Enhanced command line completion
|
||||
set wildmenu
|
||||
" Command line history
|
||||
@@ -28,7 +39,7 @@ if &listchars ==# 'eol:$'
|
||||
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
||||
endif
|
||||
|
||||
if v:version > 703 || v:version == 703 && has('patch541')
|
||||
if v:version > 703 || v:version == 703 && has("patch541")
|
||||
" Delete comment character when joining commented lines
|
||||
set formatoptions+=j
|
||||
endif
|
||||
@@ -59,6 +70,8 @@ if has('linebreak')
|
||||
set linebreak
|
||||
" Downwards Arrow With Tip Rightwards (U+21B3, utf-8: E2 86 B3)
|
||||
let &showbreak='↳ '
|
||||
" Use same highlight group as listchars for showbreak
|
||||
set highlight+=@:SpecialKey
|
||||
endif
|
||||
|
||||
" TODO: spellcapcheck
|
||||
@@ -85,6 +98,7 @@ if exists('+relativenumber')
|
||||
endif
|
||||
|
||||
" Keep cursor from buffer edges
|
||||
set scrolloff=8
|
||||
set sidescrolloff=5
|
||||
|
||||
" Turn backup off
|
||||
@@ -93,15 +107,6 @@ if has('writebackup')
|
||||
set nowritebackup
|
||||
endif
|
||||
|
||||
" Change info file location
|
||||
if has('viminfo') && has('unix')
|
||||
let s:cache_dir = expand('~/.cache/vim')
|
||||
if !isdirectory(s:cache_dir)
|
||||
call mkdir(s:cache_dir)
|
||||
endif
|
||||
execute 'set viminfofile='.s:cache_dir.'/info'
|
||||
endif
|
||||
|
||||
" Use Unix as standard file type
|
||||
set fileformats=unix,mac,dos
|
||||
|
||||
@@ -112,8 +117,6 @@ set isfname-=:
|
||||
set hlsearch incsearch
|
||||
" Set ignore search case unless mixed
|
||||
set ignorecase smartcase
|
||||
" Don't ignore case in command line file completions
|
||||
set nofileignorecase
|
||||
|
||||
" Allow buffers with changes to be hidden
|
||||
set hidden
|
||||
@@ -152,29 +155,19 @@ set mouse=a
|
||||
" q - allow formatting with 'gq'
|
||||
set formatoptions+=rq
|
||||
|
||||
" Always show the signcolum
|
||||
if exists('&signcolumn')
|
||||
set signcolumn=yes
|
||||
endif
|
||||
|
||||
" Enable modeline
|
||||
set modeline
|
||||
|
||||
" Don't redraw during execution macros, registers, commands, etc.
|
||||
set lazyredraw
|
||||
|
||||
" When in diff mode, use the patience algorithm for more readable diffs.
|
||||
if &diff
|
||||
set diffopt+=algorithm:patience
|
||||
endif
|
||||
|
||||
" Allow color schemes to do bright colors without forcing bold
|
||||
if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
|
||||
set t_Co=16
|
||||
endif
|
||||
|
||||
" Change cursor dependant on current mode
|
||||
if !has('nvim') && has('cursorshape') && has('unix') && !has('gui_running')
|
||||
if has('cursorshape') && has('unix') && !has('gui_running')
|
||||
if $TMUX ==# '' && $ITERM_PROFILE !=# ''
|
||||
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
|
||||
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
" Show the statusline above the commandline.
|
||||
scriptencoding utf-8
|
||||
set laststatus=2
|
||||
|
||||
" Define color variables.
|
||||
let g:statusline#light_green = {'fg': ['235', '#262626'], 'bg': [ '35', '#00af5f']}
|
||||
let g:statusline#light_blue = {'fg': ['235', '#262626'], 'bg': [ '33', '#0087ff']}
|
||||
let g:statusline#light_orange = {'fg': ['235', '#262626'], 'bg': ['209', '#ff875f']}
|
||||
let g:statusline#light_red = {'fg': ['235', '#262626'], 'bg': ['124', '#af0000']}
|
||||
let g:statusline#light_grey = {'fg': ['235', '#262626'], 'bg': ['246', '#949494']}
|
||||
let g:statusline#light_violet = {'fg': ['235', '#262626'], 'bg': [ '99', '#875fff']}
|
||||
let g:statusline#dark_white = {'fg': [ '15', '#ffffff'], 'bg': ['233', '#121212']}
|
||||
let g:statusline#dark_yellow = {'fg': ['179', '#dfaf5f'], 'bg': ['233', '#121212']}
|
||||
let g:statusline#dark_grey = {'fg': ['244', '#808080'], 'bg': ['233', '#121212']}
|
||||
|
||||
" Create highlight groups.
|
||||
function! s:hi(group, color) abort
|
||||
execute 'highlight '.a:group
|
||||
\.' ctermfg='.a:color['fg'][0].' ctermbg='.a:color['bg'][0]
|
||||
\.' guifg='.a:color['fg'][1].' guibg='.a:color['bg'][1]
|
||||
endfunction
|
||||
|
||||
" StatusLineLight is shows the mode and cursor information, it is dynamically
|
||||
" changed by statusline#mode(), give it a default.
|
||||
call s:hi('StatusLineLight', g:statusline#light_grey)
|
||||
" StatusLineDusk is shows additional information which is not always present,
|
||||
" give it a muted color.
|
||||
call s:hi('StatusLineDusk', g:statusline#light_grey)
|
||||
" StatusLineDark shows the filename and filetype and takes up most of the
|
||||
" statusline, give it a dark background.
|
||||
call s:hi('StatusLineDark', g:statusline#dark_white)
|
||||
" StatusLineChange shows changes in the file by changing the colour of the
|
||||
" filename, give if a dark background.
|
||||
call s:hi('StatusLineChange', g:statusline#dark_yellow)
|
||||
" StatusLineFade shows the status of completion engines but using colors which
|
||||
" fade into the background to avoid grabbing attention.
|
||||
call s:hi('StatusLineDuskFade', g:statusline#dark_grey)
|
||||
|
||||
" Construct a statusline for special buffer types.
|
||||
function! statusline#special(group, name, title)
|
||||
" Display current mode with dynamic highlights.
|
||||
let l:mode = '%#'.a:group.'# '.a:name.' '
|
||||
" Display filename with dark highlights.
|
||||
let l:file = '%#StatusLineDark# '.a:title
|
||||
" Display current/total lines and column with dynamic highlights.
|
||||
let l:line = '%#'.a:group.'# ☰ %l/%L ㏑%2c '
|
||||
" Combine the elements into a single string to be evaluated.
|
||||
return l:mode.l:file.'%='.l:line
|
||||
endfunction
|
||||
|
||||
" Construct a statusline for generic buffer types.
|
||||
function! statusline#generic(group, mode, coc)
|
||||
" Display current mode with dynamic highlights.
|
||||
let l:mode = '%#'.a:group.'# '.a:mode.' '
|
||||
" Display spell or paste if set with dusk highlights in a group to swallow
|
||||
" the spaces when empty.
|
||||
let l:edit = '%#StatusLineDusk#%( '
|
||||
\.'%{&spell ? "Spell " : ""}'
|
||||
\.'%{&paste ? "Paste " : ""}'
|
||||
\.'%)'
|
||||
" Display filename with dark or changed highlights.
|
||||
let l:file = (&modified ? '%#StatusLineChange#' : '%#StatusLineDark#').' %<%f'
|
||||
" Display readonly and nomodifiable if set.
|
||||
let l:state = '%#StatusLineDark#'
|
||||
\.'%{&readonly ? " 🔒" : ""}'
|
||||
\.'%{&modifiable ? "" : " ⛔"}'
|
||||
if a:coc && exists('*coc#status')
|
||||
" Display coc.nvim status.
|
||||
let l:coc = '%#StatusLineDuskFade#%( %{coc#status()}%)'
|
||||
else
|
||||
let l:coc = ''
|
||||
endif
|
||||
" Display filetype if set.
|
||||
let l:type = '%#StatusLineDark# %{&filetype} '
|
||||
" Display fileencoding if not utf-8 and fileformat if not unix with dusk
|
||||
" highlights in a group to swallow spaces when empty.
|
||||
let l:format = '%#StatusLineDusk#%( '
|
||||
\.'%{&fileencoding ==# "utf-8" ? "" : &fileencoding}'
|
||||
\.'%{&fileformat ==# "unix" ? "" : "[".&fileformat."]"}'
|
||||
\.' %)'
|
||||
" Display current/total lines and column with dynamic highlights.
|
||||
let l:line = '%#'.a:group.'# ☰ %l/%L ㏑%2c '
|
||||
" Combine the elements into a single string to be evaluated.
|
||||
return l:mode.l:edit.l:file.l:state.l:coc.'%='.l:type.l:format.l:line
|
||||
endfunction
|
||||
|
||||
" Define active statusline, this statusline is dynamic with StatusLineLight
|
||||
" being updated based on the current mode and only used for current buffer.
|
||||
function! statusline#active()
|
||||
let l:mode = statusline#mode()
|
||||
if &buftype ==# 'help'
|
||||
if l:mode ==# 'Normal'
|
||||
let l:mode = 'Help'
|
||||
endif
|
||||
return statusline#special('StatusLineLight', l:mode, '%F')
|
||||
elseif &buftype ==# 'quickfix'
|
||||
" Quickfix list and location list have the same buftype, the window has a
|
||||
" loclist flag, query the window info.
|
||||
let l:info = getwininfo(win_getid())[0]
|
||||
if l:mode ==# 'Normal'
|
||||
let l:mode = l:info['loclist'] ? 'Location' : 'Quickfix'
|
||||
endif
|
||||
return statusline#special('StatusLineLight', l:mode,
|
||||
\ get(l:info['variables'], 'quickfix_title', ''))
|
||||
elseif &buftype ==# 'terminal'
|
||||
return statusline#special('StatusLineLight', 'Terminal', '%f')
|
||||
elseif &previewwindow
|
||||
if l:mode ==# 'Normal'
|
||||
let l:mode = 'Preview'
|
||||
endif
|
||||
return statusline#generic('StatusLineLight', l:mode, v:false)
|
||||
elseif &filetype ==# 'man'
|
||||
return statusline#special('StatusLineDusk', 'Manual', '%f')
|
||||
endif
|
||||
return statusline#generic('StatusLineLight', l:mode, v:true)
|
||||
endfunction
|
||||
|
||||
" Define inactive statusline, this remains static until the buffer gains
|
||||
" focus again.
|
||||
function! statusline#inactive()
|
||||
if &buftype ==# 'help'
|
||||
let l:statusline = statusline#special('StatusLineDusk', 'Help', '%F')
|
||||
elseif &buftype ==# 'quickfix'
|
||||
" Quickfix list and location list have the same buftype, the window has a
|
||||
" loclist flag, query the window info.
|
||||
let l:info = getwininfo(win_getid())[0]
|
||||
let l:statusline = statusline#special('StatusLineDusk',
|
||||
\ l:info['loclist'] ? 'Location' : 'Quickfix',
|
||||
\ get(l:info['variables'], 'quickfix_title', ''))
|
||||
elseif &buftype ==# 'terminal'
|
||||
let l:statusline = statusline#special('StatusLineDusk', 'Terminal', '%f')
|
||||
elseif &previewwindow
|
||||
let l:statusline = statusline#generic('StatusLineDusk', 'Preview', v:false)
|
||||
elseif &filetype ==# 'man'
|
||||
let l:statusline = statusline#special('StatusLineDusk', 'Manual', '%f')
|
||||
else
|
||||
let l:statusline = statusline#generic('StatusLineDusk', 'Idle', v:false)
|
||||
endif
|
||||
" Escape spaces and double quotes for use in setlocal.
|
||||
let l:statusline = substitute(l:statusline, '\([ "]\)', '\\\0', 'g')
|
||||
execute 'setlocal statusline='.l:statusline
|
||||
endfunction
|
||||
|
||||
" Get statusline mode and update StatusLineLight.
|
||||
function! statusline#mode()
|
||||
" Map modes to a human readable name and a color.
|
||||
let l:mode = {
|
||||
\ 'n': ['Normal', g:statusline#light_green],
|
||||
\ 'i': ['Insert', g:statusline#light_blue],
|
||||
\ 'c': ['Command', g:statusline#light_green],
|
||||
\ 'v': ['Visual', g:statusline#light_orange],
|
||||
\ 'V': ['V-Line', g:statusline#light_orange],
|
||||
\ '': ['V-Block', g:statusline#light_orange],
|
||||
\ 'R': ['Replace', g:statusline#light_red],
|
||||
\ 's': ['Select', g:statusline#light_violet],
|
||||
\ 'S': ['S-Line', g:statusline#light_violet],
|
||||
\ '': ['S-Block', g:statusline#light_violet],
|
||||
\ 't': ['Terminal', g:statusline#light_blue],
|
||||
\ '!': ['Shell', g:statusline#light_grey],
|
||||
\}[mode()]
|
||||
" Update the StatusLineLight color.
|
||||
call s:hi('StatusLineLight', l:mode[1])
|
||||
return l:mode[0]
|
||||
endfunction
|
||||
|
||||
" Setup autocmds to set the statusline per buffer.
|
||||
augroup benieStatusLine
|
||||
autocmd!
|
||||
" Dynamically update the current buffer mode and color changes using %! to
|
||||
" call a function which is always evaluated on statusline update.
|
||||
autocmd BufEnter,WinEnter,BufWinEnter * setlocal statusline=%!statusline#active()
|
||||
" Statically set the statusline when leaving the buffer.
|
||||
autocmd BufLeave,WinLeave * call statusline#inactive()
|
||||
augroup END
|
||||
@@ -1,117 +0,0 @@
|
||||
"""Python formatexpr for clang-format & yapf"""
|
||||
|
||||
import json
|
||||
import sys
|
||||
import subprocess
|
||||
import difflib
|
||||
|
||||
import vim
|
||||
|
||||
|
||||
class FormatError(Exception):
|
||||
"""A formatting error."""
|
||||
|
||||
|
||||
def clang_format():
|
||||
"""Call clang-format on the current text object."""
|
||||
clang_format = vim.vars['clang_format_path']
|
||||
# TODO: The cursor position before gq is invoked is not preserved in the
|
||||
# jump list, this expression will return the cursor position at the
|
||||
# beginning of the motion or text object.
|
||||
# Is there a way to get the cursor position immediately before gq is
|
||||
# invoked? So that we can pass the position to clang-format in order for
|
||||
# it to return the updated position to continue editing.
|
||||
# Query the current absolute cursor positon.
|
||||
cursor = int(vim.eval('line2byte(".") + col(".")')) - 2
|
||||
if cursor < 0:
|
||||
return
|
||||
# Determine the lines to format.
|
||||
startline = int(vim.eval('v:lnum'))
|
||||
endline = startline + int(vim.eval('v:count')) - 1
|
||||
lines = f'{startline}:{endline}'
|
||||
fallback_style = vim.vars['clang_format_style']
|
||||
# Construct the clang-format command to call.
|
||||
command = [
|
||||
clang_format, '-style', 'file', '-cursor',
|
||||
str(cursor), '-lines', lines, '-fallback-style', fallback_style
|
||||
]
|
||||
if vim.current.buffer.name:
|
||||
command += ['-assume-filename', vim.current.buffer.name]
|
||||
# Call the clang-format command.
|
||||
output = call(command)
|
||||
if not output:
|
||||
return
|
||||
# Read the clang-format json header.
|
||||
header = json.loads(output[0])
|
||||
if header.get('IncompleteFormat'):
|
||||
raise FormatError('clang-format: incomplete (syntax errors).')
|
||||
# Replace the formatted regions.
|
||||
replace_regions(output[1:])
|
||||
# Set the updated cursor position.
|
||||
vim.command('goto %d' % (header['Cursor'] + 1))
|
||||
|
||||
|
||||
def yapf():
|
||||
"""Call yapf on the current text object."""
|
||||
yapf = vim.vars['yapf_path']
|
||||
# Determine the lines to format.
|
||||
start = int(vim.eval('v:lnum'))
|
||||
end = start + int(vim.eval('v:count'))
|
||||
lines = '{0}-{1}'.format(start, end)
|
||||
style = vim.vars['yapf_style']
|
||||
# Construct the clang-format command to call.
|
||||
command = [yapf, '--style', style, '--lines', lines]
|
||||
# TODO: Since yapf is a Python package, we could import the module and
|
||||
# call it directly instead. It would then be possible to output better
|
||||
# error messages and act on the buffer directly.
|
||||
# Call the yapf command.
|
||||
output = call(command)
|
||||
if not output:
|
||||
return
|
||||
# Replace the formatted regions.
|
||||
replace_regions(output[:-1])
|
||||
|
||||
|
||||
def call(command):
|
||||
"""Call the command to format the text.
|
||||
|
||||
Arguments:
|
||||
command (list): Formatting command to call.
|
||||
text (str): Text to be passed to stdin of command.
|
||||
|
||||
Returns:
|
||||
list: The output of the formatter split on new lines.
|
||||
None: If the subprocess failed.
|
||||
"""
|
||||
# Don't open a cmd prompt window on Windows.
|
||||
startupinfo = None
|
||||
if sys.platform.startswith('win32'):
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
startupinfo.wShowWindow = subprocess.SW_HIDE
|
||||
# Call the formatting command.
|
||||
process = subprocess.Popen(command,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
stdin=subprocess.PIPE,
|
||||
startupinfo=startupinfo)
|
||||
stdout, stderr = process.communicate(
|
||||
input='\n'.join(vim.current.buffer).encode('utf-8'))
|
||||
if stderr:
|
||||
raise FormatError(stderr)
|
||||
if not stdout:
|
||||
raise FormatError('No output from {0}.'.format(command[0]))
|
||||
# Split the lines into a list of elements.
|
||||
return stdout.decode('utf-8').split('\n')
|
||||
|
||||
|
||||
def replace_regions(lines):
|
||||
"""Replace formatted regions in the current buffer.
|
||||
|
||||
Arguments:
|
||||
lines (list): The formatted buffer lines.
|
||||
"""
|
||||
matcher = difflib.SequenceMatcher(None, vim.current.buffer, lines)
|
||||
for tag, i1, i2, j1, j2 in reversed(matcher.get_opcodes()):
|
||||
if tag != 'equal':
|
||||
vim.current.buffer[i1:i2] = lines[j1:j2]
|
||||
541
syntax/ansi.vim
541
syntax/ansi.vim
@@ -1,541 +0,0 @@
|
||||
" Derived from https://github.com/vim-scripts/AnsiEsc.vim
|
||||
|
||||
if has("conceal")
|
||||
echohl ErrorMsg
|
||||
echomsg 'vim was not built with the conceal feature'
|
||||
echohl None
|
||||
endif
|
||||
|
||||
" Make sure that escape sequences are concealed.
|
||||
setlocal conceallevel=3
|
||||
setlocal concealcursor=nvc
|
||||
|
||||
" suppress escaped sequences that don't involve colors (which may or may not be ansi-compliant)
|
||||
syn match ansiSuppress conceal '\e\[[0-9;]*[^m]'
|
||||
syn match ansiSuppress conceal '\e\[?\d*[^m]'
|
||||
syn match ansiSuppress conceal '\b'
|
||||
|
||||
" ------------------------------
|
||||
" Ansi Escape Sequence Handling: {{{2
|
||||
" ------------------------------
|
||||
syn region ansiNone start="\e\[[01;]m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiNone start="\e\[m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlack start="\e\[;\=0\{0,2};\=30m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRed start="\e\[;\=0\{0,2};\=31m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreen start="\e\[;\=0\{0,2};\=32m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellow start="\e\[;\=0\{0,2};\=33m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlue start="\e\[;\=0\{0,2};\=34m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagenta start="\e\[;\=0\{0,2};\=35m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyan start="\e\[;\=0\{0,2};\=36m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhite start="\e\[;\=0\{0,2};\=37m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlackBg start="\e\[;\=0\{0,2};\=\%(1;\)\=40\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedBg start="\e\[;\=0\{0,2};\=\%(1;\)\=41\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenBg start="\e\[;\=0\{0,2};\=\%(1;\)\=42\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowBg start="\e\[;\=0\{0,2};\=\%(1;\)\=43\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueBg start="\e\[;\=0\{0,2};\=\%(1;\)\=44\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaBg start="\e\[;\=0\{0,2};\=\%(1;\)\=45\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanBg start="\e\[;\=0\{0,2};\=\%(1;\)\=46\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteBg start="\e\[;\=0\{0,2};\=\%(1;\)\=47\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBoldBlack start="\e\[;\=0\{0,2};\=\%(1;30\|30;1\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBoldRed start="\e\[;\=0\{0,2};\=\%(1;31\|31;1\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBoldGreen start="\e\[;\=0\{0,2};\=\%(1;32\|32;1\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBoldYellow start="\e\[;\=0\{0,2};\=\%(1;33\|33;1\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBoldBlue start="\e\[;\=0\{0,2};\=\%(1;34\|34;1\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBoldMagenta start="\e\[;\=0\{0,2};\=\%(1;35\|35;1\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBoldCyan start="\e\[;\=0\{0,2};\=\%(1;36\|36;1\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBoldWhite start="\e\[;\=0\{0,2};\=\%(1;37\|37;1\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiStandoutBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;30\|30;3\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiStandoutRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;31\|31;3\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiStandoutGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;32\|32;3\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiStandoutYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;33\|33;3\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiStandoutBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;34\|34;3\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiStandoutMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;35\|35;3\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiStandoutCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;36\|36;3\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiStandoutWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;37\|37;3\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiItalicBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;30\|30;2\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiItalicRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;31\|31;2\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiItalicGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;32\|32;2\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiItalicYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;33\|33;2\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiItalicBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;34\|34;2\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiItalicMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;35\|35;2\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiItalicCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;36\|36;2\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiItalicWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;37\|37;2\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiUnderlineBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;30\|30;4\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiUnderlineRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;31\|31;4\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiUnderlineGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;32\|32;4\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiUnderlineYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;33\|33;4\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiUnderlineBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;34\|34;4\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiUnderlineMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;35\|35;4\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiUnderlineCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;36\|36;4\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiUnderlineWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;37\|37;4\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlinkBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;30\|30;5\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlinkRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;31\|31;5\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlinkGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;32\|32;5\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlinkYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;33\|33;5\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlinkBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;34\|34;5\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlinkMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;35\|35;5\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlinkCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;36\|36;5\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlinkWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;37\|37;5\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiRapidBlinkBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;30\|30;6\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRapidBlinkRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;31\|31;6\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRapidBlinkGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;32\|32;6\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRapidBlinkYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;33\|33;6\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRapidBlinkBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;34\|34;6\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRapidBlinkMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;35\|35;6\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRapidBlinkCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;36\|36;6\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRapidBlinkWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;37\|37;6\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiRVBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;30\|30;7\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRVRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;31\|31;7\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRVGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;32\|32;7\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRVYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;33\|33;7\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRVBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;34\|34;7\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRVMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;35\|35;7\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRVCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;36\|36;7\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRVWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;37\|37;7\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn match ansiStop conceal "\e\[;\=0\{1,2}m"
|
||||
syn match ansiStop conceal "\e\[K"
|
||||
syn match ansiStop conceal "\e\[H"
|
||||
syn match ansiStop conceal "\e\[2J"
|
||||
|
||||
"syn match ansiIgnore conceal "\e\[\([56];3[0-9]\|3[0-9];[56]\)m"
|
||||
"syn match ansiIgnore conceal "\e\[\([0-9]\+;\)\{2,}[0-9]\+m"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Some Color Combinations: - can't do 'em all, the qty of highlighting groups is limited! {{{2
|
||||
" ---------------------------------------------------------------------
|
||||
syn region ansiBlackBlack start="\e\[0\{0,2};\=\(30;40\|40;30\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedBlack start="\e\[0\{0,2};\=\(31;40\|40;31\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenBlack start="\e\[0\{0,2};\=\(32;40\|40;32\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowBlack start="\e\[0\{0,2};\=\(33;40\|40;33\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueBlack start="\e\[0\{0,2};\=\(34;40\|40;34\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaBlack start="\e\[0\{0,2};\=\(35;40\|40;35\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanBlack start="\e\[0\{0,2};\=\(36;40\|40;36\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteBlack start="\e\[0\{0,2};\=\(37;40\|40;37\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlackRed start="\e\[0\{0,2};\=\(30;41\|41;30\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedRed start="\e\[0\{0,2};\=\(31;41\|41;31\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenRed start="\e\[0\{0,2};\=\(32;41\|41;32\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowRed start="\e\[0\{0,2};\=\(33;41\|41;33\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueRed start="\e\[0\{0,2};\=\(34;41\|41;34\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaRed start="\e\[0\{0,2};\=\(35;41\|41;35\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanRed start="\e\[0\{0,2};\=\(36;41\|41;36\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteRed start="\e\[0\{0,2};\=\(37;41\|41;37\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlackGreen start="\e\[0\{0,2};\=\(30;42\|42;30\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedGreen start="\e\[0\{0,2};\=\(31;42\|42;31\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenGreen start="\e\[0\{0,2};\=\(32;42\|42;32\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowGreen start="\e\[0\{0,2};\=\(33;42\|42;33\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueGreen start="\e\[0\{0,2};\=\(34;42\|42;34\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaGreen start="\e\[0\{0,2};\=\(35;42\|42;35\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanGreen start="\e\[0\{0,2};\=\(36;42\|42;36\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteGreen start="\e\[0\{0,2};\=\(37;42\|42;37\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlackYellow start="\e\[0\{0,2};\=\(30;43\|43;30\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedYellow start="\e\[0\{0,2};\=\(31;43\|43;31\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenYellow start="\e\[0\{0,2};\=\(32;43\|43;32\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowYellow start="\e\[0\{0,2};\=\(33;43\|43;33\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueYellow start="\e\[0\{0,2};\=\(34;43\|43;34\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaYellow start="\e\[0\{0,2};\=\(35;43\|43;35\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanYellow start="\e\[0\{0,2};\=\(36;43\|43;36\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteYellow start="\e\[0\{0,2};\=\(37;43\|43;37\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlackBlue start="\e\[0\{0,2};\=\(30;44\|44;30\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedBlue start="\e\[0\{0,2};\=\(31;44\|44;31\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenBlue start="\e\[0\{0,2};\=\(32;44\|44;32\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowBlue start="\e\[0\{0,2};\=\(33;44\|44;33\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueBlue start="\e\[0\{0,2};\=\(34;44\|44;34\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaBlue start="\e\[0\{0,2};\=\(35;44\|44;35\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanBlue start="\e\[0\{0,2};\=\(36;44\|44;36\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteBlue start="\e\[0\{0,2};\=\(37;44\|44;37\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlackMagenta start="\e\[0\{0,2};\=\(30;45\|45;30\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedMagenta start="\e\[0\{0,2};\=\(31;45\|45;31\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenMagenta start="\e\[0\{0,2};\=\(32;45\|45;32\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowMagenta start="\e\[0\{0,2};\=\(33;45\|45;33\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueMagenta start="\e\[0\{0,2};\=\(34;45\|45;34\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaMagenta start="\e\[0\{0,2};\=\(35;45\|45;35\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanMagenta start="\e\[0\{0,2};\=\(36;45\|45;36\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteMagenta start="\e\[0\{0,2};\=\(37;45\|45;37\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlackCyan start="\e\[0\{0,2};\=\(30;46\|46;30\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedCyan start="\e\[0\{0,2};\=\(31;46\|46;31\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenCyan start="\e\[0\{0,2};\=\(32;46\|46;32\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowCyan start="\e\[0\{0,2};\=\(33;46\|46;33\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueCyan start="\e\[0\{0,2};\=\(34;46\|46;34\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaCyan start="\e\[0\{0,2};\=\(35;46\|46;35\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanCyan start="\e\[0\{0,2};\=\(36;46\|46;36\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteCyan start="\e\[0\{0,2};\=\(37;46\|46;37\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn region ansiBlackWhite start="\e\[0\{0,2};\=\(30;47\|47;30\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiRedWhite start="\e\[0\{0,2};\=\(31;47\|47;31\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiGreenWhite start="\e\[0\{0,2};\=\(32;47\|47;32\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiYellowWhite start="\e\[0\{0,2};\=\(33;47\|47;33\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiBlueWhite start="\e\[0\{0,2};\=\(34;47\|47;34\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiMagentaWhite start="\e\[0\{0,2};\=\(35;47\|47;35\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiCyanWhite start="\e\[0\{0,2};\=\(36;47\|47;36\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
syn region ansiWhiteWhite start="\e\[0\{0,2};\=\(37;47\|47;37\)m" end="\e\["me=e-2 contains=ansiConceal
|
||||
|
||||
syn match ansiExtended "\e\[;\=\(0;\)\=[34]8;\(\d*;\)*\d*m" contains=ansiConceal
|
||||
|
||||
syn match ansiConceal contained conceal "\e\[\(\d*;\)*\d*m"
|
||||
|
||||
" -------------
|
||||
" Highlighting: {{{2
|
||||
" -------------
|
||||
let s:hlkeep_{bufnr("%")}= &l:hl
|
||||
exe "setlocal hl=".substitute(&hl,'8:[^,]\{-},','8:Ignore,',"")
|
||||
|
||||
" handle 3 or more element ansi escape sequences by building syntax and highlighting rules
|
||||
" specific to the current file
|
||||
" call s:MultiElementHandler()
|
||||
|
||||
hi ansiNone cterm=NONE gui=NONE
|
||||
|
||||
if &t_Co == 8 || &t_Co == 256
|
||||
" ---------------------
|
||||
" eight-color handling: {{{3
|
||||
" ---------------------
|
||||
" call Decho("set up 8-color highlighting groups")
|
||||
hi ansiBlack ctermfg=black guifg=black cterm=none gui=none
|
||||
hi ansiRed ctermfg=red guifg=red cterm=none gui=none
|
||||
hi ansiGreen ctermfg=green guifg=green cterm=none gui=none
|
||||
hi ansiYellow ctermfg=yellow guifg=yellow cterm=none gui=none
|
||||
hi ansiBlue ctermfg=blue guifg=blue cterm=none gui=none
|
||||
hi ansiMagenta ctermfg=magenta guifg=magenta cterm=none gui=none
|
||||
hi ansiCyan ctermfg=cyan guifg=cyan cterm=none gui=none
|
||||
hi ansiWhite ctermfg=white guifg=white cterm=none gui=none
|
||||
|
||||
hi ansiBlackBg ctermbg=black guibg=black cterm=none gui=none
|
||||
hi ansiRedBg ctermbg=red guibg=red cterm=none gui=none
|
||||
hi ansiGreenBg ctermbg=green guibg=green cterm=none gui=none
|
||||
hi ansiYellowBg ctermbg=yellow guibg=yellow cterm=none gui=none
|
||||
hi ansiBlueBg ctermbg=blue guibg=blue cterm=none gui=none
|
||||
hi ansiMagentaBg ctermbg=magenta guibg=magenta cterm=none gui=none
|
||||
hi ansiCyanBg ctermbg=cyan guibg=cyan cterm=none gui=none
|
||||
hi ansiWhiteBg ctermbg=white guibg=white cterm=none gui=none
|
||||
|
||||
hi ansiBoldBlack ctermfg=black guifg=black cterm=bold gui=bold
|
||||
hi ansiBoldRed ctermfg=red guifg=red cterm=bold gui=bold
|
||||
hi ansiBoldGreen ctermfg=green guifg=green cterm=bold gui=bold
|
||||
hi ansiBoldYellow ctermfg=yellow guifg=yellow cterm=bold gui=bold
|
||||
hi ansiBoldBlue ctermfg=blue guifg=blue cterm=bold gui=bold
|
||||
hi ansiBoldMagenta ctermfg=magenta guifg=magenta cterm=bold gui=bold
|
||||
hi ansiBoldCyan ctermfg=cyan guifg=cyan cterm=bold gui=bold
|
||||
hi ansiBoldWhite ctermfg=white guifg=white cterm=bold gui=bold
|
||||
|
||||
hi ansiStandoutBlack ctermfg=black guifg=black cterm=standout gui=standout
|
||||
hi ansiStandoutRed ctermfg=red guifg=red cterm=standout gui=standout
|
||||
hi ansiStandoutGreen ctermfg=green guifg=green cterm=standout gui=standout
|
||||
hi ansiStandoutYellow ctermfg=yellow guifg=yellow cterm=standout gui=standout
|
||||
hi ansiStandoutBlue ctermfg=blue guifg=blue cterm=standout gui=standout
|
||||
hi ansiStandoutMagenta ctermfg=magenta guifg=magenta cterm=standout gui=standout
|
||||
hi ansiStandoutCyan ctermfg=cyan guifg=cyan cterm=standout gui=standout
|
||||
hi ansiStandoutWhite ctermfg=white guifg=white cterm=standout gui=standout
|
||||
|
||||
hi ansiItalicBlack ctermfg=black guifg=black cterm=italic gui=italic
|
||||
hi ansiItalicRed ctermfg=red guifg=red cterm=italic gui=italic
|
||||
hi ansiItalicGreen ctermfg=green guifg=green cterm=italic gui=italic
|
||||
hi ansiItalicYellow ctermfg=yellow guifg=yellow cterm=italic gui=italic
|
||||
hi ansiItalicBlue ctermfg=blue guifg=blue cterm=italic gui=italic
|
||||
hi ansiItalicMagenta ctermfg=magenta guifg=magenta cterm=italic gui=italic
|
||||
hi ansiItalicCyan ctermfg=cyan guifg=cyan cterm=italic gui=italic
|
||||
hi ansiItalicWhite ctermfg=white guifg=white cterm=italic gui=italic
|
||||
|
||||
hi ansiUnderlineBlack ctermfg=black guifg=black cterm=underline gui=underline
|
||||
hi ansiUnderlineRed ctermfg=red guifg=red cterm=underline gui=underline
|
||||
hi ansiUnderlineGreen ctermfg=green guifg=green cterm=underline gui=underline
|
||||
hi ansiUnderlineYellow ctermfg=yellow guifg=yellow cterm=underline gui=underline
|
||||
hi ansiUnderlineBlue ctermfg=blue guifg=blue cterm=underline gui=underline
|
||||
hi ansiUnderlineMagenta ctermfg=magenta guifg=magenta cterm=underline gui=underline
|
||||
hi ansiUnderlineCyan ctermfg=cyan guifg=cyan cterm=underline gui=underline
|
||||
hi ansiUnderlineWhite ctermfg=white guifg=white cterm=underline gui=underline
|
||||
|
||||
hi ansiBlinkBlack ctermfg=black guifg=black cterm=standout gui=undercurl
|
||||
hi ansiBlinkRed ctermfg=red guifg=red cterm=standout gui=undercurl
|
||||
hi ansiBlinkGreen ctermfg=green guifg=green cterm=standout gui=undercurl
|
||||
hi ansiBlinkYellow ctermfg=yellow guifg=yellow cterm=standout gui=undercurl
|
||||
hi ansiBlinkBlue ctermfg=blue guifg=blue cterm=standout gui=undercurl
|
||||
hi ansiBlinkMagenta ctermfg=magenta guifg=magenta cterm=standout gui=undercurl
|
||||
hi ansiBlinkCyan ctermfg=cyan guifg=cyan cterm=standout gui=undercurl
|
||||
hi ansiBlinkWhite ctermfg=white guifg=white cterm=standout gui=undercurl
|
||||
|
||||
hi ansiRapidBlinkBlack ctermfg=black guifg=black cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkRed ctermfg=red guifg=red cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkGreen ctermfg=green guifg=green cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkYellow ctermfg=yellow guifg=yellow cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkBlue ctermfg=blue guifg=blue cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkMagenta ctermfg=magenta guifg=magenta cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkCyan ctermfg=cyan guifg=cyan cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkWhite ctermfg=white guifg=white cterm=standout gui=undercurl
|
||||
|
||||
hi ansiRVBlack ctermfg=black guifg=black cterm=reverse gui=reverse
|
||||
hi ansiRVRed ctermfg=red guifg=red cterm=reverse gui=reverse
|
||||
hi ansiRVGreen ctermfg=green guifg=green cterm=reverse gui=reverse
|
||||
hi ansiRVYellow ctermfg=yellow guifg=yellow cterm=reverse gui=reverse
|
||||
hi ansiRVBlue ctermfg=blue guifg=blue cterm=reverse gui=reverse
|
||||
hi ansiRVMagenta ctermfg=magenta guifg=magenta cterm=reverse gui=reverse
|
||||
hi ansiRVCyan ctermfg=cyan guifg=cyan cterm=reverse gui=reverse
|
||||
hi ansiRVWhite ctermfg=white guifg=white cterm=reverse gui=reverse
|
||||
|
||||
hi ansiBlackBlack ctermfg=black ctermbg=black guifg=Black guibg=Black cterm=none gui=none
|
||||
hi ansiRedBlack ctermfg=red ctermbg=black guifg=Red guibg=Black cterm=none gui=none
|
||||
hi ansiGreenBlack ctermfg=green ctermbg=black guifg=Green guibg=Black cterm=none gui=none
|
||||
hi ansiYellowBlack ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black cterm=none gui=none
|
||||
hi ansiBlueBlack ctermfg=blue ctermbg=black guifg=Blue guibg=Black cterm=none gui=none
|
||||
hi ansiMagentaBlack ctermfg=magenta ctermbg=black guifg=Magenta guibg=Black cterm=none gui=none
|
||||
hi ansiCyanBlack ctermfg=cyan ctermbg=black guifg=Cyan guibg=Black cterm=none gui=none
|
||||
hi ansiWhiteBlack ctermfg=white ctermbg=black guifg=White guibg=Black cterm=none gui=none
|
||||
|
||||
hi ansiBlackRed ctermfg=black ctermbg=red guifg=Black guibg=Red cterm=none gui=none
|
||||
hi ansiRedRed ctermfg=red ctermbg=red guifg=Red guibg=Red cterm=none gui=none
|
||||
hi ansiGreenRed ctermfg=green ctermbg=red guifg=Green guibg=Red cterm=none gui=none
|
||||
hi ansiYellowRed ctermfg=yellow ctermbg=red guifg=Yellow guibg=Red cterm=none gui=none
|
||||
hi ansiBlueRed ctermfg=blue ctermbg=red guifg=Blue guibg=Red cterm=none gui=none
|
||||
hi ansiMagentaRed ctermfg=magenta ctermbg=red guifg=Magenta guibg=Red cterm=none gui=none
|
||||
hi ansiCyanRed ctermfg=cyan ctermbg=red guifg=Cyan guibg=Red cterm=none gui=none
|
||||
hi ansiWhiteRed ctermfg=white ctermbg=red guifg=White guibg=Red cterm=none gui=none
|
||||
|
||||
hi ansiBlackGreen ctermfg=black ctermbg=green guifg=Black guibg=Green cterm=none gui=none
|
||||
hi ansiRedGreen ctermfg=red ctermbg=green guifg=Red guibg=Green cterm=none gui=none
|
||||
hi ansiGreenGreen ctermfg=green ctermbg=green guifg=Green guibg=Green cterm=none gui=none
|
||||
hi ansiYellowGreen ctermfg=yellow ctermbg=green guifg=Yellow guibg=Green cterm=none gui=none
|
||||
hi ansiBlueGreen ctermfg=blue ctermbg=green guifg=Blue guibg=Green cterm=none gui=none
|
||||
hi ansiMagentaGreen ctermfg=magenta ctermbg=green guifg=Magenta guibg=Green cterm=none gui=none
|
||||
hi ansiCyanGreen ctermfg=cyan ctermbg=green guifg=Cyan guibg=Green cterm=none gui=none
|
||||
hi ansiWhiteGreen ctermfg=white ctermbg=green guifg=White guibg=Green cterm=none gui=none
|
||||
|
||||
hi ansiBlackYellow ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow cterm=none gui=none
|
||||
hi ansiRedYellow ctermfg=red ctermbg=yellow guifg=Red guibg=Yellow cterm=none gui=none
|
||||
hi ansiGreenYellow ctermfg=green ctermbg=yellow guifg=Green guibg=Yellow cterm=none gui=none
|
||||
hi ansiYellowYellow ctermfg=yellow ctermbg=yellow guifg=Yellow guibg=Yellow cterm=none gui=none
|
||||
hi ansiBlueYellow ctermfg=blue ctermbg=yellow guifg=Blue guibg=Yellow cterm=none gui=none
|
||||
hi ansiMagentaYellow ctermfg=magenta ctermbg=yellow guifg=Magenta guibg=Yellow cterm=none gui=none
|
||||
hi ansiCyanYellow ctermfg=cyan ctermbg=yellow guifg=Cyan guibg=Yellow cterm=none gui=none
|
||||
hi ansiWhiteYellow ctermfg=white ctermbg=yellow guifg=White guibg=Yellow cterm=none gui=none
|
||||
|
||||
hi ansiBlackBlue ctermfg=black ctermbg=blue guifg=Black guibg=Blue cterm=none gui=none
|
||||
hi ansiRedBlue ctermfg=red ctermbg=blue guifg=Red guibg=Blue cterm=none gui=none
|
||||
hi ansiGreenBlue ctermfg=green ctermbg=blue guifg=Green guibg=Blue cterm=none gui=none
|
||||
hi ansiYellowBlue ctermfg=yellow ctermbg=blue guifg=Yellow guibg=Blue cterm=none gui=none
|
||||
hi ansiBlueBlue ctermfg=blue ctermbg=blue guifg=Blue guibg=Blue cterm=none gui=none
|
||||
hi ansiMagentaBlue ctermfg=magenta ctermbg=blue guifg=Magenta guibg=Blue cterm=none gui=none
|
||||
hi ansiCyanBlue ctermfg=cyan ctermbg=blue guifg=Cyan guibg=Blue cterm=none gui=none
|
||||
hi ansiWhiteBlue ctermfg=white ctermbg=blue guifg=White guibg=Blue cterm=none gui=none
|
||||
|
||||
hi ansiBlackMagenta ctermfg=black ctermbg=magenta guifg=Black guibg=Magenta cterm=none gui=none
|
||||
hi ansiRedMagenta ctermfg=red ctermbg=magenta guifg=Red guibg=Magenta cterm=none gui=none
|
||||
hi ansiGreenMagenta ctermfg=green ctermbg=magenta guifg=Green guibg=Magenta cterm=none gui=none
|
||||
hi ansiYellowMagenta ctermfg=yellow ctermbg=magenta guifg=Yellow guibg=Magenta cterm=none gui=none
|
||||
hi ansiBlueMagenta ctermfg=blue ctermbg=magenta guifg=Blue guibg=Magenta cterm=none gui=none
|
||||
hi ansiMagentaMagenta ctermfg=magenta ctermbg=magenta guifg=Magenta guibg=Magenta cterm=none gui=none
|
||||
hi ansiCyanMagenta ctermfg=cyan ctermbg=magenta guifg=Cyan guibg=Magenta cterm=none gui=none
|
||||
hi ansiWhiteMagenta ctermfg=white ctermbg=magenta guifg=White guibg=Magenta cterm=none gui=none
|
||||
|
||||
hi ansiBlackCyan ctermfg=black ctermbg=cyan guifg=Black guibg=Cyan cterm=none gui=none
|
||||
hi ansiRedCyan ctermfg=red ctermbg=cyan guifg=Red guibg=Cyan cterm=none gui=none
|
||||
hi ansiGreenCyan ctermfg=green ctermbg=cyan guifg=Green guibg=Cyan cterm=none gui=none
|
||||
hi ansiYellowCyan ctermfg=yellow ctermbg=cyan guifg=Yellow guibg=Cyan cterm=none gui=none
|
||||
hi ansiBlueCyan ctermfg=blue ctermbg=cyan guifg=Blue guibg=Cyan cterm=none gui=none
|
||||
hi ansiMagentaCyan ctermfg=magenta ctermbg=cyan guifg=Magenta guibg=Cyan cterm=none gui=none
|
||||
hi ansiCyanCyan ctermfg=cyan ctermbg=cyan guifg=Cyan guibg=Cyan cterm=none gui=none
|
||||
hi ansiWhiteCyan ctermfg=white ctermbg=cyan guifg=White guibg=Cyan cterm=none gui=none
|
||||
|
||||
hi ansiBlackWhite ctermfg=black ctermbg=white guifg=Black guibg=White cterm=none gui=none
|
||||
hi ansiRedWhite ctermfg=red ctermbg=white guifg=Red guibg=White cterm=none gui=none
|
||||
hi ansiGreenWhite ctermfg=green ctermbg=white guifg=Green guibg=White cterm=none gui=none
|
||||
hi ansiYellowWhite ctermfg=yellow ctermbg=white guifg=Yellow guibg=White cterm=none gui=none
|
||||
hi ansiBlueWhite ctermfg=blue ctermbg=white guifg=Blue guibg=White cterm=none gui=none
|
||||
hi ansiMagentaWhite ctermfg=magenta ctermbg=white guifg=Magenta guibg=White cterm=none gui=none
|
||||
hi ansiCyanWhite ctermfg=cyan ctermbg=white guifg=Cyan guibg=White cterm=none gui=none
|
||||
hi ansiWhiteWhite ctermfg=white ctermbg=white guifg=White guibg=White cterm=none gui=none
|
||||
|
||||
if v:version >= 700 && exists("&t_Co") && &t_Co == 256 && exists("g:ansiesc_256color")
|
||||
" ---------------------------
|
||||
" handle 256-color terminals: {{{3
|
||||
" ---------------------------
|
||||
" call Decho("set up 256-color highlighting groups")
|
||||
let icolor= 1
|
||||
while icolor < 256
|
||||
let jcolor= 1
|
||||
exe "hi ansiHL_".icolor."_0 ctermfg=".icolor
|
||||
exe "hi ansiHL_0_".icolor." ctermbg=".icolor
|
||||
" call Decho("exe hi ansiHL_".icolor." ctermfg=".icolor)
|
||||
while jcolor < 256
|
||||
exe "hi ansiHL_".icolor."_".jcolor." ctermfg=".icolor." ctermbg=".jcolor
|
||||
" call Decho("exe hi ansiHL_".icolor."_".jcolor." ctermfg=".icolor." ctermbg=".jcolor)
|
||||
let jcolor= jcolor + 1
|
||||
endwhile
|
||||
let icolor= icolor + 1
|
||||
endwhile
|
||||
endif
|
||||
|
||||
else
|
||||
" ----------------------------------
|
||||
" not 8 or 256 color terminals (gui): {{{3
|
||||
" ----------------------------------
|
||||
" call Decho("set up gui highlighting groups")
|
||||
hi ansiBlack ctermfg=black guifg=black cterm=none gui=none
|
||||
hi ansiRed ctermfg=red guifg=red cterm=none gui=none
|
||||
hi ansiGreen ctermfg=green guifg=green cterm=none gui=none
|
||||
hi ansiYellow ctermfg=yellow guifg=yellow cterm=none gui=none
|
||||
hi ansiBlue ctermfg=blue guifg=blue cterm=none gui=none
|
||||
hi ansiMagenta ctermfg=magenta guifg=magenta cterm=none gui=none
|
||||
hi ansiCyan ctermfg=cyan guifg=cyan cterm=none gui=none
|
||||
hi ansiWhite ctermfg=white guifg=white cterm=none gui=none
|
||||
|
||||
hi ansiBlackBg ctermbg=black guibg=black cterm=none gui=none
|
||||
hi ansiRedBg ctermbg=red guibg=red cterm=none gui=none
|
||||
hi ansiGreenBg ctermbg=green guibg=green cterm=none gui=none
|
||||
hi ansiYellowBg ctermbg=yellow guibg=yellow cterm=none gui=none
|
||||
hi ansiBlueBg ctermbg=blue guibg=blue cterm=none gui=none
|
||||
hi ansiMagentaBg ctermbg=magenta guibg=magenta cterm=none gui=none
|
||||
hi ansiCyanBg ctermbg=cyan guibg=cyan cterm=none gui=none
|
||||
hi ansiWhiteBg ctermbg=white guibg=white cterm=none gui=none
|
||||
|
||||
hi ansiBoldBlack ctermfg=black guifg=black cterm=bold gui=bold
|
||||
hi ansiBoldRed ctermfg=red guifg=red cterm=bold gui=bold
|
||||
hi ansiBoldGreen ctermfg=green guifg=green cterm=bold gui=bold
|
||||
hi ansiBoldYellow ctermfg=yellow guifg=yellow cterm=bold gui=bold
|
||||
hi ansiBoldBlue ctermfg=blue guifg=blue cterm=bold gui=bold
|
||||
hi ansiBoldMagenta ctermfg=magenta guifg=magenta cterm=bold gui=bold
|
||||
hi ansiBoldCyan ctermfg=cyan guifg=cyan cterm=bold gui=bold
|
||||
hi ansiBoldWhite ctermfg=white guifg=white cterm=bold gui=bold
|
||||
|
||||
hi ansiStandoutBlack ctermfg=black guifg=black cterm=standout gui=standout
|
||||
hi ansiStandoutRed ctermfg=red guifg=red cterm=standout gui=standout
|
||||
hi ansiStandoutGreen ctermfg=green guifg=green cterm=standout gui=standout
|
||||
hi ansiStandoutYellow ctermfg=yellow guifg=yellow cterm=standout gui=standout
|
||||
hi ansiStandoutBlue ctermfg=blue guifg=blue cterm=standout gui=standout
|
||||
hi ansiStandoutMagenta ctermfg=magenta guifg=magenta cterm=standout gui=standout
|
||||
hi ansiStandoutCyan ctermfg=cyan guifg=cyan cterm=standout gui=standout
|
||||
hi ansiStandoutWhite ctermfg=white guifg=white cterm=standout gui=standout
|
||||
|
||||
hi ansiItalicBlack ctermfg=black guifg=black cterm=italic gui=italic
|
||||
hi ansiItalicRed ctermfg=red guifg=red cterm=italic gui=italic
|
||||
hi ansiItalicGreen ctermfg=green guifg=green cterm=italic gui=italic
|
||||
hi ansiItalicYellow ctermfg=yellow guifg=yellow cterm=italic gui=italic
|
||||
hi ansiItalicBlue ctermfg=blue guifg=blue cterm=italic gui=italic
|
||||
hi ansiItalicMagenta ctermfg=magenta guifg=magenta cterm=italic gui=italic
|
||||
hi ansiItalicCyan ctermfg=cyan guifg=cyan cterm=italic gui=italic
|
||||
hi ansiItalicWhite ctermfg=white guifg=white cterm=italic gui=italic
|
||||
|
||||
hi ansiUnderlineBlack ctermfg=black guifg=black cterm=underline gui=underline
|
||||
hi ansiUnderlineRed ctermfg=red guifg=red cterm=underline gui=underline
|
||||
hi ansiUnderlineGreen ctermfg=green guifg=green cterm=underline gui=underline
|
||||
hi ansiUnderlineYellow ctermfg=yellow guifg=yellow cterm=underline gui=underline
|
||||
hi ansiUnderlineBlue ctermfg=blue guifg=blue cterm=underline gui=underline
|
||||
hi ansiUnderlineMagenta ctermfg=magenta guifg=magenta cterm=underline gui=underline
|
||||
hi ansiUnderlineCyan ctermfg=cyan guifg=cyan cterm=underline gui=underline
|
||||
hi ansiUnderlineWhite ctermfg=white guifg=white cterm=underline gui=underline
|
||||
|
||||
hi ansiBlinkBlack ctermfg=black guifg=black cterm=standout gui=undercurl
|
||||
hi ansiBlinkRed ctermfg=red guifg=red cterm=standout gui=undercurl
|
||||
hi ansiBlinkGreen ctermfg=green guifg=green cterm=standout gui=undercurl
|
||||
hi ansiBlinkYellow ctermfg=yellow guifg=yellow cterm=standout gui=undercurl
|
||||
hi ansiBlinkBlue ctermfg=blue guifg=blue cterm=standout gui=undercurl
|
||||
hi ansiBlinkMagenta ctermfg=magenta guifg=magenta cterm=standout gui=undercurl
|
||||
hi ansiBlinkCyan ctermfg=cyan guifg=cyan cterm=standout gui=undercurl
|
||||
hi ansiBlinkWhite ctermfg=white guifg=white cterm=standout gui=undercurl
|
||||
|
||||
hi ansiRapidBlinkBlack ctermfg=black guifg=black cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkRed ctermfg=red guifg=red cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkGreen ctermfg=green guifg=green cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkYellow ctermfg=yellow guifg=yellow cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkBlue ctermfg=blue guifg=blue cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkMagenta ctermfg=magenta guifg=magenta cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkCyan ctermfg=cyan guifg=cyan cterm=standout gui=undercurl
|
||||
hi ansiRapidBlinkWhite ctermfg=white guifg=white cterm=standout gui=undercurl
|
||||
|
||||
hi ansiRVBlack ctermfg=black guifg=black cterm=reverse gui=reverse
|
||||
hi ansiRVRed ctermfg=red guifg=red cterm=reverse gui=reverse
|
||||
hi ansiRVGreen ctermfg=green guifg=green cterm=reverse gui=reverse
|
||||
hi ansiRVYellow ctermfg=yellow guifg=yellow cterm=reverse gui=reverse
|
||||
hi ansiRVBlue ctermfg=blue guifg=blue cterm=reverse gui=reverse
|
||||
hi ansiRVMagenta ctermfg=magenta guifg=magenta cterm=reverse gui=reverse
|
||||
hi ansiRVCyan ctermfg=cyan guifg=cyan cterm=reverse gui=reverse
|
||||
hi ansiRVWhite ctermfg=white guifg=white cterm=reverse gui=reverse
|
||||
|
||||
hi ansiBlackBlack ctermfg=black ctermbg=black guifg=Black guibg=Black cterm=none gui=none
|
||||
hi ansiRedBlack ctermfg=black ctermbg=black guifg=Black guibg=Black cterm=none gui=none
|
||||
hi ansiRedBlack ctermfg=red ctermbg=black guifg=Red guibg=Black cterm=none gui=none
|
||||
hi ansiGreenBlack ctermfg=green ctermbg=black guifg=Green guibg=Black cterm=none gui=none
|
||||
hi ansiYellowBlack ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black cterm=none gui=none
|
||||
hi ansiBlueBlack ctermfg=blue ctermbg=black guifg=Blue guibg=Black cterm=none gui=none
|
||||
hi ansiMagentaBlack ctermfg=magenta ctermbg=black guifg=Magenta guibg=Black cterm=none gui=none
|
||||
hi ansiCyanBlack ctermfg=cyan ctermbg=black guifg=Cyan guibg=Black cterm=none gui=none
|
||||
hi ansiWhiteBlack ctermfg=white ctermbg=black guifg=White guibg=Black cterm=none gui=none
|
||||
|
||||
hi ansiBlackRed ctermfg=black ctermbg=red guifg=Black guibg=Red cterm=none gui=none
|
||||
hi ansiRedRed ctermfg=red ctermbg=red guifg=Red guibg=Red cterm=none gui=none
|
||||
hi ansiGreenRed ctermfg=green ctermbg=red guifg=Green guibg=Red cterm=none gui=none
|
||||
hi ansiYellowRed ctermfg=yellow ctermbg=red guifg=Yellow guibg=Red cterm=none gui=none
|
||||
hi ansiBlueRed ctermfg=blue ctermbg=red guifg=Blue guibg=Red cterm=none gui=none
|
||||
hi ansiMagentaRed ctermfg=magenta ctermbg=red guifg=Magenta guibg=Red cterm=none gui=none
|
||||
hi ansiCyanRed ctermfg=cyan ctermbg=red guifg=Cyan guibg=Red cterm=none gui=none
|
||||
hi ansiWhiteRed ctermfg=white ctermbg=red guifg=White guibg=Red cterm=none gui=none
|
||||
|
||||
hi ansiBlackGreen ctermfg=black ctermbg=green guifg=Black guibg=Green cterm=none gui=none
|
||||
hi ansiRedGreen ctermfg=red ctermbg=green guifg=Red guibg=Green cterm=none gui=none
|
||||
hi ansiGreenGreen ctermfg=green ctermbg=green guifg=Green guibg=Green cterm=none gui=none
|
||||
hi ansiYellowGreen ctermfg=yellow ctermbg=green guifg=Yellow guibg=Green cterm=none gui=none
|
||||
hi ansiBlueGreen ctermfg=blue ctermbg=green guifg=Blue guibg=Green cterm=none gui=none
|
||||
hi ansiMagentaGreen ctermfg=magenta ctermbg=green guifg=Magenta guibg=Green cterm=none gui=none
|
||||
hi ansiCyanGreen ctermfg=cyan ctermbg=green guifg=Cyan guibg=Green cterm=none gui=none
|
||||
hi ansiWhiteGreen ctermfg=white ctermbg=green guifg=White guibg=Green cterm=none gui=none
|
||||
|
||||
hi ansiBlackYellow ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow cterm=none gui=none
|
||||
hi ansiRedYellow ctermfg=red ctermbg=yellow guifg=Red guibg=Yellow cterm=none gui=none
|
||||
hi ansiGreenYellow ctermfg=green ctermbg=yellow guifg=Green guibg=Yellow cterm=none gui=none
|
||||
hi ansiYellowYellow ctermfg=yellow ctermbg=yellow guifg=Yellow guibg=Yellow cterm=none gui=none
|
||||
hi ansiBlueYellow ctermfg=blue ctermbg=yellow guifg=Blue guibg=Yellow cterm=none gui=none
|
||||
hi ansiMagentaYellow ctermfg=magenta ctermbg=yellow guifg=Magenta guibg=Yellow cterm=none gui=none
|
||||
hi ansiCyanYellow ctermfg=cyan ctermbg=yellow guifg=Cyan guibg=Yellow cterm=none gui=none
|
||||
hi ansiWhiteYellow ctermfg=white ctermbg=yellow guifg=White guibg=Yellow cterm=none gui=none
|
||||
|
||||
hi ansiBlackBlue ctermfg=black ctermbg=blue guifg=Black guibg=Blue cterm=none gui=none
|
||||
hi ansiRedBlue ctermfg=red ctermbg=blue guifg=Red guibg=Blue cterm=none gui=none
|
||||
hi ansiGreenBlue ctermfg=green ctermbg=blue guifg=Green guibg=Blue cterm=none gui=none
|
||||
hi ansiYellowBlue ctermfg=yellow ctermbg=blue guifg=Yellow guibg=Blue cterm=none gui=none
|
||||
hi ansiBlueBlue ctermfg=blue ctermbg=blue guifg=Blue guibg=Blue cterm=none gui=none
|
||||
hi ansiMagentaBlue ctermfg=magenta ctermbg=blue guifg=Magenta guibg=Blue cterm=none gui=none
|
||||
hi ansiCyanBlue ctermfg=cyan ctermbg=blue guifg=Cyan guibg=Blue cterm=none gui=none
|
||||
hi ansiWhiteBlue ctermfg=white ctermbg=blue guifg=White guibg=Blue cterm=none gui=none
|
||||
|
||||
hi ansiBlackMagenta ctermfg=black ctermbg=magenta guifg=Black guibg=Magenta cterm=none gui=none
|
||||
hi ansiRedMagenta ctermfg=red ctermbg=magenta guifg=Red guibg=Magenta cterm=none gui=none
|
||||
hi ansiGreenMagenta ctermfg=green ctermbg=magenta guifg=Green guibg=Magenta cterm=none gui=none
|
||||
hi ansiYellowMagenta ctermfg=yellow ctermbg=magenta guifg=Yellow guibg=Magenta cterm=none gui=none
|
||||
hi ansiBlueMagenta ctermfg=blue ctermbg=magenta guifg=Blue guibg=Magenta cterm=none gui=none
|
||||
hi ansiMagentaMagenta ctermfg=magenta ctermbg=magenta guifg=Magenta guibg=Magenta cterm=none gui=none
|
||||
hi ansiCyanMagenta ctermfg=cyan ctermbg=magenta guifg=Cyan guibg=Magenta cterm=none gui=none
|
||||
hi ansiWhiteMagenta ctermfg=white ctermbg=magenta guifg=White guibg=Magenta cterm=none gui=none
|
||||
|
||||
hi ansiBlackCyan ctermfg=black ctermbg=cyan guifg=Black guibg=Cyan cterm=none gui=none
|
||||
hi ansiRedCyan ctermfg=red ctermbg=cyan guifg=Red guibg=Cyan cterm=none gui=none
|
||||
hi ansiGreenCyan ctermfg=green ctermbg=cyan guifg=Green guibg=Cyan cterm=none gui=none
|
||||
hi ansiYellowCyan ctermfg=yellow ctermbg=cyan guifg=Yellow guibg=Cyan cterm=none gui=none
|
||||
hi ansiBlueCyan ctermfg=blue ctermbg=cyan guifg=Blue guibg=Cyan cterm=none gui=none
|
||||
hi ansiMagentaCyan ctermfg=magenta ctermbg=cyan guifg=Magenta guibg=Cyan cterm=none gui=none
|
||||
hi ansiCyanCyan ctermfg=cyan ctermbg=cyan guifg=Cyan guibg=Cyan cterm=none gui=none
|
||||
hi ansiWhiteCyan ctermfg=white ctermbg=cyan guifg=White guibg=Cyan cterm=none gui=none
|
||||
|
||||
hi ansiBlackWhite ctermfg=black ctermbg=white guifg=Black guibg=White cterm=none gui=none
|
||||
hi ansiRedWhite ctermfg=red ctermbg=white guifg=Red guibg=White cterm=none gui=none
|
||||
hi ansiGreenWhite ctermfg=green ctermbg=white guifg=Green guibg=White cterm=none gui=none
|
||||
hi ansiYellowWhite ctermfg=yellow ctermbg=white guifg=Yellow guibg=White cterm=none gui=none
|
||||
hi ansiBlueWhite ctermfg=blue ctermbg=white guifg=Blue guibg=White cterm=none gui=none
|
||||
hi ansiMagentaWhite ctermfg=magenta ctermbg=white guifg=Magenta guibg=White cterm=none gui=none
|
||||
hi ansiCyanWhite ctermfg=cyan ctermbg=white guifg=Cyan guibg=White cterm=none gui=none
|
||||
hi ansiWhiteWhite ctermfg=white ctermbg=white guifg=White guibg=White cterm=none gui=none
|
||||
endif
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
highlight default link cmakecacheComment Comment
|
||||
highlight default link cmakecacheVariable Identifier
|
||||
highlight default link cmakecacheType Type
|
||||
highlight default link cmakecacheValue String
|
||||
highlight default link cmakecacheDelimiter Delimiter
|
||||
|
||||
syntax region cmakecacheComment start='#' end='$'
|
||||
syntax region cmakecacheComment start='//' end='$'
|
||||
syntax region cmakecacheVariable matchgroup=cmakecacheDelimiter start='^\ze\w\+' end=':'
|
||||
syntax keyword cmakecacheType
|
||||
\ BOOL PATH FILEPATH STRING INTERNAL STATIC UNINITIALIZED
|
||||
syntax region cmakecacheValue start='=\zs' end='$' contains=cmakecacheDelimiter
|
||||
syntax match cmakecacheDelimiter ';' contained
|
||||
@@ -1,8 +0,0 @@
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax region consoleCommand matchgroup=consolePrompt start='^\s*\$' skip='\\$' end='$'
|
||||
|
||||
highlight link consoleCommand Special
|
||||
highlight consolePrompt cterm=bold gui=bold
|
||||
@@ -71,9 +71,8 @@ if !exists('cpp_no_cpp14')
|
||||
endif
|
||||
|
||||
" C++17
|
||||
if exists('cpp_experimental') && !exists('cpp_no_cpp17')
|
||||
if !exists('cpp_no_cpp17')
|
||||
" Attribute Specifier Sequence
|
||||
" FIXME: This matches range-for and switch case statements
|
||||
" Match: [[using attribute-namespace: attribute-list]]
|
||||
syn match cppAttributeUsingNamespace '\s\+\zs\w\+\ze\s*:' contained contains=cppAttributeUsing
|
||||
syn keyword cppAttributeUsing using contained
|
||||
@@ -87,7 +86,7 @@ if exists('cpp_experimental') && !exists('cpp_no_cpp17')
|
||||
endif
|
||||
|
||||
" C++20
|
||||
if exists('cpp_experimental') && !exists('cpp_no_cpp20')
|
||||
if !exists('cpp_no_cpp20')
|
||||
syn keyword cppStatement concept requires
|
||||
|
||||
" TODO: Attribute Specifier Sequence
|
||||
@@ -109,7 +108,6 @@ endif
|
||||
if !exists('cpp_no_function')
|
||||
" Match function expressions: expr<T>()
|
||||
" ^^^^
|
||||
" TODO: change .* to a not be greedy
|
||||
syn match cppFunction '\h\w*\ze<.*>\s*(' display
|
||||
|
||||
hi default link cppFunction Function
|
||||
|
||||
@@ -38,9 +38,8 @@ syn match groovyNumber "\<\(0[bB][0-1]\+\|0[0-7]*\|0[xX]\x\+\|\d\(\d\|_\d\)*\)[l
|
||||
syn match groovyNumber "\(\<\d\(\d\|_\d\)*\.\(\d\(\d\|_\d\)*\)\=\|\.\d\(\d\|_\d\)*\)\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\="
|
||||
syn match groovyNumber "\<\d\(\d\|_\d\)*[eE][-+]\=\d\(\d\|_\d\)*[fFdD]\=\>"
|
||||
syn match groovyNumber "\<\d\(\d\|_\d\)*\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\>"
|
||||
syn match groovyTodo "\(TODO\|FIXME\)" contained
|
||||
syn region groovyComment start='\/\*' end='\*\/' contains=groovyTodo fold
|
||||
syn match groovyComment '\/\/.*$' contains=groovyTodo
|
||||
syn region groovyComment start='\/\*' end='\*\/' fold
|
||||
syn match groovyComment '\/\/.*$'
|
||||
syn match groovyDelimiter '[()\[\]]'
|
||||
syn region groovyBlock matchgroup=groovyDelimiter start='{' end='}' transparent fold
|
||||
syn match groovyStructure '\w\+\ze\s*{'
|
||||
@@ -72,7 +71,6 @@ hi default link groovyAssert Keyword
|
||||
hi default link groovyBoolean Boolean
|
||||
hi default link groovyBranch Conditional
|
||||
hi default link groovyClassDecl Structure
|
||||
hi default link groovyTodo Todo
|
||||
hi default link groovyComment Comment
|
||||
hi default link groovyConditional Conditional
|
||||
hi default link groovyConstant Constant
|
||||
|
||||
225
syntax/llvm.vim
225
syntax/llvm.vim
@@ -1,11 +1,11 @@
|
||||
" Vim syntax file
|
||||
" Language: llvm
|
||||
" Maintainer: The LLVM team, http://llvm.org/
|
||||
" Version: $Revision$
|
||||
" Version: $Revision: 137806 $
|
||||
|
||||
if v:version < 600
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists('b:current_syntax')
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -14,199 +14,75 @@ syn case match
|
||||
" Types.
|
||||
" Types also include struct, array, vector, etc. but these don't
|
||||
" benefit as much from having dedicated highlighting rules.
|
||||
syn keyword llvmType void half float double x86_fp80 fp128 ppc_fp128
|
||||
syn keyword llvmType label metadata x86_mmx
|
||||
syn keyword llvmType type label opaque token
|
||||
syn keyword llvmType void float double
|
||||
syn keyword llvmType x86_fp80 fp128 ppc_fp128
|
||||
syn keyword llvmType type label opaque
|
||||
syn match llvmType /\<i\d\+\>/
|
||||
|
||||
" Instructions.
|
||||
" The true and false tokens can be used for comparison opcodes, but it's
|
||||
" much more common for these tokens to be used for boolean constants.
|
||||
syn keyword llvmStatement add addrspacecast alloca and arcp ashr atomicrmw
|
||||
syn keyword llvmStatement bitcast br catchpad catchswitch catchret call
|
||||
syn keyword llvmStatement cleanuppad cleanupret cmpxchg eq exact extractelement
|
||||
syn keyword llvmStatement extractvalue fadd fast fcmp fdiv fence fmul fpext
|
||||
syn keyword llvmStatement fptosi fptoui fptrunc free frem fsub getelementptr
|
||||
syn keyword llvmStatement icmp inbounds indirectbr insertelement insertvalue
|
||||
syn keyword llvmStatement inttoptr invoke landingpad load lshr malloc max min
|
||||
syn keyword llvmStatement mul nand ne ninf nnan nsw nsz nuw oeq oge ogt ole
|
||||
syn keyword llvmStatement olt one or ord phi ptrtoint resume ret sdiv select
|
||||
syn keyword llvmStatement sext sge sgt shl shufflevector sitofp sle slt srem
|
||||
syn keyword llvmStatement store sub switch trunc udiv ueq uge ugt uitofp ule ult
|
||||
syn keyword llvmStatement umax umin une uno unreachable unwind urem va_arg
|
||||
syn keyword llvmStatement xchg xor zext
|
||||
syn keyword llvmStatement add fadd sub fsub mul fmul
|
||||
syn keyword llvmStatement sdiv udiv fdiv srem urem frem
|
||||
syn keyword llvmStatement and or xor
|
||||
syn keyword llvmStatement icmp fcmp
|
||||
syn keyword llvmStatement eq ne ugt uge ult ule sgt sge slt sle
|
||||
syn keyword llvmStatement oeq ogt oge olt ole one ord ueq ugt uge
|
||||
syn keyword llvmStatement ult ule une uno
|
||||
syn keyword llvmStatement nuw nsw exact inbounds
|
||||
syn keyword llvmStatement phi call select shl lshr ashr va_arg
|
||||
syn keyword llvmStatement trunc zext sext
|
||||
syn keyword llvmStatement fptrunc fpext fptoui fptosi uitofp sitofp
|
||||
syn keyword llvmStatement ptrtoint inttoptr bitcast
|
||||
syn keyword llvmStatement ret br indirectbr switch invoke unwind unreachable
|
||||
syn keyword llvmStatement malloc alloca free load store getelementptr
|
||||
syn keyword llvmStatement extractelement insertelement shufflevector
|
||||
syn keyword llvmStatement extractvalue insertvalue
|
||||
|
||||
" Keywords.
|
||||
syn keyword llvmKeyword
|
||||
\ acq_rel
|
||||
\ acquire
|
||||
\ addrspace
|
||||
\ alias
|
||||
\ align
|
||||
\ alignstack
|
||||
\ alwaysinline
|
||||
\ appending
|
||||
\ argmemonly
|
||||
\ arm_aapcscc
|
||||
\ arm_aapcs_vfpcc
|
||||
\ arm_apcscc
|
||||
\ asm
|
||||
\ atomic
|
||||
\ available_externally
|
||||
\ blockaddress
|
||||
\ builtin
|
||||
\ byval
|
||||
\ c
|
||||
\ catch
|
||||
\ caller
|
||||
\ cc
|
||||
\ ccc
|
||||
\ cleanup
|
||||
\ coldcc
|
||||
\ comdat
|
||||
\ common
|
||||
\ constant
|
||||
\ datalayout
|
||||
\ declare
|
||||
\ default
|
||||
\ define
|
||||
\ deplibs
|
||||
\ dereferenceable
|
||||
\ distinct
|
||||
\ dllexport
|
||||
\ dllimport
|
||||
\ dso_local
|
||||
\ dso_preemptable
|
||||
\ except
|
||||
\ external
|
||||
\ externally_initialized
|
||||
\ extern_weak
|
||||
\ fastcc
|
||||
\ filter
|
||||
\ from
|
||||
\ gc
|
||||
\ global
|
||||
\ hhvmcc
|
||||
\ hhvm_ccc
|
||||
\ hidden
|
||||
\ initialexec
|
||||
\ inlinehint
|
||||
\ inreg
|
||||
\ inteldialect
|
||||
\ intel_ocl_bicc
|
||||
\ internal
|
||||
\ linkonce
|
||||
\ linkonce_odr
|
||||
\ localdynamic
|
||||
\ localexec
|
||||
\ local_unnamed_addr
|
||||
\ minsize
|
||||
\ module
|
||||
\ monotonic
|
||||
\ msp430_intrcc
|
||||
\ musttail
|
||||
\ naked
|
||||
\ nest
|
||||
\ noalias
|
||||
\ nobuiltin
|
||||
\ nocapture
|
||||
\ noimplicitfloat
|
||||
\ noinline
|
||||
\ nonlazybind
|
||||
\ nonnull
|
||||
\ norecurse
|
||||
\ noredzone
|
||||
\ noreturn
|
||||
\ nounwind
|
||||
\ optnone
|
||||
\ optsize
|
||||
\ personality
|
||||
\ private
|
||||
\ protected
|
||||
\ ptx_device
|
||||
\ ptx_kernel
|
||||
\ readnone
|
||||
\ readonly
|
||||
\ release
|
||||
\ returned
|
||||
\ returns_twice
|
||||
\ sanitize_address
|
||||
\ sanitize_memory
|
||||
\ sanitize_thread
|
||||
\ section
|
||||
\ seq_cst
|
||||
\ sideeffect
|
||||
\ signext
|
||||
\ syncscope
|
||||
\ source_filename
|
||||
\ speculatable
|
||||
\ spir_func
|
||||
\ spir_kernel
|
||||
\ sret
|
||||
\ ssp
|
||||
\ sspreq
|
||||
\ sspstrong
|
||||
\ strictfp
|
||||
\ swiftcc
|
||||
\ tail
|
||||
\ target
|
||||
\ thread_local
|
||||
\ to
|
||||
\ triple
|
||||
\ unnamed_addr
|
||||
\ unordered
|
||||
\ uselistorder
|
||||
\ uselistorder_bb
|
||||
\ uwtable
|
||||
\ volatile
|
||||
\ weak
|
||||
\ weak_odr
|
||||
\ within
|
||||
\ writeonly
|
||||
\ x86_64_sysvcc
|
||||
\ win64cc
|
||||
\ x86_fastcallcc
|
||||
\ x86_stdcallcc
|
||||
\ x86_thiscallcc
|
||||
\ zeroext
|
||||
syn keyword llvmKeyword define declare global constant
|
||||
syn keyword llvmKeyword internal external private
|
||||
syn keyword llvmKeyword linkonce linkonce_odr weak weak_odr appending
|
||||
syn keyword llvmKeyword common extern_weak
|
||||
syn keyword llvmKeyword thread_local dllimport dllexport
|
||||
syn keyword llvmKeyword hidden protected default
|
||||
syn keyword llvmKeyword except deplibs
|
||||
syn keyword llvmKeyword volatile fastcc coldcc cc ccc
|
||||
syn keyword llvmKeyword x86_stdcallcc x86_fastcallcc
|
||||
syn keyword llvmKeyword ptx_kernel ptx_device
|
||||
syn keyword llvmKeyword signext zeroext inreg sret nounwind noreturn
|
||||
syn keyword llvmKeyword nocapture byval nest readnone readonly noalias uwtable
|
||||
syn keyword llvmKeyword inlinehint noinline alwaysinline optsize ssp sspreq
|
||||
syn keyword llvmKeyword noredzone noimplicitfloat naked alignstack
|
||||
syn keyword llvmKeyword module asm align tail to
|
||||
syn keyword llvmKeyword addrspace section alias sideeffect c gc
|
||||
syn keyword llvmKeyword target datalayout triple
|
||||
syn keyword llvmKeyword blockaddress
|
||||
|
||||
" Obsolete keywords.
|
||||
syn keyword llvmError getresult begin end
|
||||
|
||||
" Misc syntax.
|
||||
syn match llvmNoName /[%@!]\d\+\>/
|
||||
syn match llvmNoName /[%@]\d\+\>/
|
||||
syn match llvmNumber /-\?\<\d\+\>/
|
||||
syn match llvmFloat /-\?\<\d\+\.\d*\(e[+-]\d\+\)\?\>/
|
||||
syn match llvmFloat /\<0x\x\+\>/
|
||||
syn keyword llvmBoolean true false
|
||||
syn keyword llvmConstant zeroinitializer undef null none
|
||||
syn match llvmTodo /\(TODO\|FIXME\|XXX\)/
|
||||
syn match llvmComment /;.*$/ contains=llvmTodo
|
||||
syn keyword llvmConstant zeroinitializer undef null
|
||||
syn match llvmComment /;.*$/ contains=@Spell
|
||||
syn region llvmString start=/"/ skip=/\\"/ end=/"/
|
||||
syn match llvmLabel /[-a-zA-Z$._][-a-zA-Z$._0-9]*:/
|
||||
syn match llvmIdentifier /[%@][-a-zA-Z$._][-a-zA-Z$._0-9]*/
|
||||
|
||||
" Named metadata and specialized metadata keywords.
|
||||
syn match llvmIdentifier /![-a-zA-Z$._][-a-zA-Z$._0-9]*\ze\s*$/
|
||||
syn match llvmIdentifier /![-a-zA-Z$._][-a-zA-Z$._0-9]*\ze\s*[=!]/
|
||||
syn match llvmType /!\zs\a\+\ze\s*(/
|
||||
syn match llvmConstant /\<DW_TAG_[a-z_]\+\>/
|
||||
syn match llvmConstant /\<DW_ATE_[a-zA-Z_]\+\>/
|
||||
syn match llvmConstant /\<DW_OP_[a-zA-Z0-9_]\+\>/
|
||||
syn match llvmConstant /\<DW_LANG_[a-zA-Z0-9_]\+\>/
|
||||
syn match llvmConstant /\<DW_VIRTUALITY_[a-z_]\+\>/
|
||||
syn match llvmConstant /\<DIFlag[A-Za-z]\+\>/
|
||||
|
||||
" Syntax-highlight lit test commands and bug numbers.
|
||||
syn match llvmSpecialComment /;\s*PR\d*\s*$/
|
||||
syn match llvmSpecialComment /;\s*REQUIRES:.*$/
|
||||
" Syntax-highlight dejagnu test commands.
|
||||
syn match llvmSpecialComment /;\s*RUN:.*$/
|
||||
syn match llvmSpecialComment /;\s*CHECK:.*$/
|
||||
syn match llvmSpecialComment "\v;\s*CHECK-(NEXT|NOT|DAG|SAME|LABEL):.*$"
|
||||
syn match llvmSpecialComment /;\s*PR\d*\s*$/
|
||||
syn match llvmSpecialComment /;\s*END\.\s*$/
|
||||
syn match llvmSpecialComment /;\s*XFAIL:.*$/
|
||||
syn match llvmSpecialComment /;\s*XTARGET:.*$/
|
||||
|
||||
if v:version >= 508 || !exists('did_c_syn_inits')
|
||||
if v:version < 508
|
||||
if version >= 508 || !exists("did_c_syn_inits")
|
||||
if version < 508
|
||||
let did_c_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
@@ -216,7 +92,6 @@ if v:version >= 508 || !exists('did_c_syn_inits')
|
||||
HiLink llvmType Type
|
||||
HiLink llvmStatement Statement
|
||||
HiLink llvmNumber Number
|
||||
HiLink llvmTodo Todo
|
||||
HiLink llvmComment Comment
|
||||
HiLink llvmString String
|
||||
HiLink llvmLabel Label
|
||||
@@ -232,4 +107,4 @@ if v:version >= 508 || !exists('did_c_syn_inits')
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = 'llvm'
|
||||
let b:current_syntax = "llvm"
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
highlight default link requirementsComment Comment
|
||||
highlight default link requirementsVersion Identifier
|
||||
highlight default link requirementsOperator Operator
|
||||
|
||||
syntax region requirementsComment start='^\w*#' end='$' contains=@Spell
|
||||
syntax match requirementsVersion '\d\+\.\d\+\.\d\+\w*'
|
||||
syntax match requirementsOperator '=='
|
||||
@@ -1,10 +0,0 @@
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax include @sanitizerCppSyntax syntax/cpp.vim
|
||||
|
||||
syntax region sanitizerBacktraceRegion matchgroup=sanitizerBacktrace start='\s\+\zs#\d\+' end='(.*)' oneline
|
||||
syntax region sanitizerBacktraceRegion matchgroup=sanitizerBacktrace start='\s\+\zs#\d\+' end='\(\/.*\)\+:\d\+:\d\+ (.*)' oneline contains=@sanitizerCppSyntax
|
||||
|
||||
highlight default link sanitizerBacktrace Comment
|
||||
121
tasks.yaml
121
tasks.yaml
@@ -1,121 +0,0 @@
|
||||
---
|
||||
- set_fact:
|
||||
plugin_dir: '{{vim_config_dir}}/pack/managed'
|
||||
plugins:
|
||||
# ====================== Completion & Diagnostics ========================
|
||||
|
||||
# Conqueror of Completion
|
||||
- repo: neoclide/coc.nvim
|
||||
branch: release
|
||||
# Snippet collection
|
||||
- repo: honza/vim-snippets
|
||||
# Completion for vimscript
|
||||
- repo: vim-scripts/vimomni
|
||||
mode: opt
|
||||
# Version control differences in the sign column
|
||||
- repo: mhinz/vim-signify
|
||||
# Conflict marker utilities
|
||||
- repo: rhysd/conflict-marker.vim
|
||||
# Doxygen documentation stubs
|
||||
- repo: vim-scripts/DoxygenToolkit.vim
|
||||
mode: opt
|
||||
# Easy table manipulation
|
||||
- repo: dhruvasagar/vim-table-mode
|
||||
|
||||
# =========================== User Interface =============================
|
||||
|
||||
# Sanley numbered tabs in tabline
|
||||
- repo: mkitt/tabline.vim
|
||||
# Fuzzy finder
|
||||
# TODO: Still necessary?
|
||||
- repo: junegunn/fzf
|
||||
- repo: junegunn/fzf.vim
|
||||
# Replay macros with the enter key
|
||||
- repo: wincent/replay
|
||||
# Improved % matching
|
||||
- repo: andymass/vim-matchup
|
||||
# Forgot about this...
|
||||
- repo: kbenzie/note.vim
|
||||
# View term and hex colors
|
||||
- repo: guns/xterm-color-table.vim
|
||||
|
||||
# ============================== Text Objects ============================
|
||||
|
||||
# Library for creating text objects
|
||||
- repo: kana/vim-textobj-user
|
||||
# TODO: Doesn't work with nvim
|
||||
- repo: kana/vim-textobj-entire
|
||||
# Text object for URI's
|
||||
- repo: jceb/vim-textobj-uri
|
||||
# Text object for comment blocks
|
||||
- repo: glts/vim-textobj-comment
|
||||
# Text object for sentences
|
||||
- repo: reedes/vim-textobj-sentence
|
||||
# Text object & bindings for arguments
|
||||
- repo: PeterRincker/vim-argumentative
|
||||
|
||||
# ================================ Tim Pope ==============================
|
||||
|
||||
# Toggle comments
|
||||
- repo: tpope/vim-commentary
|
||||
# Edit delimiters
|
||||
- repo: tpope/vim-surround
|
||||
# Better dot command
|
||||
- repo: tpope/vim-repeat
|
||||
# Git wrapper
|
||||
- repo: tpope/vim-fugitive
|
||||
# Unix command warppers
|
||||
- repo: tpope/vim-eunuch
|
||||
# Improved directory browser
|
||||
- repo: tpope/vim-vinegar
|
||||
# PascalCase to under_score to camelCase
|
||||
# TODO: Copy the good bit remove this plugin
|
||||
- repo: tpope/vim-abolish
|
||||
# Mappings for pairs of tasks
|
||||
- repo: tpope/vim-unimpaired
|
||||
# Sane date manipulation
|
||||
- repo: tpope/vim-speeddating
|
||||
# Wisely add end{if,function} fork with cmake support
|
||||
- repo: godbyk/vim-endwise
|
||||
branch: patch-1
|
||||
# Text object & formatting for json
|
||||
- repo: tpope/vim-jdaddy
|
||||
# Granular project configuration
|
||||
- repo: tpope/vim-projectionist
|
||||
|
||||
# ================================ tmux ==================================
|
||||
|
||||
# Seemless vim/tmux pane navigation
|
||||
- repo: 'christoomey/vim-tmux-navigator'
|
||||
mode: opt
|
||||
# Enable focus events when in tmux session
|
||||
- repo: 'tmux-plugins/vim-tmux-focus-events'
|
||||
mode: opt
|
||||
|
||||
# =============================== Syntax =================================
|
||||
|
||||
- repo: editorconfig/editorconfig-vim
|
||||
- repo: kalekundert/vim-coiled-snake
|
||||
- repo: kbenzie/vim-spirv
|
||||
- repo: rperier/vim-cmake-syntax
|
||||
- repo: tikhomirov/vim-glsl
|
||||
- repo: beyondmarc/hlsl.vim
|
||||
- repo: frasercrmck/opencl.vim
|
||||
- repo: asciidoc/vim-asciidoc
|
||||
- repo: mustache/vim-mustache-handlebars
|
||||
- repo: joshglendenning/vim-caddyfile
|
||||
- repo: kbenzie/vim-khr
|
||||
- repo: jrozner/vim-antlr
|
||||
- repo: sophacles/vim-bundle-mako
|
||||
- repo: Glench/Vim-Jinja2-Syntax
|
||||
|
||||
- name: remove minpac directory
|
||||
when: ansible_os_family != "Windows"
|
||||
file:
|
||||
path: '{{vim_config_dir}}/pack/minpac'
|
||||
state: absent
|
||||
- name: remove minpac directory
|
||||
when: ansible_os_family == "Windows"
|
||||
win_file:
|
||||
path: '{{vim_config_dir}}/pack/minpac'
|
||||
state: absent
|
||||
@@ -1,15 +0,0 @@
|
||||
# TODO
|
||||
|
||||
## High
|
||||
|
||||
* [ ]
|
||||
|
||||
## Normal
|
||||
|
||||
* [ ]
|
||||
|
||||
## Low
|
||||
|
||||
* [ ]
|
||||
|
||||
<!-- vim: nospell textwidth=0
|
||||
262
vimrc
262
vimrc
@@ -11,106 +11,182 @@ if has('syntax') && !exists('g:syntax_on')
|
||||
syntax enable
|
||||
endif
|
||||
|
||||
" Append work config to runtimepath and packpath.
|
||||
set runtimepath+=~/.config/work
|
||||
set packpath+=~/.config/work
|
||||
" Plugins
|
||||
call plug#begin('~/.vim/bundle')
|
||||
|
||||
" Disable unused providers
|
||||
let g:loaded_node_provider = 0
|
||||
let g:loaded_perl_provider = 0
|
||||
let g:loaded_ruby_provider = 0
|
||||
" Load local plugins first, allows local dev whilst also being installed.
|
||||
if filereadable(expand('~/.vim/local.vim'))
|
||||
source ~/.vim/local.vim
|
||||
endif
|
||||
|
||||
" Markdown fenced code block languages
|
||||
" vim-airline - improved status bar
|
||||
" TODO: Get rid of airline and roll your own
|
||||
Plug 'vim-airline/vim-airline'
|
||||
let g:airline#extensions#branch#enabled = 0
|
||||
let g:airline#extensions#hunks#enabled = 0
|
||||
for s:setting in ['left_sep', 'right_sep', 'section_error', 'section_warning']
|
||||
exec 'let g:airline_'.s:setting.' = ""'
|
||||
endfor
|
||||
" tabline.vim - sanely numbered tabs
|
||||
Plug 'mkitt/tabline.vim'
|
||||
|
||||
" YouCompleteMe
|
||||
" TODO: Try out neovim completion plugins to see if they are better
|
||||
if !platform#is_windows()
|
||||
" YouCompleteMe with parameter completion
|
||||
Plug 'oblitum/YouCompleteMe', {'do': './install.py --clang-completer'}
|
||||
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
|
||||
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
|
||||
let g:ycm_min_num_of_chars_for_completion = 1
|
||||
let g:ycm_complete_in_comments = 1
|
||||
let g:ycm_complete_in_strings = 1
|
||||
let g:ycm_collect_identifiers_from_comments_and_strings = 1
|
||||
let g:ycm_seed_identifiers_with_syntax = 1
|
||||
let g:ycm_autoclose_preview_window_after_insertion = 1
|
||||
let g:ycm_always_populate_location_list = 1
|
||||
let g:ycm_error_symbol = '▸'
|
||||
let g:ycm_warning_symbol = '▸'
|
||||
let g:ycm_goto_buffer_command = 'horizontal-split'
|
||||
endif
|
||||
if has('python')
|
||||
" ultisnips - snippet engine
|
||||
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
||||
endif
|
||||
" vim-cmake-completion - completion & help
|
||||
Plug 'kbenzie/vim-cmake-completion', {'for': ['cmake']}
|
||||
" vimomni - Completion for vimscript
|
||||
Plug 'vim-scripts/vimomni', {'for': ['vim']}
|
||||
|
||||
" ale - Asynchronous Lint Engine
|
||||
Plug 'w0rp/ale'
|
||||
let g:ale_sign_error = '▸'
|
||||
let g:ale_sign_warning = '▸'
|
||||
let g:ale_echo_msg_format = '[%linter%] %s (%code%)'
|
||||
let g:ale_linters = {'c': [], 'cpp': []}
|
||||
hi link ALEError SyntasticError
|
||||
hi link ALEWarning SyntasticWarning
|
||||
hi link ALEErrorSign SyntasticErrorSign
|
||||
hi link ALEWarningSign SyntasticWarningSign
|
||||
|
||||
" git diff in the sign column
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
if exists('&signcolumn')
|
||||
set signcolumn=yes
|
||||
else
|
||||
let g:gitgutter_sign_column_always = 1
|
||||
endif
|
||||
|
||||
if has('python')
|
||||
" format.vim - format with text objects
|
||||
Plug 'git@bitbucket.org:infektor/format.vim.git'
|
||||
endif
|
||||
|
||||
" vim-textobj-user - library for creating text objects
|
||||
Plug 'kana/vim-textobj-user'
|
||||
" vim-textobj-entire - Entire file text object
|
||||
let g:textobj_entire_no_default_key_mappings = 1
|
||||
Plug 'kana/vim-textobj-entire'
|
||||
xmap a% <Plug>(textobj-entire-a)
|
||||
omap a% <Plug>(textobj-entire-a)
|
||||
xmap i% <Plug>(textobj-entire-i)
|
||||
omap i% <Plug>(textobj-entire-i)
|
||||
" vim-textobj-parameter - Parameter text object
|
||||
Plug 'sgur/vim-textobj-parameter'
|
||||
" vim-textobj-uri - URI text object
|
||||
Plug 'jceb/vim-textobj-uri'
|
||||
" vim-textobj-comment - Comment text object
|
||||
Plug 'glts/vim-textobj-comment'
|
||||
omap a/ <Plug>(textobj-comment-a)
|
||||
xmap a/ <Plug>(textobj-comment-a)
|
||||
omap i/ <Plug>(textobj-comment-i)
|
||||
xmap i/ <Plug>(textobj-comment-i)
|
||||
" vim-textobj-sentence - Improved sentence text object
|
||||
Plug 'reedes/vim-textobj-sentence'
|
||||
|
||||
" vim-commentary - toggle comments
|
||||
Plug 'tpope/vim-commentary'
|
||||
" vim-surround - edit delimiters
|
||||
Plug 'tpope/vim-surround'
|
||||
" vim-repeat - better dot command
|
||||
Plug 'tpope/vim-repeat'
|
||||
" vim-fugitive - git wrapper
|
||||
Plug 'tpope/vim-fugitive'
|
||||
" vim-eunuch - unix command warppers
|
||||
Plug 'tpope/vim-eunuch'
|
||||
" vim-vinegar - improved directory browser
|
||||
Plug 'tpope/vim-vinegar'
|
||||
" vim-abolish - CamelCase to under_score to mixedCase
|
||||
" TODO: Copy the good bit remove this plugin
|
||||
Plug 'tpope/vim-abolish'
|
||||
" vim-unimpaired - for pairs of tasks
|
||||
Plug 'tpope/vim-unimpaired'
|
||||
" vim-speeddating - sane date manipulation
|
||||
Plug 'tpope/vim-speeddating'
|
||||
" vim-endwise - wisely add end{if,function}, fork with cmake support
|
||||
Plug 'godbyk/vim-endwise', {'branch': 'patch-1'}
|
||||
" vim-jdaddy - text object & formatting for json
|
||||
Plug 'tpope/vim-jdaddy'
|
||||
" vim-projectionist - granular project configuration
|
||||
Plug 'tpope/vim-projectionist'
|
||||
|
||||
" fzf.vim - Fuzzy finder
|
||||
if !platform#is_windows()
|
||||
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all --no-update-rc'}
|
||||
Plug 'junegunn/fzf.vim'
|
||||
let g:fzf_action = {
|
||||
\ 'ctrl-t': 'tab split',
|
||||
\ 'ctrl-s': 'split',
|
||||
\ 'ctrl-v': 'vsplit'
|
||||
\ }
|
||||
endif
|
||||
|
||||
Plug 'kbenzie/note.vim'
|
||||
let g:note_directory = '~/Sync/Notes'
|
||||
|
||||
if !platform#is_windows()
|
||||
" Seemless vim/tmux pane navigation
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
" Enable focus events when in tmux session
|
||||
Plug 'tmux-plugins/vim-tmux-focus-events'
|
||||
endif
|
||||
|
||||
" replay macros with the enter key
|
||||
Plug 'wincent/replay'
|
||||
" vim-matchit - Improved % matching
|
||||
Plug 'andymass/vim-matchup'
|
||||
|
||||
" vim-table-mode - Easy table manipulation
|
||||
Plug 'dhruvasagar/vim-table-mode'
|
||||
let g:table_mode_map_prefix = '<leader>t'
|
||||
let g:table_mode_toggle_map = 'M'
|
||||
|
||||
" DoxygenToolkit.vim - documentation stubs
|
||||
Plug 'vim-scripts/DoxygenToolkit.vim', {'for': ['cpp', 'c']}
|
||||
let g:DoxygenToolkit_commentType = 'C++'
|
||||
|
||||
" markdown fenced code block languages
|
||||
let g:markdown_fenced_languages =
|
||||
\ ['cpp', 'c', 'cmake', 'console', 'sh', 'vim', 'python', 'yaml']
|
||||
|
||||
" reStructedText enable code styles
|
||||
let g:rst_style = 1
|
||||
" reStructuredText code block languages
|
||||
let g:rst_syntax_code_list = {
|
||||
\ 'vim': ['vim'],
|
||||
\ 'java': ['java'],
|
||||
\ 'c': ['c'],
|
||||
\ 'cpp': ['cpp', 'c++'],
|
||||
\ 'console': ['console'],
|
||||
\ 'python': ['python']
|
||||
\ }
|
||||
\ ['cpp', 'c', 'cmake', 'sh', 'vim', 'python', 'yaml']
|
||||
|
||||
" Enable builtin syntax folding
|
||||
let g:xml_syntax_folding = 1
|
||||
let g:sh_fold_enabled = 1
|
||||
|
||||
if wsl#isDetected()
|
||||
" Make gx work in WSL
|
||||
let g:netrw_browsex_viewer='cmd.exe /C start'
|
||||
endif
|
||||
" xterm-color-table.vim - view term and hex colors
|
||||
Plug 'guns/xterm-color-table.vim'
|
||||
|
||||
if tmux#inSession()
|
||||
" Seemless vim/tmux pane navigation
|
||||
packadd vim-tmux-navigator
|
||||
let g:tmux_navigator_no_mappings = 1
|
||||
" Enable focus events when in tmux session
|
||||
packadd vim-tmux-focus-events
|
||||
endif
|
||||
|
||||
" coc.nvim
|
||||
let g:coc_global_extensions = [
|
||||
\ 'coc-clangd',
|
||||
\ 'coc-cmake',
|
||||
\ 'coc-css',
|
||||
\ 'coc-docker',
|
||||
\ 'coc-html',
|
||||
\ 'coc-jedi',
|
||||
\ 'coc-json',
|
||||
\ 'coc-marketplace',
|
||||
\ 'coc-pyright',
|
||||
\ 'coc-snippets',
|
||||
\ 'coc-vimlsp',
|
||||
\ 'coc-yaml',
|
||||
\]
|
||||
if has("win32")
|
||||
let g:coc_global_extensions += [
|
||||
\ 'coc-powershell'
|
||||
\]
|
||||
endif
|
||||
let g:coc_default_semantic_highlight_groups = 0
|
||||
|
||||
" vim-signify
|
||||
let g:signify_sign_change = '~'
|
||||
|
||||
" vim-textobj-entire
|
||||
let g:textobj_entire_no_default_key_mappings = 1
|
||||
xmap a% <Plug>(textobj-entire-a)
|
||||
omap a% <Plug>(textobj-entire-a)
|
||||
xmap i% <Plug>(textobj-entire-i)
|
||||
omap i% <Plug>(textobj-entire-i)
|
||||
" vim-textobj-comment
|
||||
omap a/ <Plug>(textobj-comment-a)
|
||||
xmap a/ <Plug>(textobj-comment-a)
|
||||
omap i/ <Plug>(textobj-comment-i)
|
||||
xmap i/ <Plug>(textobj-comment-i)
|
||||
|
||||
" fzf.vim
|
||||
let g:fzf_action = {
|
||||
\ 'ctrl-t': 'tab split',
|
||||
\ 'ctrl-s': 'split',
|
||||
\ 'ctrl-v': 'vsplit'
|
||||
\ }
|
||||
|
||||
" note.vim
|
||||
let g:note_directory = '~/Sync/Notes'
|
||||
|
||||
" vim-matchit
|
||||
let g:matchup_matchparen_offscreen = {'method': 'status_manual'}
|
||||
|
||||
" vim-table-mode
|
||||
let g:table_mode_map_prefix = '<leader>t'
|
||||
let g:table_mode_toggle_map = 'M'
|
||||
|
||||
" DoxygenToolkit.vim
|
||||
let g:DoxygenToolkit_commentType = 'C++'
|
||||
|
||||
" vim-spirv
|
||||
let g:spirv_enable_current_id = 0
|
||||
let g:spirv_enable_extinst_error = 0
|
||||
" SPIR-V syntax
|
||||
Plug 'kbenzie/vim-spirv'
|
||||
let g:spirv_current_id_highlight = 'ctermbg=234, guibg=#1c1c1c'
|
||||
|
||||
" CMake, GLSL, HLSL, OpenCL C syntax
|
||||
Plug 'rperier/vim-cmake-syntax'
|
||||
Plug 'tikhomirov/vim-glsl'
|
||||
Plug 'beyondmarc/hlsl.vim'
|
||||
Plug 'frasercrmck/opencl.vim'
|
||||
Plug 'asciidoc/vim-asciidoc'
|
||||
Plug 'mustache/vim-mustache-handlebars'
|
||||
Plug 'joshglendenning/vim-caddyfile'
|
||||
Plug 'kbenzie/vim-khr'
|
||||
|
||||
call plug#end()
|
||||
|
||||
Reference in New Issue
Block a user