This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" AWKish example in VimL for shay_shay | |
" Barry Arthur, Aug 2015 | |
let db = {} | |
for l in readfile('utiluqotic.txt') | |
let recs = split(l, '|') | |
let db[recs[0]] = recs | |
endfor | |
iabbrev db <c-r>=db[expand('%:r')][5]<cr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Barry Arthur, August 2015 | |
" Moving habits into maps | |
" | |
" A regular editing sequence I caught myself | |
" doing was: <c-v>}kwI<some-text><esc> | |
" to prepend a common string to all of | |
" the lines within the current indent. | |
" These maps make that much simpler: | |
" <leader>K<some-text><esc> | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syn match Element "^Test" nextgroup=Other | |
syn match Other "Case" contained | |
hi def link Element String | |
hi def link Other Number | |
finish | |
Test Case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmap <leader><Space> <Plug>BuffaloTrigger | |
nmap <leader>dc <Plug>diffo_close | |
nmap <leader>do <Plug>diffo_open | |
nmap <leader>du <Plug>diffo_update | |
nmap <leader>gw <Plug>GripeWord | |
nmap <leader>n <Plug>KweasyAgain | |
nmap <leader>f <Plug>KweasyJump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Barry Arthur, July 2015 | |
" Kludge emulating comments in dict literals | |
" :-0 surprised?! | |
function! StripComments(comment_leader, dict) | |
return filter(a:dict, 'v:key !~ "^" . escape(a:comment_leader, "\"")') | |
endfunction | |
let x = StripComments('REM', { | |
\ 'a' : 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (human b , (radix 0)) | |
(while (> (/ b 1024) 0) | |
(set 'b (div b 1024)) | |
(inc radix)) | |
(format "%.2f %s" b (nth radix magnitudes))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let x = {'one' : 1, 'two' : 2} | |
for [k, v] in items(x) | |
echo k . ' -> ' . v | |
endfor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 definitions found | |
From The Collaborative International Dictionary of English v.0.48 [gcide]: | |
Grope \Grope\, v. t. | |
1. To search out by feeling in the dark; as, we groped our | |
way at midnight. | |
[1913 Webster] | |
2. To examine; to test; to sound. [Obs.] --Chaucer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env tclsh | |
package require cmdline | |
package require struct::set | |
namespace eval ::tclmr { | |
namespace path [list ::cmdline ::struct::set] | |
namespace export {[a-z]*} | |
namespace ensemble create -unknown tclmr::unknown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env tclsh | |
package require cmdline | |
package require struct::set | |
oo::class create tclmr { | |
constructor {} { | |
namespace path [list {*}[namespace path] ::cmdline ::struct::set] | |
} |