Search code examples
macosvimeditorvi

Exit column mode for vim


I was trying to enter column mode (:%!column -t)in vim to view a csv, but it delineated by something other than a comma and now my information is unreadable, and CTRL-V now no longer displays the above command, but instead displays :%!column -t^M.

How would I exit vim/fix this?


Solution

  • $ man column | grep "\-s"
         column [-entx] [-c columns] [-s sep] [file ...]
         -s      Specify a set of characters to be used to delimit columns for the -t option.
                 by default, or with the characters supplied using the -s option.  Useful for pretty-printing displays.
    

    There is -s option which allows you to specify delimiter you need.

    You can undo changes in vim using u button.