diff options
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/lua/mango/packer.lua | 1 | ||||
-rw-r--r-- | .config/nvim/lua/mango/remap.lua | 19 |
2 files changed, 5 insertions, 15 deletions
diff --git a/.config/nvim/lua/mango/packer.lua b/.config/nvim/lua/mango/packer.lua index 83e0ff3..02aa11a 100644 --- a/.config/nvim/lua/mango/packer.lua +++ b/.config/nvim/lua/mango/packer.lua @@ -23,6 +23,7 @@ return require('packer').startup(function(use) use 'kylechui/nvim-surround' use 'mattn/emmet-vim' use 'tpope/vim-commentary' + use 'christoomey/vim-sort-motion' -- Git integration use 'tpope/vim-fugitive' diff --git a/.config/nvim/lua/mango/remap.lua b/.config/nvim/lua/mango/remap.lua index 824ad53..2c41cfc 100644 --- a/.config/nvim/lua/mango/remap.lua +++ b/.config/nvim/lua/mango/remap.lua @@ -42,18 +42,10 @@ remap('i', '<C-+>', '"+pa') remap('nv', "'", '`') remap('nv', '`', "'") --- Transpose characters without clobbering registers -local function transpose_chars(rev) - lib.save_regs('a', function() - vim.cmd.normal('"a' .. (rev and 'X' or 'x') .. '"ap') - end) -end - --- Transpose characters -remap('n', '<leader>t', transpose_chars) -remap('n', '<leader>T', function() - transpose_chars(true) -end) +-- Transpose characters; for some reason it has a noticable delay if I just give +-- a string instead of lambda functions +remap('n', '<leader>t', function() vim.cmd.normal('"zx"zp') end) +remap('n', '<leader>T', function() vim.cmd.normal('"zX"zp') end) -- Open netrw quickly remap('n', '-', ':Ex<CR>') @@ -63,6 +55,3 @@ remap('n', '-', ':Ex<CR>') -- bottom instead of the left or top remap('n', '–', ':vsplit | Ex<CR>') remap('n', 'g–', ':split | Ex<CR>') - --- Sort lines in selection -remap('v', 's', ':sort<CR>') |