Last active
July 13, 2020 03:09
-
-
Save mizofumi/b41590062a659181d7580b0cda94ff01 to your computer and use it in GitHub Desktop.
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
| このチートシートのファイル場所 | |
| ``` | |
| ~/.vim_cheat | |
| ``` | |
| 設定の再読み込み | |
| ``` | |
| :source ~/.vimrc | |
| ``` | |
| =========================================== | |
| NERDTree | |
| ``` | |
| Shift + i : 隠しファイルの表示 | |
| hjkl : カーソル移動 | |
| i : 水平で開く | |
| s : 垂直で開く | |
| Ctrl + n : NERDTreeの表示切り替え | |
| Ctrl + hjkl : 階層を維持した状態でカーソル移動 | |
| u : 上の階層に移動 | |
| CC : カーソルのディレクトリを開く | |
| ``` | |
| Vim | |
| ``` | |
| Ctrl+w + c : Paneを閉じる | |
| Ctrl+w + s : 上下分割 | |
| Ctrl+w + v : 左右分割 | |
| Ctrl+w + w : 次のPaneに移動 | |
| Ctrl+w + hjkl : Paneの移動 | |
| Ctrl+w + x : Paneの入れ替え | |
| Ctrl+w + + : Paneの高さ+1 | |
| Ctrl+w + - : Paneの高さ-1 | |
| Ctrl+w + < : Paneの幅-1 | |
| Ctrl+w + > : Paneの幅+1 | |
| Ctrl+w + Space : チートシートの表示 | |
| Ctrl + Space : ターミナルを開く | |
| Ctrl + E : Paneのサイズ変更モード | |
| ``` |
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
| { | |
| "python.linting.enabled": false, | |
| "suggest.keepCompleteopt": true | |
| } |
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
| set tabstop=4 | |
| set shiftwidth=4 | |
| set smartindent | |
| set backspace=indent,eol,start | |
| set nu | |
| " for command mode | |
| nnoremap <S-Tab> << | |
| " for insert mode | |
| inoremap <S-Tab> <C-d> | |
| call plug#begin('~/.vim/plugged') | |
| Plug 'arcticicestudio/nord-vim' | |
| Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
| Plug 'preservim/nerdtree' | |
| Plug 'ryanoasis/vim-devicons' | |
| Plug 'tinyheero/vim-myhelp' | |
| Plug 'simeji/winresizer' | |
| Plug 'voldikss/vim-floaterm' | |
| Plug 'reireias/vim-cheatsheet' | |
| call plug#end() | |
| inoremap <silent><expr> <TAB> | |
| \ pumvisible() ? coc#_select_confirm() : | |
| \ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" : | |
| \ <SID>check_back_space() ? "\<TAB>" : | |
| \ coc#refresh() | |
| function! s:check_back_space() abort | |
| let col = col('.') - 1 | |
| return !col || getline('.')[col - 1] =~# '\s' | |
| endfunction | |
| " 補完表示時のEnterで改行をしない | |
| inoremap <expr><CR> pumvisible() ? "<C-y>" : "<CR>" | |
| set completeopt=menuone,noinsert | |
| inoremap <expr><C-j> pumvisible() ? "<Down>" : "<C-n>" | |
| inoremap <expr><C-k> pumvisible() ? "<Up>" : "<C-p>" | |
| map <C-n> :NERDTreeToggle<CR> | |
| autocmd vimenter * if !argc() | NERDTree | endif | |
| autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
| set fillchars+=vert:\ | |
| autocmd ColorScheme * highlight VertSplit cterm=NONE ctermfg=Green ctermbg=NONE | |
| " map <C-@> to toggle | |
| tnoremap <silent> <C-@> <C-w>:FloatermToggle<CR> | |
| nnoremap <silent> <C-@> :FloatermToggle<CR> | |
| let g:cheatsheet#cheat_file = '~/.vim_cheat' | |
| " tnoremap <silent> <C-w><Space> <C-w>:Cheat<CR> \| <C-w>L | |
| " nnoremap <silent> <C-w><Space> :Cheat<CR> \| <C-w>L | |
| tnoremap <silent> <C-w><Space> <C-w>:Cheat<CR> | |
| nnoremap <silent> <C-w><Space> :Cheat<CR> | |
| " Highlighting | |
| set cursorline | |
| augroup cch | |
| autocmd! cch | |
| autocmd WinLeave * set nocursorline | |
| autocmd WinEnter,BufRead * set cursorline | |
| augroup END | |
| hi clear CursorLine | |
| hi CursorLine gui=underline | |
| highlight CursorLine ctermbg=8 guibg=gray term=bold cterm=bold | |
| highlight CursorLineNr term=bold cterm=bold ctermfg=012 gui=bold |
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
| brew install vim | |
| brew install node | |
| curl --compressed -o- -L https://yarnpkg.com/install.sh | bash | |
| curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
| :PlugInstall | |
| :CocInstall coc-css coc-go coc-html coc-java coc-json coc-phpls coc-python coc-sh coc-snippets coc-xml coc-yaml | |
| { | |
| "dependencies": { | |
| "coc-css": ">=1.2.4", | |
| "coc-go": ">=0.9.1", | |
| "coc-html": ">=1.2.4", | |
| "coc-java": ">=1.4.11", | |
| "coc-json": ">=1.2.6", | |
| "coc-phpls": ">=2.1.8", | |
| "coc-python": ">=1.2.12", | |
| "coc-sh": ">=0.5.1", | |
| "coc-snippets": ">=2.1.28", | |
| "coc-xml": ">=1.11.1", | |
| "coc-yaml": ">=1.0.4" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment