Feature request: Cursor tab-like jump to next suggested edit #134

Open
opened 2025-04-11 13:56:31 -04:00 by CoreyCole · 3 comments
CoreyCole commented 2025-04-11 13:56:31 -04:00 (Migrated from github.com)

Will jumping the cursor to the next suggested edit every be possible in the neovim plugin? This is the main feature I miss when using neovim over cursor. Until it is supported, I need to jump into cursor when I have to do a bunch of edits with a repeated pattern.

-- Function to open URL in browser based on OS
local function open_url_in_browser(url)
  local platform = vim.loop.os_uname().sysname

  if platform == "Darwin" then
    -- macOS
    os.execute('open "' .. url .. '"')
  elseif platform == "Linux" then
    -- Linux
    os.execute('xdg-open "' .. url .. '"')
  elseif platform == "Windows_NT" then
    -- Windows
    os.execute('start "" "' .. url .. '"')
  else
    print("Unsupported platform: " .. platform)
    return false
  end

  return true
end

-- Function to open the current file in Cursor at the current line
local function open_in_cursor()
  local file_path = vim.fn.expand("%:p")
  local line_number = vim.fn.line(".")
  local workspace_dir = "/Users/coreycole/cn/monorepo"
  
  -- First: Open the folder via URL scheme
  local folder_url = "cursor://file/" .. workspace_dir .. "?windowId=_blank"
  
  vim.notify("Opening folder: " .. folder_url, vim.log.levels.INFO)
  
  -- Open the folder first
  if open_url_in_browser(folder_url) then
    -- Wait a bit for Cursor to load, then open the specific file
    vim.defer_fn(function()
      -- Now use CLI to open the specific file at the right line
      local cmd = string.format('cursor --goto "%s:%s"', file_path, line_number)
      
      vim.notify("Running command: " .. cmd, vim.log.levels.INFO)
      
      -- Execute the command
      local result = vim.fn.system(cmd)
      
      if vim.v.shell_error == 0 then
        vim.notify("Opened file in Cursor", vim.log.levels.INFO)
      else
        vim.notify("Failed to open file (cmd: " .. cmd .. ")", vim.log.levels.ERROR)
      end
    end, 1000)  -- 1000ms delay to let Cursor open
  else
    vim.notify("Failed to open folder in Cursor", vim.log.levels.ERROR)
  end
end
map("n", "<leader>cu", open_in_cursor, { desc = "Open in Cursor at current line" })
Will jumping the cursor to the next suggested edit every be possible in the neovim plugin? This is the main feature I miss when using neovim over cursor. Until it is supported, I need to jump into cursor when I have to do a bunch of edits with a repeated pattern. ```lua -- Function to open URL in browser based on OS local function open_url_in_browser(url) local platform = vim.loop.os_uname().sysname if platform == "Darwin" then -- macOS os.execute('open "' .. url .. '"') elseif platform == "Linux" then -- Linux os.execute('xdg-open "' .. url .. '"') elseif platform == "Windows_NT" then -- Windows os.execute('start "" "' .. url .. '"') else print("Unsupported platform: " .. platform) return false end return true end -- Function to open the current file in Cursor at the current line local function open_in_cursor() local file_path = vim.fn.expand("%:p") local line_number = vim.fn.line(".") local workspace_dir = "/Users/coreycole/cn/monorepo" -- First: Open the folder via URL scheme local folder_url = "cursor://file/" .. workspace_dir .. "?windowId=_blank" vim.notify("Opening folder: " .. folder_url, vim.log.levels.INFO) -- Open the folder first if open_url_in_browser(folder_url) then -- Wait a bit for Cursor to load, then open the specific file vim.defer_fn(function() -- Now use CLI to open the specific file at the right line local cmd = string.format('cursor --goto "%s:%s"', file_path, line_number) vim.notify("Running command: " .. cmd, vim.log.levels.INFO) -- Execute the command local result = vim.fn.system(cmd) if vim.v.shell_error == 0 then vim.notify("Opened file in Cursor", vim.log.levels.INFO) else vim.notify("Failed to open file (cmd: " .. cmd .. ")", vim.log.levels.ERROR) end end, 1000) -- 1000ms delay to let Cursor open else vim.notify("Failed to open folder in Cursor", vim.log.levels.ERROR) end end map("n", "<leader>cu", open_in_cursor, { desc = "Open in Cursor at current line" }) ```
samuellawerentz commented 2025-08-19 16:00:43 -04:00 (Migrated from github.com)

This will be a gamechanger for neovim. Much awaited.

This will be a gamechanger for neovim. Much awaited.
samholmes commented 2025-09-01 19:14:21 -04:00 (Migrated from github.com)

NEED IT!

I don't care who I have to pay. I'd love to move all the cursor features into Neovim. (Hey cursor, just support neovim).

NEED IT! I don't care who I have to pay. I'd love to move all the cursor features into Neovim. (Hey cursor, just support neovim).
CoreyCole commented 2025-11-06 12:37:50 -05:00 (Migrated from github.com)

https://github.com/folke/sidekick.nvim

this support copilot's next edit suggestions (NES). it is something, but not as good as cursor's in my experience with it.

https://github.com/folke/sidekick.nvim this support copilot's next edit suggestions (NES). it is something, but not as good as cursor's in my experience with it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
supermaven-inc/supermaven-nvim#134
No description provided.