Skip to content

Latest commit

 

History

History
365 lines (309 loc) · 17.8 KB

howtouse.md

File metadata and controls

365 lines (309 loc) · 17.8 KB

How to use

Table of Contents

Exiting

Check the command line
Keys Description
: w Write file
: q Quit
: w q Write and quit
: q ! Force quit
: q a Quit all Windows
: w q a Write and quit all Windows
: q a ! Force quit all Windows
: w ! Force write
: w q ! Force write and quit window

Normal mode

The Default Mode
Keys Description
h
Go Left ⬅️
j
Go Down ⬇️
k
Go Up ⬆️
l
Go Right ➡️
w
Go forwards to the start of a word ➡️
e
Go forwards to the end of a word ➡️
b
Go backwards to the start of a word ⬅️
{
Go previous blank line
} Go next blank line
r Replace a character at the cursor
Page Up Page Up ⬆️
Page Down Page Down ⬇️
g g Go to the first line ⬆️
g _ Go to the last non-blank character of the line ➡️
G Go to the last line ⬇️
0 Go to the first line ⬆️
$ Go to the end of the line ➡️
^ Go to the non-blank character start of line ⬅️
Ctrl u Half Page Down ⬇️
Ctrl d Half Page Up ⬆️
d $ OR D Delete until the end of the line
: Start Ex mode
u Undo
Ctrl r Redo
> Indent
= = Auto Indent
d d Delete a line
d w Delete a word
c i " Delete inside double quotes and enter insert mode
c i ' Delete inside sinble quotes and enter insert mode
c i ( OR c i )
c i [ OR c i ]
c i { OR c i }
c i w Delete word and enter insert mode
d i " Delete inside double quotes
d i ' Delete inside sinble quotes
d i ( OR d i )
d i [ OR d i ]
d i { OR d i }
d i w Delete word
x Delete current character
S OR c c Delete the characters in current line and start insert mode
y y OR Y Copy a line
p Paste the clipboard
n Search forwards
N Search backwards
* Search forwards for the word under cursor
# Search backwards for the word under cursor
f Jump to next occurrence
F Jump to previous occurrence
Ctrl k Move next window
Ctrl j Move prev window
z t Scroll the screen so the cursor is at the top
z b Scroll the screen so the cursor is at the bottom
z . Center the screen on the cursor
Z Z Write current file and exit
Z Q Same as :q!
Ctrl w c Close current window
? keyword Search backwards
/ keyword Search forwards
\ r Quick Run
s OR cu Delete current character and enter insert mode
y{ Yank to the previous blank line
y} Yank to the next blank line
yl Yank a character
X OR dh Cut a character before cursor
ga Show current character info
tx Move to the left of the next x (any character) on the current line
Tx Move to the right of the back x (any character) on the current line
yt Any key Yank characters to an any character
cf Any key Delete characters to an any character and enter insert mode
H
Move to the top line of the screen
M
Move to the center line of the screen
L
Move to the bottom line of the screen
%
Move to matching pair of paren
q Any key
Start recording operations for Macros
q
Stop recording operations
@ Any key
Exce a macro
c t Any Key
Delete characters until the any key and enter Insert mode
d t Any Key
Delete characters until the any key
.
Repeat the last normal mode command
K
Hover (LSP)
g c
Goto Declaration (LSP)
g d
Goto Definition (LSP)
g y
Goto TypeDefinition (LSP)
g i
Goto Implementation (LSP)
g r
Open References mode (LSP Find References)
g h
Open Call Hierarchy Viewer (LSP Call Hierarchy)
g l
Document Link (LSP)
Space r
Rename (LSP)
\ c
Code Lens (LSP)
z d
Delete fold lines
z R
Delete fold lines
Ctrl s
Selection Range (LSP)
Space o
Document Symbol (LSP)
Ctrl o
Jump Back from LSP Goto Definition

Register

Register operations
Keys Description
" register name y y
" register name y l
" register name y w
" register name y {
" register name y }
" register name p
" register name P
" register name d d
" register name d w
" register name d $
" register name d 0
" register name d G
" register name d g g
" register name d {
" register name d }
" register name d i any key
" register name d h
" register name c l OR " register name s
" register name c i any key

Visual mode

