æ³å®èªè ãã®è¨äºã¯ãVimã£ã¦ä¾¿å©ã ãã©ãè¦ããã¦ã ã¨å±æçã«ãã使ããªãã£ãããã¦ãå®éã«æ¬æ ¼çã«Webéçºããã®ã¯é£ããããã¢ããã¼ã·ã§ã³ãç¶ããªããªãâ¦ãã¨ãã人ã®ããã«æ¸ãã¾ããã 工夫ããç¹ TODOãµã³ãã«ã¢ããªãç¨æãã¦ãVimã®è¨å®é©ç¨ â ãªã¢ã«ãªã³ã¼ãã使ã£ã¦å®éã«Vimãåãããã¨ããæãã§å°ããã¤ä¾¿å©ã«ãªãä½é¨ãããªããå®éã®Webéçºã§ã使ããVimã使ã£ãæä½ãè¨å®ãªã©ãè¦ãã¦ãããã¹ãããã¢ããæ§æ ç¹å®ã®ãã©ã°ã¤ã³ã使ãã±ã¼ã¹ã¯é¡ä¼¼ãã©ã°ã¤ã³ãç´¹ä»ããä»ã®ãã©ã°ã¤ã³ãé¸æã§ããããã«ãï¼ããããVimã®æ¥½ããã¨ããã好ããªãã®ã好ããªããã«èªåã§çµã¿åããã¦ä½¿ããï¼ æ³¨æç¹ Vimã®èª¬æã«ãªãã¾ã(Neovimã§ã¯ããã¾ããã®ã§ã注æãã ãã)ã Vimã¯ãã¼ã¸ã§ã³8.2ã使ã£ã¦ãã¾ãã Dockerä¸ã®Ubuntuã§Vimãåããæ³å®ã«ãªã£ã¦ãã¾ããã¤ã³
vim-lsp ã使ãã¤ã¤ã Lint, Format ãä¸æãè¨å®ã§ãã ALE ãä½µç¨ãã¦ãã¾ãããããããã vim-lsp 㧠Lint, Format ãè¨å®åºæ¥ãç®å¦ãç«ã£ãã®ã§ãè¨è¼ãã¦ããã¾ãã èæ¯ TypeScript ã®ã³ã¼ããä¿åæã« Prettier ã§ãã©ã¼ããããããããvim-lsp ã§è£å®ãå®ç¾©ã¸ã£ã³ããè¡ãã¤ã¤ diagnostics ã¯ç¡å¹ã«ã ALE 㧠Lint, Format ãå®è¡ããç°å¢ãä½ã£ã¦ãã¾ããã Plug 'prabirshrestha/vim-lsp' Plug 'mattn/vim-lsp-settings' let g:lsp_diagnostics_enabled = 0 Plug 'dense-analysis/ale' let g:ale_echo_msg_format = '[%linter%] %code: %%s'
ãªãã¡ã¯ã¿ãªã³ã°ãããã³ã¼ãã調ã¹ããããæãå¼ã³åºãå ãæ¢ãã®ã«LspReferencesãLspCallHierarchyIncomingã使ã£ã¦ããã ãã ãã©ã¡ãã1é層åãã表示ãã¦ããããå¼ã³åºãå ãé ãã¨å½±é¿ç¯å²ãææ¡ãã«ããã£ãã®ã§quickfixã«çµæããã¼ã¸ãã¦è¡¨ç¤ºããã³ãã³ããä½ã£ã¦ã¿ãã command! AppendCallTree call s:append_tree(':LspCallHierarchyIncoming') command! AppendRefTree call s:append_tree(':LspReferences') augroup AppendTree autocmd! augroup END function! s:append_tree(cmd) abort autocmd AppendTree BufWinEnter quick
ã¯ããã« çè ã¯ããã©ãããããªã®ã§ã社ä¼äººã«ãªã£ã¦ãã°ããããã¾ã§ã大å¦ã®å¾è¼©ã®dotfilesãforkãã¦ä½¿ã£ã¦ãããtmuxã®è¨å®ããã®ã¾ã¾åå©ç¨ãã¦ãã®ã§ãè¨å®ãã¡ã¤ã«ã«ä½ãè¨å®ãã¦ãããããåãã£ã¦ããªãã£ãã å°±è·ããã¾ã§ã¯ãEmacsã使ã£ã¦ãã¦ããããªãã«è¨å®ãã¡ã¤ã«ãæé·ããã¦ãããããããå°±è·ããããã«ãªãã¨ãªã使ãå§ããVimããã£ããæã«ãªãã¿ãä»ã使ãç¶ãã¦ããã Vimã®è¨å®ãé©å½ã«ãããããåã£ã¦ãããã®ããããã¯ã¼ã¯ãããã®ã§ãèªåãæ¸ããã¨ãããè¨å®ãã¹ã¯ãªããã¯ã»ã¨ãã©ãªãã£ããããã§ãç¹ã«åé¡ã¯ãªãã£ããããªãã¨ãªãVimãéããªã£ã¦æ°ããã¦ããããæ¹åæ¹æ³ãåãããªãã®ã§ããã½ã³ã³ãå¤ããã¿ã¤ãã³ã°ã§ããã¹ã¦ãæ¨ã¦ãã æ¬è¨äºã¯ãçè ãç´ ã®Vimã§ã©ã®ããã«Goã®ã³ã¼ããæ¸ãã¦ãããã説æããè¨äºã§ããããã®ãããç¹ã«ä»è ã«åãæ¹æ³ãå§ãã訳ã§ã¯ãª
ãå ¨è§ã¹ãã¼ã¹ã®è¡¨ç¤ºãã¯ä½çªç ãããããã¾ããããè¤æ°ç¨®é¡ã«å¯¾å¿ãã¦ãããã®ãããã¨è¦ã¤ãããªãã£ãã®ã§æ¸ãã¾ããã ã³ã¼ã .vimrcãinit.vimã«è¨è¿°ãã¦ãã ããã å ¨è§ã¹ãã¼ã¹ä»¥å¤ã®ç¹æ®ã¹ãã¼ã¹ããã¤ã©ã¤ããã¾ããä¸è¨ã§å¯¾å¿ãã¦ããªãtabãªã©ã¯listcharsã§å¯è¦åã§ãã¾ãã ä¸è¨ã§ã¯è²ãdarkmagentaã«ãã¦ãã¾ãããã«ã©ã¼ã¹ãã¼ã ã«ãã£ã¦ã¯è¦ã¥ããããããã¾ããã®ã§ãã好ã¿ã§è¨å®ãã¦ãã ããã è¡¨ç¤ºä¾ è¿½è¨ ãããæ¸ããã¨ãã«ã¯Neovimã§è©¦ãã¦ããã®ã§ãããVimã§å®è¡ããããã¾ãåä½ãã¾ããã§ããã åèæ¬ã«è¼ãã¦ããVim hackãåèã«ãVimEnter,WinEnterã¨ColorSchemeã®2ã¤ã®ã¤ãã³ãã使ãã®ãè¯ãããã§ãã augroup extra-whitespace autocmd VimEnter,WinEnter * call
åã¯dotfilesç³»ãªãã¸ããª*1ã®ã³ãããæ°ãåè¨ããã ãã§2261ã³ãããããã.vimrcã°ã£ããããã£ã¦ãã¦éçºãå ¨ç¶é²ã¾ãªãã¿ã¤ãã®äººéã§ãã¤ã¾ãéçºç°å¢ã«ã¨ã¦ããã ãããããã ãã ããããã¦ä»ã«èª°ããã£ã¦ãªããããªæ°ã ã®ã«ã¹ã¿ãã¤ãºãçã¿åºãã¦ãã¾ã£ããããããªããã°ããã£ãã¨å¾æãã¦ãããã®ãå¤ãããã®ã§ãåã®ãããªäººãæ°ãã«çã¾ããªããããããã¦ããã°ããã£ããã¯ããã¯ã¨ãã®æ³åã®ãããªãã®ãç´¹ä»ãããã å¾æãã¦ãããã® C-h, C-y, C-u, C-oã§ã¦ã£ã³ãã¦åãæ¿ã Windows, macOS, Linuxåãã以ä¸ã®ã°ãã¼ãã«ãªãã¼ãã¤ã³ããè¨å®ãã¦ããã C-h: ã¿ã¼ããã«ã«ã¦ã£ã³ãã¦åãæ¿ã C-y: IntelliJãCLionã«ã¦ã£ã³ãã¦åãæ¿ã C-u: Google Chromeã«ã¦ã£ã³ãã¦åãæ¿ã C-o: TwitterãSlackã«
ã¨ã³ã¸ãã¢ã®ä½éã§ããæè¿è¨äºãæ¸ãã¦ããªãã£ãã®ã§å°ãã¿ã§ããå æ¥ãè åä¼ç»ã®ç¤¾å ã¤ãã³ããã¨ãã£ã¿ã«ã¤ãã¦èªãä¼ãå¬ããã¾ãããè·ç¨®ã«ãããã¾ããã«ã³ã ã§ã¯å¤ãã®å¾æ¥å¡ã¯ãªã³ã©ã¤ã³ã§æ¥åãè¡ã£ã¦ãã¾ãããã¾ã«ã¯ãªãã©ã¤ã³ã§äº¤æµã...ã¨ãããã¨ã§æ¥ãã人ã¯ãªãã£ã¹ã«éã¾ã£ã¦ã¨ãã£ã¿ã®è©±ããã¤ã¤è»½é£ã楽ããã¨ããã³ã³ã»ããã§ãã å½æ¥ã¯ Vim, Emacs, Visual Studio Code, nano... ã¨æ§ã ãªã¨ãã£ã¿ã®ããã話ããç±ã話ãèªããã¾ãããç§ã¯ Vim ã® Vim script ã«ã¤ãã¦è©±ããã®ã§ä»æ¥ã¯ãããè¨äºåãã¾ãã 0. ç§ã¨ã¨ãã£ã¿ ç§ã¯é·ãã Vim ãã¨ãã£ã¿ã¨ãã¦ä½¿ã£ã¦ãã¾ãããã¨ãã£ã¿ãã¨ãããã®ãæèããã®ã¯å¤§å¦çã®é ã§ãããããæ©æ¢°å·¥å¦ç³»ã ã£ãã®ã§ããã½ããã¦ã§ã¢å·¥å¦ã C ã C++ ãã«ãªãã¥ã©ã ã«ããèªåããããã履修ãã¾ããããã
ã³ã¼ããæ¸ãã¦ããã¨ãã対å¿ããæ¬å¼§ã¯ã¨ã¦ã大äºã§ããã¨ãã£ã¿ã¼ã®ä¸ã§ã«ã¼ã½ã«ä¸ã®æ¬å¼§ãã©ãã¨å¯¾å¿ãã¦ããããä¸ç®ã§ãããã¨ä¾¿å©ã§ããVimã®æ¨æºã®ãã©ã°ã¤ã³ã«matchparenã¨ãããã©ã°ã¤ã³ãããã¾ã (:h matchparen)ã ç§ããã£ã¨matchparenã®ãã¤ã©ã¤ãã«ä¾åãã¦ã³ã¼ããæ¸ãã¦ãã¾ãããããããã ãã ããã®ãã©ã°ã¤ã³ã®ããã©ã¼ãã³ã¹ãæ°ã«ãªãããã«ãªã£ã¦ãã¾ãããæ¨æºãã©ã°ã¤ã³ãªã®ã§ããããã¨éãå¦çããã£ã¦ããã¨æãã¾ãã対å¿æ¬å¼§ããã¤ã©ã¤ããããã©ã°ã¤ã³ã«ãã£ã¦ä½è¨ãªå¦çãè¡ããã¦ãã³ã¼ãã£ã³ã°ã®å¦¨ãã«ãªã£ã¦ã¯ãã¾ãããããã¾ããã æåã¯ããããéããã¨ãèãã¾ãããããããã¡ã¤ã«ãåã£ãçµæãã©ããã¦ãããæ©è½ãå®ç¾ããããã«å¿ è¦ãªå¦çãéãã¦æéãããã£ã¦ãããã¨ã«æ°ãä»ãã¾ãã (3æ¥ãããåã®ãã¨ã§ã)ããã®æ©è½ãè½ã¨ãã®ã¯æ¨æºãã©ã°ã¤ã³ã«ã¯åã
ããã«ã¡ã¯ãç§ã¯ã¤ãæè¿ã¾ã§ Vim ã® Vi æåãç¥ããªãã£ãã®ã§ããã好å¥å¿ã§ã¡ãã£ã¨ããã£ã¦ã¿ãã¨ãããã©ã£ã·ãã¨ããã£ã¦ãã¾ãã¾ãããã¾ã£ãããªç¶æ ã® Vim ãèªåè²ã«æãä¸ãã¦ããã®ã¯ã¨ã¦ã楽ããã§ãã vimrc ãæ¸ã㦠Vim ãã«ã¹ã¿ãã¤ãºãã¦ãããã¡ã«ã Vim script ã®ãã¨ãå°ããã¤ããã£ã¦ãã¾ãããããã§ä¸ã¤ãã©ã°ã¤ã³ãä½ãã¾ãããã¡ããã© Zenn ã§è¨äºãæ¸ãã¦ã¿ããã¨æã£ã¦ããã¨ãããªã®ã§ããããæ©ã«ãç´¹ä»ããã¦ãã ããã vim-hitspop æ¤ç´¢ã³ãã³ãã®ãããæ°ããããã¢ããã§è¡¨ç¤ºãã¦ããããã©ã°ã¤ã³ã§ãã ãã¨ãã° /foo ã¨ããã³ãã³ããå®è¡ããã¨ããããã¢ãããç¾ã㦠foo [3/7] ã¨ãã£ãæ¤ç´¢çµæã表示ãã¾ãããã㧠7 ã¯ãã¼ã¿ã«ã®ãããæ°ãã3 ã¯ç¾å¨ã«ã¼ã½ã«ãã©ã®ä½ç½®ã«ããã®ãã表ãã¦ãã¾ãã n n n ... ã¨ã
Vimã«ã¯å¦çæéãè¨æ¸¬ããæ©è½ãããã以ä¸ã®ããã«vimã®å¼æ°ã« --startuptime ãä»ãããã¨ã§æå®ãã{logfilename}ã«å¦çæéãè¨æ¸¬ããçµæããã¡ã¤ã«ã¨ãã¦åºåã§ããã vim --startuptime {logfilename} ãã®åºåçµæã¯ä»¥ä¸ã®å½¢å¼ã§åºåãããã times in msec clock self+sourced self: sourced script clock elapsed: other lines 000.000 000.000: --- VIM STARTING --- 000.000 000.000: Allocated generic buffers 002.000 002.000: locale set 002.000 000.000: clipboard setup 002.000 000.000: window ch
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}