Skip to content

tmerse/ctrlp_histsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Fuzzy-search ~/.bash_history, ~/.zsh_history inside vim via ctrlp.

Usage

Run :CtrlPShellHistory and a buffer with entries of you term-history will show up. Pressing return will paste the current line below the cursor.

Configuration

Inside .vimrc / init.vim:

" by default, this is set to $HOME . '/.bash_hitory'
let g:ctrlp#shell_history#path = $HOME . '/.zsh_history'

" negative value will take last n entries into consideration (bottom up).
" use a positive value, for top-down.
" default: -2000
let g:ctrlp#shell_history#size = -3000

TODO:

  • Better matching/smallest match first (typing cp should show cp foo bar first instead of cat paw ).
  • Instead of appending the selection below the cursor, the user should be able to provide a function that acts on the return value after ctrlp closed.

Licence

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published