A guide for editing, navigation, plugins, and Verilog workflows.
- File Operations
- Navigation
- Splits & Tabs
- Search & Replace
- Commenting
- Verilog-Specific
- Plugins
- Diff Tools
- Clipboard
:enew " Create new buffer
:w filename.txt " Save as filename.txt
:wq or :x " Save and quit
:q! " Quit without saving :e path/to/file.txt " Open file in current buffer
:Ex " Open file explorer h, j, k, l " Left, Down, Up, Right
w, b " Next/previous word
0, $ " Start/end of line
gg, G " Top/bottom of file
Ctrl + u, Ctrl + d " Half-page up/down gd " Go to definition (LSP)
Ctrl + ] " Jump to tag (ctags)
gr " Find references (LSP) (Requires Telescope)
:Telescope find_files " Search files
:Telescope live_grep " Search text in files :sp file.txt " Horizontal split
:vsp file.txt " Vertical split
Ctrl + w + h/j/k/l " Move between splits
Ctrl + w + c " Close split :tabnew file.txt " Open in new tab
gt, gT " Next/previous tab /pattern " Search forward
?pattern " Search backward
n, N " Next/previous match
:%s/old/new/g " Replace all :s/^/\/\/ " Comment line (Verilog)
:s/^\/\/// " Uncomment - Comment.nvim:
gcc " Toggle line comment gbc " Toggle block comment
- vim-commentary:
gcc " Toggle comment
-- init.lua
require('lspconfig').verible.setup{} Keymaps:
gd: Go to definitionK: Hover documentation
ctags -R --languages=verilog " Generate tags Ctrl + ] " Jump to tag :!gtkwave waveform.vcd -- Packer.nvim
use {
'numToStr/Comment.nvim', " Commenting
'nvim-telescope/telescope.nvim', " Fuzzy search
'sindrets/diffview.nvim', " Diff tools
} nvim -d file1.v file2.v Commands:
]c, [c " Next/previous diff
:diffupdate " Refresh diff :DiffviewOpen file1.v file2.v Ctrl + Shift + V: Paste from system clipboard."+p: Paste from Neovim’s clipboard.
sudo apt install xclip # Linux - Reload Config:
:luafile % - Check Filetype:
:set ft? - Custom Keymaps: Add to
init.lua:vim.keymap.set('n', '<leader>ff', ':Telescope find_files<CR>')
Enjoy your Neovim journey! 🚀