dblume commited on 2021-12-10 10:26:02
Showing 1 changed files, with 10 additions and 7 deletions.
... | ... |
@@ -18,19 +18,22 @@ You can clone from the origin with: |
18 | 18 |
|
19 | 19 |
### tmux vim entr |
20 | 20 |
|
21 |
-Create two panes in tmux, run vim in one, and run entr in the other with a command like: |
|
21 |
+Create two panes in tmux, run vim in one, and run entr in the other. You probably |
|
22 |
+only need the `git ls-files` for `entr`, but I provide a bash command group with |
|
23 |
+`find` here so I can easily copy and change it as needed. |
|
22 | 24 |
|
23 |
- find . -type f \( -name \*.[ch]pp -or -name \*.[ch] \) | \ |
|
25 |
+ { git ls-files && find . -type f -regex '.*\.\(cfg\|local\)'; } | \ |
|
24 | 26 |
entr -c sh -c 'ctags -R *; make -j$(nproc) && valgrind --leak-check=yes product/testcode' |
25 | 27 |
|
26 |
-or, to compile with debug info and run in gdb: |
|
28 |
+`find` could also have been `find . -type f \( -name \*.cfg -or -name \*.local \)`. |
|
27 | 29 |
|
28 |
- find . -type f \( -name \*.[ch]pp -or -name \*.[ch] \) | \ |
|
29 |
- entr -c sh -c 'ctags -R *; make debug -j$(nproc) && gdb product/testcode' |
|
30 |
+To compile with debug info and run in gdb: |
|
30 | 31 |
|
31 |
-Tips: you can also run ctags and cscope, and in vim you can grep and use the QuickFix window with commands like... |
|
32 |
+ ... | entr -c sh -c 'ctags -R *; make debug -j$(nproc) && gdb product/testcode' |
|
32 | 33 |
|
33 |
- :grep -rI searchterm . |
|
34 |
+Tip: In vim you can grep and use the QuickFix window with commands like... |
|
35 |
+ |
|
36 |
+ :grep -rI --exclude=tags --exclude=cscope.* --exclude-dir=obj searchterm . |
|
34 | 37 |
:cw |
35 | 38 |
|
36 | 39 |
See [this QuickFix tip for sorting results by filename](http://git.dlma.com/dotfiles.git/commit/0cb566c53caf931c8b3f423dcfded4660b220cbb). |
37 | 40 |