Giter Site home page Giter Site logo

Comments (6)

gbprod avatar gbprod commented on June 16, 2024 1

That's a really interesting feature, I think I can do something for that next week 😉

from yanky.nvim.

gbprod avatar gbprod commented on June 16, 2024 1

Thanks for the feedback!!!
I've made some updates.
I've changed <Plug> names, I think you'll I've something really close to vim-unimpaired:

vim.keymap.set("n", "]p", "<Plug>(YankyPutIndentAfterLinewise)", {})
vim.keymap.set("n", "[p", "<Plug>(YankyPutIndentBeforeLinewise)", {})
vim.keymap.set("n", "]P", "<Plug>(YankyPutIndentAfterLinewise)", {})
vim.keymap.set("n", "[P", "<Plug>(YankyPutIndentBeforeLinewise)", {})

vim.keymap.set("n", ">p", "<Plug>(YankyPutIndentAfterShiftRight)", {})
vim.keymap.set("n", "<p", "<Plug>(YankyPutIndentAfterShiftLeft)", {})
vim.keymap.set("n", ">P", "<Plug>(YankyPutIndentBeforeShiftRight)", {})
vim.keymap.set("n", "<P", "<Plug>(YankyPutIndentBeforeShiftLeft)", {})

vim.keymap.set("n", "=p", "<Plug>(YankyPutAfterFilter)", {})
vim.keymap.set("n", "=P", "<Plug>(YankyPutBeforeFilter)", {})

from yanky.nvim.

midrare avatar midrare commented on June 16, 2024 1

Just tested, and all seems to be in working order. Thanks for the quick implementation!

from yanky.nvim.

gbprod avatar gbprod commented on June 16, 2024

Hi @drinkitup777 !
I've made something here: #33 if you want to try before I merge.
Awesome feature, I don't know how I did before :D

from yanky.nvim.

midrare avatar midrare commented on June 16, 2024

It's pasting on the right line, but I don't think the indenting is acting right. If you do a character-wise yank, it always acts as if it's coming from indent level 0. For example, if you yank a word from a line and >p, it will be put on the next line with indent 1, no matter the indent level of the line it was yanked from. It's the same for [p and ]p ... etc.

Side: congrats on joining the [p club 🤓

from yanky.nvim.

TamaMcGlinn avatar TamaMcGlinn commented on June 16, 2024

Could you increase the visibility of this by suggesting those maps in the README? I think people who are used to vim-unimpaired expect this to "just work", and not to have to search the issues for 'unimpaired' - which I only did because I thought there was a bug similar to #19

from yanky.nvim.

Related Issues (20)

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.