Posts

System Clipboard

Select visual lines needs to be copied and then use following shortcuts To Copy "*yy To Paste inside VIM "*p To copy outside VIM Since, text is already copied to system clipboard, we can use regular paste method available in OS. For more information use :help register

Use Matchit with ReactJS and Typescript Project

What is matchit plugin in vim? Matchit plugin in VIM allows us to jump between matching tags. For example: <div> <span>inner tag</span> <ol> <li>Ex-1</li> <li>Ex-2</li> </ol> </div> Then we can jump between div tags using %. We can put cursor in div then pressing % will take us(make a jump) to it’s matching pair </div>. This works out of the box for html, xml type of files. For files like typescriptreact (tsx), jsx we have to configure it manually.

How to profile VIM?

Introduction Here is how we can profile our VIM to find where it’s spending most of it’s time during during function calls. This happpens when we have tons of plugins and our linting, file editing becomes slow. :profile start vim-markdown.log :profile file * :profile func * " Do whatever makes VIM slow :profile pause " To continue profile use " :profile continue :noautocmd qall! References Stackoverflow Link