-# whoami #
+# late for the tea
+## whoami
- mafiasi
- system administrator
- developer**ish**
- hacker
-# rules rulez #
+## rules rulez ##
- ask anytime
- type along
- this is [online](https://github.com/wahrwolf/plain-vim)
-# my setup #
+## my setup ##
- python3
- arch
- qtile
- vim
- zsh
-# What is vim? #
+## What is vim?
- an editor
- an operating system
- an religion
--- /dev/null
+# lets find a rabbit
+## What tools do you need? ##
+- make
+- grep
+- git
+- sh
+- man
+
+## What tools do you can use? ##
+- python
+- ...
+- *
+
+## What tools do you really need? ##
+- some computer
+## But I have no idea how to use vim? ##
+- :help
+- vimtutor
+- try it
+
+## But I have no idea how to use linux/unix ! ##
+- man
+- info
+- try it
+- stackoverflow
+- ppl (twitter)
+## vim has modes ##
+- command mode
+- ex mode
+- insert mode
+- normal mode
+- visual mode
+
+#### insert mode ####
+- enter stuff
+- ctrl+r+register
+ * \+ for clipboard
+ * \* for visual
+ * = for eval
+ * % for file name
+ * : for last cmd
+ * [0..9] for last yank/delete
+- inserts are actions
+- substitute, append, insert
+
+#### normal mode ####
+- work with the file content
+- yank/paste
+- record macros
+- use vim language
+
+#### command mode ####
+- work with the file
+- call functions
+- use external tools
+- replace stuff
+
+#### ex mode ####
+- work with vim
+- always command mode
+- write vim script
+
+## vim language ##
+**factor action motion/selection modifier**
+
+#### motions ####
+- [hjkl] : left, down, up, right
+- [wb] : word forward **b**ackwards
+- /foobar : go to next occurence of foobar
+- ?foobar : like / but backwards
+- \* : next occurent of current word
+- fX : go to next occurence of X
+- tX : fXh
+- gg : go to beginning
+- G : go to end of file
+- g] : go to tag **well talk about that**
+- gd : gg \*
+- :help motion
+- :number : got to line number
+
+#### selection ####
+- i( : everything between (-pair; also "'[{
+- vmotion : from cursor pos and after motion
+- % : complete file
+- a,b : line a to b
+- <,> : last selected area (' for line, ` for character)
+
+#### action ####
+- c : change the current selction (delete and switch to insert)
+- s : change the current character (delete and switch to insert)
+- rX: fill current selection/character with X
+- k : search current word in manpage
+- d : delete selection or motion
+- x : delete current selection/characgter
+- y : copy selection/motion
+- p : paste / replace selection
+- = : align/indent selection/motion
+- . : repeat last action
+- u : undo last action
+- ctrl+r : redo last action (also see undo-tree)
+- ctrl+d : completion (see completion)
+
+## vim commands ##
+- all prefix with :
+- executet in current buffer
+- will be added to command history
+
+#### file commands ####
+- e : open or reload file (edit)
+- w : write buffer content to filesystem
+- q : close current buffer
+- find : find file under path and edit it
+
+
+#### content commands ####
+- s/foo/bar/modifier : substitute foo with bar
+ **most used modifiers** (
+ * n : count matches (do not replace)
+ * a : ask before replacing
+ * g : replace all
+- read file : append file after cursor
+- a,b!cmd : replace selection with cmd output (use , for current cursor pos)
+
+#### unix commands ####
+- grep : search for expr and show pos in quickfix window
+- make : try to build target and show errors in quickfix window
+- tag : find term in ctags database
+- !/sh : execute shell command
+
+#### vim commands ####
+- :help : show help
+- :set : show/set current setting
+- :let : set variables
+
+## buffer and windows ##
+
+
+#### buffers in vim ####
+- one buffer holds one state of a file
+- output can be directed into buffers
+- buffers can be compared
+- content can be written to multiple buffers
+
+#### widows in vim ####
+- one winodw shows one buffer
+- windows can be moved, resized, splitted and closed
+- windows can synched (for scrolling)
+- window commands:
+ * ctrl+hjkl : move focus to window (left,botton, top,right) of current one
+ * :split : horizontal split
+ * :vsplit : vertical split
+ * :left cmd : spawn next window right of current one
+ * ctrl+o : go to last location
--- /dev/null
+# Where is my cat?
+## what is unix? ##
+- some fancy operating system
+- sometimes a mindset
+- always something ppl will rage about
+
+## what are the unix principles?"
+__By Salus:__
+1. Write programs that do one thing and do it well
+2. write programs to work togther
+3. write programs to handle text streams (because that is a universal interface)
+
+checkout the [wiki article](https://en.wikipedia.org/wiki/Unix_philosophy) for more
+
+## what are gnu core utils / unix toolchain? ##
+- collection of tools for daily use
+- build after (some aspects of) the unix principles
+- avaible on most or all unix systems
+- cmd \<input \>output
+## big tools ##
+
+#### grep ####
+- find stuff
+- can do regex
+
+#### make ####
+- build stuff using rules
+- super fancy internal rules (for e.g. c)
+- touring complete
+- typical "make configure install"
+
+#### sh ####
+- interactive processor of commands
+- unites toolchain
+- cli ui (pls do not call it that xD )
+
+
+#### ctags ####
+- parses code to find defintions
+- make definition searchable
+- works for most languages
+
+#### git ####
+- versioning tool
+
+#### gcc ####
+- compiler
+- designed for c but can do lot more know
+
+#### man ####
+- helpfile manager
+
+#### gdb ####
+- debugger
+- designed for c
+- can do lot more
+## unixtoolchain with vim ##
+- :set makeprg
+- :set grepprg=rg --vimformat
+
+#### use it with the builtin tools ####
+- all external commands can be replaced
+- use quickfix or specify alternative format
+- can be changed for performance
+- can be changed for extra features (but watchout on other maschines)
+
+#### use any tool with vim ####
+- pipe output to files
+- use fifo
+- pipe content through commands
--- /dev/null
+# Cricket with flamingos
+## What is a register?##
+- mini buffers for tex
+- most can be set manually
+- some have special effects
+
+#### what can vim do with them ?####
+- save snippets
+- save commands
+- save search queries
+- paste them
+
+#### basic uses ####
+- "Ay : append yank operation to buffer a
+- "ay : insert yank opertion to buffer a
+- "ap : paste buffer after cursor
+- qaq : insert text to buffer
+- ctrl+r a : paste buffer (works for all modes)
+## Most common registers ##
+- [a-z] : free to use personal buffers
+- [0-9] : last buffers
+- / : contains last search query
+- . : contains last commadn
+- % contains file name
+- \+ : clipboard
+- \* : primary selection
+- = : evaluates expr and prints it
+- \_ : the blackhole register
+- \- : small delete register (less than a line)
+## Macros ##
+- a series of actions which can be easily repeated
+- no recursion allowed (see functions)
+- can be used to enter snippets
+- use q[a-z] to start recording macro into register
+- use q again to stop macros
+- use @[a-z] to execute macro (@@ to execute last used macro)
+
+#### How to they work? ####
+- execute every keystroke from normal mode
+- use q to write text into a register
+- use @ to interpret register as commands!
+
+#### How to hack that? ####
+- save snippets in files for easy access
+- yank snippets into registers
+- edit snippets by pasting and reyanking them
+
+#### search/command buffer ####
+- use q: to access the command history
+- use q/ to access the search history
+- use normal vim commands to navigate in that buffer
+- press enter to execute the current line as a command/search
--- /dev/null
+# The tea party
+## Why talk about files here? ##
+- they are a unix core concept
+- files may have diffrent properties
+- fifos and streams can be considered as files
+- link files to buffers
+
+#### source code files ####
+- vim is built to as an code editor
+- should help you code better
+- syntax highlithing
+- code completion
+- snippets
+- customizable
+- syntax validation
+- include other definionts
+- have build instructions
+
+#### data files ####
+- may have a certain format
+- should be searchable
+- may change
+
+
+#### notes ####
+- should be reachable
+- may contain snippets
+
+
+#### config files ####
+- may include other files
+- may have a certain format
+## File plugin ##
+- vim has rules to identify a filetype
+- vim load the plugin file for that filetype
+
+#### typical configuration details ####
+- compiler
+- highlithing
+- completion function
+- formating/indenting function
+- search fucntion
+- tell vim how your code is defined
+
+#### what not to do! ####
+- write your own parser
+- write your `any vim feature`
+
+## syntasctic ##
+- collection of file plugins
+- syntax validation tools per filetype
+- easy extendible
+
--- /dev/null
+# Advice from a Caterpillar