Comments (5)
This can be done with gelguy/Cmd2.vim with the following mappings.
function! s:Peekaboo()
call peekaboo#peek(1, 'ctrl-r', 0)
endfunction
let g:Cmd2_cmd_mappings = {
\ 'Peekaboo': {'command': function('s:Peekaboo'), 'type': 'function'},
\ }
cmap <C-R> <Plug>(Cmd2)Peekaboo
from vim-peekaboo.
Peekaboo needs full control over the command-line to start itself (:call peekaboo#peak(...)
). So on <CTRL-R>
it should,
- Remember what's currently on the command-line. Also remember the position of the cursor.
- Clear the command-line and use it to start the sidebar
- When sidebar is closed, rebuild the command-line and restore the position of the cursor, and let Vim inject the content of the selected register.
It's quite complicated, but probably not impossible. Special care must be taken to make it compatible withg:peekaboo_delay
. I'll look into in when I get some time.
from vim-peekaboo.
Yeah, what @gelguy suggested could be a better way to handle this. I've tried implementing the aforementioned scheme, but realized that it has to rely on fragile hacks with extensive use of feedkeys()
. I'll mark this issue as wontfix
and close it. Thanks.
from vim-peekaboo.
@gelguy tested this and works like a charm. Thanks both. @junegunn maybe it's worth mentioning this on the readme so this great usage does not go unnoticed?
from vim-peekaboo.
@jmlucjav Okay, I'll update the FAQ section.
from vim-peekaboo.
Related Issues (20)
- Window is being resized when pasting in insert mode HOT 2
- Plugin regularly (but unpredictably) crashes neovim HOT 5
- when this plugin be loaded lazy will occur some problem HOT 1
- screencapture tool used in README?
- [Feature Request] Use floating window instead of split HOT 17
- Can it support redir @?
- Can it display the type of register?
- Blank window in visual mode HOT 1
- Not working in Command mode HOT 1
- cmd height changed to maximum HOT 5
- Breaks Ex mode if used
- Peekaboo window does not show leading whitespaces
- [Feature Request] foldcolumn independent window HOT 1
- [Feature Request] show special key combinations instead of bytes: <Esc> instead of ^[ HOT 1
- [bug] conflict with startify
- vim-peekaboo sets cmdheight to max, meaning I can only see 1 line of my window output HOT 5
- Feature Request: change (or disable) default maps HOT 3
- change location of sidebar? HOT 2
- Ctrl-R Insert Mode places register one char before last
- Peekaboo makes it impossible to paste in telescope HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-peekaboo.