Vim-Slimv:按下回车键时括号括起来的位置 [英] Vim - slimv : close-parenthesis position upon pressing enter
问题描述
我是一个Vim用户,试图学习常见的Lisp。我在Windows上运行gvim。我正在尝试遵循此处给出的slimv教程:
I'm a vim user trying to learn common lisp. I run gvim on windows. I am trying to follow the slimv tutorial given here: http://kovisoft.bitbucket.org/tutorial.html
My question:suppose you type the following and press enter after :morse
(the vertical bar denotes the cursor position)
(defpackage :morse|)
I get the following result (again the vertical bar '|' denotes the cursor position):
(defpackage :morse
|
)
Whereas I want the following result:
(defpackage :morse
|)
so that I can continue to type to get the following:
(defpackage :morse
(:use :common-lisp))
What should I do to get the result I want?
Many thanks in advance!
Got it - the answer apparently lies in :help g:paredit_electric_return
. I.e., insert the following in your _vimrc file:
let g:paredit_electric_return=1
Also see this feature in action:
这篇关于Vim-Slimv:按下回车键时括号括起来的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!