Neovim Keymap Cheatsheet: Josean Martinez’s Configuration
Neovim Keymap Cheatsheet
這篇文章主要是要整理給自己看的筆記 XD
目前使用的是一個 YouTuber, Josean Martinez 的配置:附上連結:
Preview
附上這個配置的一些美美預覽圖:
Cover:

Telescope:

Lazy.nvim:

File Explorer:

Lsp:

Lazy git

Keymaps
Basic
<leader>is eual to<Space>herejkto exit Insert to Normal<leader>nhto clear search highlights<leader>+to increase number<leader>-to decrease number<Ctrl>oto jump backward<Ctrl>ito jump forward
Split
<leader>svto split window vertically<leader>shto split window horizontally<leader>seto make splits equal size<leader>sxto close current split<leader>smto maximize/minimize a split
Tab
<leader>toto open new tab<leader>txto close current tab<leader>tnto go to next tab<leader>tpto go to previous tab<leader>tfto open current window in new tab
Lazy.nvim plugin manager
:Lazyto open plugin manager
Tmux navigator
<Ctrl>h/j/k/lto move between tmux & split window
File explorer
<leader>eeto toggle file explorer<leader>efto toggle file explorer on current file<leader>ecto collapse file explorer<leader>erto refresh file explorer
Which key
- print hint message after typing a letter
Telescope
<leader>ffto fuzzy find files in cwd<leader>frto fuzzey find recent files<leader>fsto find string in cwd<leader>fcto find string under cursor in cwd<leader>ftto find todos<Ctrl>j/kto move in the result<Ctrl>qto quit the telescope
Auto session
<leader>wrto restore session for cwd<leader>wsto save session for cwd
File management
rto rename a fileato add a file
Treesitter
:Inspect Treeto open syntax tree<Ctrl><Spc>to select node and use it again to select parent node
Autocomplete
<Ctrl>kto select previous suggestion<Ctrl>jto select previous suggestion<Ctrl>bto scroll up in docs<Ctrl>fto scroll down in docs<Ctrl><Spc>to show completion suggestion<Ctrl>eto close completion window<Enter>to confirm current selection
Comments
gccto comment/uncomment current linegc<position>to comment/uncommentTODO:in comment to create TODO tagBUGin comment to create BUG tagHACKin comment to create HACK tag
Substitute
sto substitute with motionssto substitute lineSto substitute end of line
Surround
ys<motion>to add surroundingds<motion>to delete surroundingcs<motion>to change surrounding
Lsp
:Masonto open masongRto show definition, referencesgDto go to declarationgdto show lsp definitiongito show lsp implementationsgtto show lsp type definition<leader>cato see available code action<leader>rnto smart rename<leader>Dto show diagnostics<leader>dto show diagnostics for line[dto jump to previous diagnostics in bufferKto show documentation for what is under cursor<leader>rsto mapping to restart lsp if necessary
Trouble
<leader>xxto open/close trouble list<leader>xwto open trouble workspace diagnostics<leader>xdto open trouble document diagnostics<leader>xqto open trouble quick fix list<leader>xlto open trouble location list<leader>xtto open todos in trouble
Linting
<leader>lto trigger linting for current line
Git Integration
]hto go to next hunk[hto go to previous hunk<leader>hsto stage hunk<leader>hrto reset hunk<leader>hSto stage buffer<leader>hRto reset buffer<leader>huto undo stage hunk<leader>hpto preview hunk<leader>hbto blame line<leader>hBto toggle line blame<leader>hdto diff this<leader>hDto diff this ~
Lazygit
<leader>lgto open lazy git
- Title: Neovim Keymap Cheatsheet: Josean Martinez’s Configuration
- Author: kazma
- Created at : 2024-05-01 15:59:06
- Updated at : 2025-08-20 13:53:24
- Link: https://kazma.tw/2024/05/01/Neovim-Keymap-Cheatsheet-Josean-Martinez’s-Configuration/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments





