All Projects → ray-x → sad.nvim

ray-x / sad.nvim

Licence: GPL-3.0 license
Space Age seD in Neovim. A project-wide find and replace plugin for Neovim.

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to sad.nvim

deoplete-solargraph
deoplete.nvim source for Ruby with solargraph.
Stars: ✭ 73 (+92.11%)
Mutual labels:  neovim-plugin
neuron.nvim
Make neovim the best note taking application
Stars: ✭ 340 (+794.74%)
Mutual labels:  neovim-plugin
fzf-checkout.vim
Manage branches and tags with fzf
Stars: ✭ 187 (+392.11%)
Mutual labels:  neovim-plugin
openrgb.nvim
Bring RGB to life in Neovim
Stars: ✭ 39 (+2.63%)
Mutual labels:  neovim-plugin
comment-box.nvim
✨ Clarify and beautify your comments using boxes and lines.
Stars: ✭ 91 (+139.47%)
Mutual labels:  neovim-plugin
bolt.nvim
⚡ Ultrafast multi-pane file manager for Neovim with fuzzy matching
Stars: ✭ 100 (+163.16%)
Mutual labels:  neovim-plugin
nvim-gomove
A complete plugin for moving and duplicating blocks and lines, with complete fold handling, reindenting, and undoing in one go.
Stars: ✭ 142 (+273.68%)
Mutual labels:  neovim-plugin
session-lens
A session-switcher extension for rmagatti/auto-session using Telescope.nvim
Stars: ✭ 143 (+276.32%)
Mutual labels:  neovim-plugin
critiq.vim
Github code reviews from Neovim
Stars: ✭ 69 (+81.58%)
Mutual labels:  neovim-plugin
replace
Generic file search & replace tool, written in Python 3
Stars: ✭ 28 (-26.32%)
Mutual labels:  find-and-replace
onestatus
an api to customize tmux from vim
Stars: ✭ 82 (+115.79%)
Mutual labels:  neovim-plugin
winshift.nvim
Rearrange your windows with ease.
Stars: ✭ 230 (+505.26%)
Mutual labels:  neovim-plugin
SimpleSnippets.vim
Simple snippet support for your Vim and Neovim
Stars: ✭ 86 (+126.32%)
Mutual labels:  neovim-plugin
nvim-scrollbar
Extensible Neovim Scrollbar
Stars: ✭ 355 (+834.21%)
Mutual labels:  neovim-plugin
aerial.nvim
Neovim plugin for a code outline window
Stars: ✭ 485 (+1176.32%)
Mutual labels:  neovim-plugin
AbbrevMan.nvim
🍍 A NeoVim plugin for managing vim abbreviations.
Stars: ✭ 82 (+115.79%)
Mutual labels:  neovim-plugin
hotpot.nvim
🍲 Carl Weathers #1 Neovim Plugin.
Stars: ✭ 183 (+381.58%)
Mutual labels:  neovim-plugin
nvim-startup.lua
Displays neovim startup time
Stars: ✭ 53 (+39.47%)
Mutual labels:  neovim-plugin
stabilize.nvim
Neovim plugin to stabilize window open/close events.
Stars: ✭ 295 (+676.32%)
Mutual labels:  neovim-plugin
cutlass.nvim
Plugin that adds a 'cut' operation separate from 'delete'
Stars: ✭ 78 (+105.26%)
Mutual labels:  neovim-plugin

sad.nvim

Space Age seD in neovim. A project wide find and replace plugin with sad & fzf

This plug is a wrapper for sad by ms-jqd

You need

  • install sad
  • fzf so you can confirm/select the matches to apply your changes
  • by default the plugin using fd to list all files in the current folder, you can use git ls_file
  • a pager tool, e.g. delta
Sad_github.nvim.mp4

install

Plug 'ray-x/guihua.lua'  "lua GUI lib
Plug 'ray-x/sad.nvim'

Configure

require'sad'.setup({
  diff = 'delta', -- you can use `diff`, `diff-so-fancy`
  ls_file = 'fd', -- also git ls_file
  exact = false, -- exact match
  vsplit = true, -- split sad window the screen vertically, when set to number
  -- it is a threadhold when window is larger than the threshold sad will split vertically,
  height_ratio = 0.6, -- height ratio of sad window when split horizontally
  width_ratio = 0.6, -- height ratio of sad window when split vertically

})

usage

  • If you put your cursor on the word want to replace or visual select the word you want to replace, simply run
:Sad

You will be prompt to input new word to be replace

  • replace all oldtext to newtext for all project files
:Sad oldtext newtext
  • add file filter, e.g lua files
:Sad oldtext newtext lua
  • The lua way, you can add key map
-- replace old with new
lua require'sad'.replace('old', 'new')

-- or replace old with input for 'md' files
lua require'sad'.replace('old', nil, 'md')

-- or replace expand('<word>') or visual select with 'new' for md files
lua require'sad'.replace(nil, 'new', 'md')

-- or replace expand('<word>') or visual select with your input for md files
lua require'sad'.replace(nil, nil, 'md')

confirm or cancel

  • <Tab> To toggle the individual item in the replacement list
  • <CR> to confirm and apply all the replacement
  • <Esc> to cancel all changes
  • <Ctrl-a> toggle select all

Alternatives

  • vim&neovim: far.vim a vim plugin with python & vimscript

  • neovim: nvim-spectre Lua plugin, find with rg and replace with sed

    and most importantly, with realtime preview

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].