Remove ftdetect/python.vim due to wrong location
This commit is contained in:
parent
4e38d2f43f
commit
d713dd4619
@ -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 <leader>ff :call Preserve(
|
||||
\ "silent exec '0,$!yapf --style ".g:yapf_style."'")<CR>
|
||||
" TODO Add mapping for single line formatting
|
||||
" TODO Add mapping for text block formatting
|
||||
" }}}
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user