Difference between revisions of "Vim"
(Created page with "Vim is a clone, with additions, of Bill Joy's vi text editor program for Unix. Vim's author, Bram Moolenaar, based it on the source code for a port of the Stevie editor to the...") |
|||
Line 10: | Line 10: | ||
Masuk ke dalam mode ''edit'' dapat melalui | Masuk ke dalam mode ''edit'' dapat melalui | ||
− | * Memulai tulisan/edit === Ketik 'i' pada bagian yang akan diubah | + | * Memulai tulisan/edit === Ketik 'i' pada bagian yang akan diubah '''atau''' 'shift+a' maka kursor akan berada di akhir kalimat |
− | * | + | * Keluar mode edit === esc |
− | |||
+ | Edit di luar 'mode edit' dapat dilakukan dengan cara | ||
+ | * Copy satu baris === Ketik 'yy' | ||
+ | * Paste satu baris === Ketik 'p' | ||
+ | * Delete satu baris === Ketik 'dd' | ||
+ | Perintah lain (di luar mode edit) | ||
+ | * Search === /<kata yang dicari> | ||
+ | * Keluar (tidak disimpan) === :q '''atau''' :qa! | ||
+ | * Keluar dan simpan === :wq | ||
===Referensi=== | ===Referensi=== |
Revision as of 14:59, 25 January 2021
Vim is a clone, with additions, of Bill Joy's vi text editor program for Unix. Vim's author, Bram Moolenaar, based it on the source code for a port of the Stevie editor to the Amiga and released a version to the public in 1991. Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface.
Instalasi
Secara default, vim sudah ada di ubuntu. Jika ingin download, dapat mengakses link https://www.vim.org/download.php
Cara Penggunaan
Ketik vi <nama file> pada terminal. Jika nama file belum ada, maka akan otomatis dibuat.
Ketika awal (tidak dalam mode edit), kursor dapat digerakkan ke atas-bawah-kanan-kiri.
Masuk ke dalam mode edit dapat melalui
- Memulai tulisan/edit === Ketik 'i' pada bagian yang akan diubah atau 'shift+a' maka kursor akan berada di akhir kalimat
- Keluar mode edit === esc
Edit di luar 'mode edit' dapat dilakukan dengan cara
- Copy satu baris === Ketik 'yy'
- Paste satu baris === Ketik 'p'
- Delete satu baris === Ketik 'dd'
Perintah lain (di luar mode edit)
- Search === /<kata yang dicari>
- Keluar (tidak disimpan) === :q atau :qa!
- Keluar dan simpan === :wq
Referensi
https://en.wikipedia.org/wiki/Vim_(text_editor)
https://www.tutorialspoint.com/vim/vim_editing.htm