Giter Site home page Giter Site logo

vim-peekaboo's Introduction

vim-peekaboo

Peekaboo extends " and @ in normal mode and <CTRL-R> in insert mode so you can see the contents of the registers.

Installation

Using vim-plug:

Plug 'junegunn/vim-peekaboo'

Usage

Peekaboo will show you the contents of the registers on the sidebar when you hit " or @ in normal mode or <CTRL-R> in insert mode. The sidebar is automatically closed on subsequent key strokes.

You can toggle fullscreen mode by pressing spacebar.

Customization

" Default peekaboo window
let g:peekaboo_window = 'vertical botright 30new'

" Delay opening of peekaboo window (in ms. default: 0)
let g:peekaboo_delay = 750

" Compact display; do not display the names of the register groups
let g:peekaboo_compact = 1

" Prefix for the peekaboo key mapping (default: '')
let g:peekaboo_prefix = '<leader>'

" Prefix for CTRL-R insert key mapping (default: '')
let g:peekaboo_ins_prefix = '<c-x>'

FAQ

"Peekaboo conflicts with my maps and abbrevs"

Use non-recursive maps and abbreviations (e.g. nnoremap, inoreabbrev) so that they are not expanded. It is strongly advised that you always stick to nore-versions unless you know exactly what you're doing.

"Can I use Peekaboo in command-line mode?"

There's no native support for command-line mode, but it's possible with another plugin. See here.

Known issues

Compatability with macros

Peekaboo internally uses feedkeys() function which can break macros. So Peekaboo temporarily disables itself when replaying macros with @. However, if you invoke @ via a non-recursive map (e.g. nnoremap Q @q), Peekaboo doesn't get a chance to do so and your macros may not work as expected. The workaround is to use recursive maps: nmap Q @q.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.