This file contains 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 <iostream> | |
#include <type_traits> | |
#include <utility> | |
#if defined(__cpp_variadic_using) && defined(__cpp_deduction_guides) | |
template <typename... Fs> | |
class | |
#if defined(__has_cpp_attribute) && __has_cpp_attribute(nodiscard) | |
[[nodiscard]] |
This file contains 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
VS_VERSION_INFO VERSIONINFO | |
FILEVERSION 1,2,3,4 | |
PRODUCTVERSION 1,2,3,4 | |
FILEFLAGSMASK 0x3fL | |
#ifdef _DEBUG | |
FILEFLAGS 0x1L | |
#else | |
FILEFLAGS 0x0L | |
#endif | |
FILEOS 0x40004L |
This file contains 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
set clipboard=unnamed | |
set hlsearch | |
set incsearch | |
set virtualedit=block | |
set whichwrap=b,s,h,l,<,>,[,] | |
set ignorecase smartcase | |
set scrolloff=5 | |
nnoremap c "_c | |
nnoremap x "_x | |
nnoremap n nzz |
This file contains 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
cmake_minimum_required(VERSION 3.1) | |
project(CMakeProject CXX) | |
set(CMAKE_C_STANDARD 11) | |
set(CMAKE_C_STANDARD_REQUIRED ON) | |
set(CMAKE_C_EXTENSIONS OFF) | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
set(CMAKE_CXX_EXTENSIONS OFF) |
This file contains 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
" dependsはVim用なので,neovimでは不要 | |
call dein#add('Shougo/defx.nvim', { | |
\ 'depends': ['nvim-yarp', 'vim-hug-neovim-rpc'], | |
\ 'on_cmd': 'Defx', | |
\ 'on_func': 'defx' | |
\}) | |
if dein#tap('defx.nvim') " {{{ |
This file contains 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:create_winid2bufnr_dict() abort " {{{ | |
let winid2bufnr_dict = {} | |
for bnr in filter(range(1, bufnr('$')), 'v:val') | |
for wid in win_findbuf(bnr) | |
let winid2bufnr_dict[wid] = bnr | |
endfor | |
endfor | |
return winid2bufnr_dict | |
endfunction " }}} |
This file contains 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
if exists('*win_gotoid') | |
function! s:buf_open_existing(bname) abort " {{{ | |
let bnr = bufnr(a:bname) | |
if bnr == -1 | |
echoerr 'Buffer not found:' a:bname | |
return | |
endif | |
let wids = win_findbuf(bnr) | |
if empty(wids) | |
new |
This file contains 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
" 参考: http://secret-garden.hatenablog.com/entry/2017/11/14/113127 | |
" 既に開いているターミナルを開く(バッファに移動) | |
" 開いているターミナルが無い場合は新規に起動 | |
if has('terminal') | |
function! s:complete_term_bufname(arglead, cmdline, cursorpos) abort " {{{ | |
let arglead = tolower(a:arglead) | |
return filter(map(term_list(), 'bufname(v:val)'), '!stridx(tolower(v:val), arglead)') | |
endfunction " }}} | |
function! s:term_open_existing(...) abort " {{{ |
This file contains 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
if &compatible | |
set nocompatible | |
endif | |
function! s:hint_n_m() abort " {{{ | |
redir => str | |
:marks | |
redir END | |
echo str |
This file contains 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
if &compatible | |
set nocompatible | |
endif | |
let s:compl_key_dict = { | |
\ char2nr("\<C-l>"): "\<C-x>\<C-l>", | |
\ char2nr("\<C-n>"): "\<C-x>\<C-n>", | |
\ char2nr("\<C-p>"): "\<C-x>\<C-p>", | |
\ char2nr("\<C-k>"): "\<C-x>\<C-k>", | |
\ char2nr("\<C-t>"): "\<C-x>\<C-t>", | |
\ char2nr("\<C-i>"): "\<C-x>\<C-i>", |