Skip to content

Repository files navigation

Introduction

This is my Neovim configuration for all the platforms I use (Linux, Windows and macOS). init.vim is the config file for terminal Neovim, and ginit.vim is the additional config file for GUI client of Neovim (I am using neovim-qt for now on Windows).

My configurations are heavily documented to make it as clear as possible. While you can download the whole repository and use it, it is not recommended though. Good configurations are personal. Everyone should have his or her unique config file. You are encouraged to copy from this this repo the part you feel useful and add it to your own Nvim config.

See doc here on how to install Nvim's dependencies, Nvim itself and the configuration on different platforms (Linux, macOS and Windows).

Features

Shortcuts

Some of the shortcuts I use frequently. In the following shortcuts, <leader> represents the , character.

ShortcutModeplatformDescription
<leader>fNormalLinux/macOS/WinFuzzy file search in a floating window
<leader>hNormalLinux/macOS/WinFuzzy help search in a floating window
<leader>bNormalLinux/macOS/WinFuzzy buffer tag search in a floating window
<leader><Space>NormalLinux/macOS/WinRemove trailing whitespaces
<leader>vNormalLinux/macOS/WinReselect last pasted text
<leader>evNormalLinux/macOS/WinEdit Neovim config in a new tabpage
<leader>svNormalLinux/macOS/WinReload Neovim config
<leader>qNormalLinux/macOS/WinQuit current window
<leader>QNormalLinux/macOS/WinQuit all window and close Neovim
<leader>wNormalLinux/macOS/WinSave current buffer content
<leader>cdNormalLinux/macOS/WinChange current directory to where current file is
<leader>yNormalLinux/macOS/WinCopy the content of entire buffer to default register
<leader>clNormalLinux/macOS/WinToggle cursor column
<leader>cdNormalLinux/macOS/WinChange current working directory to to the dir of current buffer
<space>tNormalLinux/macOS/WinToggle tag window (show project tags in the right window)
<F11>NormalLinux/macOS/WinToggle spell checking
<F12>NormalLinux/macOS/WinToggle paste mode
\xNormalLinux/macOS/WinClose location or quickfix window
\dNormalLinux/macOS/WinClose current buffer and go to previous buffer
{count}gbNormalLinux/macOS/WinGo to {count} buffer or next buffer in the buffer list.
Alt-MNormalmacOS/WinRender Markdown to HTML and open it in system browser
obNormal/VisualmacOS/WinOpen link under cursor or search visual selection
ctrl-uInsertLinux/macOS/WinTurn word under cursor to upper case
ctrl-tInsertLinux/macOS/WinTurn word under cursor to title case
jkInsertLinux/macOS/WinReturn to Normal mode (faster <ESC>)

Trouble shooting

If you come across an issue, you can first use :checkhealth command provided by nvim to trouble-shoot yourself. Please read carefully the messages provided by health check.

If you still have an issue, you may open a new issue.

Further readings

Some of the resources that I find helpful in mastering Vim is here. You may also be interested in my post in configuring Vim on different platforms:

Footnotes

  1. Not enabled by default for Linux, see this issue on how to enable vimtex on Linux.

About

My custom Neovim configuration with full battery for Python, Markdown, LaTeX and more...

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages