-
Uses native vim regexes (which are slightly different from the regexes used by grep, ack, ag, etc) so the patterns are the same as with vim's within-file search patterns.
You can do a normal within-file search first, then re-use the same pattern to
| def get_caller(depth: int = 1): | |
| """Returns the caller frame at the given depth.""" | |
| import inspect | |
| from collections import namedtuple | |
| frame = inspect.currentframe() | |
| assert frame is not None | |
| if frame.f_back is None: |
Uses native vim regexes (which are slightly different from the regexes used by grep, ack, ag, etc) so the patterns are the same as with vim's within-file search patterns.
You can do a normal within-file search first, then re-use the same pattern to
| #!/usr/bin/env python | |
| # liuw | |
| # Nasty hack to raise exception for other threads | |
| import ctypes # Calm down, this has become standard library since 2.5 | |
| import threading | |
| import time | |
| NULL = 0 |