From d713dd4619996feaf66bfe6afaf0353dd816778c Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 6 Jul 2016 21:20:58 +0100 Subject: [PATCH] Remove ftdetect/python.vim due to wrong location --- after/ftdetect/python.vim | 34 ---------------------------------- after/ftplugin/python.vim | 7 ++++--- 2 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 after/ftdetect/python.vim diff --git a/after/ftdetect/python.vim b/after/ftdetect/python.vim deleted file mode 100644 index 3f5a63a..0000000 --- a/after/ftdetect/python.vim +++ /dev/null @@ -1,34 +0,0 @@ -" Python convention is to use 4 space tabs. -setlocal tabstop=4 shiftwidth=4 softtabstop=4 - -" Python formatting mappings {{{ -" Supported yapf styles: pep8, google -let g:yapf_style='pep8' -" A wrapper function to restore the cursor position, window position, -" and last search after running a command. -function! Preserve(command) - " Save the last search - let last_search=@/ - " Save the current cursor position - let save_cursor = getpos(".") - " Save the window position - normal H - let save_window = getpos(".") - call setpos('.', save_cursor) - - " Do the business: - execute a:command - - " Restore the last_search - let @/=last_search - " Restore the window position - call setpos('.', save_window) - normal zt - " Restore the cursor position - call setpos('.', save_cursor) -endfunction -nmap ff :call Preserve( - \ "silent exec '0,$!yapf --style ".g:yapf_style."'") -" TODO Add mapping for single line formatting -" TODO Add mapping for text block formatting -" }}} diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim index 3edcf1b..0dbd044 100644 --- a/after/ftplugin/python.vim +++ b/after/ftplugin/python.vim @@ -1,7 +1,8 @@ " Set up tabs -setlocal tabstop=4 -setlocal shiftwidth=4 -setlocal expandtab +set expandtab +set tabstop=8 +set shiftwidth=4 +set softtabstop=4 " Set up text width setlocal textwidth=0