Skip to content

Instantly share code, notes, and snippets.

View girishji's full-sized avatar

girishji girishji

View GitHub Profile
@girishji
girishji / find_file.vim.md
Created March 10, 2024 14:36
Async list update with fuzzy search in scope.vim

Here is a representative example of asynchronous list update, and fuzzy searching on the items using scope.vim.

This example spawns a job to obtain a list of files using fd command. Output of fd command is checked every 100ms.

import autoload 'scope/task.vim'
import autoload 'scope/popup.vim'

# Helper function: Filter a list of files using fuzzy matching on typed string
@girishji
girishji / python.vim.md
Last active March 11, 2024 14:29
Extend scope.vim to search python files

You can extend scope.vim to fuzzy search python defs, classes, and keywords.

Place this file in ~/.vim/after/ftplugin/python.vim.

if exists('g:loaded_scope')
    import autoload 'scope/popup.vim'
    def Things()
        var things = []
        for nr in range(1, line('$'))