From 95a9589201696dfe00a9219e5c2586bfec15339b Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 3 Feb 2009 06:07:56 -0500 Subject: vim, scheme updates --- software/scheme | 18 +++++++++++++++--- software/vim | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 software/vim diff --git a/software/scheme b/software/scheme index 7b7041b..c64d000 100644 --- a/software/scheme +++ b/software/scheme @@ -9,8 +9,9 @@ See also notes on `The Little Schemer `__. Scheme Implementations ----------------------- - -Very partial list, mostly just the ones which are interesting to me. +Very partial list, mostly just the ones which are interesting to me. +Alexey Radul maintains a nice table of R5RS implementation details in various +packages on his `website `__. MIT/GNU Scheme The 7.9.0 release (last stable as of 01/01/2009) is not R5RS compatible, @@ -59,9 +60,20 @@ C-x u Undo C-y Paste ========= ==================================================================== +Command in ``.edwin`` to set Super-TAB to autocomplete scheme variables:: + + (define-key 'Scheme #\s-tab 'scheme-complete-variable) + Scope -------------- - ``set!`` looks up a symbol name and permanently changes the first value it comes across. ``let`` (and ``letrec``) create a new symbol with the given value. But wait, you need a ``lambda`` block to make everything work? + +Environment/Interpreter Commands +----------------------------------- +``(disk-save filename)`` will save a binary microcode image; an existing +image can be specified with the ``--band`` option at runtime or with +``(disk-restore filename)`` from within the interpreter. Bands are also called +worlds. + diff --git a/software/vim b/software/vim new file mode 100644 index 0000000..76ffa24 --- /dev/null +++ b/software/vim @@ -0,0 +1,38 @@ +============ +It's vim! +============ + +Typical .vimrc +------------------ +Here's what a typical ``.vimrc`` looks like for me:: + + if has('syntax') && (&t_Co > 2) + syntax on + endif + + set history=50 + set wildmode=list:longest,full + set showmode + set showcmd + set smartcase + set shiftwidth=4 + set tabstop=4 + set shiftround + set expandtab + set autoindent + + autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except, finally,def,class + +Commands +------------- +I search and replace globally a lot:: + + :%s/before/after/g + +Tricks +------------- +I often want to pull a particular gnarly line or two from another file; here's +the command I use to grab three lines of context around 'phrase':: + + :r!grep -A 3 'phrase' ../otherfile.txt + -- cgit v1.2.3