Many know about that you can open a file based on what’s under your cursor using
C-w f. There is also a handy variation on this using ‘F’. This variation will open
said file, but if it’s followed by a line number vim will jump to that line. We encounter this
a lot when executing tests via vim-dispatch.
This trick comes courtesy the CIA, via WikiLeaks. This leaked document shows how one can view a binary file in hex mode using the Linux xxd command.Continue reading »
A very common practice when refactoring code is deleting entire methods or code blocks en masse. One might be tempted to use visual select mode to select multiple lines, or simply to mash
dd. But Vim makes deleting code blocks easy with
dap. You can remember this as “Delete A Paragraph”.