Play 2048 inside your favourite editor
Implementation of the
2048
game for Neovim.
https://github.com/NStefan002/2048.nvim/assets/100767853/b53c7947-c457-4b5f-814c-f07416ac182d
lazy:
{
"NStefan002/2048.nvim",
cmd = "Play2048",
config = true,
}
use({
"NStefan002/2048.nvim",
config = function()
require("2048").setup()
end,
})
:Rocks install 2048.nvim
:Play2048
h
, j
, k
, l
to move the squares in the desired direction.h
- move the squares to the leftj
- move the squares downk
- move the squares upl
- move the squares to the rightu
- undo the last mover
- restart the gamen
- new game (select the board size)<CR>
- confirm in menus<Esc>
- cancel in menusNOTE:
require("2048").setup({
keys = {
up = "<Up>",
down = "<Down>",
left = "<Left>",
right = "<Right>",
undo = "<C-z>",
restart = "R",
new_game = "N",
confirm = "y",
cancel = "n",
},
})