In this repo I want to keep my neo vim config. It might evolve over time, let's see. Currently I'm just playing around. So don't expect anything functional here....
And right at the moment I'm moving my current setup from init.vim to completely using lua. So at the beginning it will be a downgrade. Stuff is heavily influenced by [neovim configuration from brainfucksec(https://github.com/brainfucksec/neovim-lua)
Needed neovim version >=0.8.0
use :checkhealth
to get a first overview of the current status of the system.
Some specific packages should be present on the system
python3
ruby
git
Make sure to install and enable Nerd Fonts
init.lua
- main configuration file, used to only reference other config fileslua
- Containing all the lua stuffcore
- All main configuration filesoptions.lua
- Config options for vim and neovimkeymaps.lua
- All keybindings, generic and specific for pluginsplugins.lua
- enabling of used plugins. For details see section about plugins
- To exit insert or terminal mode, you can also use
jk
>
,<
for indentation in visual modeShift-h
,Shift-l
to switch between buffers
/
invoke incremental searchC-g
move to next matchC-t
move to previous matchC-p
fzf a fileC-\
fzf open buffersC-l
do a live grep (using rg)C-k
search available keymaps
In insert or command mode you can insert content of a register by pressing C-r <register_name>
where register_name is the according key.
vim offers several different registers. They are either automatically or explicitly filled.
They can be accessed by prepending "
to the register name. For example you are in visual mode
and want to yank the current selection to the named register e, then you would enter "ey
.
To read from the register in insert or command mode you can use C-r <register_name>
These are the different register names:
"
The unnamed register. Contains last yanked/deleted region (if not specifically writing to named register or black hole)-
the last small delete (smaller than a line)_
The black hole. Anything you write to this register is lost.0
-9
Numbered register. Yank/delete fills according region in0
and shifts previous content by one numbera
-z
,A
-Z
named registers. Can be used to store something in it.%
read only Current filename with full path#
alternate filename (the previous file in this buffer, if applicable)*
or+
clipboard/
Last search pattern:
read only Last command line.
read only Last inserted text (Does not work withC-r
on command line)=
The expression register. All subsequent inputs until<CR>
(or<ESC>
) are evaluated as a command (or abandoned)
For handling plugins the packer plugin manager is used. The basic setup should happen automatically.
The overall configuration is handled in lua/core/plugins.lua
. Here you enable all the plugins by adding them to the list. Specific configuration for each plugin is supposed to be done in separate files in lua/plugins/...
.
Whenever you make changes to the plugins configuration you have to run :PackerCompile
.
Here is a list of different commands provided by packer:
-- You must run this or `PackerSync` whenever you make changes to your plugin configuration
-- Regenerate compiled loader file
:PackerCompile
-- Remove any disabled or unused plugins
:PackerClean
-- Clean, then install missing plugins
:PackerInstall
-- Clean, then update and install plugins
-- supports the `--preview` flag as an optional first argument to preview updates
:PackerUpdate
-- Perform `PackerUpdate` and then `PackerCompile`
-- supports the `--preview` flag as an optional first argument to preview updates
:PackerSync
-- Show list of installed plugins
:PackerStatus
-- Loads opt plugin immediately
:PackerLoad completion-nvim ale
nvim-tree
is a file explorer.
Making it easier to browse the available files
Shortcuts
nvim-web-devicons
adds filetype glyphs and colors.
feline
a minimal, stylish and customizable statusline
fzf-lua
lua implementation for using fzf
Some general introduction about fzf on YT
Shortcuts
C-p
Search for filesC-\
Search for buffersC-g
Grep - search for grep expression and then interactively search the resultsC-l
Live grep - interactively search for grep expressionC-k
Keymaps
- nvim - Documentation main page
- nvim lua - Lua documentation by neovim project
- vim diff - Differences between nvim and vim
- Options - Neovim's options listed
- vim cheat sheet - Standard vim cheat sheet, grouped by different modes. Done by Kethqwerty in Notion
- Keyboard layout - A cheat sheet representing all the keys in QWERTY keyboard layout. Done via google docs
- Lua in Y minutes - Quick one page overview about lua
- Quick guide - Another guide