[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] RFC: limiting the amount of position history
From: |
David Niklas |
Subject: |
[Nano-devel] RFC: limiting the amount of position history |
Date: |
Sat, 9 Jan 2016 13:11:36 -0500 |
> <snip>
> Apparently nano limits the search and replace histories to
> 100 items each. But the file-positions history grows without
> end. The oldest entry in mine dates from roughly August last
> year That isn't useful.
>
> So I propose to limit the number of entries in the positions-
> history file to 100 or 200, or at the very most 500.
That sounds great, but you run into two problems.
1. What gets deleted? Oldest entry? I might want that entry.
2. If you did it statistically, most used file, then nano would become a
bit creepy IMHO.
I think that you should mention this in nano docs, even add an option
maybe.
It's a good idea, most editors implement a recently used list of sorts,
but IMHO, it's hard to get right. Mine will grow till I use nano to
shorten it.
A great idea would be to (optionally) compress the file, say lzo, gz,
etc.
% ls -l .nano/filepos_history
12504
% time lzop -o file.lzo .nano/filepos_history
real 0m0.002s
user 0m0.000s
sys 0m0.000s
% ls -l file.lzo
5080
% gzip -k .nano/filepos_history
real 0m0.015s
user 0m0.000s
sys 0m0.000s
% ls -l .nano/filepos_history.gz
3251
% lz4 .nano/filepos_history
real 0m0.001s
user 0m0.000s
sys 0m0.000s
% ls -l .nano/filepos_history.lz4
5242
% lzip .nano/filepos_history
real 0m0.020s
user 0m0.007s
sys 0m0.000s
% ls .nano/filepos_history.lz
3099
Sincerely, David
- [Nano-devel] RFC: limiting the amount of position history,
David Niklas <=