I have a list of items where I want to replace the first two characters:

a) item 1
b) item 2
c) item 3

What is the fastest way to make this:

* item 1
* item 2
* item 3

I have an approach with visual mode (Ctr-v, jjj, but need to do two replace commands. Iirc, this replacement can be done with 1 command)

  • 1
    Like .,.+2s/^../*/ (or equivalently in a visual selection)? Why two replace commands? 2c would replace two characters.
    – muru
    Commented Feb 20, 2015 at 8:40
  • sometimes only the first line in the visual selection is changed, repeating then with . for the other lines messes things up.
    – poseid
    Commented Feb 20, 2015 at 9:10
  • 2
    @poseid are you in the habit of pressing Ctrl-C instead of Esc? This prevents, among other things, changes being applied to each line of a Visual-block selection.
    – tommcdo
    Commented Feb 20, 2015 at 10:48
  • that could be the main reason for confusion! thanks!
    – poseid
    Commented Feb 21, 2015 at 9:38

2 Answers 2


Visual-block selection:



:,+2norm! cE*



Dot formula:

  • 2
    Crazy approach: using textobj-word-column.vim you can do ciC*<esc> and be done. Note: this plugin is a "do what I mean" plugin so it fails in unexpected places and ways, but the plugin is still useful in some easy cases like this. Commented Feb 20, 2015 at 23:55
  • interesting the normal and dot formula!
    – poseid
    Commented Feb 21, 2015 at 9:40
  • 3
    Note that for the Visual-block solution, you will only see text being typed on the first line. Once you hit <Esc>, it will fill in the remaining lines.
    – tommcdo
    Commented Feb 27, 2018 at 12:04
  • Any suggestions for a way to remember that c will replace? Like how ctrl+D(own) Commented Mar 28, 2019 at 16:06
  • 5
    @JordanMackie c is for "change".
    – romainl
    Commented Mar 30, 2019 at 16:24

Here is more efficient way of doing this:

  1. Having cursor on the first item and 1st letter (0), enter 'blockwise' visual mode Ctrl+v and select the 1st column of your current paragraph by } (if your list is finished by new line), otherwise use different methods like arrow keys (to move around the selection), or pattern search /c) where c is your last element).
  2. Move to the last symbol of your list by k and l (or using arrow keys), so two columns are selected which you want to change.
  3. Change the selected text by pressing c and type your bullet symbol (*) and finish by hitting Esc.

Works more efficiently especially in the longer lists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.