Skip to content

Commit

Permalink
Updated doc with comments on Paredit newline handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kovisoft committed Oct 5, 2019
1 parent c50c93f commit e0dc4eb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
7 changes: 5 additions & 2 deletions doc/paredit.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*paredit.txt* Paredit Last Change: 15 Jun 2018
*paredit.txt* Paredit Last Change: 05 Oct 2019

Paredit Mode for Vim *paredit* *slimv-paredit*
Version 0.9.14
Expand All @@ -13,6 +13,7 @@ but it is also distributed separately as a standalone plugin.

===============================================================================
PAREDIT MODE *paredit-mode*
*parentheses*

Paredit mode is a special editing mode that keeps all matched characters
(parentheses, square and curly braces, double quotes) balanced, i.e. all opening
Expand Down Expand Up @@ -418,6 +419,8 @@ paredit triggers 'filetype plugin on' and 'filetype indent on', these options
disable the corresponding feature.

*g:paredit_electric_return*
*newline*
*carriage-return*
If nonzero then "electric return" feature is enabled. This means that when an
<Enter> is pressed before a closing paren in insert mode, paredit will actually
insert two newlines creating an empty line. The extra newline is consumed at
Expand All @@ -430,7 +433,7 @@ option |g:slimv_repl_simple_eval| is nonzero. In this case <Enter> is used
to send the command line to the swank server for evaluation.

Please find a video demonstration of the electric return feature here:
http://img8.imageshack.us/img8/9479/openparen.gif
https://kovisoft.bitbucket.io/openparen.gif

*g:paredit_smartjump*
If nonzero, this option changes the behavior of '(' and ')' in normal and visual
Expand Down
19 changes: 14 additions & 5 deletions doc/slimv.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*slimv.txt* Slimv Last Change: 20 Jan 2018
*slimv.txt* Slimv Last Change: 05 Oct 2019

Slimv *slimv*
Version 0.9.14
Expand Down Expand Up @@ -1301,6 +1301,7 @@ b. install a Clojure Vim syntax plugin, like VimClojure.
c. newest Vim versions contain a specific Clojure syntax script.


*slimv-indentation*
2. Indentation

The indentation is also done via the default lisp.vim indent plugin, or an
Expand All @@ -1326,11 +1327,19 @@ such mappings are not defined by Slimv.
gg=G Reindent whole file.


3. Parenthesis handling
*slimv-parentheses*
*slimv-newline*
3. Parenthesis and newline handling

First of all there is paredit mode that is provided by the paredit.vim script
(also part of Slimv).
For a detailed introduction on paredit mode please consult the |paredit| help.
Paredit mode also changes the way newlines are handled, this feature is called
"electric return", see more on this topic in |g:paredit_electric_return|.

If you don't like paredit mode, Vim still obtains many tools to aid working
with parentheses. This is a very important topic for a Lisp programmer.

First of all there is paredit mode. If you don't like it, Vim still obtains
many tools to aid working with parentheses. This is a very important topic
for a Lisp programmer.

:inoremap ( ()<Esc>i Automatically insert closing parenthesis mark when
an opening one is inserted.
Expand Down

0 comments on commit e0dc4eb

Please sign in to comment.