Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Vim Mode for Playground, System Browser, Debugger in Pharo.

License

NotificationsYou must be signed in to change notification settings

webcpu/SmalltalkVimMode

Repository files navigation

Vim Mode for Playground, System Browser, Debugger in Pharo.

Install SmalltalkVimMode

Prerequisites

  • Latest Pharo 6.1 image.
  • Pharo VM for Pharo 6.1.(It doesn't work in the latest Pharo. I have tried to fix it, but my Smalltalk skill is rusty, I have no idea what went wrong.)

Execute the code in a Playground in Pharo

baseline   := 'SmalltalkVimMode'.repository := 'github://unchartedworks/SmalltalkVimMode:master'. metacello  := [ Metacello new baseline: baseline; repository: repository ].get        := [ metacello value get ].load       := [ metacello value onConflict: [:ex | ex allow]; load ].actions    := {get . load}.apply      := [ :action | action value ].actions do: apply.

Shortcuts

Main

Esc enter normal mode

i enter insert mode

V enter visual mode per line

Normal mode

Comment/Uncomment

Command + / comment/uncomment selected code, if there is no selection, the current line will be commented/uncommented.

Navigation keys

h left

Nh left N times

j down

Nj down N times

k up

Nk up N times

l right

Nl right N times

0 move the cursor to the first character in the line

$ move the cursor to the last character in the line

^move the cursor to the first non-blank character in the line

g_ move the cursor to the last non-blank character in the line

w move forward to the start of the next word (next alphanumeric word)

Nw move forward to the start of the next N words (next N alphanumeric words)

W move forward to the start of the next word (delimited by a white space)

NW move forward to the start of the next N words (delimited by a white space)

e move forward to the end of the next word (next alphanumeric word)

Ne move forward to the end of the next N words (next N alphanumeric words)

E move forward to the end of the next word (delimited by a white space)

NE move forward to the end of the next N words (delimited by a white space)

b move backward to the start of previous word (previous alphanumeric word)

Nb move backward to the start of previous N words (previous N alphanumeric words)

B move backward to teh start of previous word (delimited by a white space)

NB move backward to teh start of previous N words (delimited by a white space)

gg move to the beginning of the buffer

G move to the end of the buffer

fx move forward to the next occurrence of character x to the right

Nfx move forward to the Nth occurrence of character x to the right

tx move forward to before the next occurrence of character x to the rigtht

Ntx move forward to before the Nth occurrence of character x to the right

Fx move forward to the Nth occurrence of character x to the left

NFx move forward to the Nth occurrence of character x to the left

Tx move forward to after the previous occurrence of character x to the left

NTx move forward to after the Nth occurrence of character x to the left

Insert text

a insert text after the cursor

A insert text at the end of the line

i insert text before the cursor

o begin a new line below the cursor

O begin a new line above the cursor

Delete text

x delete character at the cursor

Nx delete N characters from the cursor

dw delete a word.

Ndw delete N words.

d0 delete to the beginning of a line.

d$ delete to the end of a line.

dgg delete to the beginning of the file.

dG delete to the end of the file.

dd delete line

Ndd delete N lines

Simple replace text

r peplace the character under the cursor

R replace characters instead of inserting them

Copy/Paste text

yy copy current line into storage buffer

p paste storage buffer after current line

Np paste N times storage buffer after current line

Undo/Redo operation

u undo the last operation

Nu undo the last N operations

Ctrl + rredo the last undo operation

NCtrl + rredo the last N undo operations

About

Vim Mode for Playground, System Browser, Debugger in Pharo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp