Introduction to vi command (memorandum)

Introduction

Since I've been working more and more in terminals, I've put together (minimal) operation commands as a personal note. There are a lot of commands when I look it up, but I would like to master it from here as an introduction.

Switch to edit mode

--Enter edit mode at the position of the "i" cursor --"A" Moves to edit mode by one character to the right of the cursor --"O" Add / move one line under the cursor line to enter edit mode --"O" Add / move one line above the cursor line to enter edit mode --"Shift + i" Move to the beginning of the line and enter edit mode --"Shift + a" Move to the end of the line and enter edit mode

Exit edit mode / save file

--Save "ZZ" or ": wq" and exit -": Q!" Exit without saving --End of ": q"

Vim settings

--Kkkk to display the number of ": set number" lines

Move cursor

Up down left right

--Move up to "k" (↑) --Move down "j" (↓) --Move to the left of "h" (←) --Move to the right of "l" (→)

word

--"W" Move to the beginning of the next word --"3w" Move to the beginning of the word three words ahead --Move to the beginning of the word before "b" --"3b" Move to the beginning of the previous word

line

--Move to the beginning of the "^" line --Move to the end of the "$" line

Paragraph

--Move to the beginning of the "{" paragraph --Move to the end of the "}" paragraph

Other

--Move to the first line of "gg" --Move to the last line of "G" --": Line number" Moves the cursor to the specified line --"Ctrl + f" or "Ctrl + e" scroll down --"Ctrl + b" or "Ctrl + y" scroll up

Search

-"/ Character string" + (n / N) character string search (next / previous)

Edit

Copy and Paste

--Copy of "yy" or "Y" line (Yank) --Copy 3 lines from the "3yy" cursor position --Cut out the "dd" line --Cut 3 lines from the "3dd" cursor position --"P" Paste on the next line (Put)

Delete

--Delete one character of "x"

Other

--Cancel the operation immediately before "u"

Recommended Posts

Introduction to vi command (memorandum)
memorandum of vi command
Command memorandum
Introduction to Scrapy (1)
Introduction to Scrapy (3)
Introduction to Supervisor
Introduction to Tkinter 1: Introduction
nc command memorandum
Introduction to PyQt
Introduction to Scrapy (2)
[Linux] Introduction to Linux
Introduction to Scrapy (4)
Memorandum conda command
Introduction to discord.py (2)
setuptools command memorandum
Introduction to discord.py
[Introduction to Udemy Python3 + Application] 67. Command line arguments
vi (vim) command memo
Introduction to Lightning pytorch
Introduction to Nonparametric Bayes
Introduction to EV3 / MicroPython
Introduction to TensorFlow-Image Recognition
Introduction to OpenCV (python)-(2)
Introduction to PyQt4 Part 1
Introduction to Dependency Injection
Introduction to Private Chainer
Introduction to machine learning
Conveniently upload to kaggle Dataset
A memorandum regarding γ conversion
Introduction to vi command (memorandum)
AOJ Introduction to Programming Topic # 1, Topic # 2, Topic # 3, Topic # 4
Introduction to electronic paper modules
A quick introduction to pytest-mock
Introduction to dictionary lookup algorithm
Introduction to Monte Carlo Method
Introduction to Python Django (2) Win
Introduction to Cython Writing [Notes]
An introduction to private TensorFlow
Kubernetes Scheduler Introduction to Homebrew
A super introduction to Linux
AOJ Introduction to Programming Topic # 7, Topic # 8
Alternative to django's dumpdata command
Command to generate QR code
Introduction to Anomaly Detection 1 Basics
Introduction to RDB with sqlalchemy Ⅰ
[Introduction to Systre] Fibonacci Retracement ♬
Introduction to serial communication [Python]
AOJ Introduction to Programming Topic # 5, Topic # 6
[Introduction to AWS] A memorandum of building a web server on AWS
Introduction to Deep Learning ~ Learning Rules ~
Introduction to Python (Python version APG4b)
An introduction to Python Programming
[Introduction to cx_Oracle] (8th) cx_Oracle 8.0 release
Introduction to discord.py (3) Using voice
An introduction to Bayesian optimization
Deep Reinforcement Learning 1 Introduction to Reinforcement Learning
Super introduction to machine learning
Introduction to Ansible Part ③'Inventory'
Series: Introduction to cx_Oracle Contents
Linux command memorandum [for beginners]
[Introduction] How to use open3d
Introduction to Deep Learning ~ Backpropagation ~
Introduction to Ansible Part ④'Variable'