An open API service indexing awesome lists of open source software.

https://github.com/zelongguo/nvim

My neovim settings.
https://github.com/zelongguo/nvim

lua neovim vim vimscript

Last synced: about 2 months ago
JSON representation

My neovim settings.

Awesome Lists containing this project

README

          

# NeoVim

> Now I have moved to lua script, if you are using vim or just want using vim script, please see another branch. The configuration of vim script may be quite different between lua script.

## All In One
```bash
~/.config/nvim/
├── Readme.md
├── TODO.md
├── ftplugin # the filetype info which would be load based on file type
├── init.lua # nvim confnguration entrance
├── lazy-lock.json # plugins version info
├── lua
│   ├── config
│   │   ├── defaults.lua
│   │   ├── keymaps.lua
│   │   └── lazy.lua
│   ├── plugins # plugins of lazy.vim
│   │   ├── deprecated
│   │   ├── editor
│   │   ├── lang
│   │   ├── lsp
│   │   └── ui
│   └── utils
├── requirements.txt
├── spell
└── ultisnips
```

## Requirements
- NeoVIM v0.10+, for more please refer to requirements.txt

## Key Binding and Plugins

### Default mappings
| keys | operations | mode |
|----------------------|-------------------------------------------|--------|
| **Cursor Move:** | | |
| `i` | up | N |
| `k` | down | N |
| `j` | left | N |
| `l` | right | N |
| `I` | 5i | N |
| `K` | 5k | N |
| `J` | 5j | N |
| `L` | 5l | N |
| `W` | jump 5 words backward | N |
| `B` | jump 5 words forward | N |
| `` | jump to the top of the current screen | N |
| `` | jump to the bottom of the current screen | N |
| `` | jump to the middle of the current screen | N |
| `` | jump to the beginning of the current line | N |
| `` | jump to the end of the current line | N |
| `f` | find backward | N |
| **`F`** | find forward | N |
| `H` | insert from the beginning of the line | N -> I |
| `A` | insert from the end of the line | N -> I |
| `` | backspace | I |
| `` | delete | I |
| ~~**Placeholder:**~~ | | |
| `` | go to next place holder (N) | N |
| `,f` | go to next place holder (I) | I |
| **Highlight:** | | |
| `` | cancel highlights | N |
| **Others:** | | |
| `` | back to Normal mode | I & V |
| `S` | save current file | N |
| `Q` | quit | N |

### Buffers and tabs management
> More tabs and buffers management see related plugins:
telescope ....

#### Tabs management

| keys | operations | keys | operations |
|-------------|--------------------------|--------------------|----------------|
| **Default** | | **bufferline.vim** | |
| `tn` | new **empty** tab | `t1` | go to 1st tab |
| `tN` | new **duplicated** tab | `t2` | go to 2nd tab |
| `tl` | move to next tab | ... | .... |
| `tj` | move to prev tab | `t9` | go to 9th tab |
| `tml` | move current tab to next | `t ` | go to last tab |
| `tmj` | move current tab to prev | `t ` = `t1` | go to 1st tab |

#### Buffers (windows / panels) management under current tab
Default key maps

| keys | operations |
|-------------------------------|----------------------------------------------------|
| **Create buffers:** | |
| `sn` | new **empty** buffer (default to right vertically) |
| `si` | new **empty** buffer up horizontal |
| `sk` | new **empty** buffer bottom horizontal |
| `sj` | new **empty** buffer left vertically |
| `sl` | new **empty** buffer right vertically, (=`sn`) |
| `sI` | new **duplicated** buffer up |
| `sK` | new **duplicated** buffer down |
| `sJ` | new **duplicated** buffer left |
| `sL` | new **duplicated** buffer right |
| **Move buffers:** | |
| `i` | move to up buffer |
| `k` | move to down buffer |
| `j` | move to left buffer |
| `l` | move to right buffer |
| **Switch between buffers:** | |
| `sml` (= `smj` = `si` = `sk`) | rotate the buffers |
| **Resize buffers:** | |
| `` | resize +5 |
| `` | resize +5 |
| `` | vertical resize -5 |
| `` | vertical resize +5 |

> TODO: Setting for toggling between horizontal and vertical buffer views?

Tabs management in **telescope.vim**
> Further read of telescope help is needed for getting smoother experiences ...

Telescope Startup & Searching Set-ups:
| keys | operations |
|--------------|--------------------------------------------------|
| `ff` | find files |
| `fg` | find characters, `live_grep` |
| `fh` | help pages |
| `fr` | recent files |
| `fb` | find buffers |
| `ft` | find tabs (rely on the telescope-tab dependency) |

Navigation in Insert and Normal Modes:
| keys | operations | keys | operations |
|------------------|--------------|------------------|------------------------------|
| **Insert Mode:** | | **Normal Mode:** | |
| `` | move up | `i` | move up |
| `` | move left | `j` | move left |
| `` | move down | `k` | move down |
| `` | move right | `l` | move right |
| `` | close | `` | close |
| `` | prev history | `gg` | move to top |
| `` | next history | `G` | move to bottom |
| | | `?` | keys shortcuts, `which keys` |

Buffers and Tabs Opening Ways:
| keys | operations |
|-----------|--------------------------------------------------------------------------|
| `` | open in **current buffer** (may follow `tn`), `select_default` |
| *``* | *open in a new tab, **(not recommended)*** |
| *``* | *open in a new vertical buffer under current tab, **(not recommended)*** |

> *Note: here only vertical split supported, using default key maps to toggle buffer views ...*
*`` and `` are not recommended because it may be better if you use nvim default key maps more ...*

*The nvim startup plugin alpha-vim could could lead you a new buffer to open recent files.*

### Plugins

#### VimTex

| keys | operations |
|-------------------|----------------------------------------------|
| `,ll` | compile |
| `,lv` | Locate the cursor position in the PDF file |
| ` + ` | Locate the cursor position in the latex file |
| `,lt` | toggle Table of contents of vimtex |