summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2016-07-14 17:32:56 +0300
committerFrank LENORMAND <lenormf@gmail.com>2016-07-14 17:32:56 +0300
commit843d03f2e7ea9b0530cd435ccca3a236ed302594 (patch)
tree9225300ab4f45859e7dc649b8dbf879434bcf806
parent712c99059261e14d03105bbc755f55da16639001 (diff)
Disable automatic paragraph formatting by default, work around the lack of string refill in `fold`
-rw-r--r--rc/base/autowrap.kak4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/base/autowrap.kak b/rc/base/autowrap.kak
index e925407f..0b7bc44b 100644
--- a/rc/base/autowrap.kak
+++ b/rc/base/autowrap.kak
@@ -3,7 +3,7 @@ decl int autowrap_column 80
# If enabled, paragraph formatting will reformat the whole paragraph in which characters are being inserted
# This can potentially break formatting of documents containing markup (e.g. markdown)
-decl bool autowrap_format_paragraph yes
+decl bool autowrap_format_paragraph no
# Command to which the paragraphs to wrap will be passed, all occurences of '%c' are replaced with `autowrap_column`
decl str autowrap_fmtcmd 'fold -s -w %c'
@@ -26,7 +26,7 @@ def -hidden autowrap-cursor %{ eval -save-regs '/"|^@m' %{
format_cmd=$(printf %s "${kak_opt_autowrap_fmtcmd}" \
| sed "s/%c/${kak_opt_autowrap_column}/g")
printf %s "
- exec '<a-]>p<a-x>|${format_cmd}<ret>'
+ exec '<a-]>p<a-x><a-j>|${format_cmd}<ret>'
try %{ exec s\h+$<ret> d }
select '${kak_reg_m}'
"