mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
Add Searching For Hex Digits as a vim til.
This commit is contained in:
@@ -22,7 +22,6 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
|||||||
- [Rails](#rails)
|
- [Rails](#rails)
|
||||||
- [Ruby](#ruby)
|
- [Ruby](#ruby)
|
||||||
- [tmux](#tmux)
|
- [tmux](#tmux)
|
||||||
- [Unix](#unix)
|
|
||||||
- [Vim](#vim)
|
- [Vim](#vim)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -210,7 +209,6 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
|||||||
- [Saying Yes](unix/saying-yes.md)
|
- [Saying Yes](unix/saying-yes.md)
|
||||||
- [Search History](unix/search-history.md)
|
- [Search History](unix/search-history.md)
|
||||||
- [Securely Remove Files](unix/securely-remove-files.md)
|
- [Securely Remove Files](unix/securely-remove-files.md)
|
||||||
- [SSH With A Specific Key](unix/ssh-with-a-specific-key.md)
|
|
||||||
- [SSH With Port Forwarding](unix/ssh-with-port-forwarding.md)
|
- [SSH With Port Forwarding](unix/ssh-with-port-forwarding.md)
|
||||||
- [Switch Versions of a Brew Formula](unix/switch-versions-of-a-brew-formula.md)
|
- [Switch Versions of a Brew Formula](unix/switch-versions-of-a-brew-formula.md)
|
||||||
- [Watch The Difference](unix/watch-the-difference.md)
|
- [Watch The Difference](unix/watch-the-difference.md)
|
||||||
@@ -265,6 +263,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
|||||||
- [Repeating Characters](vim/repeating-characters.md)
|
- [Repeating Characters](vim/repeating-characters.md)
|
||||||
- [Replace A Character](vim/replace-a-character.md)
|
- [Replace A Character](vim/replace-a-character.md)
|
||||||
- [Scrolling Relative to the Window](vim/scrolling-relative-to-the-window.md)
|
- [Scrolling Relative to the Window](vim/scrolling-relative-to-the-window.md)
|
||||||
|
- [Searching For Hex Digits](vim/searching-for-hex-digits.md)
|
||||||
- [Set End Of Line Markers](vim/set-end-of-line-markers.md)
|
- [Set End Of Line Markers](vim/set-end-of-line-markers.md)
|
||||||
- [Set Your Color Scheme](vim/set-your-color-scheme.md)
|
- [Set Your Color Scheme](vim/set-your-color-scheme.md)
|
||||||
- [Split Different](vim/split-different.md)
|
- [Split Different](vim/split-different.md)
|
||||||
|
|||||||
18
vim/searching-for-hex-digits.md
Normal file
18
vim/searching-for-hex-digits.md
Normal 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.
|
||||||
Reference in New Issue
Block a user