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

https://github.com/sokhuong-uon/nvim

VSCode-Neovim keybinding config using Lua
https://github.com/sokhuong-uon/nvim

config configs custom keybindings neovim settings shortcuts vim vscode whichkey

Last synced: 6 months ago
JSON representation

VSCode-Neovim keybinding config using Lua

Awesome Lists containing this project

README

          

# Neovim config for using with VSCode

## Installation (Linux)
### 1. Download
```bash
bash <(curl -s https://raw.githubusercontent.com/sokhuong-uon/nvim/main/installer.sh)
```
or clone this repo into your `.config` folder

### 2. Config
Point VSCode Neovim config path to `init.lua`.

## VSCode extensions needed

- [vscode-neovim](https://github.com/vscode-neovim/vscode-neovim)
- [whichkey](https://github.com/VSpaceCode/vscode-which-key) (optional)

## Plugins

- [folke/flash.nvim](https://github.com/folke/flash.nvim).
- [kylechui/nvim-surround](https://github.com/kylechui/nvim-surround).

## Keybinding

**_Note_**: leader is set to Space .

| Binding | What it does | Mode | VSCode command |
| -------------------------------- | -------------------------- | ----- | ------------------------------- |
| | Show whichkey menu. | `N` | `whichkey.show` |
| + | Show Command Palette. | `N` | `workbench.action.showCommands` |
| + / | Comment out selected code. | `N/V` | `editor.action.commentLine` |

### - Refactor

| Binding | What it does | Mode | VSCode command |
| ----------------------------------------------- | ------------------- | ----- | ---------------------------------- |
| + r | Show refactor menu. | `N/V` | `editor.action.refactor` |
| + r + r | Rename symbol. | `N` | `editor.action.rename` |
| + r + i | Organize import. | `N` | `editor.action.organizeImports` |
| + r + c | Remove console log. | `N` | **`:g/\\vconsole[.][lgtc]/d`** |

### - HTML Emmet

| Binding | What it does | Mode | VSCode command |
| ----------------------------------------------- | ------------------------------ | ----- | ------------------------------------------ |
| + r + w | Wrap ``/s in another tag. | `N/V` | `editor.emmet.action.wrapWithAbbreviation` |
| + r + d | Delete HTML ``. | `N` | `editor.emmet.action.removeTag` |
| + r + u | Update HTML ``. | `N` | `editor.emmet.action.updateTag` |

### - Buffer/Active Editor/Tab

| Binding | What it does | Mode | VSCode command |
| ----------------------------------------------- | ------------------------------------------- | ---- | --------------------------------------------------------------- |
| + w | Close active editor. | `N` | `workbench.action.closeActiveEditor` |
| + W | Close other active editor/s. | `N` | `workbench.action.closeOtherEditors` |
| + b + t | Show active eidtor in file explorer. | `N` | `workbench.files.action.showActiveFileInExplorer` |
| + b + r | Rename file. | `N` | `workbench.files.action.showActiveFileInExplorer`, `renameFile` |
| + b + n | New file in the same folder as active file. | `N` | `workbench.explorer.fileView.focus`, `explorer.newFile` |
| Ctrl + s | Save file. | `N` | Ctrl + s |

### - Explore/list navigation

https://github.com/vscode-neovim/vscode-neovim#explorerlist-navigation

### - File explorer manipulation

https://github.com/vscode-neovim/vscode-neovim#explorer-file-manipulation