helm swoop is very good, it could show me the lines matching some word, but I need to edit the lines around the matching line. How to do that? I can only view the them. I tried to use mouse to position the line I want to modify, but it doesn't work.
For this purpose there is
helm-resume. It allows you to 'continue' with the previous helm session.
I.e, your flow would be as following:
1. Fire up helm session .
2. Select the item to edit. Press RET to jump to that place to edit it..
helm-resume (C-c h b) and you should be back in your previous session.
You can tie it to some more convienient short cut like:
(global-set-key (kbd "<f5>") 'helm-resume)
There is also a detailed explanation about helm-resume and helm in general: http://tuhdo.github.io/helm-intro.html#ID-9d698347-33ee-447d-9fd1-eb01e9770dbb
Please let me know if you have further questions.
You should use Helm-Swoop's Multiline Behavior. Basically you specify the number using a prefix argument (C-u n M-x helm-swoop )of context lines to use in helm swoop buffer. Then for the lines you want to modify you enter to edit mode using C-c C-e from the minibuffer.
PS: I'm rephrasing HeyYO's comment, as a proper answer as I share his solution.