/nvim

comfy neovim config

Primary LanguageLuaMIT LicenseMIT

LelouchFR's Neovim Config

Table of Content:

Preview

Installation

to install my configuration, you can simply do:

git clone https://github.com/lelouchfr/nvim.git

after that, to install the plugins (more infos about the plugin used here), go into neovim and run:

:PlugInstall

Plugins

Keymaps

normal keymap running description
normal ; : go in command mode
normal <leader>rn <cmd>set rnu!<CR> toggle relative line numbers
normal <leader>n <cmd>set nu!<CR> toggle line numbers
normal <C-c> <cmd>%y+ copy the whole file
insert jk <Esc> go in normal mode
terminal jk <C-\\><C-n> go in nterm mode
insert <C-h> <Left> moving in insert mode
insert <C-j> <Down> moving in insert mode
insert <C-k> <Up> moving in insert mode
insert <C-l> <Right> moving in insert mode
normal <M-j> jzz scroll down code by having the cursor in the middle of the buffer
normal <M-k> kzz scroll down code by having the cursor in the middle of the buffer
normal <C-A-j> :m+1<CR>== move a line down
normal <C-A-k> :m-2<CR>== move a line up
visual "<C-A-j>" :'<,'>move '>+1<CR>gv=gv move lines down in visual mode
visual <C-A-k> :'<,'>move '<-2<CR>gv=gv move lines up in visual mode
visual > <gv unindent
visual < >gv indent
normal <C-n> :NvimTreeToggle<CR> toggle file tree
normal <Tab> :BufferLineCycleNext<CR> go to next buffer
normal <S-Tab> :BufferLineCyclePrev<CR> go to previous buffer
normal <leader>x :bd<CR> close buffer
normal <leader>/ gcc toggle comments
visual <leader>/ gc toggle comments (in visual mode)
normal <leader>ff builtin.find_files telescope files
normal <leader>fg builtin.live_grep telescope grep
normal <leader>fb builtin.buffers telescope buffer
normal <leader>fh builtin.help_tags telescope help tags