It would be awesome, if the plugin offer a way to delete every n line. I've got regular cases were I need to delete just every second line and somehow I miss this feature. Example:
``` line 1 line 2 line 3 line 4 line 5 ```
would become
``` line 1 line 3 line 5 ```
As an alternative you could do that in a "custom command", like maybe a python command (untested):
```bash python -c \ 'import sys; sys.stdout.write("\n".join([l for l in sys.stdin.readlines() if l % 2]))' ```
The same way as @codebrainz's suggestion, you can get this to work easily with `sed`: ```shell sed -n '1~2p' ``` Replace `1` with the starting line, and `2` with the step you want -- here it does exactly what you asked for, print every second line starting at line 1, effectively giving every odd line.
Yepp... As all of the options offered by the plugin there is some sed/awk/* way to do it ;) But it's having an advantage: All in one place and "build in" ;)
@frlan: I implemented the feature in PR #860. As I am not the author of the plugin the maintainer is up to decide if he wants to accept it or not.
Closed #772.
github-comments@lists.geany.org