andri-ch / gotoword

vim plugin that gives users the possibility to write and access documentation about the word or expr. under cursor
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Create Gotoword text interface inside Vim #32

Open andri-ch opened 9 years ago

andri-ch commented 9 years ago

When user types :Helper on a word, the helper_buffer's contents change, buffer is updated (Helper window is redrawn). Now, when the app needs input from user, it should split window (create a text dialog) or the first row of the buffer should contain the dialog buttons (highlighted words) and when user goes to a button with "b" - positioning the cursor at the beginning of a word, let's say "Ok" - and types :Helper -> the app knows that button "Ok" was pressed by user.

A button should be a white bold word on a blue background.

More info with :help highlight highlight text ranges: http://stackoverflow.com/questions/1633335/highlight-text-ranges-in-vim

gotoword_text_interface_example_issue_ 32

One advantage of a form like buffer like in the image is that it is not blocking, like input, inputlist are. And they persist.

gotoword_text_interface_issue_ 32

andri-ch commented 9 years ago

1.When user double-clicks a button or presses "Enter" on a button, Helper is called. Actually, links should have different views (App.helper_* methods) associated with them. And maybe views should take different arguments.

2.The buttons can have a color like tags in a help file, cyan, I think, so users are more likely to click on them because they will recognize the feature.