helix icon indicating copy to clipboard operation
helix copied to clipboard

Minimap and Scrollbar

Open kuanyinglu opened this issue 3 years ago • 21 comments

Heard about Helix in the past, but it's been a while so today I looked at all the progress made. I'm really starting to like this editor! One thing I didn't find in my quick search is minimap and scrollbar. I don't really use minimap, but I know some people like them.

I'm really just looking looking forward to a scroll bar with features like this plugin in Neovim. https://github.com/petertriho/nvim-scrollbar It highlights a rough location of where diagnostics and searches. One feature I find myself using a lot in other editors is looking for words under cursor, and think this could be really useful.

Wondering what people think about this feature.

kuanyinglu avatar Apr 21 '22 03:04 kuanyinglu

I would like a scroll bar just to see where I am in the file and the LSP errors, I would not want it to be used with a mouse like a GUI application! No need for a minimap, that is bloat.

I am a bit worried about feature creep happening in Helix, it would be really bad if it started to turn into VS Code! :) Nearly every feature I ever wanted is already a pull request, just waiting for those precious nuggets of code to drop one by one...

David-Else avatar Apr 21 '22 10:04 David-Else

Scrollbar seems doable and I would argue belongs in the core. Minimap is probably very hard to accomplish without a GUI though and I don't know how I would feel about it being in the core.

the-mikedavis avatar Apr 21 '22 17:04 the-mikedavis

Scrollbar seems doable and I would argue belongs in the core. Minimap is probably very hard to accomplish without a GUI though and I don't know how I would feel about it being in the core.

I personally don't use minimaps, but here's one I saw for vim https://reposhub.com/rust/command-line/wfxr-minimap-vim.html which in turn uses a rust proj https://github.com/wfxr/code-minimap

slinlee avatar Apr 21 '22 18:04 slinlee

There was also a discussion on this a while ago: https://matrix.to/#/!zMuVRxoqjyxyjSEBXc:matrix.org/$_yZ9RkhI4rNEbJxsdZ9WhYTNvPiCdsUqts-rQb5yEkQ?via=matrix.org&via=tchncs.de&via=mozilla.org

kirawi avatar Apr 21 '22 21:04 kirawi

Would be interesting to have a scrollbar + minimap (with the colored find), but I feel like it is kinda wasteful for the space on terminals like 80x24 (I still do that).

pickfire avatar Apr 23 '22 10:04 pickfire

I feel like minimaps would be quite wasteful, but scrollbars (especially if they work with the mouse) would be greatly appreciated, if only to get a sense of where you are in the document.

cor avatar Oct 19 '22 20:10 cor

Now that we have a scrollbar for the <space>k popups, it should be pretty simple to add this to the main editor right?

image

cor avatar Nov 17 '22 12:11 cor

I think the scrollabar is relatively much more universally useful compared to minimap, but I did use minimap.vim (or something like it) in NeoVim in the past, enjoyed it and would love to have it back. The space required for it is a personal preference - for me horizontal space is not an issue at all because I don't tend to split the view into any sort of columns. But it definitely would be an optional thing that only some people would enjoy and enable.

dpc avatar Jan 05 '24 21:01 dpc

I would expect such thing to be a plugin since it's basically a glorified symbols map, of which a similar feature is being considered.

gyreas avatar Jan 06 '24 17:01 gyreas

@gyreas scrollbars are not plugins

DoctorRyner avatar Mar 05 '24 10:03 DoctorRyner

I do hope to see somekind of scrollbar/minimap that shows me the places where I have last modified the file.

I work on large C++ codebases and getting lost in the codebase is a real thing. Having any kind of indicator where I last modified code, theres git changes, or anything else would be very helpful.

Akselmo avatar Jun 07 '24 08:06 Akselmo

BTW. Part of the reason I'm using Helix is that I don't want to be dealing with plugins to get a smooth full featured code editing experience in the CLI.

Obviously it's impossible to throw in every feature every user desires into the same codebase. So plugins are great, but come with many downsides: it's a hassle to find them, their quality varies as they don't get the same amount of testing, their documentation is often lacking and lagging, they get broken as the upstream changes, they often get weird interactions between each other, etc. They are great for these one or two really specific things that someone needs where 99% of other user won't.

It's a subjective call, but IMO things like scrollbar and a minimap are a common features of GUI code editors / IDE and AFAIK many people use them. I don't think they would be heavy or a burden to maintain once implemented. Being a 1st class feature they can get better performance and level of integration. People that don't care about them they can just not enable them.

dpc avatar Jun 07 '24 15:06 dpc

@dpc, I mean — yes! Any new editor that comes out is sure to have a scrollbar/minimap builtin, it seems like an internal feature

DoctorRyner avatar Jun 07 '24 15:06 DoctorRyner

I do hope to see somekind of scrollbar/minimap that shows me the places where I have last modified the file.

I work on large C++ codebases and getting lost in the codebase is a real thing. Having any kind of indicator where I last modified code, theres git changes, or anything else would be very helpful.

You can go to the next/prev git change via ]g and [g. There's also the git diff gutter which should be on by default.

kirawi avatar Jun 07 '24 16:06 kirawi

You can go to the next/prev git change via ]g and [g. There's also the git diff gutter which should be on by default.

These are great, and I'm personally using them as well, but from experience I know that an a visual overview of the overlay of the code (minimap) helps create a mental map of how the code is structured in the file, and then if we had that, enriching it with some color to show the edits makes sense to me. I don't think I ever was using editor with such a feature, so hard to say more without actually trying it out.

dpc avatar Jun 07 '24 17:06 dpc

Yeah, i also like the shortcuts, but theres nothing remindin me to use them. I have ADHD so i kind of need these visual cues to help me to remember things 😅

I dont personally need a minimap (although that would be cool). Just a scrollbar that shows lines for areas that have changes, search results, etc..

I really love using helix and i understand the careful movement to avoid feature creep. But i do also believe this is really helpful UX for everyone and i do truly miss it when using helix.

Akselmo avatar Jun 07 '24 22:06 Akselmo

Both are useful, any update?

ElYaiko avatar Jul 18 '24 03:07 ElYaiko