Автоматический отступ с MacVim

712
morbusg

Как я могу изменить автоматический отступ в MacVim?

Моя проблема в том, что при редактировании файла TeX, например, каждый раз, когда я (печатаю, vim решает сделать отступ для этой строки.

Вот видео моей проблемы . Вы можете видеть, что это бесит.

Я на Mavericks, окно о MacVim показывает версию как

Snapshot 66, VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec 12 2012 16:22:25)  MacOS X (unix) version  Included patches: 1-754 

Я установил патоген, и модули, используемые с помощью, которые включают в себя tabular, vim-slim, vim-colors-solarize, и vim-surround. (Перечислю их всех здесь, потому что я не знаю, что создает такое поведение.)

0

1 ответ на вопрос

2
benjifisher

The easiest way to find all the options that affect indenting is to open an options window with

:options 

and then look at Section 15, "tabs and indenting". Once you know which options are relevant, you can check their current values and which plugin is responsible with

:verbose set ai? si? cin? cink? inde? indk? ci? pi? lisp? lispw? 

To actually disable a filetype-specific indentation; from the manual section 30.3:

If you don't like the indenting for one specific type of file, this is how you avoid it. Create a file with just this one line: >

:let b:did_indent = 1 

Now you need to write this in a file with a specific name:

/indent/.vim 

The is the name of the file type, such as "cpp" or "java".

Понял; последняя команда показывает `indentkeys = 0 {, 0},:, 0 #,! ^ F, o, O, e, [, (, {,),},]` из `vim / runtime / indent / tex. vim`. Вы знаете, как это изменить локально, т.е. в `~ / .vimrc`? morbusg 10 лет назад 0
Или, что еще лучше, как не загружать этот плагин для LaTeX-ориентированного отступа? morbusg 10 лет назад 0
Смотрите `: help 30.3` в руководстве пользователя. benjifisher 10 лет назад 0