Skip to content

Commit

Permalink
[neovim] Add keymaps to move lines
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella committed Jan 23, 2024
1 parent 56d396d commit 9cafb7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions home/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

programs.fish.shellAbbrs = {
"gc!" = "git commit -v --amend";
"gd!" = "git diff --cached";
"gp!" = "git push --force-with-lease";
ga = "git add";
gaa = "git add --all";
Expand Down
4 changes: 4 additions & 0 deletions home/neovim/extra-config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ vim.keymap.set("n", "n", "nzz", {})
-- https://twitter.com/adib_hanna/status/1657074745978781701
vim.keymap.set("n", "j", "jzz", {})
vim.keymap.set("n", "k", "kzz", {})
-- https://github.com/ThePrimeagen/init.lua/blob/master/lua/theprimeagen/remap.lua
-- https://vimtricks.com/p/vimtrick-moving-lines/
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")

0 comments on commit 9cafb7b

Please sign in to comment.