Files changed (3)
(cd slides/ && (for I in *.html ; do tidy -asxhtml -o "$$I".new "$$I" ; mv -f "$$I".new "$$I" ; done)) \
++* When visual text terminals (like VT-100) started to appear, Bill Joy created the "vi" editor as an extension to ex:
+*** Possibly because these were the greatest common denominator of the keys on the keyboards that appeared then.
++* Vim Supports vi-like macros, its own scripting language and several common scripting languages (Perl, Python, Tcl, Ruby).
++* Once you have learned the basic usage, you will find a whole variety of suprising uses for this editor.
+* Although Vim supports UTF-8 and has partial support for BIDI there are much better editors for simple Hebrew editing.
++* Using |:source $VIMRUNTIME/mswin.vim| will make the insert mode more Windows-like and functional.
++** Once ":" is pressed in normal mode, one can enter the so-called "ex" commands at the command-line.
++* A complete listing of them can be found in [:help motion.txt http://vimdoc.sourceforge.net/htmldoc/motion.html].
+* In Vim, one can execute several commands on ranges ([:help range http://vimdoc.sourceforge.net/htmldoc/cmdline.html#cmdline-ranges]).
++* Or an empty range-specifier for context-specific default (such as the current line or the entire file)
+* "ctags" allows to cross-reference the code and browse to the definition of identifiers in a hypertext-like manner.
++* Then you can type |Ctrl+]| to jump to the definition of an identfier, and |Ctrl+T| to return to the previous position.
++* A register is specified with a double-quotes (|"|) followed by the register name which precedes the y or d command.
++00 Other special registers. (check [:help registers http://vimdoc.sourceforge.net/htmldoc/change.html#registers])
++* Besides moving around, one can use the movement commands as input to various operators that precede them.
++*** For example If you have the string "Hello Good People!" and you want it replaced by something else, you can do the following:
++* All of them are listed in [:help motion.txt http://vimdoc.sourceforge.net/htmldoc/motion.html] and more can be defined by the user.
++00 Move around using the standard Vi commands (but the arrow keys require holding shift when ":source mswin.vim").
+* |vj$hhhy| will copy all the text from the cursor to the next line excluding its last three characters.
++* For more information consult [:help Visual http://vimdoc.sourceforge.net/htmldoc/visual.html#Visual]
++* Vim has other mark-related command which can also be found in [:help motion.txt http://vimdoc.sourceforge.net/htmldoc/motion.html]
++* One can switch to a different buffer using |:bn| (buffer-next), |:bp| (buffer-previous) and other commands.
++* One can use gvim to convert syntax highlighted files, to HTML files that contain their text coloured in their highlighted colours.
++* To do that one can invoke the command |:TOhtml|, and get a resultant file in a new buffer and window.
++* Use |:let html_use_css = 1| to make sure the HTML is outputted using CSS styles instead of font tags and other old HTMLisms.
+* The rest of the presentation will cover ways to automate vim, starting from the most basic to the most sophisticated.
++* Suppose you have a text document where you want to create ASCII-art titles. This can be done like so:
++* This one goes to the end of the file (|G|) inserts "Date:" there (|oDate:|), inserts the contents of the date command and join the lines together. (|kJ|)
++* One can put such code in the .vimrc, or in |:source|'ed files or (with a lesser convenience) write it in command-line mode.
++* Modelines are included at the beginning or the end of the file and invoke "setlocal" on the vim variables.
+* The dot-vimrc file is the central configuration file for vim, which a user can use to configure vim and gvim to his liking.
++* It is written in vimscript, and one can put there normal commands that one normally puts in command line-mode.
+* One can define commands to be executed for certain files (with certain prefixes, under certain locations, etc.) using the autocmd feature.
+Will set the file type of all the files under |~/Download/unpack/graphics| whose extension is ".pdb" to perl.