From 04193635e97e5c0e09cbf57210ae054c041d0ae7 Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 29 Jun 2026 23:13:19 +0200 Subject: [PATCH] feat: add keybinds --- init.vim | 3 ++- {old_lua => lua}/buffer_closer/init.lua | 0 {old_lua => lua/config}/keybinds.lua | 23 +++++++++++------------ 3 files changed, 13 insertions(+), 13 deletions(-) rename {old_lua => lua}/buffer_closer/init.lua (100%) rename {old_lua => lua/config}/keybinds.lua (69%) diff --git a/init.vim b/init.vim index 40d7ca4..04d4669 100644 --- a/init.vim +++ b/init.vim @@ -1,10 +1,11 @@ lua require('config.settings') +lua require('config.keybinds') + " vim.fn.stdpath("data") "lua require('plugins') "lua require('plugin_settings') "lua require('color_scheme') "lua require('settings') -"lua require('keybinds') "lua require('lsp/lsp_init') "lua require('status_line') "lua require('neotree') diff --git a/old_lua/buffer_closer/init.lua b/lua/buffer_closer/init.lua similarity index 100% rename from old_lua/buffer_closer/init.lua rename to lua/buffer_closer/init.lua diff --git a/old_lua/keybinds.lua b/lua/config/keybinds.lua similarity index 69% rename from old_lua/keybinds.lua rename to lua/config/keybinds.lua index cfb5b5c..2c48c31 100644 --- a/old_lua/keybinds.lua +++ b/lua/config/keybinds.lua @@ -1,11 +1,11 @@ +vim.api.nvim_create_user_command('W', "update", { nargs='?'}) + local bind = vim.keymap.set vim.g.mapleader = "," bind('n', 'v', 'vspl', { desc = 'Vertical split' }) --bind('n', 'e', 'e .set relativenumber', { desc = 'Netrw file manager' }) -bind('n', 'e', 'Neotree toggle', { desc = 'Neotree' }) -bind('n', '', 'Neotree reveal') -- Buffer navigation bind('n', '', 'bp', { desc = 'Buffer previous' }) @@ -37,20 +37,19 @@ bind('n', 'w', '%s/\\s\\+$/nohlsearch', { desc = 'Dele bind('n', 'cc', 'cclose') bind('n', 'co', 'copen') -vim.api.nvim_create_user_command('W', "update", { nargs='?'}) -- Telescope -bind('n', 'ff', 'Telescope find_files') +-- bind('n', 'ff', 'Telescope find_files') -- bind('n', 'fg', 'Telescope live_grep') -bind('n', 'fg', require("telescope").extensions.live_grep_args.live_grep_args, { noremap = true }) -bind('n', 'fb', 'Telescope buffers') -bind('n', 'fh', 'Telescope help_tags') +-- bind('n', 'fg', require("telescope").extensions.live_grep_args.live_grep_args, { noremap = true }) +-- bind('n', 'fb', 'Telescope buffers') +-- bind('n', 'fh', 'Telescope help_tags') -vim.api.nvim_create_user_command('MyFuncs', require('my_funcs').reopen, { nargs='?'}) -bind('n', 'r', 'MyFuncs') +-- Testing funcs +-- vim.api.nvim_create_user_command('MyFuncs', require('my_funcs').reopen, { nargs='?'}) +-- bind('n', 'r', 'MyFuncs') -vim.api.nvim_create_user_command('MyFuncsPP', require('my_funcs').print_path, { nargs='?'}) -bind('n', 'pp', 'MyFuncsPP') +-- vim.api.nvim_create_user_command('MyFuncsPP', require('my_funcs').print_path, { nargs='?'}) +-- bind('n', 'pp', 'MyFuncsPP') -- bind({'n', 'i'}, '', 'w', { desc = 'Save with CTRL+s' }) -vim.api.nvim_create_user_command('GoVoyeur', require('goVoyeur').file_saved, { nargs='?'})