Visual Selection
Keys Description
Esc
Enter Normal mode
d OR x
Delete characters
y
Copy characters
r
Replace character
J
Join lines
u
Convert to Lowercase
U
Convert to Uppercase
>
Indent
<
Unindent
~
Toggle case
Ctrl a
Increase number
Ctrl x
Decrease number
I
Insert characters to multiple lines
z f
Fold lines
Ctrl s
Selection Range (LSP)

Replace mode

Replace Text
Esc Go to Normal mode Backspace Undo

Insert mode

Insert Text
Keys Description
Esc
Enter Normal mode
Ctrl e
Insert the character which is below the cursor
Ctrl y
Insert the character which is above the cursor
Ctrl i
Insert a Tab
Ctrl h OR Backspace
Delete the character before the cursor
Ctrl t
Indent
Ctrl d
UnIndent
Ctrl w
Delete the word before the cursor
Ctrl u
Delete characters before the cursor
Ctrl r
Signature Help (LSP)

Backupmanager mode

Backup File Manager
Keys Description
Enter
Open Diff
R
Restore Backup file
D
Delete Backup file
r
Reload Backup file

References mode

References mode
Keys Description
Enter
Go to the destination
ESC
Quit References mode

Call Hierarchy mode

Call Hierarchy
Keys Description
Enter
Go to the destination
i
Incoming Call (LSP)
o
Outgoing Call (LSP)

Filer mode

File Manager
Keys Description
D
Delete file
i
Detail Information
v
Split window and open file or directory

Configuration mode

Configuration mode
Keys Description
w
Save the current configs to the configuration file

Ex mode

Ex mode
Command Description
number Jump to line number; e.g. :10
! shell command Shell command execution
bg Pause the editor and show the recent terminal output
man arguments Show the given UNIX manual page, if available; e.g. :man man
e filename Open file
ene Create new empty buffer
new Create new empty buffer in split window horizontally
vnew Create new empty buffer in split window vertically
%s/keyword1/keyword2/ Replace text (normal mode only)
ls Display all buffer
bprev Switch to the previous buffer
bnext Switch to the next buffer
bfirst Switch to the first buffer
blast Switch to the last buffer
bd or bd number Delete buffer
buf Open buffer manager
vs Vertical split window
vs filename Open in vertical split window
sv Horizontal split window
sp filename Open in horizontal split window
livereload on or livereload on Change setting of live reload of configuration file
theme themeName Change color theme : Example theme dark
tab on or tab off Change setting to tab line
syntax on or syntax off Change setting to syntax highlighting
tabstop number Change setting to tabStop : Example tabstop 2
paren on or paren off Change setting to auto close paren
indent on or indent off Change sestting to auto indent
linenum on or linenum off Change setting to display line number
statusLine on or statusLine on Change setting to display status line
realtimesearch on or realtimesearch off Change setting to real-time search
deleteparen on or deleteparen off Change setting to auto delete paren
smoothscroll on or smoothscroll off Change setting to smooth scroll
scrollMinDelay number Set smooth scroll min speed : Example scrollMinDelay 10
scrollMaxDelay number Set smooth scroll max speed : Example scrollMaxDelay 10
highlightcurrentword on or highlightcurrentword off Change setting to highlight other uses of the current word
clipboard on or clipboard off Change setting to system clipboard
highlightfullspace on or highlightfullspace off Change setting to highlight full width space
buildonsave on or buildonsave off Change setting to build on save
indentationlines on or indentationlines off Change setting to indentation lines
showGitInactive on or showGitInactive off Change status line setting to show/hide git branch name in inactive window
noh Turn off highlights
icon Setting show/hidden icons in filer mode
deleteTrailingSpaces Delete trailing spaces
ignorecase Change setting to ignorecase
smartcase Change setting to smartcase
highlightCurrentLine on or highlightCurrentLine off Change the highlight setting of the current line
build Build the current buffer
lspFold LSP Folding Range
lspFormat LSP Document Formatting
log Open a log viewer for editor log
lspLog Open a log viewer for LSP log
lspRestart Restart the current LSP server
lspForceRestart Force restart the current LSP server
help Open help
putConfigFile Put a sample configuration file in ~/.config/moe
run Quick run
recent Open recent file selection mode (Only supported on Linux)
backup Open backup manager
conf Open configuration mode
debug Open debug mode

Go To Top