From 07ab4163c6f3203aaa3724689223892e13ca9c0e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 24 Apr 2021 15:29:38 +0530 Subject: [PATCH] Readme: update mapping list --- README.md | 54 ++++++++++++++++++++++++++++++++---------- lua/bufferline/lua.lua | 4 ++-- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 67ad166..9233b32 100644 --- a/README.md +++ b/README.md @@ -158,28 +158,58 @@ I'd install it first and add its setup line : require'lspconfig'.clangd.setup{} `` -# Default Mappings to make stuffs easier! +# Default Mappings - space is the leader key + space is the **leader** key. +- Opening terminals! - Ctrl l Open terminal vertically over right - Ctrl x Open terminal horizontally below the current window + +- **File tree (nvim-tree)** + - Ctrl n toggle neovim tree -- Shift n toggle line number + +- Shift h show hidden files (use these keybinds when cursor's in the filetree, same for the keybinds below). +- Ctrl + v open files in vertical split +- Ctrl + x open files in horizontal split + +- **Toggling stuffs** + +- leader + n toggle line number +- leader + z toggle truezen.nvim's Ataraxis mode +- leader + m toggle truezen.nvim's minimalistic mode + +- **Copy text** + - Ctrl a copies everything in the current file - select any text + y copies the selected text -- leader + z toggle truezen.nvim's Ataraxis mode -- leader + n toggle line number -- leader + f b open all buffers , with telescope -- leader + f p search and preview images with telescope -- leader + f f find files in the current DIR , with telescope -- leader + f o open recently edited files , with telescope -- leader + f f find files in the current DIR , with telescope -- leader + f h opens up a manpage like thing but for all vim related things , with telescope + +- **Telescope** + +- leader + f b open all buffers +- leader + f f find files in the current DIR +- leader + f o open recently edited files +- leader + f f find files in the current DIR +- leader + f h opens up a help page like thing +- Ctrl + v open files in vertical split +- Ctrl + x open files in horizontal split + +- **Formatting code** + - leader + f m formats or beautifies the code in current window via neoformat - (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check this https://github.com/sbdchd/neoformat). + (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check (this)[https://github.com/sbdchd/neoformat]. + +- **Neoscroll** + - ``, ``, ``, ``, `` and `` : Smooth scrolling for window movement commands. +- **Managing tabs with bufferline!** + +- Shift l or s cycle through opened tabs +- Shift d close current tab +- Shift b open new tab + # TODO - Add snippets support. diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index c661f69..b94440e 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -63,10 +63,10 @@ vim.g.mapleader = " " --command that adds new buffer and moves to it vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd | blast" -vim.api.nvim_set_keymap("n", "", ":New ", opt) +vim.api.nvim_set_keymap("n", "", [[tabnew]], opt) --removing a buffer -vim.api.nvim_set_keymap("n", "", [[bdelete]], opt) +vim.api.nvim_set_keymap("n", "", [[bdelete]], opt) -- tabnew and tabprev vim.api.nvim_set_keymap("n", "", [[BufferLineCycleNext]], opt)