From eb9c759aeabebd1a46d329fbd78c2638b3a2af97 Mon Sep 17 00:00:00 2001 From: Leandro Freitas Date: Tue, 7 Jun 2011 16:56:44 -0300 Subject: [PATCH] Set options every time --- ftplugin/todo.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index 6c47454..ad7c7e3 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -5,6 +5,12 @@ " Website: http://github.com/freitass/todo.txt.vim " Version: 0.3 +" Some options lose their values when window changes. They will be set every +" time this script is invocated, which is whenever a file of this type is +" created or edited. +setlocal textwidth=0 +setlocal wrapmargin=0 + if exists("g:loaded_todo") finish endif @@ -13,9 +19,6 @@ let g:loaded_todo = 1 let s:save_cpo = &cpo set cpo&vim -setlocal textwidth=0 -setlocal wrapmargin=0 - setlocal foldmethod=expr setlocal foldexpr=TodoFoldLevel(v:lnum) setlocal foldtext=TodoFoldText()