Load Grep Results Into Vim

When coding, I often need to search for the references of a variable or a function across multiple files. Usually I enter command mode of vim and do a grep command, memorize the search results and open the files having hits. This common pattern could be dramatically accelerated by a user-defined vim command:
:command Gitgrep :lex system("git grep -n " . shellescape(getreg('/'))).

Read More

Delete Lines from Huge Files

With huge files, tasks that as simple as removing first or last several lines could become hard. If you try to open a huge file with vim, the chance is that the system gets stuck struggling to load the huge file into memory. This post has several alternative approaches to delete lines from huge files.

Read More