This is really just for myself to have a reference for using the text editor named VI. Your welcome to use it yourself, perhaps I will make a PDF later to help me cheat more
until then, on with the non-sense commands:
looking for text
- when looking for text and your cursor is on the word you want to search for, use the * character to search for the pattern going forward in your document
- setting the "incsearch" option will show the first match or the pattern while you are still typing it
- setting the "hlseach" option will highlight all of the matches in the document when searching
moving around
- use % to jump from open brace to its matching close brace or from open if statement
- at the end of the brace or if statement, use [{ to jump back to its start of the {
- use gd to jump from the use of a variable to its local declaration
macros and repeating
- to make a macro:
- type "qa" to record into register "a"
- do all yer commands
- type "q" to stop recording
- to repeat the macro, enter number of times to repeat, then "@a"
- also, the "." will repeat any command you previously execute