Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Add Normal, Visual and Visual Line modes #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RomanNikitenko
Copy link
Contributor

@RomanNikitenko RomanNikitenko commented Aug 24, 2018

What does this PR do?

Visual mode:

  • ability to turn on the mode by'v', this will also mark a starting selection point
  • ability to select text by arrows or 'h', 'j', 'k', 'l' keys

Visual Line mode:

  • ability to turn on the mode by'V', this will also select current line and mark it as starting selection point
  • ability to select text line by line using arrows or 'j', 'k' keys
  • ability to delete selected lines by 'd'

Normal mode:

  • ability to turn on the mode by 'esc' or ctrl-[
  • ability to manage a cursor position by arrows or 'h', 'j', 'k', 'l' keys
  • Move to the beginning of line: '0'
  • Move to the end of line: '$'
  • Move to previous beginning of word: 'b'
  • Move to end of word: 'e'

Insert mode:

  • Move the cursor before the current character and enter insert mode: 'i' key or 'Insert'
  • Move the cursor after the current character and enter insert mode: 'a'
  • Move the cursor to the end of the line and enter insert mode: 'A'
  • Move the cursor to the beginning of the line and enter insert mode: 'I'
  • Insert a new line below the current line and enter insert mode on the new line: 'o'
  • Insert a new line above the current one and enter insert mode on the new line: 'O'

Current mode will be displayed in status bar:
mode

Video
https://www.youtube.com/watch?v=gx3cwDlJyAo
https://www.youtube.com/watch?v=BXbYrMDsUI8&t=2s

What issues does this PR fix or reference?

eclipse-che/che#9244

Signed-off-by: Roman Nikitenko rnikiten@redhat.com

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
@RomanNikitenko
Copy link
Contributor Author

This work was started when the plugin model was not as complete as it is today. So we consider current state of Vi keybinding support as extension and it should be implemented as plugin.
See more eclipse-theia/theia#2783

@kiliancs
Copy link

For reference, take a look at https://github.com/brijeshb42/monaco-vim, which implements vim keybindings directly over Monaco.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants