This is an EditorConfig plugin for Vim. This plugin could be found on both GitHub and Vim online.
There are two ways for installation:
-
If your Vim is compiled with
+python
feature (this is usually true on most Linux distributions), the most simple way to install this plugin is to download the archive and extract it into your Vim runtime directory (~/.vim
on UNIX/Linux and$VIM_INSTALLATION_FOLDER\vimfiles
on windows). -
If your Vim is not compiled with
+python
feature, please first download the EditorConfig core and follow the instructions in the README and INSTALL files to install it. Once EditorConfig core is installed, copy theeditorconfig.vim
file to your~/.vim/plugin
directory to install the editorconfig plugin.
The EditorConfig Vim plugin supports the following EditorConfig properties:
- indent_style
- indent_size
- tab_width
- end_of_line
- charset
- trim_trailing_whitespace
- insert_final_newline
- root (only used by EditorConfig core)
undo actions are lost in this situation:
- code is written
- "undo" action (via u command) is used to undo some code changes
- file is saved (via :w)
- "redo" action (via C-r command) is used to redo the code changes
When insert_final_newline = false, the redo step (step 4) does not work. Instead a single invisible action is performed again, marking the file as changed when nothing changed.