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 s:handler_close_cb(channel) abort | |
| let lines = [] | |
| while ch_status(a:channel, {'part': 'out'}) == 'buffered' | |
| let lines += [ch_read(a:channel)] | |
| endwhile | |
| echo lines | |
| endfunction | |
| function s:main() abort |
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 s:quickrun_show_expected_config(type) abort | |
| let type = empty(a:type) ? &filetype : a:type | |
| source $VIMPLUGINS/vim-quickrun/autoload/quickrun.vim | |
| let xs = split(execute('scriptnames'), "\n") | |
| let id = str2nr(get(filter(xs, { i, x -> x =~# 'autoload/quickrun.vim$' }), 0, '')) | |
| let dict = function(printf("\<SNR>%d_build_config", id))({ 'type' : type }) | |
| for key in keys(dict) | |
| echo printf("%s: %s", key, string(dict[key])) | |
| endfor | |
| 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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| // note: free return value if is not NULL. | |
| char* parse_excmd(char* line){ | |
| const char* s = "EX(CMD_"; | |
| if (!strncmp(s, line, strlen(s))){ | |
| char* first = strchr(line, '"'); |
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
| 1) ./configure CFLAGS="-g" && make // -g | |
| 2分25秒 | |
| 2) ./configure CFLAGS="" && make // -O2 | |
| 6分27秒 | |
| 3) ./configure CFLAGS="-g -O2" && make // -g -O2 | |
| 7分18秒 |
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! ChangeColorScheme() abort | |
| let colorschemes = ['blue', 'darkblue'] | |
| let idx = tabpagenr() - 1 | |
| if len(colorschemes) <= idx | |
| let idx = 0 | |
| endif | |
| execute printf('colorscheme %s', colorschemes[idx]) | |
| endfunction | |
| augroup TabpageColorScheme |
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! s:main() abort | |
| let s = '中華料理画像うpよろしく' | |
| let cs = split(s, '\zs') | |
| let i = 0 | |
| while i < len(cs) | |
| if i == 0 | |
| echomsg s | |
| elseif i == len(cs) - 1 | |
| echomsg join(reverse(cs), '') |
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
| // <body> | |
| // <div id="output"></div> | |
| // <script src="./javascripts/main.js" type="text/javascript"></script> | |
| // </body> | |
| var output = document.getElementById('output'); | |
| var e = document.createElement('div'); | |
| var b = document.createElement('input'); |
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
| new | |
| set fileformat=unix | |
| call setline(1, "abc" . nr2char(0x0a) . nr2char(0x0d) . "def") |
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
| diff --git src/eval.c src/eval.c | |
| index 53c188b..3d2c22b 100644 | |
| --- src/eval.c | |
| +++ src/eval.c | |
| @@ -187,6 +187,7 @@ static struct vimvar | |
| {VV_NAME("t_none", VAR_NUMBER), VV_RO}, | |
| {VV_NAME("t_job", VAR_NUMBER), VV_RO}, | |
| {VV_NAME("t_channel", VAR_NUMBER), VV_RO}, | |
| + {VV_NAME("stacktrace", VAR_LIST), VV_RO}, | |
| }; |