Skip to content

Latest commit

 

History

History
72 lines (55 loc) · 2.05 KB

readme.md

File metadata and controls

72 lines (55 loc) · 2.05 KB

nvim-insert-mode

Insert-Mode Search|Replace based navigation combined with quick jump features.

  • Dynamic Text Replacement:

    Users can replace text efficiently based on their input, allowing for quick adjustments without leaving insert mode. Supports varying lengths of replacement text, accommodating different editing needs.

  • Anywhere Functionality:

    Integrates with the Hop plugin to enable quick navigation within lines and across the buffer. Offers different hopping modes based on the context (e.g., empty lines vs. current line), making it versatile for various editing scenarios.

Requirements

Neovim 0.9+ is required.

Hop.nvim

Noice

  • Setup

-- lazy.nvim
  {
    dir = "Akirisu-kirisu/nvim-insert-mode",
    dependencies = {
        "smoka7/hop.nvim",
        "folke/noice.nvim",
    },
    event = "VeryLazy", -- Lazy load your plugin based on specific event
  },

-- noice.nvim
  views = {
    cmdline_popup = {
      timeout = 10000,
      focusable = true,
      position = {
        row = "93%", -- This will position it at the bottom of the screen
        col = "100%",
      },
      relative = "editor",
      size = {
        width = get_relative_width(),
        height = "auto",
      },
      replace = true,
    },
  }

keymaps

vim.keymap.set("i", "<A-r>", [[<C-o>:lua require('nvim-insert-mode').insert_find_replace()<CR>]])
vim.keymap.set("i", "<A-,>", [[<C-o>:lua require('nvim-insert-mode').insert_find_cut()<CR>]])
vim.keymap.set("i", "<A-.>", [[<C-o>:lua require('nvim-insert-mode').insert_hop()<CR>]])

Todo

Command Features:

  1. The command should function like a vertical hop, allowing the selection of empty lines, with an optional width of 80 characters.

  2. It should incorporate a precognition feature that utilizes gutter lines.

  3. It must include a search history feature to select previous and next entries