Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/supermomonga/vimshell-inline-history.vim
Inline history completion for VimShell
https://github.com/supermomonga/vimshell-inline-history.vim
Last synced: 4 days ago
JSON representation
Inline history completion for VimShell
- Host: GitHub
- URL: https://github.com/supermomonga/vimshell-inline-history.vim
- Owner: supermomonga
- Created: 2013-11-24T19:43:26.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-05-30T02:08:19.000Z (over 1 year ago)
- Last Synced: 2025-01-11T06:49:09.776Z (4 days ago)
- Language: Vim Script
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vimshell-inline-history.vim
This plugin provides inline history completion feature to VimShell.
Works with both Vim + NeoVim.## Features
![](http://gifzo.net/UKIIEtj887.gif)
- Complete histories by `C-p` and `C-n`.
- Complete histories which start with current input.
- Cycle completion.## Install
### [neobundle](https://github.com/shougo/neobundle.vim):
```vim
NeoBundleLazy 'supermomonga/vimshell-inline-history.vim', { 'depends' : [ 'Shougo/vimshell.vim' ] }if neobundle#tap('vimshell-inline-history.vim')
call neobundle#config({
\ 'autoload' : {
\ 'filetypes' : [ 'vimshell' ]
\ }
\})function! neobundle#hooks.on_post_source(bundle)
"Example of remapping keys for plugin
imap (vimshell_inline_history#next)
imap (vimshell_inline_history#prev)
endfunction"Example of unmapping default keys
let g:vimshell_inline_history#default_mappings = 0call neobundle#untap()
endif
```### [vim-plug](https://github.com/junegunn/vim-plug):
```vim
Plug 'supermomonga/vimshell-inline-history.vim', { 'depends' : [ 'Shougo/vimshell.vim' ] }function! VSHistmapCB(...)
let g:vimshell_inline_history#default_mappings = 0
imap (vimshell_inline_history#next)
imap (vimshell_inline_history#prev)
endfunctionfunction! VSHistmap()
if has("nvim")
call jobstart(['bash','-c','echo "-"; exit;'],{'on_stdout':'VSHistmapCB'})
else
call job_start(['bash','-c','echo "-"; exit;'],{'out_cb':'VSHistmapCB'})
endif
endfunction"Group name can be arbitrary so long as doesn't conflict with another
augroup VSHistMapping
autocmd!
"Get filetype with :echom &filetype when in buffer
autocmd FileType vimshell :call VSHistmap()
augroup END
```## Usage
Hit `C-n` or `C-p` to complete history.