I'm continuing to learn more keys for cut/copy/paste in vim
| Navigation | Combination |
| Cut | dd - entire line |
| Copy | yy - entire line |
| Paste |
p - paste below the current line P - paste at the current line
|
You can also use these keys along with numbers. eg: :3 - will simply take you 3rd line. We can add
d or
y based on whether we need to copy or cut/delete.
:3d - for deleting 3rd line.:3y - for copying 3rd line.Ndd - for deleting the next N lines including the current.Since I'm using ESC key for switching modes, I remapped the caps lock key to be
ESC within vim.
While debugging the failing tests in a different repo, I learnt about
prettyDOM, which is an effective way to debug the HTML code that gets rendered.
import { prettyDOM } from '@testing-library/dom';
const div = document.createElement('div');
div.innerHTML = 'HTML Element
';
console.log(prettyDOM(div));
//<div>
//<h1>HTML Element</h1>
//</div>
For my new posts, Subscribe via weekly RSS, common RSS