You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Wilfred, thx for your work! Love the UI of *deadgrep* buffer.
I have a idea of enhancing and want to share it with you:
let's assume that we have a sample file "sample.js":
constA=()=>{console.log("I'm function A");};constB=()=>{console.log("I'm function B");};constC=()=>{console.log("I'm function C");};
I use deadgrep to search "console" and the result will be:
Search term: function change
Search type: string words regexp
Case: smart sensitive ignore
Context: none before after
Directory: ~/XXXX
Files: all type glob
sample.js
2 console.log("I'm function A");
6 console.log("I'm function B");
10 console.log("I'm function C");
Then I change both "before" and "after" context to 1, and I will get:
Search term: function change
Search type: string words regexp
Case: smart sensitive ignore
Context: none before:1 after:1
Directory: ~/XXXX
Files: all type glob
sample.js
1 const A = () => {
2 console.log("I'm function A");
3 };
5 const B = () => {
6 console.log("I'm function B");
7 };
9 const C = () => {
10 console.log("I'm function C");
11 };
It's hard to see the boundary of different result and I think a divider would help:
Search term: function change
Search type: string words regexp
Case: smart sensitive ignore
Context: none before:1 after:1
Directory: ~/XXXX
Files: all type glob
sample.js
1 const A = () => {
2 console.log("I'm function A");
3 };
...
5 const B = () => {
6 console.log("I'm function B");
7 };
...
9 const C = () => {
10 console.log("I'm function C");
11 };
To add a divider, I can see results with context in same file more clearly. What's your opinion?
M-x deadgrep-debug:
About your environment:
Platform: darwin
Emacs version: 26.1
Command: nil
Initial output from ripgrep:
nil
ripgrep version: 0.9.0.
The text was updated successfully, but these errors were encountered:
I think that's a good idea! Here's an example of the output:
Context: none before:1 after:2
Directory: ~/projects/deadgrep/
Files: all type glob
deadgrep.el
121
122 (defun deadgrep--insert-output (output &optional finished)
123 "Propertize OUTPUT from rigrep and write to the current buffer."
124 ;; If we had an unfinished line from our last call, include that.
---
196
197 (defun deadgrep--process-sentinel (process output)
198 "Update the deadgrep buffer associated with PROCESS as complete."
199 (let ((buffer (process-buffer process)))
---
218
219 (defun deadgrep--process-filter (process output)
220 ;; Searches may see a lot of output, but it's really useful to have
221 ;; a snippet of output when debugging. Store the first output received.
Hi Wilfred, thx for your work! Love the UI of *deadgrep* buffer.
I have a idea of enhancing and want to share it with you:
let's assume that we have a sample file "sample.js":
I use deadgrep to search "console" and the result will be:
Then I change both "before" and "after" context to 1, and I will get:
It's hard to see the boundary of different result and I think a divider would help:
To add a divider, I can see results with context in same file more clearly. What's your opinion?
M-x deadgrep-debug
:ripgrep
version:0.9.0
.The text was updated successfully, but these errors were encountered: