From 8f6271e82d1eb26df1cb89a34633cc194281cde3 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 14 Jan 2012 21:28:59 +0100 Subject: [PATCH] vimrc: Use syntax based omni completion. --- vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vimrc b/vimrc index bb0bfe6..3d75498 100644 --- a/vimrc +++ b/vimrc @@ -404,6 +404,15 @@ if has('syntax') set synmaxcol=500 endif +" Use (limited) syntax based omni completion if no other omni completion is +" available. Taken from :help ft-syntax-omni. + if has('autocmd') && exists('+omnifunc') + autocmd FileType * + \ if &omnifunc == '' | + \ setlocal omnifunc=syntaxcomplete#Complete | + \ endif + endif + " Highlight lines longer than 78 characters. Thanks to Tony Mechelynck " from the Vim mailing list. It can easily be " disabled when necessary with :2match (in Vim >= 700). -- 2.44.1