# nvim **Repository Path**: sunnylai/nvim ## Basic Information - **Project Name**: nvim - **Description**: No description available - **Primary Language**: VimL - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-27 - **Last Updated**: 2023-10-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## NeoVim - My neovim settings ### Preliminary preparation ###### Install necessary application - nodejs, npm ``` bash sudo pacman -S nodejs npm ``` - fzf, Ag (the_silver_searcher) ``` bash # fzf git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install # ag sudo pacman -S the_silver_searcher ``` ###### Install npm package - neovim ``` bash sudo npm install -g neovim ``` - instant-markdown-d ``` bash sudo npm install -g instant-markdown-d ``` ###### Install python package - pynvim ```bash pip install pynvim ``` - smdv ``` bash pip install --user smdv ```
#### Keyboard Shortcuts ###### The Most Basics **`k`** : switchs to **INSERT** :mode (same as key `i` in vanilla vim)
**`Q`** : quits current vim window (same as key `:q` in vanilla vim)
**`S`** : saves the current file (same as command `:w` in vanilla vim)

###### IMPORTANT Since the `i` key has ben mapped to `k`, every command(combination) that involves `i` should use `k` instead(for example, `ciw` should be `ckw`).

###### Remapped Cursor Movement | Shortcuts | Action | Equivalent | |:---------:|---------------------------------|------------| | `u` | Cursor up a terminal line | `k` | | `e` | Cursor down a terminal line | `j` | | `n` | Cursor left | `h` | | `i` | Cursor right | `l` | | `U` | Cursor up 5 terminal line | `5k` | | `E` | Cursor down 5 terminal line | `5j` | | `N` | Cursor to the start of the line | `0` | | `I` | Cursor to the end of the line | `$` | | `W` | Move cursor 5 words next | `5w` | | `B` | Move cursor 5 words forward | `5b` |
###### Remapped Text Manipulating Commands in Normal Mode | Shortcut | Action | |:--------:|-----------| | `l` | undo | | `<` | un-indent | | `>` | indent |
#### Plugins KeyBindings ###### AutoCompletion - COC (AutoCompletion) | Shortcut | Action | |:---------------:|-----------------------| | `gd` | Go to definition | | `gr` | List references | | `gi` | List implementation | | `gy` | Go to type definition | | `Space` `r` `n` | Rename a variable |
###### File Navigation - coc-explorer(file broweser) | Shortcut | Action | |:--------:|-------------------------| | `tt` | Open file browser | | `?` | Show help (in explorer) | - FZF - the fuzzy file finder | Shortcut | Action | |:----------:|------------------| | `Ctrl` `p` | FZF Files | | `Ctrl` `u` | Move up 1 item | | `Ctrl` `e` | Move down 1 item |
###### Text Editing Plugins - vim-table-mode | Shortcut | Action | |:---------------:|-------------------| | `SPACE` `t` `m` | Toggle table mode | | `SPACE` `t` `r` | Relign table |