The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [vim]

Vim is a text editor which can use various commands to edit text. Note that challenges that require the answers to be in a specific language are generally discouraged.

Filter by
Sorted by
Tagged with
5
votes
3answers
717 views

Use an editor to write “Hello, World” [closed]

Objective Use any editor or IDE (vim, emacs, IntelliJ, etc) to write a valid "Hello, World" program in any C-like language. The "!" is optional, but you get style points if you use it. You may use ...
4
votes
2answers
172 views

Tips for golfing in V

What general tips do you have for golfing in V? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to V (e.g. "remove comments" is not an ...
31
votes
12answers
2k views

Tips for golfing in vim

I've recently realized how vim works great for golfing, especially for kolmogorov-complexity. Also, according to meta vim is a perfectly acceptable 'programming language' at least, for the scope of ...
9
votes
2answers
832 views

Reverse every word in a line in vim

Your task is to build a vim script or provide a sequence of keystrokes that will operate on a single line of text with up to 140 printable ASCII characters (anywhere in a file, with the cursor ...
27
votes
2answers
2k views

Vim - surround comment line with comment character

Today I realised that I often like to define sections in my code like so: #################### # Helper Functions # #################### But that it's tedious to ...
2
votes
4answers
720 views

Write a Vim command that reads as English text [closed]

Once you grok vi, your muscle memory learns tricks like ggVGx to delete all the text in a file. Trouble is, ggVGx is not an ...
18
votes
2answers
782 views

Type out Green Eggs and Ham in vim

The book Green Eggs and Ham by Dr. Seuss is famous for only having 50 different words in the entire story of the book. Your task is to create a sequence of keystrokes that will result in the entire ...
9
votes
4answers
800 views

Most destructive “forgot-to-enter-insert-mode” sequence in Vim

Pretend you have an arbitrary text file (which you may choose). Give the sequence of keystrokes that is most destructive (*) if it was intended to be inserted to the text, but instead was entered in ...
16
votes
3answers
1k views

Compose a Vim quine! [closed]

Goal: Create and save file in Vim containing at least 25 ASCII characters. The exact keystrokes used during the creation and saving of this file must also produce identical contents in Windows ...