From 9132d33abee90d0818186d54792a80431b20386f Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 14 Oct 2021 14:20:48 +1300 Subject: [PATCH 1/1] Updated settings for Python --- .vim/UltiSnips/python.snippets | 10 ++++++++++ .vim/after/ftplugin/python.vim | 18 ++++++++++++++++++ .vim/ftplugin/python.vim | 1 - 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .vim/UltiSnips/python.snippets delete mode 100644 .vim/ftplugin/python.vim diff --git a/.vim/UltiSnips/python.snippets b/.vim/UltiSnips/python.snippets new file mode 100644 index 0000000..ecb4e8e --- /dev/null +++ b/.vim/UltiSnips/python.snippets @@ -0,0 +1,10 @@ +snippet #! "My own Python hashbang" b +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# +# Copyright © ${1:2021} martin f. krafft <${2:m@rtin.kiwi}> +# Released under the ${3:MIT} Licence. +# + +$0 +endsnippet diff --git a/.vim/after/ftplugin/python.vim b/.vim/after/ftplugin/python.vim index ffd59cf..34edf01 100644 --- a/.vim/after/ftplugin/python.vim +++ b/.vim/after/ftplugin/python.vim @@ -1,2 +1,20 @@ +let python_highlight_all=1 + +let g:linelength = 79 + setlocal sw=4 setlocal sts=4 +let &l:textwidth=g:linelength +setlocal autoindent + +setlocal formatoptions+=bl + +nnoremap :Black +inoremap :Black +nnoremap :call flake8#Flake8() +inoremap :call flake8#Flake8() + +let g:flake8_quickfix_height=3 +let g:black_linelength = g:linelength + +imap t import ipdb; ipdb.set_trace() diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim deleted file mode 100644 index ec33e0c..0000000 --- a/.vim/ftplugin/python.vim +++ /dev/null @@ -1 +0,0 @@ -imap trace import ipdb; ipdb.set_trace() -- 2.39.5