This is a draft cheat sheet. It is a work in progress and is not finished yet.
VIM Cursor Movement
first, last char of line |
|
move to column n of line |
|
move forward/backward to character x |
|
move forward to before char x |
|
next/previous paragraph, next/previous sentance |
|
word/token left, right |
|
Move to end/beginning of file |
|
Vim Editing
insert left of current char/current line |
|
insert to right of current char/current line |
|
create new line under/above current one and insert |
|
delete text moved over by {motion} and enter insert mode |
|
delete text moved over by {motion} and do not enter insert mode |
|
copy the text moved over by {motion} |
|
visual selection mode |
|
Linewise selection mode |
|
Blockwise Selection mode |
|
Cut, copy, cut (& leave in insert mode) |
|
If you want to search an entire file, you can use % to indicate that as the range: |
|
|
|
Handy posix Commands (macos mostly)
IP Range Calculator |
|
Show Environment Variables |
|
show a single variable |
|
add or update variable value |
export VARIABLE="value"
|
View Checksum |
|
list packages |
sudo apt list --installed | grep -i apache sudo dpkg -l | grep -i apache
|
check linux version |
|
Vundle (Vim Plugin Manager)
Update Plugins from .vimrc |
|
Administration
Adding users |
|
Adding Users (s is shell, g is group, m creates home dir if not already created)
|
useradd UserName -s /bin/bash -G sudo -m
|
cURL Commands
Download File from a remote server |
|
This works with a webpage too... |
Download File from remote server 2 |
|
|