Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[help][feature request] Moving within a large item #22

Open
folofjc opened this issue Mar 1, 2022 · 2 comments
Open

[help][feature request] Moving within a large item #22

folofjc opened this issue Mar 1, 2022 · 2 comments

Comments

@folofjc
Copy link

folofjc commented Mar 1, 2022

If I have an item that is very long, like a paragraph, what is the easiest way to move around in it? All I can find so far are very inefficient ways:

  • w, e, etc to move word by word, or even 20w all are too imprecise
  • f to find the first letter, but then I have to do it over and over to get to the word I want
  • / search is what I would use in vim, but all it does is narrow down the nodes on the page to ones that contain that word. And then the cursor still does not go to the word that was searched, it simply highlights it (workflowy's default behavior)
  • j, k move item by item, so skip over lines within an item
  • A, ^, 0, $, etc all move to the very beginning or end of the item (basically soft line wrap)

Am I missing something? If not, could this be added as a feature? Some way to search within an item (similar to f and t) to move the cursor, but with greater control than just a single letter.

Thanks!

@Wojnach
Copy link
Owner

Wojnach commented Mar 2, 2022

Implementing a vim-like '/' search feels like it would require a lot of work, so I haven't gotten around to it yet.

For now I've just been using the browsers own ctrl-f search which does most of the things we want... But there is a catch with it though; you'll lose cursor focus if it can't find the word you are searching for hehe.. You'll have to spam ESC a couple of times to regain focus again when that happens.

Most of the vim-like cursor movment have to be written from scratch and take a long time to implement. You have to parse the text yourself and account for edge cases such as html tags and non-ascii characters, etc. The ones that are implemented right now, such as 'w' and 'e', are the ones that have been requested in the past or that I frequently use. But we can add new ones upon request.

The best way for navigating a visible wall-text, IMO, is to implement something like Vim-EasyMotion that lets you jump to anywhere in the text. But again that feels like it would require some work so I haven't gone around to it yet.

Another weakness is that you can't navigate inside notes just as easily as you can with bullet names. Fixing this requires a rewrite on how the cursor movement works and how the commands parses the text.

@folofjc
Copy link
Author

folofjc commented Mar 2, 2022

Okay, yeah I was worried that this would be a lot of work. I am ambivalent as to the correct solution. I really like the vim-pencil plugin that maps j and k in vim to moving within a soft-wrapped line. Even if it were something like that, that would be great. Doesn't have to be j and k of course, some other keys.

As to the ctrl-f, how do you do this? When I do ctrl-f I can then search for the word. When I want to return focus to workflowy, I hit ESC. Now the word (or the part of the word I searched for) is highlighted. But then if I hit i to insert, it actually replaces the highlighted text. If I do any movement commands like w or e, then it starts at the beginning of the item. I would be happy to use this method, but I am unsure how it works.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants