Skip to content

Commit

Permalink
NVIM: Added Spectre search & replace plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Powerm1nt committed Mar 5, 2022
1 parent 9d0af2a commit fe222f5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ call plug#begin('~/.vim/plugged')
Plug 'jiangmiao/auto-pairs'
Plug 'qpkorr/vim-bufkill'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'nvim-lua/plenary.nvim'
Plug 'windwp/nvim-spectre'

call plug#end()

Expand Down Expand Up @@ -45,6 +47,14 @@ nnoremap <silent> <space>d :<C-u>CocList diagnostics<cr>
nmap <leader>do <Plug>(coc-codeaction)
nmap <leader>rn <Plug>(coc-rename)
noremap <silent> <C-S> :update<CR>
nnoremap <leader>S <cmd>lua require('spectre').open()<CR>
"search current word
nnoremap <leader>sw <cmd>lua require('spectre').open_visual({select_word=true})<CR>
vnoremap <leader>s <cmd>lua require('spectre').open_visual()<CR>
" search in current file
nnoremap <leader>sp viw:lua require('spectre').open_file_search()<cr>
" run command :Spectre

" COC completion settings
let g:coc_global_extensions = [
Expand Down

0 comments on commit fe222f5

Please sign in to comment.