当我通过 O
或 o
添加一行时,它是根据它周围的缩进添加的。
有没有办法在使用 A
或 I
时做同样的事情?
class
def method
▋ | cursor starts in the first column
end
end
... *clickety-click* ...
class
def method
▋ | cursor is correctly positioned inside the method
end
end
O
和 o
开箱即用,但我必须从更高/更低的行开始。
最佳答案
使用 S
或 cc
在正确的缩进级别启动插入模式。
关于Vim:插入或追加缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26298540/