Skip to content

Instantly share code, notes, and snippets.

@rbtnn
rbtnn / intro-reactjs-with-ts.md
Last active January 8, 2023 17:35
React.jsをTypeScriptでやる方法

React.jsをTypeScriptでやる方法を以下に示す。React.jsなのでtsじゃなくてtsxを使ったケースをここでは示している。

$mkdir react-app
$cd react-app
$npm init
$npm install webpack
$npm install -D webpack-cli @webpack-cli/generators
$npx webpack init
? Which of the following JS solutions do you want to use? Typescript

? Do you want to use webpack-dev-server? Yes

This file has been truncated, but you can view the full file.
"use strict"
define("ghost-admin/adapters/-json-api",["exports","@ember-data/adapter/json-api"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})})),define("ghost-admin/adapters/api-key",["exports","ghost-admin/adapters/application"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
var n=t.default.extend({queryRecord(e,t,n){if(!n||"me"!==n.id)return this._super(...arguments)
let r=`${this.buildURL("users","me")}token/`
return this.ajax(r,"GET",{data:{}}).then((e=>e))}})
e.default=n})),define("ghost-admin/adapters/application",["exports","ghost-admin/adapters/embedded-relation-adapter"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
var n=t.default.extend({shouldBackgroundReloadRecord:()=>!1})
e.default=n})),define("ghost-admin/adapters/base",["exports","ember-ajax/mixins/ajax-support","@ember-data/adapter/rest","ghost-admin/utils/ghost-paths"],(fun
let g:loaded_layout = 1
let s:layout_path_def = expand('~/Desktop/layout.json')
command! -bar -nargs=0 LayoutSave :call s:save_layout()
command! -bar -nargs=0 LayoutLoad :call s:load_layout()
function! s:replace_winid2path(xs) abort
for x in a:xs
@rbtnn
rbtnn / ddc_and_pum.vim
Last active August 2, 2024 03:15
ddc.vimとpum.vimを試す最小限の設定
call plug#('Shougo/pum.vim')
call plug#('Shougo/ddc.vim')
call plug#('Shougo/ddc-around')
call plug#('Shougo/ddc-matcher_head')
call plug#('Shougo/ddc-sorter_rank')
call plug#('Shougo/ddc-converter_remove_overlap')
call plug#('vim-denops/denops.vim')
call ddc#custom#patch_global('completionMenu', 'pum.vim')
call ddc#custom#patch_global('sources', ['around'])
@rbtnn
rbtnn / gist:41176651514d48178842f807ec8cac72
Last active July 21, 2021 16:19
airlineとかで見かける「>」の設定の仕方
let g:airline_left_sep = nr2char(0xe0b0) " ''
let g:airline_left_alt_sep = nr2char(0xe0b1) " ''
let g:airline_right_sep = nr2char(0xe0b2) " ''
let g:airline_right_alt_sep = nr2char(0xe0b3) " ''
let g:lightline = {
\ 'separator': { 'left': nr2char(0xe0b0), 'right': nr2char(0xe0b2) },
\ }
@rbtnn
rbtnn / nrformats-unsigned.diff
Created May 26, 2020 05:58
nrformats-unsigned
diff --git a/src/ops.c b/src/ops.c
index 9ab355596..e720d0f96 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -2441,6 +2441,7 @@ do_addsub(
int dooct;
int dobin;
int doalp;
+ int douns;
int firstdigit;
@rbtnn
rbtnn / vimgrep_plaintext.diff
Created December 26, 2019 14:42
:vimgrepに単純な文字列検索オプションを付けた修正の差分
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 491049194..f47750561 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -6421,9 +6421,9 @@ ex_drop(exarg_T *eap)
}
/*
- * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
+ * Skip over the pattern argument of ":vimgrep /pat/[g][j][p]".
function! s:main() abort
call popup_menu(['aaa', 'bbb', 'ccc'], {
\ 'filter' : function('s:filter'),
\ 'callback' : function('s:callback'),
\ })
endfunction
function! s:filter(id, key) abort
if a:key == 't'
" タブページで開くフラグを設定して、

ゴリラ.vim #3

話す内容

  • 私について
  • 私のVim環境について
  • Vimのソースコードについて
@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