|||

Nearly all commands are in normal (not INSERT) mode.

My vimrc file is here

macros

This is a super handy feature. Basically you can press q then any key, to start recording a macro to it.

qo starts recording to register o’, q stops recording.

@o replays the recording

Example…

qydt,dt,xj0q start recording; delete to comma;delete to comma; delete one char; down a line; to the beginning; stop recording.


10.3.2.1,0 ms,N/A
10.3.2.2,Dead,N/S
10.3.2.3,Dead,N/S
10.3.2.4,Dead,N/S
10.3.2.5,0 ms,TestServerName
10.3.2.6,0 ms,N/A

Then I want to remove the N/A and N/S

:%s/N\/A//g :%s/N\/S//g :v/\S/d

Sorting

:sort u Sorts by unique lines (super awesome!!!)

Search and Replace

s = single line

%s all lines

g = global

:%s/searchfor/replacewith/g

Remove Empty Lines

:v/\S/d in’v’erse g!’; match whitespace that is not a space; d’elete all matching

:g/^\s*$/d This should work too.

The Power of g

gvim Copy Paste

:map <CS-v> "+gP Paste into gvim from OS :map <CS-c> "+y Copy from gvim to OS :map <C-v> p Paste within gvim :map <C-c> y Copy within gvim

v or V(for the full line) to select text to copy.

CSVs

Pretty columns

:%!column -t -s ','

Up next Nmap Notes Logging Nmap ‘’Note: this does not display vulnerability info’’ Something like this may work: Windows Hostname discovery APRS Notes
Latest posts shirt designs Now Learning Graphical Design Python Notes Deploy to a Remote Docker registry DMented 'zine for DM's and Character Sheets for Players Online Security Find Notes Kawasaki Vulcan S 650 Notes Honda Rebel 300 Notes Samba Notes Things worth noting My Software Friends Favorites Recommended Tech Elasticsearch Notes Book Notes APRS Notes vim notes Nmap Notes 4runner Notes Bash Notes Raspberry PI Zero quickstart Notes on Van Life Ubuntu 16.04 or 18.04 Installing Dropbox on Arch Linux Arch Linux Notes About Knives, Mainly Sharpening ENS Environment Notification System