Loading plugin/black.vim +5 −1 Changes for plugin/black.vim: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ " Author: Łukasz Langa " Created: Mon Mar 26 23:27:53 2018 -0700 " Requires: Vim Ver7.0+ " Version: 1.0 " Version: 1.1 " " Documentation: " This plugin formats Python files. Loading @@ -10,6 +10,8 @@ " History: " 1.0: " - initial version " 1.1: " - restore cursor/window position after formatting if v:version < 700 || !has('python3') echo "This script requires vim7.0+ with Python 3.6 support." Loading Loading @@ -108,7 +110,9 @@ def Black(): except Exception as exc: print(exc) else: cursor = vim.current.window.cursor vim.current.buffer[:] = new_buffer_str.split('\n')[:-1] vim.current.window.cursor = cursor print(f'Reformatted in {time.time() - start:.4f}s.') def BlackUpgrade(): Loading Loading
plugin/black.vim +5 −1 Changes for plugin/black.vim: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ " Author: Łukasz Langa " Created: Mon Mar 26 23:27:53 2018 -0700 " Requires: Vim Ver7.0+ " Version: 1.0 " Version: 1.1 " " Documentation: " This plugin formats Python files. Loading @@ -10,6 +10,8 @@ " History: " 1.0: " - initial version " 1.1: " - restore cursor/window position after formatting if v:version < 700 || !has('python3') echo "This script requires vim7.0+ with Python 3.6 support." Loading Loading @@ -108,7 +110,9 @@ def Black(): except Exception as exc: print(exc) else: cursor = vim.current.window.cursor vim.current.buffer[:] = new_buffer_str.split('\n')[:-1] vim.current.window.cursor = cursor print(f'Reformatted in {time.time() - start:.4f}s.') def BlackUpgrade(): Loading