Closed renard closed 11 years ago
You mean something like adding an indicator to "line 20" that will only show when your window is actually scrolled in a way that line 20 is visible? And it always points at line 20.
If that's what you want, that's currently not possible, but it's pretty easy to add. I can also add support for the built-in bitmaps.
Yes this is it.
I can be an enhancement feature.
Ok, you can now add non-relative indicators with new keyword :relative
(defaults to t). For non-relative indicators you can also specify the bitmap using :bitmap
. See variable fringe-bitmaps
for a list of built-in bitmaps.
;; create an arrow indicator at line 20
(ind-create-indicator-at-line 20 :relative nil :bitmap 'left-arrow :managed t)
These are updated using function ind-update-absolute
if you manage your own lists of indicators.
YEAH That rocks!
May I gonna abuse a little, anyway specifying 'left-fringe
or 'right-fringe
may also be a good update.
By the way I added indicators.el
to el-get
package manager (see https://github.com/dimitri/el-get/pull/1073).
Hm, I can do that for the non-relative indicators. With the relative indicators it's a bit more difficult since the bitmaps are constructed on-the-fly. Well, I guess simply splitting them into two lists and processing each separately would work. Will check it out.
Thanks for adding it to el-get :O I guess I should also register my other packages there (I only put stuff on melpa).
Done. Use :fringe 'left-fringe
or ':fringe 'right-fringe` to specify the fringe (works with both absolute and relative types)
Nice!
Thanks of the quick fixes.
Hah, thank you. I don't even know why I wrote this in the first play, but the fact you found this not day after I uploaded it motivated me a lot to improve it :P
But seriously, I don't even have a use for this :D
I'm gonna close this issue, if you have more ideas/suggestions/problems start new issue for each one so we have some system in it.
Thanks again.
I do like something to help remind me where a file has been modified, such as highlight-changes-mode
.
The problem with that mode is that buffer overlays are modified and may lower the contrast ratio between 2 colors.
Having such an information in the fringe is the perfect alternative.
Here is a quick and dirty example of indicators.el: https://github.com/renard/indicate-change
Enjoy.
Sweet! I'll add it to readme so people will check it out. Simple and useful :P
By the way I noticed that every time you create a new absolute mark, a "Marker set" message is displayed.
is it mandatory for you to set a marker?
This is a bit annoying since it pollutes the Messages buffer and erase any mini buffer messages (specially if you work with el-doc).
This is a nice tool any very easy to use.
Is it possible to attach an indicator to line in a non relative way? For example I would like to add indicators to show where buffer has been modified. Thus is may be useful to link the indicator non relatively.