Inserting characters at the beginning of multiple lines


I want to insert some characters at the beginning of multiple lines. (Called ‘string-rectangle’ feature on Emacs)

For example,




> a
> b
> c


I resolved it with Cmd + Shift + L and move a cursor at the beginning of lines, then insert "> ".


Any updates on how to do this? 3 lines or 10 lines isn’t a big deal, but dozens of lines is a pain to manually insert a character. (I need to insert * at the beginning of a section of text, so that it works with a C-style comment.


Actually never mind, I just searched for \n and replaced with \n *


The answer is above: this is still not a native feature of Atom, but the indicated package works well.


You can hold ctrl-alt then use the arrow keys to select multiple lines. No third party packages required. See this.


i highlight the text and then Cmd + Shift + L and then i try to move the cursor to end of line and add the comma and i get

I cant get my comma at the end of every line.

  1. You’re on Windows. You have no cmd key, which is only on Mac. You’re probably thinking of ctrl.
  2. The keybinding ctrl-shift-l, on Windows, is the default binding for the command grammar-selector:show.

Have you installed sublime-style-column-selection?

Given your use case, it would be easier for you to just add extra cursors. Just put your mouse at the end of the first line and click. Then put your mouse at the end of the second line and press ctrl while clicking.


i added the sublime-style-column-selection .
in my selection drop down from menu bar, the short cut keys are not for windows. how do I get them to be for windows? add selection below= alt ctrl arrow dow.n flips my entire computer screen upside-down.

how do i select the first column of words?


The documentation on this page shows you how to control the sublime-style-column-selection package. If you are seeing a behavior from a package you don’t recognize, you can open the Keybinding Resolver using ctrl-.. If you post a screenshot of that, I can explain what you’re seeing.


I was able to do this by:

#1 Select all [ctrl+A]
#2 Go to Selection Tab > Click on Split into lines
#3 Then Shift + Home
#4 Now, you can type anything and it will be added to the starting of each line!


This is the solution that worked for me. Thank you for this answer!