Permalink
Browse files

Move python PEP8 settings to own file

This makes things like ':verbose set textwidth?' work.

Before:
  textwidth=79

After:
  textwidth=79
        Last set from ~/.vim/ftplugin/python_pep8.vim
  • Loading branch information...
1 parent 7353df4 commit d26c932dc7226cf6f4b5c9c3a24012813b789d0a @bergman bergman committed Sep 26, 2011
Showing with 12 additions and 3 deletions.
  1. +12 −0 Rakefile
  2. +0 −3 vimrc
View
@@ -174,6 +174,18 @@ vim_plugin_task "command_t", "http://s3.wincent.com/command-t/releases/co
end
end
+vim_plugin_task "pep8" do
+ File.open(File.expand_path("../ftplugin/python_pep8.vim", __FILE__), "w") do |file|
+ file.puts <<-VIM.gsub(/^ +/, "")
+ " make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
+ setlocal softtabstop=4
+ setlocal tabstop=4
+ setlocal shiftwidth=4
+ setlocal textwidth=79
+ VIM
+ end
+end
+
vim_plugin_task "make_tabs" do
File.open(File.expand_path("../ftplugin/make_tabs.vim", __FILE__), "w") do |file|
file.puts <<-VIM.gsub(/^ +/, "")
View
3 vimrc
@@ -75,9 +75,6 @@ au BufNewFile,BufRead *.json set ft=javascript
au BufRead,BufNewFile *.txt call s:setupWrapping()
-" make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
-au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
-
" allow backspacing over everything in insert mode
set backspace=indent,eol,start

0 comments on commit d26c932

Please sign in to comment.