1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-05 08:08:02 +00:00

Add Searching For Hex Digits as a vim til.

This commit is contained in:
jbranchaud
2015-10-13 08:26:42 -05:00
parent 5f91ab0a44
commit 9bd193b141
2 changed files with 19 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
# Searching For Hex Digits
If you want to find sequences of hex digits (`A-F`, `a-f` and `0-9`) in a
search, you can hack together something like:
```
/[A-Fa-f0-9]\+
```
This is a bit verbose, though. Vim has a number of built in character
classes that can be referenced in searches and substitutions. For hex
digits, there is `\x`. Using this, the search above can be achieved with:
```
/\x\+
```
See `:h \x` for more details and other character classes.