add some mappings
This commit is contained in:
parent
89ab7f7be9
commit
7d23b8c24e
2
init.lua
2
init.lua
@ -5,14 +5,12 @@ require "misc-utils"
|
|||||||
require "top-bufferline"
|
require "top-bufferline"
|
||||||
require("colorizer").setup()
|
require("colorizer").setup()
|
||||||
|
|
||||||
local cmd = vim.cmd
|
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
|
|
||||||
g.mapleader = " "
|
g.mapleader = " "
|
||||||
g.auto_save = 0
|
g.auto_save = 0
|
||||||
|
|
||||||
-- colorscheme related stuff
|
-- colorscheme related stuff
|
||||||
cmd "syntax on"
|
|
||||||
|
|
||||||
g.nvchad_theme = "onedark"
|
g.nvchad_theme = "onedark"
|
||||||
local base16 = require "base16"
|
local base16 = require "base16"
|
||||||
|
@ -33,14 +33,14 @@ map("n", "<leader>n", [[ <Cmd> set nu!<CR>]], opt)
|
|||||||
map("n", "<leader>z", ":TZAtaraxis<CR>", opt)
|
map("n", "<leader>z", ":TZAtaraxis<CR>", opt)
|
||||||
map("n", "<leader>m", ":TZMinimalist<CR>", opt)
|
map("n", "<leader>m", ":TZMinimalist<CR>", opt)
|
||||||
|
|
||||||
map("n", "<C-s>", [[ <Cmd> w <CR>]], opt)
|
map("n", "<C-s>", ":w <CR>", opt)
|
||||||
-- vim.cmd("inoremap jh <Esc>")
|
-- vim.cmd("inoremap jh <Esc>")
|
||||||
|
|
||||||
-- Commenter Keybinding
|
-- Commenter Keybinding
|
||||||
map("n", "<leader>/", ":CommentToggle<CR>", {noremap = true, silent = true})
|
map("n", "<leader>/", ":CommentToggle<CR>", {noremap = true, silent = true})
|
||||||
map("v", "<leader>/", ":CommentToggle<CR>", {noremap = true, silent = true})
|
map("v", "<leader>/", ":CommentToggle<CR>", {noremap = true, silent = true})
|
||||||
|
|
||||||
map("n","<C-q>",":BufDel", opt)
|
map("n", "<C-q>", ":bp<bar>sp<bar>bn<bar>bd! <CR>", opt)
|
||||||
|
|
||||||
-- compe stuff
|
-- compe stuff
|
||||||
|
|
||||||
@ -123,3 +123,11 @@ map("n", "<Leader>fp", [[<Cmd>lua require('telescope').extensions.media_files.me
|
|||||||
map("n", "<Leader>fb", [[<Cmd>Telescope Buffers<CR>]], opt)
|
map("n", "<Leader>fb", [[<Cmd>Telescope Buffers<CR>]], opt)
|
||||||
map("n", "<Leader>fh", [[<Cmd>Telescope help_tags<CR>]], opt)
|
map("n", "<Leader>fh", [[<Cmd>Telescope help_tags<CR>]], opt)
|
||||||
map("n", "<Leader>fo", [[<Cmd>Telescope oldfiles<CR>]], opt)
|
map("n", "<Leader>fo", [[<Cmd>Telescope oldfiles<CR>]], opt)
|
||||||
|
|
||||||
|
-- bufferline tab stuff
|
||||||
|
map("n", "<S-t>", [[<Cmd>tabnew<CR>]], opt) -- new tab
|
||||||
|
map("n", "<S-x>", [[<Cmd>bdelete<CR>]], opt) -- close tab
|
||||||
|
|
||||||
|
-- move between tabs
|
||||||
|
map("n", "<TAB>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
|
||||||
|
map("n", "<S-TAB>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)
|
||||||
|
@ -17,15 +17,3 @@ require "bufferline".setup {
|
|||||||
mappings = "true"
|
mappings = "true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local opt = {silent = true}
|
|
||||||
local map = vim.api.nvim_set_keymap
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
|
|
||||||
-- MAPPINGS
|
|
||||||
map("n", "<S-t>", [[<Cmd>tabnew<CR>]], opt) -- new tab
|
|
||||||
map("n", "<S-x>", [[<Cmd>bdelete<CR>]], opt) -- close tab
|
|
||||||
|
|
||||||
-- move between tabs
|
|
||||||
map("n", "<TAB>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
|
|
||||||
map("n", "<S-TAB>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user