Skip to content

Instantly share code, notes, and snippets.

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},
};
new
set fileformat=unix
call setline(1, "abc" . nr2char(0x0a) . nr2char(0x0d) . "def")
@rbtnn
rbtnn / main.js
Created October 9, 2016 12:54
output.innerHTML = e.innerHTML;
// <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');
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), '')
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
@rbtnn
rbtnn / gist:9125a7e394d8991aab7ba9e23fe1ff23
Created February 5, 2017 11:30
ラズパイのVimビルド時間
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秒
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index 565f8a518..bf7db8054 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -916,6 +916,9 @@ To remove all menus use: *:unmenu-all* >
:unmenu! * " remove all menus in Insert and Command-line mode
:aunmenu * " remove all menus in all modes
+Note |:aunmenu| is to remove all menus in all modes, except for Terminal mode.
+To remove menus for Terminal mode, use |:tlunmenu| instead.
#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, '"');
@rbtnn
rbtnn / QuickrunShowExpectedConfig.vim
Created February 3, 2019 08:17
QuickrunShowExpectedConfig
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
@rbtnn
rbtnn / job.vim
Created February 27, 2019 12:37
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