The asciidoc.vim file contains some synchronization options (:syn sync).
However, I've noticed that this can make Vim lag a little bit when
typing each character on a fairly simple 150-line document[0] with a
decently fast computer[1].  Removing those options restores Vim's
responsiveness.

I'm including a patch that does that.

[0] 
https://github.com/bk2204/daniel-ruby/blob/ad108607f1b4bbb93daf4133aa624ca29117dc86/doc/daniel.adoc
[1] ThinkPad X220 with a 2.8 GHz Core i7 processor and 8 GiB of RAM.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
From 6f699a0af260838c6a828b85a6633742a44b37bc Mon Sep 17 00:00:00 2001
From: "brian m. carlson" <[email protected]>
Date: Sat, 1 Nov 2014 21:19:06 +0000
Subject: [PATCH] Remove syntax syncing to avoid slowness.

Turning on the syntax synchronization options (:syn sync) can make Vim
very slow on some files, even those that are not very large.  The
highlighting still appears to be correct even without these options, so
remove them to improve performance.
---
 vim/syntax/asciidoc.vim | 2 --
 1 file changed, 2 deletions(-)

diff --git a/vim/syntax/asciidoc.vim b/vim/syntax/asciidoc.vim
index 1303db7..05d40a0 100644
--- a/vim/syntax/asciidoc.vim
+++ b/vim/syntax/asciidoc.vim
@@ -23,8 +23,6 @@ if exists("b:current_syntax")
 endif
 
 syn clear
-syn sync fromstart
-syn sync linebreaks=100
 
 " Run :help syn-priority to review syntax matching priority.
 syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED
-- 
2.1.1

Attachment: signature.asc
Description: Digital signature

Reply via email to