Skip to content

Myzel394/telescope-last-positions.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

telescope-last-positions.nvim

Remembers the last position where you left insert / visual / replace or any other mode!

This plugins requires SmoothCursor.nvim as this plugin implements the actual functionality.

Showcase

new.mp4

Requirements

Usage

:Telescope last_positions

Setting a keymap is recommended:

vim.api.nvim_set_keymap("n", "<leader>l", "<Cmd>Telescope last_positions<CR>", { desc = "Open Last Positions" })

Installation

This is a telescope.nvim plugin, make sure you have it installed.

  1. Make sure SmoothCursor.nvim is installed and show_last_positions is enabled.
require"smoothcursor".setup {
  show_last_positions = "leave" -- or "enter"
}
  1. Install Myzel394/telescope-last-positions.nvim with your favorite plugin manager.
"Myzel394/telescope-last-positions.nvim",
  1. Load extension
require("telescope").load_extension("last_positions")

Configuration

Configure the extension like any other Telescope extension. The example below show all available configuration options and their default values.

require("telescope").setup {
    extensions = {
        last_positions = {
            -- What modes should be tracked
            whitelisted_modes = { "v", "V", "i", "R" },
            -- Maps mode to the icon shown in the preview's indicator
            mode_icon_map = {
                v = "",
                V = "",
                i = "",
                R = "󰊄",
            },
            -- Maps mode to the name shown next to the actual filename
            mode_name_map = {
                v = "Visual",
                V = "V·Line",
                i = "Insert",
                R = "Replace",
            }
        }
    }
}

About

Access your last insert / visual / replace mode positions using Telescope

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages