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

RPC call to scroll to search text (scroll syncing) #82

Open
davidmarkclements opened this issue Apr 18, 2016 · 1 comment
Open

RPC call to scroll to search text (scroll syncing) #82

davidmarkclements opened this issue Apr 18, 2016 · 1 comment

Comments

@davidmarkclements
Copy link

davidmarkclements commented Apr 18, 2016

here's the idea:

  1. I create a very light weight plugin for my editor (vi, sublime text, emacs, atom, whatever)
  2. all the plugin does is vmd scroll-to <current text buffer> either on save, or perhaps when the text buffer changes, or perhaps polling - where <current text buffer> is literally the text being displayed by the editor
  3. vmd renders the text buffer to html, and searches for that html, if there's a match then scroll to the beginning of the text

This is easier than trying to exactly co-ordinate scroll positions between an editor and the vmd window, and would make editor plugin creation trivial

Only consideration could be how heavy this is - probably not that heavy, how big is a text buffer, couple of hundred bytes?

@davidmarkclements davidmarkclements changed the title RPC call to scroll to search text RPC call to scroll to search text (scroll syncing) Apr 18, 2016
@maxkueng
Copy link
Collaborator

maxkueng commented Apr 18, 2016

Vim already supports the Netbeans protocol out-of-the-box. I never dove deeply in to this but I think it allows accessing Vim's buffers and receiving events from it. I believe it would be possible to get the cursor position end even rerender vmd as you type (without saving first) and also scrolling to the right position.

Forgive me if I'm talking bullshit. I haven't actually investigated this. It's just what I remember having read a while ago.

If this Netbeans stuff works, however, it might be possible to support other editors as well if they have a Netbeans plugin.

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