pyC*_*hon 37 sublimetext atom-editor
在Atom中是否有任何方法可以复制Sublime Text中的功能,您可以在其中按住alt键并向上或向下移动鼠标以选择并在多行末尾创建光标,以便您可以同时编辑多行?
Lee*_*Lee 36
如果我正确理解您的问题,您需要选择多行并在每行的末尾创建一个光标.有几种方法可以实现这一目标:
Selection|Split Into Lines命令(Cmd+Shift+L在OS X上或按下Cmd/Ctrl+Shift+P并键入Split Into Lines)将多行选择拆分为每行的选择.Selection|Add Selection Below根据需要添加带游标的行数Nee*_*ngh 15
我是Sublime Text 3的忠实粉丝,Atom非常好但是无法击败 Sublime :)
好吧,你可以尝试在ATOM中制作" 你最喜欢的Sublime Key'CTRL + SHIFT + L' " 来获得多光标的多线选择:
文件> Keymap ...
粘贴下面的代码和微笑:)
'atom-text-editor':
'ctrl-shift-l': 'editor:split-selections-into-lines'
Run Code Online (Sandbox Code Playgroud)
保存并关闭选项卡.打开任何文件,然后按" CTRL+SHIFT+L".现在魔法:D,按箭头键,你会在选定的行上看到多个Cusor.
对于 Windows 用户,
默认键绑定Ctrl+Shift+Up/Down似乎有效。
对于 Mac 用户,
将以下自定义键绑定代码添加到
/user/<yourName>/.atom/keymap.cson文件中
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# change the keybinding for ADD SELECTION ABOVE / BELOW
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 'shift-alt-up': 'editor:add-selection-above'
# 'shift-alt-down': 'editor:add-selection`-below'
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Run Code Online (Sandbox Code Playgroud)
Then place the cursor where you want to start and press and hold Shift+Alt and press Up or Down repeatedly to extend the cursor to as many lines as needed.
+1 to @Lee's solution above. This is same as option 2 above but using keybindings
| 归档时间: |
|
| 查看次数: |
31200 次 |
| 最近记录: |