Changing the find and replace function a bit and removing some unecesary pieces.
This commit is contained in:
parent
3039442306
commit
2757219590
@ -1,6 +1,7 @@
|
|||||||
vim.api.nvim_create_user_command('FindAndReplace', function(opts)
|
vim.api.nvim_create_user_command('FindAndReplace', function(opts)
|
||||||
vim.api.nvim_command(string.format('cdo s/%s/%s', opts.fargs[1], opts.fargs[2]))
|
-- Update each quickfix location using substitute, update the files to save changes, close the opened buffers and close the quickfix window
|
||||||
vim.api.nvim_command('cfdo update')
|
-- TODO: Does not close the buffers opened through changes
|
||||||
|
vim.api.nvim_command(string.format('cdo s/%s/%s/', opts.fargs[1], opts.fargs[2]) .. '| update | cclose')
|
||||||
end, { nargs = '*' })
|
end, { nargs = '*' })
|
||||||
|
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap(
|
||||||
|
|||||||
@ -34,8 +34,7 @@ vim.keymap.set('n', 'J', 'mzJ`z')
|
|||||||
-- Switch or close buffers in the window
|
-- Switch or close buffers in the window
|
||||||
vim.keymap.set('n', '<leader>n', ':bn<CR>', options)
|
vim.keymap.set('n', '<leader>n', ':bn<CR>', options)
|
||||||
vim.keymap.set('n', '<leader>p', ':bp<CR>', options)
|
vim.keymap.set('n', '<leader>p', ':bp<CR>', options)
|
||||||
vim.keymap.set('n', '<leader>x', ':bp<bar>sp<bar>bn<bar>bd<CR>', options)
|
vim.keymap.set('n', '<leader>x', ':bp<bar>vs<bar>bn<bar>bd<CR>', options) -- Previous buffer, split, next buffer, delete buffer
|
||||||
-- vim.keymap.set('n', '<leader>x', ':bp|bd #<CR>', options)
|
|
||||||
|
|
||||||
-- Toggle spellcheck
|
-- Toggle spellcheck
|
||||||
vim.keymap.set('n', '<leader>s', ':set spell!<CR>', options)
|
vim.keymap.set('n', '<leader>s', ':set spell!<CR>', options)
|
||||||
@ -57,6 +56,4 @@ vim.keymap.set('n', '<leader>em', function() cf.execute('benchmark') end)
|
|||||||
|
|
||||||
vim.keymap.set('n', '<leader>eo', ':Lexplore<CR>', options)
|
vim.keymap.set('n', '<leader>eo', ':Lexplore<CR>', options)
|
||||||
|
|
||||||
-- vim.keymap.set('n', '<leader>rn', ':%s/<C-r><C-w>//g<Left><Left>', options)
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>l', ':Lazy<CR>', options)
|
vim.keymap.set('n', '<leader>l', ':Lazy<CR>', options)
|
||||||
|
|||||||
@ -20,7 +20,6 @@ require('lazy').setup({
|
|||||||
require('plugins/comment'),
|
require('plugins/comment'),
|
||||||
require('plugins/dap'),
|
require('plugins/dap'),
|
||||||
require('plugins/dap-python'),
|
require('plugins/dap-python'),
|
||||||
-- require('plugins/inc-rename'),
|
|
||||||
require('plugins/treesitter'),
|
require('plugins/treesitter'),
|
||||||
require('plugins/gitsigns'),
|
require('plugins/gitsigns'),
|
||||||
require('plugins/luasnip'),
|
require('plugins/luasnip'),
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
return {
|
|
||||||
'smjonas/inc-rename.nvim',
|
|
||||||
config = function()
|
|
||||||
require('inc_rename').setup()
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>rn',
|
|
||||||
function()
|
|
||||||
return ':IncRename ' .. vim.fn.expand('<cword>')
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@ -43,17 +43,19 @@ return {
|
|||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'ansiblels',
|
'ansiblels',
|
||||||
'arduino_language_server',
|
'arduino_language_server',
|
||||||
|
'bashls',
|
||||||
'clangd',
|
'clangd',
|
||||||
|
-- 'hadolint', -- Dockerfile linting
|
||||||
'intelephense',
|
'intelephense',
|
||||||
'jdtls',
|
-- 'jdtls', -- java
|
||||||
'lua_ls',
|
'lua_ls',
|
||||||
'marksman',
|
'marksman', -- markdown
|
||||||
'pylsp',
|
'pylsp',
|
||||||
'rust_analyzer',
|
'rust_analyzer',
|
||||||
-- 'r_language_server',
|
-- 'snyk',
|
||||||
'ts_ls',
|
'ts_ls', -- Typscript
|
||||||
|
-- 'volar', -- Vue
|
||||||
'yamlls',
|
'yamlls',
|
||||||
'volar',
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -156,12 +156,6 @@ return {
|
|||||||
require('telescope.builtin').lsp_dynamic_workspace_symbols()
|
require('telescope.builtin').lsp_dynamic_workspace_symbols()
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
|
||||||
';g',
|
|
||||||
function()
|
|
||||||
require('telescope.builtin').grep_string({ search = vim.fn.input('Grep For > ')})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'<leader>rn',
|
'<leader>rn',
|
||||||
function()
|
function()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user