Add Insert mode command and <Plug> keybind again

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
vim
Domain
tooling

Research direction

Start by locating the plugin's existing Insert-mode command and mappings, then trace Neural's prompt and cursor handling. Confirm the intended behavior for staying in Insert mode, tracking cursor movement, and cancelling on mode exit; the issue does not name implementation entry points or tests.

Written by the indexing model from the issue text.

Description

enhancement

An early test version of this plugin had an Insert mode command. We should add it back again, with the following additions.

  1. Running the command should make it easy to enter the prompt without "leaving" Insert mode.
  2. We should modify Neural to insert text where the user's cursor is in Insert mode, no matter where it moves to.
  3. We should detect the user leaving Insert mode and automatically cancel Neural's text input if the user does.

If we set it up this way, it will be very easy to just add some text to a Vim buffer. If we run into issues with entering text into command, we could make it so you type characters and press enter whilst in insert mode, and we replace that text with the results of the prompt. We also have the option of implementing insert mode prompting that way anyway if it turns out to be nice.

Dominant language
Vim Script
Stars
506
Forks
19
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dense-analysis/neural

All issues in dense-analysis/neural

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.