Search this site
Embedded Files
Skip to main content
Skip to navigation
linuxos
Home
Graphics and Screen
JAMStack
Commands
Bash Scripts
Zoom H4n
Git
Vim
BSD
Fedora
CentOS
Yum
CUDA & Davinci Resolve
OpenSUSE
Debian
MX Linux
LAMP
Local VPS
Wordpress
LAMP + Wordpress
Nginx Block Server
LEMP + Wordpress
X Plane 11
Errors
Ubuntu
Arch Linux
Installation
Networking
Pacman
Wordpress
Clear Linux
LEMP
Kali Linux
Tools
Crypto Currency
linuxos
Vim
Editing
Moving around
Find text ->
/text
(next hit ->
n
, previous hit ->
N
)
Find an replace all occurrences of
foo
with
bar
->
:%s/foo/bar/g
Move to the beginning/end of a word (forward) ->
w
/
e
Move to the beginning/end of a word (backward) ->
b
/
ge
Move to beginning/end of line and start editing ->
shift
+
i
/
shift
+
a
Move to the end of line ->
$
Jump forward/backward one line ->
j
/
k
Jump forward/backward one paragraph ->
{
/
}
Move to the beginning/end of document ->
gg
/
shift
+
g
Editing
select characters ->
v
and move cursor. Selection includes cursor.
select line ->
shift
+
v
select block ->
ctrl
+
v
and move the cursor keys
copy selection ->
y
copy line ->
yy
cut selection ->
d
cut word ->
dw
cut line ->
dd
paste ->
p
paste line above ->
shift
+
p
delete character ->
x
create new line below ->
o
create a new line above ->
shift
+
o
undo ->
u
redo ->
ctrl
+
r
File Management
Explorer
Open file explorer ->
:Explore
List files in current directory ->
:e
then press
Space
and
Ctrl
+
d
Save/Quit
Save file ->
:w
Save file and quit ->
:x
Quit ->
:q
Quit discarding changes ->
:q!
Tabs
New tab ->
:tabnew
Go to next tab ->
gt
Go to previous tab ->
gT
Go to tab number ->
#gt
Go to first tab ->
:tabr
Go to last tab ->
:tabl
Move current tab to the last position ->
:tabm
Move current tab to the # position ->
:tabm #
Close tab ->
:close
Buffers
Open new file in buffer ->
:e <filename path>
Open a new file and split screen ->
:sp
List active buffers ->
:ls
Change to specific buffer ->
:b <buffer-number>
Move to next/previous buffer ->
:bn
/
:bp
Jump back/forward to last jump location ->
Ctrl
+
o
/
Ctrl
+
i
Change tab spacing in Vim
$ vi
:e $HOME/.vimrc
set tabstop=4
:x
Google Sites
Report abuse
Google Sites
Report abuse