分页: 1 / 1

vim中,在命令模式下,能直接把该光标后面所有字符移到下一行吗?

发表于 : 2009-09-26 14:27
GodPig
如果先用i切到插入模式,再回车,再esc切回来,感觉麻烦~

有没有直接一下子就把后面的字符给换到下一行的?

谢谢!

Re: vim中,在命令模式下,能直接把该光标后面所有字符移到下一行吗?

发表于 : 2009-09-26 14:30
BigSnake.NET
临时用的话录个宏

Re: vim中,在命令模式下,能直接把该光标后面所有字符移到下一行吗?

发表于 : 2009-10-06 18:24
nickleeh
解决办法:

代码:
:noremap <C-J> i<cr><esc>


然后就可以按 Ctrl + j 来断行(插入空白行).


另外:

代码:
:map <S-Enter> O<ESC>

"Shift-enter to open a new line above the current line without leaving the normal mode

代码:
:map <Enter> o<ESC>

"Enter to open a new line without leaving normal mode