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 <stddef.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <time.h> | |
| #include <sys/time.h> | |
| double gettimeofday_sec() { |
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
| augroup check_listed | |
| autocmd! | |
| autocmd BufAdd * call s:check(expand("<abuf>")) | |
| augroup END | |
| function! s:check(bufnr) | |
| echomsg 'Result of buflisted() = ' . string(buflisted(a:bufnr)) | |
| 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
| GEM | |
| remote: https://rubygems.org/ | |
| specs: | |
| activemodel (4.1.1) | |
| activesupport (= 4.1.1) | |
| builder (~> 3.1) | |
| activerecord (4.1.1) | |
| activemodel (= 4.1.1) | |
| activesupport (= 4.1.1) | |
| arel (~> 5.0.0) |
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
| int main(void) { | |
| /* j is NOT ok */ | |
| int mop1; | |
| int* map1; | |
| /* comment. */ | |
| /* j is ok */ | |
| int mop2; | |
| int *map2; | |
| /* comment. */ |
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 <stdint.h> | |
| #include <stdio.h> | |
| #define BASE 16 | |
| #define MOD_16(x) (x & 0x0F) | |
| void dump_memory_hex(uintptr_t const buf, size_t const size) { | |
| uint8_t const *const b = (uint8_t const * const)buf; | |
| uint8_t ascii[BASE + 1] = {[BASE] = '\0'}; |
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 g:lightline = { | |
| \ 'active' : { | |
| \ 'left' : [ [ 'mode', 'paste' ], [ 'filename', 'modified' ], [ 'readonly' ], [ 'buflist' ] ], | |
| \ 'right' : [ [ 'fileencoding', 'fileformat', 'lineinfo', 'percent' ], [ 'filetype' ] ], | |
| \ }, | |
| \ 'component_function' : { | |
| \ 'buflist' : 'Mline_buflist', | |
| \ }, |
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
| "-----------------------------------------------------------------------------------" | |
| " Mappings | | |
| "-----------------------------------------------------------------------------------" | |
| " コマンド | ノーマル | 挿入 | コマンドライン | ビジュアル | 選択 | 演算待ち | | |
| " map / noremap | @ | - | - | @ | @ | @ | | |
| " nmap / nnoremap | @ | - | - | - | - | - | | |
| " vmap / vnoremap | - | - | - | @ | @ | - | | |
| " omap / onoremap | - | - | - | - | - | @ | | |
| " xmap / xnoremap | - | - | - | @ | - | - | | |
| " smap / snoremap | - | - | - | - | @ | - | |
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 neobundle#autoload#function() | |
| Called 3 times | |
| Total time: 0.008816 | |
| Self time: 0.002334 | |
| count total (s) self (s) | |
| 3 0.000025 let function = expand('<amatch>') | |
| 3 0.000056 let function_prefix = get(split(function, '#'), 0, '') . '#' | |
| 3 0.003212 0.002182 let bundles = filter(neobundle#config#get_autoload_bundles(), "get(v:val.autoload, 'function_prefix', '').'#' ==# function_prefix || (has_key(v:val.autoload, 'functions') && index(neobundle#util#convert2list( v:val.autoload.functions), function) >= 0)") |
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 s:right = 1 | |
| let s:left = 2 | |
| function! s:slide(direction) | |
| let store_registor = @" | |
| execute "normal yi, W" | |
| let source = @" | |
| execute "normal yi," | |
| let dist = @" |
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 lst = ['a', 'b', 'c'] | |
| lockvar lst " 変数を書き換えられないようにする | |
| " let lst[0] = 'd' -> ERROR! | |
| unlockvar lst " 解除 | |
| " Vim script以外のファイルを読み込みたいとき | |
| " 結果はファイルの行がリストとしてかえる | |
| let lst = readfile('hogehoge.txt') |