replace simplevim name

This commit is contained in:
garlandcrow 2022-11-11 09:47:54 +09:00
parent 93922bf31e
commit 1af8b5a225
6 changed files with 34 additions and 34 deletions

View File

@ -1,8 +1,8 @@
# SimpleVim
# HelixKeymap
An opinionated Vim-like extension for VSCode that prioritizes simplicity (of use and implementation) and integration with native VSCode features.
An opinionated Helix-like extension for VSCode that prioritizes simplicity (of use and implementation) and integration with native VSCode features.
Once you enter Insert mode it will be a completely vanilla VSCode experience: the only event SimpleVim will listen for is the `Escape` key to go back to Normal mode.
Once you enter Insert mode it will be a completely vanilla VSCode experience: the only event HelixKeymap will listen for is the `Escape` key to go back to Normal mode.
## Operators
@ -162,34 +162,34 @@ Bookmarks are quick ways to jump to places in code. This requires `alefragnani.b
## Differences From Vim
SimpleVim prioritizes simplicity and integration with native VSCode features over compatability with Vim. If full Vim compatibility is important to you, consider trying a different extension. Here are some of the ways SimpleVim is different from Vim.
HelixKeymap prioritizes simplicity and integration with native VSCode features over compatability with Vim. If full Vim compatibility is important to you, consider trying a different extension. Here are some of the ways HelixKeymap is different from Vim.
- SimpleVim has no macros. Instead it has first class multiple cursor support which you can use to achieve something similar. You can place additional cursors by any of the ways native to VSCode including: `Cmd+d`, `Cmd+Alt+Down` or `Alt+Click`. Simply place cursors everywhere you would have run the macro and see your changes to each place in real time.
- HelixKeymap has no macros. Instead it has first class multiple cursor support which you can use to achieve something similar. You can place additional cursors by any of the ways native to VSCode including: `Cmd+d`, `Cmd+Alt+Down` or `Alt+Click`. Simply place cursors everywhere you would have run the macro and see your changes to each place in real time.
- SimpleVim has no `.` (repeat) command. Use multiple cursors instead (see previous bullet).
- HelixKeymap has no `.` (repeat) command. Use multiple cursors instead (see previous bullet).
- SimpleVim lets the cursor go one past the last character of the line in Normal mode. It would be nice to prevent this, but because of VSCode's selection model and extension API there is no good way to do it. It would require ugly hacks and would make other parts of the SimpleVim experience buggy.
- HelixKeymap lets the cursor go one past the last character of the line in Normal mode. It would be nice to prevent this, but because of VSCode's selection model and extension API there is no good way to do it. It would require ugly hacks and would make other parts of the HelixKeymap experience buggy.
- SimpleVim has no registers. Instead the operators have been modified so deleting text does not overwrite the text you yanked. A new `r` operator has been added for when you want to yank and delete text at the same time.
- HelixKeymap has no registers. Instead the operators have been modified so deleting text does not overwrite the text you yanked. A new `r` operator has been added for when you want to yank and delete text at the same time.
- SimpleVim's `f` and `t` motions work slightly differently from Vim's. `t` and `f` behave like Vim's `/` command, but `t` takes one character and `f` takes two. Or in other words, `t` works like Vim's `t` in Normal mode but Vim's `f` in Visual mode. And `f` behaves like the vim-sneak plugin.
- HelixKeymap's `f` and `t` motions work slightly differently from Vim's. `t` and `f` behave like Vim's `/` command, but `t` takes one character and `f` takes two. Or in other words, `t` works like Vim's `t` in Normal mode but Vim's `f` in Visual mode. And `f` behaves like the vim-sneak plugin.
- SimpleVim has no `/` (search) command. Instead you can either use the `f` motion or the native VSCode find. Between them most of the uses for `/` are taken care of.
- HelixKeymap has no `/` (search) command. Instead you can either use the `f` motion or the native VSCode find. Between them most of the uses for `/` are taken care of.
- SimpleVim has no `]` (indent) command. Instead you can use VSCode's `Cmd+]`.
- HelixKeymap has no `]` (indent) command. Instead you can use VSCode's `Cmd+]`.
- SimpleVim has no `gU` (uppercase) command. Instead you can use VSCode's `Transform to Uppercase` from the Command Palette.
- HelixKeymap has no `gU` (uppercase) command. Instead you can use VSCode's `Transform to Uppercase` from the Command Palette.
- SimpleVim has no jump list (`Ctrl+o` and `Ctrl+i` in Vim). Instead you can use VSCode's native jump list with `Ctrl+-` and `Ctrl+_`.
- HelixKeymap has no jump list (`Ctrl+o` and `Ctrl+i` in Vim). Instead you can use VSCode's native jump list with `Ctrl+-` and `Ctrl+_`.
- SimpleVim does not support marks. If you're jumping back and forth often between two places in a file you can use VSCode's split window feature, and use `Cmd+1` and `Cmd+2` to focus them. If you just need to jump back to where you've been, you can use VSCode's `Ctrl+-`.
- HelixKeymap does not support marks. If you're jumping back and forth often between two places in a file you can use VSCode's split window feature, and use `Cmd+1` and `Cmd+2` to focus them. If you just need to jump back to where you've been, you can use VSCode's `Ctrl+-`.
## Settings
The `y` (yank) operator temporarily changes the background color of the range being yanked to make it obvious what you're yanking. Otherwise you might not realize you yanked the wrong thing until you tried to put it somewhere else. You can change the background color it uses with the `simpleVim.yankHighlightBackgroundColor` setting.
The `y` (yank) operator temporarily changes the background color of the range being yanked to make it obvious what you're yanking. Otherwise you might not realize you yanked the wrong thing until you tried to put it somewhere else. You can change the background color it uses with the `HelixKeymap.yankHighlightBackgroundColor` setting.
```json
{
"simpleVim.yankHighlightBackgroundColor": "#F8F3AB"
"HelixKeymap.yankHighlightBackgroundColor": "#F8F3AB"
}
```

BIN
res/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

View File

@ -78,11 +78,11 @@ export const actions: Action[] = [
}),
parseKeysExact([' ', 'i'], [Mode.Normal], (vimState, editor) => {
vscode.commands.executeCommand('extension.simpleVim.scrollUpHalfPage')
vscode.commands.executeCommand('extension.helixKeymap.scrollUpHalfPage')
}),
parseKeysExact([' ', 'k'], [Mode.Normal], (vimState, editor) => {
vscode.commands.executeCommand('extension.simpleVim.scrollDownHalfPage')
vscode.commands.executeCommand('extension.helixKeymap.scrollDownHalfPage')
}),
// new G actions

View File

@ -70,23 +70,23 @@ export function activate(context: vscode.ExtensionContext): void {
onDidChangeActiveTextEditor(globalVimState, editor),
),
vscode.window.onDidChangeTextEditorSelection((e) => onSelectionChange(globalVimState, e)),
vscode.commands.registerCommand('extension.simpleVim.escapeKey', () =>
vscode.commands.registerCommand('extension.helixKeymap.escapeKey', () =>
escapeHandler(globalVimState),
),
vscode.commands.registerCommand(
'extension.simpleVim.scrollDownHalfPage',
'extension.helixKeymap.scrollDownHalfPage',
scrollCommands.scrollDownHalfPage,
),
vscode.commands.registerCommand(
'extension.simpleVim.scrollUpHalfPage',
'extension.helixKeymap.scrollUpHalfPage',
scrollCommands.scrollUpHalfPage,
),
vscode.commands.registerCommand(
'extension.simpleVim.scrollDownPage',
'extension.helixKeymap.scrollDownPage',
scrollCommands.scrollDownPage,
),
vscode.commands.registerCommand(
'extension.simpleVim.scrollUpPage',
'extension.helixKeymap.scrollUpPage',
scrollCommands.scrollUpPage,
),
)

View File

@ -5,36 +5,36 @@ import { VimState } from './vim_state_types'
export function enterInsertMode(vimState: VimState): void {
vimState.mode = Mode.Insert
setModeContext('extension.simpleVim.insertMode')
setModeContext('extension.helixKeymap.insertMode')
}
export function enterNormalMode(vimState: VimState): void {
vimState.mode = Mode.Normal
setModeContext('extension.simpleVim.normalMode')
setModeContext('extension.helixKeymap.normalMode')
}
export function enterVisualMode(vimState: VimState): void {
vimState.mode = Mode.Visual
setModeContext('extension.simpleVim.visualMode')
setModeContext('extension.helixKeymap.visualMode')
}
export function enterVisualLineMode(vimState: VimState): void {
vimState.mode = Mode.VisualLine
setModeContext('extension.simpleVim.visualLineMode')
setModeContext('extension.helixKeymap.visualLineMode')
}
export function enterOccurrenceMode(vimState: VimState): void {
vimState.mode = Mode.Occurrence
setModeContext('extension.simpleVim.occurrenceMode')
setModeContext('extension.helixKeymap.occurrenceMode')
}
function setModeContext(key: string) {
const modeKeys = [
'extension.simpleVim.insertMode',
'extension.simpleVim.normalMode',
'extension.simpleVim.visualMode',
'extension.simpleVim.visualLineMode',
'extension.simpleVim.occurrenceMode',
'extension.helixKeymap.insertMode',
'extension.helixKeymap.normalMode',
'extension.helixKeymap.visualMode',
'extension.helixKeymap.visualLineMode',
'extension.helixKeymap.occurrenceMode',
]
modeKeys.forEach((modeKey) => {

View File

@ -3,7 +3,7 @@ import * as vscode from 'vscode'
export function flashYankHighlight(editor: vscode.TextEditor, ranges: vscode.Range[]) {
const decoration = vscode.window.createTextEditorDecorationType({
backgroundColor: vscode.workspace
.getConfiguration('simpleVim')
.getConfiguration('helixKeymap')
.get('yankHighlightBackgroundColor'),
})