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

Use case and flow of keystrokes #75

Closed
t9md opened this issue Jan 28, 2017 · 1 comment
Closed

Use case and flow of keystrokes #75

t9md opened this issue Jan 28, 2017 · 1 comment

Comments

@t9md
Copy link
Owner

t9md commented Jan 28, 2017

narrow is not settled(phase of experimenting several ideas).

But want to remember use-case that will/was worked.

Keystrokes

  • Keybinding must be carefully defined with use-case described here in mind.
  • To make complex flow feel very intuitive, easy and natural.
  • For ease of use, important keybinding must be universal. Usable both in normal editor and narrow-editor.
    • canceling
    • confirming
    • focusing/un-focusing
    • Auto open narrow(with predefined provider by language-grammar) by moving mouse to corner??

Use-case

Quick previewing

With search/lines provider.

  1. Open narrow:lines and input query immediately.
  2. Auto preview first matching line?(with opening closed fold?)
  3. Closing narrow-editor recover original cursor position/screen-top/fold.

Direct edit multiple line

  1. Open narrow:lines, narrow:search and input query immediately.
  2. Move to item area, and edit-it(with explict entering direct-edit mode?)
  3. Saving buffer(show dialog to confirm? and suppress-able by config-option) apply changes to real-file
  4. How to undo-ing thab bulk-change?

Navigating point of interest

  1. Open narrow:fold, narrow:search
  2. Confirm first matching item, now focus is on original-pane.
  3. next-item, previous-item guide cursor to next/previous point of interest.
  4. As you move to next/previous-item, or any cursor movement/pane-item change reflect current-selected-item indicator on narrow-editor, this will give user "where am I info".
  • Keep track of current position within items is really important.
  • next-item then move cursor to different position by mouse-clicking/or via normal-atom-command then next-item SHOULD move to next-item which is relative to CURRENT cursor position.
  • Unless auto-tracking, next-item can be move-BACK cursor, this is not what user expect. narrow-editor must aware of position/buffer change of bound-editor.

As minimap

  1. Open narrow:fold or narrow:symbols
  2. Move this narrow-editor to rightmost or leftmost position in workspace, so that you can see it in comfortable place.
  3. Each time you focused to different file, symbols(or fold) items are updated.
  4. For fold, you can change fold level by cmd-[, cmd-] in narrow-editor to control granularity level of information.
  5. Yes you can use this as minimap which clickable and shows only important information only.
  6. Further, you can narrow the focus by query.
  • e.g. in file which file contains multiple classes and some of it have initialize overriding,
  • In this case, narrowing by initialize query, show only initialize functions in the items.

As TODO list

  1. Place cursor the [TODO] or [FIXME] keyword, then open narrow:search-by-current-word.
  2. Confirm first matching item, now focus is on original-pane.
  3. next-item, previous-item guide cursor to next/previous point of interest.
  4. After you fixed it and removed [FIXME] or [TODO] keyword and saved. items are auto-refreshed.
  5. So remaining items in narrow-editor is [TODO]s you have to done.
  6. When you done all the [TODO]s or [FIXME]s narrow-editor would have no items in the list. DONE.

As this way, you can use this approach when you

  • Rename variable names in project
  • Changing argument for particular function(e.g from string argument to object).
  • Removing deprecated code(after spending enough migration period and now it's time to delete!).

You can concentrate updating code and save then move to next by next-item(ctrl-cmd-n or tab for vim-mode-plus user).

As TOC( table-of-content )

Of course, clickable, narrowable.

  1. Open narrow:symbols, narrow:search, narrow:fold, narrow item by query if necessary.
  2. Click item listed cause auto-preview.

In this scenario, narrow is like minimap which gives overview of code with readable text(in minimap it's gives pictorial overview but text is not readable)

@t9md t9md changed the title think about usecase and keystroke flow [Important] Think about usecase and keystroke flow Jan 28, 2017
@t9md t9md changed the title [Important] Think about usecase and keystroke flow Use case and flow of keystroke Jan 30, 2017
@t9md t9md changed the title Use case and flow of keystroke Use case and flow of keystrokes Jan 30, 2017
@t9md t9md added the discussion label Mar 3, 2017
@t9md
Copy link
Owner Author

t9md commented Mar 5, 2017

Close, moved to wiki
https://github.com/t9md/atom-narrow/wiki/UseCase

@t9md t9md closed this as completed Mar 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant