Skip to content

Commit

Permalink
neovim - change 'change word'
Browse files Browse the repository at this point in the history
  • Loading branch information
VonHeikemen committed Mar 25, 2022
1 parent cedaae1 commit 400abd2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions my-configs/neovim/lua/conf/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ noremap('n', 'N', 'Nzzzv')
noremap('n', '#', '#zz')
noremap('n', '*', '*zz')

-- Change word, but better
noremap('n', 'cw', '*N"_cgn')

-- Delete in select mode
noremap('s', '<BS>', '<C-g>"_c')
remap('s', '<C-h>', '<BS>')
Expand Down Expand Up @@ -214,6 +211,12 @@ end)
-- == MISCELLANEOUS == --
-- ========================================================================== --

-- Change the whole word
noremap('n', 'cw', '"_ciw')

-- Change word but repeatable
noremap('n', '<leader>cw', "<cmd>let @/='\\<'.expand('<cword>').'\\>'<cr>\"_ciw")

-- Use lightspeed's omni mode
remap('', 's', '<Plug>Lightspeed_omni_s')

Expand Down

0 comments on commit 400abd2

Please sign in to comment.