acksld / muren.nvim Goto Github PK
View Code? Open in Web Editor NEWMultiple replacements in neovim
Multiple replacements in neovim
Not sure if needed but maybe useful it the preview makes the UI sluggish.
Hi, thanks for the great plugin! I hope I didn't miss some built in way to do this, but I was wondering if you had plans to allow options for positioning the pop up window(s). This would be useful since sometimes I like to look back at the code in full for context.
I made some quick changes on a fork to show what I mean. I didn't want to make a PR without checking if this was in your roadmap or you wanted to handle this further down the line (also I haven't implemented any tests on the fork). Thanks!
Position could be set with anchors and offset opts. In this picture, the anchor is bottom-right with -2 offsets in each direction, keeping muren off the corner
If some combination of anchors, offsets, and width/height would place the window out of bounds, set it to the furthest in-bound position in the direction of the offset (notice that the anchors are bottom-right, but the offsets are -2000 in each direction, effectively making it a top-left anchored window)
tpope's subvert command is a blessing when working with Typescript. Would it be possible for muren to use it?
Hi there,
I have been trying to install the plugin with packer using a simple packer config:
return require('packer').startup(function(use)
-- Packer - plugin management {{{
use 'wbthomason/packer.nvim'
-- }}}
--
use 'AckslD/muren.nvim'
-- Put this at the end after all plugins
if PACKER_BOOTSTRAP then
require('packer').sync()
end
end)
Once I save, and install, by using PackerStatus
I get:
packer.nvim - Total plugins: 2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• muren.nvim
• packer.nvim
And if I use :h muren.nvim-muren.nvim
, I do get the right document. However, if I try to use :MurenOpen
or any other command, I get E492: Not an editor command: MurenOpen
.
My nvim version is:
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3
I thought the problem was with packer, but I tested adding some other plugins and things were working just fine. I appreciate any help in advance.
Is it possible to provide a pattern to files to exclude some possible filename patterns? What kind of regexes does muren
support?
Would be nice to have the replacement highlighted in the preview. Although not sure how to figure out where they are. Anyone has some ideas?
Hi, just installed (with packer) and when I type :MurenOpen I get this error:
Error executing Lua callback: .../nvim/site/pack/packer/start/muren.nvim/lua/muren/ui.lua:245: invalid key: title_pos
stack traceback:
[C]: in function 'nvim_open_win'
.../nvim/site/pack/packer/start/muren.nvim/lua/muren/ui.lua:245: in function 'open'
...nvim/site/pack/packer/start/muren.nvim/lua/muren/api.lua:4: in function <...nvim/site/pack/packer/start/muren.nvim/lua/muren/api.lua:3>
When replacing the occurrences in the file, it'd be nice to the the confirm
option. If confirm
is on, then before replacing a specific occurrence, user should be asked to confirm if they want it to be changed.
I have the following lua file:
local opt = vim.opt
opt.termguicolors = true
opt.relativenumber = true
opt.tabstop = 2
opt.shiftwidth = 2
opt.softtabstop = 2
I then select from line 2 (opt.termguicolors = true
) to the end of file, and replace opt
with x
replace opt
to x
from line 2 to end
line 2 is not changed (only from line 3 to end)
Namaste!
Love the idea. However, when I try to issue the replace command by pressing <CR>
, nothing happens.
My configuration in init.lua
:
{
'AckslD/muren.nvim',
config = true,
},
Thank you! :)
Cheers,
Yesudeep.
First of all, this is a great plugin. Thank you for making this.
Second of all, when toggling the "recursive" option in the settings pane, some words get highlighted with the IncSearch
style.
In addition to the new undo/redo feature we could maybe also have a command which populates the quickfix list with the previous edited positions such that one can easily find them and inspect what actually changed.
Similar to MurenUnique
but in addition to the left hand side being populated from unique matches, the right hand side could be populated from what those lhs's would be transformed into. A user might realize they need a more advanced search-and-replace while writing the substitute command and want to invoke Muren. This saves some retyping.
This would probably have to use a 'c' plug mapping rather than a command.
If the substitution range could be used by muren as well that could be nice, although that's technically a separate feature request.
Hi, I'm trying to find how can I do search and replace in the entire project. Can this plugin do that? If not do you plan to add that feature?
Store history of batches replacements and have a telescope picker to chose between them, previewing the list of patterns and replacements.
How about only executing substitution in selected area in visual mode?
When attempting to search replace across a large repository the plugin takes forever, listing each file it iterates over very slowly.
It seems that it is currently unusable with large repositories.
Could maybe be useful to have a more where instead of :s/
we use LSP rename.
Not sure exactly what the behaviour should be but maybe something like:
You find all matches of the users regex. You go-to-definition to all of them such that you only have one per variable definition. Then you run the LSP rename on all of them, or possibly let the user pick one/a subset. This would be for each line/pattern in the UI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.