helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.59k stars 2.49k forks source link

Minimap and Scrollbar #2210

Open kuanyinglu opened 2 years ago

kuanyinglu commented 2 years ago

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.

David-Else commented 2 years ago

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...

the-mikedavis commented 2 years ago

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.

slinlee commented 2 years ago

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

kirawi commented 2 years ago

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

pickfire commented 2 years ago

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).

cor commented 2 years ago

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 commented 1 year ago

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

dpc commented 10 months ago

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.

gyreas commented 10 months ago

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.

DoctorRyner commented 8 months ago

@gyreas scrollbars are not plugins

Akselmo commented 4 months ago

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.

dpc commented 4 months ago

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.

DoctorRyner commented 4 months ago

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

kirawi commented 4 months ago

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.

dpc commented 4 months ago

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.

Akselmo commented 4 months ago

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.

ElYaiko commented 3 months ago

Both are useful, any update?

chromedays commented 2 months ago

any update?

dpc commented 2 months ago

Do you expect updates from anyone in particular? If there is no PRs mentioned here, no one is assigned or committed to do it, then it's safe to assume there is and will be no updates.

igorkim commented 3 weeks ago

Any updates? It would be cool to even have a scrollbar, not taking up as much space as minimap but very useful from a visual overview perspective.

dpc commented 3 weeks ago

Please stop asking for updates. You just creating needless github notifications for everyone here. If there were any updates someone would post about.