init
This commit is contained in:
commit
1e2ca5a6fc
71 changed files with 3330 additions and 0 deletions
79
config/keymaps.nix
Normal file
79
config/keymaps.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
keymaps = [
|
||||
{
|
||||
# vim.keymap.set({ "n", "v" }, "\\y", '"+y', {noremap=true, silent=true})
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "\\y";
|
||||
action = "\"+y";
|
||||
options = {
|
||||
silent = true;
|
||||
remap = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>bp";
|
||||
action = "<CMD>bprev<CR>";
|
||||
options.desc = "Previous buffer";
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>bn";
|
||||
action = "<CMD>bnext<CR>";
|
||||
options.desc = "Next buffer";
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>bd";
|
||||
action = "<CMD>bdelete<CR>";
|
||||
options.desc = "Delete buffer";
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>bD";
|
||||
action = "<CMD>bdelete!<CR>";
|
||||
options.desc = "Delete buffer !";
|
||||
}
|
||||
|
||||
# https://www.youtube.com/watch?v=w7i4amO_zaE
|
||||
# keep search result in the middle of the screen
|
||||
{
|
||||
mode = [ "n" ];
|
||||
key = "n";
|
||||
action = "nzzzv";
|
||||
}
|
||||
# keep search result in the middle of the screen
|
||||
{
|
||||
mode = [ "n" ];
|
||||
key = "N";
|
||||
action = "Nzzzv";
|
||||
}
|
||||
# preserve previously copyed text when pasting when highlighting text
|
||||
# otherwise, previously copyed text will be lost and clipboard will be filled with highlighted text
|
||||
{
|
||||
mode = [ "x" ];
|
||||
key = "<leader>p";
|
||||
action = "\"_dP";
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
-- see ":help default-mapping"
|
||||
-- vim.cmd[[unmap Y]]
|
||||
vim.keymap.del( "n", "Y" )
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue