# Managing and Munging Line Endings in Vim

If you have opened a file, and see a bunch “\^M” or “\^J” characters in it, chances are that for some reason Vim is confused as to the line-ending type. You can force it to interpret the file with a specific line-ending by using the “++ff” argument and asking Vim to re-read the file using the “:e” command: :e ++ff=unix :e ++ff=mac :e ++ff=dos This will not actually change any characters in the file, just the way the file is interpreted.

# Buffersaurus - A Vim Plugin for Searching and Indexing Across Buffers

Description provided include (among others): :Bsgrep[!] Search all buffers (or just current buffer if “!” given) for regular expression pattern, . :Bstoc[!] Construct a “table-of-contents” consisting of filetype-dependent “important” patterns (e.g. class and method/function definitions). provided include (among others): :Bsgrep[!] Search all buffers (or just current buffer if “!” given) for regular expression pattern, . :Bstoc[!] Construct a “table-of-contents” consisting of filetype-dependent “important” patterns (e.g. class and method/function definitions).

# Character/Word/Line Count of Selection in Vim (a non-Vimique Vim Command) Compared to Underlining Text (a Vimique Operation)

Every day I discover at least one new thing about Vim. Sometimes useful, sometimes not. Sometimes rather prosaic, sometimes sublime. This one falls in the useful but prosaic category: to get a count of the number of characters, lines, words etc. in the current selection, type “g CTRL-G”. This is a useful command, and good to know, but its invocation is a rather obscure key-mapping. In other words, just like most of the commands of your garden-variety “dumb” modeless editor, it can only be memorized (or looked up) and reproduced, instead of being generated based on grammatic-/syntactic- princples, like a language-based construct.

# A Tale of Two Vim Commands: 's' and 'c'

Vim continues to surprise me with its wonders. Sometimes (many times, in fact) things do not make sense, and I am perplexed as to the reasoning behind them. Then, one day, I grokked it. And from that day on, I can never imagine any other way of doing it. An example of this was my confusion over the apparent redundancy of two fundamental commands. In normal mode Vim, “s“ (mnemonic: “substitute”) and “c” (mnemonic: “change”) are both ways to remove some existing text and then go into insert mode.

# Vim: Making Those Arrow Keys Work for You (Or Why the Anti-Arrow-Key Propoganda is Wrong)

The Great Controversy A standard dictum amongst experienced Vim users is not to use the arrow keys to move around your document. This dictum is often repeated again and again, in tones that range from the taken-for-granted to hysterical-zeal. The most common reason given for this is that using the arrow keys takes your hands away from the home row of your keyboard, and thus is wasteful both in terms of time and energy, whereas the standard Vim movement keys — h, j, k, and l — keep your hands on the home row, and therefore is far more efficient.