dotfiles/config/linux-dev/nvim/docs/neovim-actions.md
Tomas Mirchev f1b3dbb9c3 nvim-upgrade (#4)
Reviewed-on: #4
Co-authored-by: Tomas Mirchev <contact@tomastm.com>
Co-committed-by: Tomas Mirchev <contact@tomastm.com>
2025-10-20 13:57:13 +00:00

95 lines
4.0 KiB
Markdown

-- Window Creation/Closing
Ctrl-w s - Split window horizontally
Ctrl-w v - Split window vertically
Ctrl-w n - Create new window horizontally with empty buffer
Ctrl-w c - Close current window
Ctrl-w o - Close all windows except current one
-- Window Navigation
Ctrl-h - Move to window on the left
Ctrl-j - Move to window below
Ctrl-k - Move to window above
Ctrl-l - Move to window on the right
-- Window Moving/Rearranging
Ctrl-w H - Move current window to far left
Ctrl-w J - Move current window to bottom
Ctrl-w K - Move current window to top
Ctrl-w L - Move current window to far right
-- Window Resizing
Ctrl-w = - Make all windows equal size
Ctrl-w _ - Maximize height of current window
Ctrl-w | - Maximize width of current window
Ctrl-w > - Increase width by 5 column
Ctrl-w < - Decrease width by 5 column
Ctrl-w + - Increase height by 5 row
Ctrl-w - - Decrease height by 5 row
-- Window Special Commands
Ctrl-w T - Move current window to new tab
Ctrl-w } - Preview definition in new window
Ctrl-w z - Close preview window
-- Tab
<Leader>t] :tabnext - Go to next tab
<Leader>t[ :tabprevious - Go to previous tab
<Leader>tn :tabnew - Create a new tab
<Leader>tc :tabclose - Close current tab
<Leader>to :tabonly - Close all other tabs
<Leader>{n} :{n}gt - Go to tab {n}
-- Buffer
-- note: mainly using the telescope one
<Leader>space telescope.buffers - open buffers with telescope. there can navigate and delete
<Leader>bl :ls - List all buffers
<Leader>bd :bdelete - Delete current buffer
<Leader>bn :bnext - Go to next buffer
<Leader>bp :bprevious - Go to previous buffer
<Leader>b{n} :buffer {n} - Go to buffer {n}
<Leader>bb :b<Space> - Start buffer selection
<Leader>bo :bufdo bd|1bd - Delete all other buffers
-- Telescope
<Leader>ff telescope.find_files - Search Files
<Leader>fg telescope.live_grep - Search by Grep
<Leader>fb telescope.buffers - Search Buffers
<Leader>fh telescope.help_tags - Search Help
<Leader>fp telescope.projects - Search Projects
<Leader>fm telescope.marks - Search Marks
<Leader>fc telescope.commands - Search Commands
<Leader>fk telescope.keymaps - Search Keymaps
<Leader>fs telescope.git_status - Search Git Status
<Leader>fw telescope.grep_string - Search current Word
<Leader>fd telescope.diagnostics - Search Diagnostics
<Leader>fr telescope.lsp_references - Search References
-- Neo-tree
<Leader>e :NvimTree toggle - Explorer Toggle
<Leader>E :NvimTree focus - Explorer Focus
-- Harpoon
<Leader>h harpoon_ui.toggle_menu - Harpoon Menu
<Leader>m harpoon_mark.add_file - Mark File
<Leader>1 harpoon_ui.nav_file(1) - Harpoon File 1
<Leader>2 harpoon_ui.nav_file(2) - Harpoon File 2
<Leader>3 harpoon_ui.nav_file(3) - Harpoon File 3
<Leader>4 harpoon_ui.nav_file(4) - Harpoon File 4
<Leader>hn harpoon_ui.nav_next - Harpoon Next
<Leader>hp harpoon_ui.nav_prev - Harpoon Previous
-- Terminal
<Leader>tet :terminal cd %:h - Terminal in This dir
<Leader>ter :terminal - Terminal Regular
<Leader>tec :!cd %:h && - Terminal Command
<Esc> <C-\><C-n> - Terminal Normal Mode
<C-w> <C-\><C-n><C-w> - Terminal Window Command
-- LSP
gd vim.lsp.buf.definition - Goto Definition
gr vim.lsp.buf.references - Goto References
K vim.lsp.buf.hover - Hover Documentation
<Leader>rn vim.lsp.buf.rename - Rename
<Leader>ca vim.lsp.buf.code_action - Code Action
<Leader>f vim.lsp.buf.format - Format