feat: new window navigation mappings
This commit is contained in:
		
							parent
							
								
									b7d5cc8f42
								
							
						
					
					
						commit
						62bcf804c8
					
				
							
								
								
									
										31
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										31
									
								
								init.lua
								
								
								
								
							|  | @ -100,6 +100,7 @@ vim.g.have_nerd_font = false | ||||||
| 
 | 
 | ||||||
| -- Make line numbers default | -- Make line numbers default | ||||||
| vim.opt.number = true | vim.opt.number = true | ||||||
|  | vim.opt.relativenumber = true | ||||||
| -- You can also add relative line numbers, to help with jumping. | -- You can also add relative line numbers, to help with jumping. | ||||||
| --  Experiment for yourself to see if you like it! | --  Experiment for yourself to see if you like it! | ||||||
| -- vim.opt.relativenumber = true | -- vim.opt.relativenumber = true | ||||||
|  | @ -136,8 +137,8 @@ vim.opt.updatetime = 250 | ||||||
| vim.opt.timeoutlen = 300 | vim.opt.timeoutlen = 300 | ||||||
| 
 | 
 | ||||||
| -- Configure how new splits should be opened | -- Configure how new splits should be opened | ||||||
| vim.opt.splitright = true | vim.opt.splitright = false | ||||||
| vim.opt.splitbelow = true | vim.opt.splitbelow = false | ||||||
| 
 | 
 | ||||||
| -- Sets how neovim will display certain whitespace characters in the editor. | -- Sets how neovim will display certain whitespace characters in the editor. | ||||||
| --  See `:help 'list'` | --  See `:help 'list'` | ||||||
|  | @ -185,10 +186,21 @@ vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' } | ||||||
| --  Use CTRL+<hjkl> to switch between windows | --  Use CTRL+<hjkl> to switch between windows | ||||||
| -- | -- | ||||||
| --  See `:help wincmd` for a list of all window commands | --  See `:help wincmd` for a list of all window commands | ||||||
| vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' }) | -- vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' }) | ||||||
| vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' }) | -- vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' }) | ||||||
| vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) | -- vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) | ||||||
| vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) | -- vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) | ||||||
|  | 
 | ||||||
|  | -- [[ Motion Keymaps ]] | ||||||
|  | 
 | ||||||
|  | -- Keymaps for better window Navigation | ||||||
|  | vim.keymap.set('n', '<leader>j', '<c-w>', { silent = true }) | ||||||
|  | 
 | ||||||
|  | -- Keymaps for better tab navigation | ||||||
|  | vim.keymap.set('n', '<leader>k', ':tabnew<CR>', { silent = true }) | ||||||
|  | 
 | ||||||
|  | -- Keymaps for better filesystem navigation | ||||||
|  | vim.keymap.set('n', '<leader>.', ':Ex<CR>', { silent = true }) | ||||||
| 
 | 
 | ||||||
| -- [[ Basic Autocommands ]] | -- [[ Basic Autocommands ]] | ||||||
| --  See `:help lua-guide-autocommands` | --  See `:help lua-guide-autocommands` | ||||||
|  | @ -303,6 +315,13 @@ require('lazy').setup({ | ||||||
|   -- |   -- | ||||||
|   -- Use the `dependencies` key to specify the dependencies of a particular plugin |   -- Use the `dependencies` key to specify the dependencies of a particular plugin | ||||||
| 
 | 
 | ||||||
|  |   -- toggleterm for floating terminal | ||||||
|  |   { | ||||||
|  |     'akinsho/toggleterm.nvim', | ||||||
|  |     version = '*', | ||||||
|  |     config = true, | ||||||
|  |   }, | ||||||
|  | 
 | ||||||
|   { -- Fuzzy Finder (files, lsp, etc) |   { -- Fuzzy Finder (files, lsp, etc) | ||||||
|     'nvim-telescope/telescope.nvim', |     'nvim-telescope/telescope.nvim', | ||||||
|     event = 'VimEnter', |     event = 'VimEnter', | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue