This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Testing WebAssembly</title> | |
| <script src="wasm_exec.js"></script> | |
| <script type="text/javascript"> | |
| function fetchAndInstantiate(url, importObject) { | |
| return fetch(url).then(response => | |
| response.arrayBuffer() | |
| ).then(bytes => | |
| WebAssembly.instantiate(bytes, importObject) |
This file contains hidden or 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
| " plug-vim | |
| """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " Specify a directory for plugins | |
| call plug#begin('~/.vim/plugged') | |
| " Make sure you use single quotes | |
| " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align | |
| Plug 'vim-airline/vim-airline' | |
| Plug 'lilydjwg/colorizer' |
This file contains hidden or 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 sum = 0 | |
| function PrintSum(num1, num2) | |
| let sum = a:num1 + a:num2 | |
| echo "the sum is ".sum | |
| let g:sum = sum | |
| endfunction |
This file contains hidden or 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
| function DeAmperfyAll() range"Step through each line in the range... | |
| for linenum in range(a:firstline, a:lastline) | |
| "Replace loose ampersands (as in DeAmperfy())... | |
| let curr_line = getline(linenum) | |
| let replacement = substitute(curr_line,'&\(\w\+;\)\@!','&','g') | |
| call setline(linenum, replacement) | |
| endfor | |
| "Report what was done... | |
| if a:lastline > a:firstline |
This file contains hidden or 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
| command! -bar DelTab %s/ // | |
| command! DelLF %s/\n// | |
| command! FmtCode DelTab|DelLF |
This file contains hidden or 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
| " myscript.vim : Example script to show how a script is structured. | |
| " Version : 1.0.5 | |
| " Maintainer : Kim Schulz<[email protected]> | |
| " Last modified : 01/01/2007 | |
| " License : This script is released under the Vim License. | |
| " check if script is already loaded | |
| if exists("loaded_myscript") | |
| finish "stop loading the script | |
| endif |
This file contains hidden or 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
| *myscript.txt* Documentation for example script myscript.vim | |
| Script : myscript.vim – Example script for vim developers | |
| Author : Kim Schulz | |
| Email : <[email protected]> | |
| Changed: 01/01/2007 | |
| =========================================================== | |
| * myscript-intro* | |
| 1. Overview~ | |
| This document gives a short introduction to the example |
This file contains hidden or 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
| function PrintSum(num1, num2,...) | |
| let sum = a:num1 + a:num2 | |
| let argnum = 1 | |
| while argnum <= a:0 | |
| let sum += a:{argnum} | |
| let argnum+=1 | |
| endwhile | |
| echo "the sum is " sum | |
| return sum | |
| endfunction |
This file contains hidden or 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
| function Min(num1,num2) | |
| if a:num1 < a:num2 | |
| let smaller = a:num1 | |
| else | |
| let smaller = a:num2 | |
| endif | |
| return smaller | |
| endfunction |
This file contains hidden or 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
| function Name(arg1, arg2,...argN) keyword | |
| code_to_execute_when_function_is_called | |
| endfunction |
NewerOlder