Whenever something feels tedious in vim, it's generally a sign of not full grokking vim. There's a better way.
:help
:help {topic}
:help buff
,---, ___ ___ | |
,--.' | ,-.----. ,--.'|_ ,--.'|_ | |
| | : \ / \ __ ,-. ,---,. | | :,' | | :,' | |
: : : | : | ,' ,'/ /| ,' .' | .--.--. : : ' : : : ' : .--.--. | |
: | |,--. .--, | | .\ : ,---. ' | |' |,---.' ,/ / '.;__,' / ,--.--. .;__,' / / / ' | |
| : ' | /_ ./| . : |: | / \ | | ,'| | | : /`./| | | / \ | | | | : /`./ | |
| | /' :, ' , ' : | | \ : / / |' : / : : .'| : ;_ :__,'| : .--. .-. |:__,'| : | : ;_ | |
' : | | /___/ \: | | : . |. ' / || | ' : |.' \ \ `. ' : |__ \__\/: . . ' |
" Make switching buffers easy | |
nmap <Leader>b :ls<CR>:buffer!<Space> | |
imap \ <Esc> | |
vmap \ <Esc> | |
inoremap <C-\> \ | |
nnoremap \ :noh<CR> | |
map <down> <C-d>zz | |
map <up> <C-u>zz | |
nnoremap <tab> zz |
come get give go keep let make put seem take be do have say see send may will about across after against among at before between by down from in off on over through to under up with as for of till than a the all any every little much no other some such that this I he you who and because but or if though while how when where why again ever far forward here near now out still then there together well almost enough even not only quite so very tomorrow yesterday north south east west please yes account act addition adjustment advertisement agreement air amount amusement animal answer apparatus approval argument art attack attempt attention attraction authority back balance base behavior belief birth bit bite blood blow body brass bread breath brother building burn burst business butter canvas care cause chalk chance change cloth coal color comfort committee company comparison competition condition connection control cook copper copy cork cotton cough country cover crack credit crime crush cry current curve dama |
choose :: [a] -> Int -> [[a]] | |
choose _ 0 = [[]] | |
choose [] k = [] | |
choose (x:xs) k = thoseWith ++ thoseWithout | |
where | |
thoseWith = map (x :) (choose xs (k - 1)) | |
thoseWithout = choose xs k |
function Map() { | |
var dict = {}; | |
return { | |
add_key_value_pair: function(key, value) { | |
dict[key] = value; | |
}, | |
get_value: function(key) { | |
var val = dict[key]; | |
if (val === undefined) { |
# the midpoint approximation of the integral of x*x from [0 1], with 10 subdivisions | |
# integral.midpoint(lambda x: x*x,0,1,10) | |
def trapezoidal(f, start, end, n, _area=0, _n=0): | |
if _n is 0: | |
return trapezoidal(f, start, end, n, _area, n) | |
elif n is 0: | |
return _area | |
else: | |
delta_x = (end - start) / (_n * 1.0) |