Vim Telescope
- id: 1747991711
- Date: May 23, 2025, 9:20 a.m.
- Author: Donald F. Elger
Goals
- Describe telescope.
- Skillfully use it.
What?
Telescope is a fuzzy finder plugin for Neovim written in Lua. It helps you search for files, text, buffers, help tags, and more using an interactive floating window. It acts like a fast, flexible “Spotlight” inside your Neovim setup.
Why?
- Saves time by letting you quickly find and open files, buffers, or content.
- Reduces the need to remember exact filenames or commands.
- Integrates tightly with Neovim and supports extensions and custom layouts.
- Offers previews so you can see results before jumping.
How?
Installation (using packer)
{
use 'nvim-telescope/telescope.nvim',
requires = { {'nvim-lua/plenary.nvim'} }
}
Useful Commands (in command mode)
- :Telescope find_files — Fuzzy search for files.
- :Telescope live_grep — Search text inside files using ripgrep.
- :Telescope buffers — Switch between open buffers.
- :Telescope help_tags — Search Neovim’s help docs.
- :Telescope oldfiles — Browse recently opened files.
Recommended Shortcuts
local builtin = require('telescope.builtin')
local map = vim.keymap.set
local opts = { noremap = true, silent = true }
('n', '<leader>ff', builtin.find_files, opts) -- Find files
map('n', '<leader>fg', builtin.live_grep, opts) -- Grep text
map('n', '<leader>fb', builtin.buffers, opts) -- List buffers
map('n', '<leader>fh', builtin.help_tags, opts) -- Help tags
map('n', '<leader>fo', builtin.oldfiles, opts) -- Recent files map
These keymaps make Telescope fast and intuitive to use.