From 9ed2d9cc483519044bbe1ec7351e4acea09164c6 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sun, 17 Apr 2016 20:03:00 +0100 Subject: [PATCH] Improve vim python filetype settings --- after/ftplugin/python.vim | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim index a679276..0a571c4 100644 --- a/after/ftplugin/python.vim +++ b/after/ftplugin/python.vim @@ -1,2 +1,26 @@ +" Set up tabs +setlocal tabstop=4 +setlocal shiftwidth=4 +setlocal expandtab + +" Set up text width setlocal textwidth=80 + +" Set up format options +" c - Auto-wrap comments using textwidth +" r - Automatically insert the current comment leader after hitting +" in Insert mode +" o - Automatically insert the current comment leader after hitting 'o' or +" 'O' in Normal mode. setlocal formatoptions+=cro + +" Set up highlighting of tabs +highlight BadWhitespace ctermbg=red guibg=red +match BadWhitespace /^\t\+/ + +" Set up file encoding +setlocal encoding=utf-8 + +" Set up file format +setlocal fileformat=unix +let python_highlight_all=1