Skip to content

serpent7776/vim-cycle-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

vim-cycle-search

A small Vim plugin for cycling through the search history.

After performing a search with / or ?, use [/ and ]/ to step backwards and forwards through previous search patterns. The current search register (@/) is updated as you cycle, so n and N immediately use the selected pattern.

Installation

Use your preferred plugin manager, or copy plugin/cycle_search.vim into ~/.vim/plugin/ (or ~/.config/nvim/plugin/ for Neovim).

With vim-plug:

Plug 'Serpent7776/vim-cycle-search'

Mappings

Mapping Action
[/ Cycle to the previous search
]/ Cycle to the next search

The default mappings are only set if [/ and ]/ are not already mapped. To define your own, map to the <Plug> targets:

nmap <silent> <leader>p <Plug>(CycleSearchPrev)
nmap <silent> <leader>n <Plug>(CycleSearchNext)

To disable the default mappings entirely, set the following before the plugin loads:

let g:cycle_search_no_default_mappings = 1

License

MIT

About

Cycle through Vim's search history with a mapping

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors