Many Errors after changing the filetype #9

Closed
fanglingsu opened this Issue Oct 15, 2011 · 3 comments

Projects

None yet

2 participants

@fanglingsu

If I load a csv file and want to change the filetype to disable the csv features by setting :set ft=txt or somethin similar, I get many error on using h, j ,k , l and the cursor keys for movement that make it impossible to work unti the filetype is set back to csv.

Error for h, j, k and l keys are only shown if g:csv_highlight_column is enabled, because the HiColumn function isn't available anymore but already referenced throuhgt autocommand for CursorMoved.

Maybe we should have a second function to cleanup all staff done by InitCSV.

@chrisbra
Owner

On Sat, October 15, 2011 6:30 pm, Daniel Carl wrote:

If I load a csv file and want to change the filetype to disable the csv
features by setting :set ft=txt or somethin similar, I get many error on
using h, j ,k , l and the cursor keys for movement that make it impossible
to work unti the filetype is set back to csv.

Error for h, j, k and l keys are only shown if g:csv_highlight_column is
enabled, because the HiColumn function isn't available anymore but
already referenced throuhgt autocommand for CursorMoved.

Maybe we should have a second function to cleanup all staff done by
InitCSV.

Thanks for reporting. Commit 962febe should fix this issue.

regards,
Christian

@fanglingsu

Pretty nice, no more errors. But I got a message on startup that the command HiColumn is not defined. I haven't tested it much, but this patch should remove the warning on startup (fanglingsu@55c69f9).

@chrisbra
Owner

Thanks, included it and pushed it to master

@fanglingsu fanglingsu closed this Oct 17, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment