Closed wayneashleyberry closed 8 years ago
How can I reproduce this? Did you turn syntax off with :syntax off<CR>
?
What use case do you have for preserving indentation, but turning the syntax off?
Yeah, by default my syntax is on... I used :syntax off
to disable it. My use case is that I'm starting to leave syntax off in terminal vim for performance reasons. This really wouldn't bother me if not for finding other languages seem to work fine.
If you consider the following code:
<?php
function test() {
}
When my cursor is over function
and I hit o
, with syntax on my cursor moves here:
function test() {
|
}
After disabling syntax and trying the same thing my cursor moves here:
function test() {
|
}
If I turn syntax back on and try again it works as expected and indents the cursor.
There isn't anything in this plug-in that relates to indentation. There are various hooks for folding. I wonder if another Vim built-in plugin relies on syntax groups being defined to perform the indentation?
EDIT: Looks like this is the case.
That's it @StanAngeloff! I'll add an issue over there - thanks :)
I thought this might be a vim limitation, but when I have syntax off indentation works fine for javascript and Go.
With syntax off, indentation using the
=
key or usingo
to enter a new line doesn't indent at all.