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
- Host: GitHub
- URL: https://github.com/sokhuong-uon/nvim
- Owner: sokhuong-uon
- License: mit
- Created: 2023-04-07T15:27:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-11T11:56:17.000Z (about 1 year ago)
- Last Synced: 2025-04-09T20:12:01.954Z (6 months ago)
- Topics: config, configs, custom, keybindings, neovim, settings, shortcuts, vim, vscode, whichkey
- Language: Lua
- Homepage:
- Size: 57.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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