mirror of
https://github.com/arkorty/Neolite.git
synced 2026-03-18 00:57:12 +00:00
Changes to be committed:
renamed: nvim/init.lua -> init.lua renamed: install.sh -> install renamed: nvim/lua/buffer-tabs.lua -> lua/buffer-tabs.lua renamed: nvim/lua/colorschemes.lua -> lua/colorschemes.lua renamed: nvim/lua/completions.lua -> lua/completions.lua renamed: nvim/lua/file-tree.lua -> lua/file-tree.lua renamed: nvim/lua/fuzzy-finder.lua -> lua/fuzzy-finder.lua renamed: nvim/lua/keybinds.lua -> lua/keybinds.lua renamed: nvim/lua/lsp-config.lua -> lua/lsp-config.lua renamed: nvim/lua/lsp-format.lua -> lua/lsp-format.lua renamed: nvim/lua/options.lua -> lua/options.lua renamed: nvim/lua/plugins.lua -> lua/plugins.lua renamed: nvim/lua/statusline.lua -> lua/statusline.lua renamed: nvim/lua/syntax-highlight.lua -> lua/syntax-highlight.lua renamed: nvim/lua/terminal.lua -> lua/terminal.lua
This commit is contained in:
54
lua/keybinds.lua
Normal file
54
lua/keybinds.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
--Local term_opts = { silent = true }
|
||||
local bind = vim.api.nvim_set_keymap
|
||||
local set = vim.keymap.set
|
||||
|
||||
-- Bind a leader key
|
||||
bind("", ";", "<Nop>", opts) -- undo any previous bind
|
||||
vim.g.mapleader = ";"
|
||||
vim.g.maplocalleader = ";"
|
||||
|
||||
-- Modes
|
||||
-- Normal Mode = 'n',
|
||||
-- Insert Mode = 'i',
|
||||
-- Visual Mode = 'v',
|
||||
-- Visual Block Mode = 'x',
|
||||
-- Terminal Mode = 't',
|
||||
-- Command Mode = 'c',
|
||||
|
||||
-- Normal mode --
|
||||
-- Basic commands
|
||||
bind("n", "<Leader>w", ":w<CR>", opts)
|
||||
bind("n", "<Leader>e", ":q<CR>", opts)
|
||||
bind("n", "<Leader>q", ":qa<CR>", opts)
|
||||
|
||||
-- Nvim tree
|
||||
bind("n", "<C-f>", ":NvimTreeToggle<CR>", opts)
|
||||
|
||||
-- Fuzzy finder
|
||||
local telescope_status_ok, telescope = pcall(require, "telescope.builtin")
|
||||
if telescope_status_ok then
|
||||
set("n", "<Leader>ff", telescope.find_files, {})
|
||||
set("n", "<Leader>fg", telescope.live_grep, {})
|
||||
set("n", "<Leader>fb", telescope.buffers, {})
|
||||
set("n", "<Leader>fh", telescope.help_tags, {})
|
||||
end
|
||||
|
||||
-- Better tabs
|
||||
bind("n", "<S-t>", ":tabnew<CR>", opts)
|
||||
bind("n", "<S-c>", ":tabclose<CR>", opts)
|
||||
bind("n", "<S-n>", ":tabprev<CR>", opts)
|
||||
bind("n", "<S-m>", ":tabnext<CR>", opts)
|
||||
|
||||
-- Better window navigation
|
||||
bind("n", "<C-Left>", "<C-w>h", opts)
|
||||
bind("n", "<C-Down>", "<C-w>j", opts)
|
||||
bind("n", "<C-Up>", "<C-w>k", opts)
|
||||
bind("n", "<C-Right>", "<C-w>l", opts)
|
||||
|
||||
-- Resize with arrows
|
||||
bind("n", "<C-k>", ":resize -2<CR>", opts)
|
||||
bind("n", "<C-j>", ":resize +2<CR>", opts)
|
||||
bind("n", "<C-l>", ":vertical resize -2<CR>", opts)
|
||||
bind("n", "<C-h>", ":vertical resize +2<CR>", opts)
|
||||
Reference in New Issue
Block a user