Comments (6)
You can use keymap-amend plugin for this mapping:
keymap.amend('n', '<C-p>', function(original)
if yanky.can_cycle() then
yanky.cycle(-1)
else
original()
end
end)
keymap.amend('n', '<C-n>', function(original)
if yanky.can_cycle() then
yanky.cycle(1)
else
original()
end
end)
It plays well with vim-visual-muilti.
from yanky.nvim.
Thanks for feedbacks !
I've introduced require('yanky').can_cycle()
method (more meaningful for me than is_in_ring
)
I've also updated documentation ;)
I'll make more tests and I'll merge after
from yanky.nvim.
Interesting!
I think I can introduce an option to chose between "cursor moved" or "content changed" event (because I prefer "content changed event 😉)
I'll try to add this in the next few days!
from yanky.nvim.
Hi @aceforeverd !
I've made something here : #32
Do you want to try before I merge ?
from yanky.nvim.
I tested, it works as expected, appreciate it 🚀 !
Yet I have a few comments:
CursorMoved
event expect to trigger if line content changed as well, maybe doced as well- Wondering if there should be a public interface like
require('yanky').is_in_ring()
to tell if is ringing, anywayrequire('yanky').ring.state ~= nil
works well for me too
from yanky.nvim.
awesome :)
from yanky.nvim.
Related Issues (20)
- Feature Request: Telescope action to both put item and set register HOT 3
- Doesn't work with Telescope HOT 9
- Feature Request: Ability to set default telescope action HOT 1
- Selection of a history in telescope always ends in pasting the latest history record HOT 5
- Feature request: Replace with Yanky HOT 1
- Text object errors HOT 2
- Bug: Latest commit breaks last-paste-textobj HOT 6
- Error executing lua callback attempt to index field 'yanky_textobj' (a nil value) HOT 2
- Wrong position of special mark after paste HOT 1
- Update doc for v2
- Question: is there lua API to get last yank/copy text, and get all the yank/copy history? HOT 2
- [Error] Occurs with `cancel_event = 'move'` When Pasting Twice HOT 2
- [Enhancement] Ignore Replaced Text HOT 7
- Wrong behavior of telescope.mapping.put actions HOT 5
- Could you increase the visibility of this by suggesting those maps in the README?
- Can't ignore primary register "* HOT 3
- Preserve cursor position on yank doesn't work HOT 2
- YankyPutAfter vs YankyGPutAfter HOT 1
- nitpick about naming and doc around YankyPutBefore/After HOT 1
- Implements `zy`
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.