]>
git.madduck.net Git - etc/vim.git/log
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
Daniel Hahler [Sat, 11 May 2019 13:11:23 +0000 (15:11 +0200)]
Use only one level of indentation after opening paren (#127)
Fixes https://github.com/Vimjas/vim-python-pep8-indent/issues/126.
Daniel Hahler [Sat, 11 May 2019 13:10:47 +0000 (15:10 +0200)]
Fix indent with pythonTodo at end of line (#124)
"pythonTodo" is contained in "pythonComment".
Fix it by adding "pythonTodo" to the pattern to match special chars.
An alternative might be using `synstack()` to get to "pythonComment"
still, but this is not really necessary (and likely slower).
Daniel Hahler [Tue, 29 Jan 2019 11:53:51 +0000 (12:53 +0100)]
spec/make-coverage: do not `cat` profile files (#123)
Daniel Hahler [Sat, 22 Dec 2018 08:04:41 +0000 (09:04 +0100)]
Merge pull request #118 from blueyed/searchpair-timeout
Improve performance
Daniel Hahler [Sun, 18 Nov 2018 11:00:33 +0000 (12:00 +0100)]
Merge branch 'master' into searchpair-timeout
Conflicts:
indent/python.vim
Daniel Hahler [Sun, 18 Nov 2018 01:00:53 +0000 (02:00 +0100)]
Merge pull request #120 from blueyed/cleanup
Minor cleanup
Daniel Hahler [Fri, 16 Nov 2018 13:50:57 +0000 (14:50 +0100)]
s:find_opening_paren: pass lnum/col always, no winsaveview
Daniel Hahler [Fri, 16 Nov 2018 09:33:01 +0000 (10:33 +0100)]
Inline s:skip_search
Daniel Hahler [Sat, 17 Nov 2018 23:49:06 +0000 (00:49 +0100)]
s:find_opening_paren: remove wrong optimization
Daniel Hahler [Sat, 17 Nov 2018 18:39:10 +0000 (19:39 +0100)]
Merge branch 'master' into searchpair-timeout
Daniel Hahler [Sat, 17 Nov 2018 18:10:46 +0000 (19:10 +0100)]
Keep/handle (auto)indent with O (#119)
Daniel Hahler [Fri, 16 Nov 2018 14:52:26 +0000 (15:52 +0100)]
Cover/fix non-matching multiline closing
Daniel Hahler [Fri, 16 Nov 2018 13:53:53 +0000 (14:53 +0100)]
s:find_opening_paren: code style
Daniel Hahler [Fri, 16 Nov 2018 13:50:57 +0000 (14:50 +0100)]
s:find_opening_paren: pass lnum/col always, no winsaveview
Daniel Hahler [Fri, 16 Nov 2018 13:44:16 +0000 (14:44 +0100)]
Use s:_skip_special_chars function directly/only, optimize
Does not use `skip` with `searchpairpos` directly, but manually (for
performance reasons; https://github.com/vim/vim/pull/3613).
Daniel Hahler [Fri, 16 Nov 2018 09:33:14 +0000 (10:33 +0100)]
s:indent_like_previous_line: switch conditions
Daniel Hahler [Fri, 16 Nov 2018 09:33:01 +0000 (10:33 +0100)]
Inline s:skip_search
Daniel Hahler [Fri, 16 Nov 2018 09:32:45 +0000 (10:32 +0100)]
Do not skip/check concealed
Daniel Hahler [Fri, 16 Nov 2018 09:31:44 +0000 (10:31 +0100)]
Use s:_skip_special_chars function
This is mainly meant to show up better with profiling.
Daniel Hahler [Fri, 16 Nov 2018 04:01:49 +0000 (05:01 +0100)]
Add g:python_pep8_indent_searchpair_timeout
Ref: https://github.com/Vimjas/vim-python-pep8-indent/issues/116
Daniel Hahler [Mon, 17 Sep 2018 11:46:46 +0000 (13:46 +0200)]
Fix handling of pythonBytesEscape from vim-python/python-syntax (#115)
Fixes https://github.com/Vimjas/vim-python-pep8-indent/issues/114
Daniel Hahler [Thu, 26 Jul 2018 09:04:30 +0000 (11:04 +0200)]
Handle byte strings in s:skip_special_chars (#113)
Fixes https://github.com/Vimjas/vim-python-pep8-indent/issues/72.
Closes https://github.com/Vimjas/vim-python-pep8-indent/pull/71.
Closes https://github.com/Vimjas/vim-python-pep8-indent/pull/68.
Fergal Hainey [Sun, 22 Jan 2017 13:17:37 +0000 (13:17 +0000)]
Remove bit about authors from contributing guide
This is now tracked by GitHub
Fergal Hainey [Fri, 20 Jan 2017 15:23:34 +0000 (15:23 +0000)]
Add Gemfile.lock to .gitignore
Daniel Hahler [Thu, 26 Jul 2018 08:03:04 +0000 (10:03 +0200)]
Merge pull request #112 from blueyed/fix-97
Fix indenting of "else" with outer if
Daniel Hahler [Thu, 26 Jul 2018 07:56:26 +0000 (09:56 +0200)]
Simplify s:find_start_of_block
Daniel Hahler [Thu, 26 Jul 2018 07:35:30 +0000 (09:35 +0200)]
Fix indenting of "else" with outer if
Fixes https://github.com/Vimjas/vim-python-pep8-indent/issues/97.
Daniel Hahler [Thu, 26 Jul 2018 07:26:18 +0000 (09:26 +0200)]
Fix multiline handling with blank lines (#111)
Daniel Hahler [Tue, 24 Jul 2018 23:33:45 +0000 (01:33 +0200)]
Remove dead s:pair_pos (#108)
Its usage was removed in
782b0f0 .
Daniel Hahler [Tue, 24 Jul 2018 23:23:28 +0000 (01:23 +0200)]
Merge pull request #110 from blueyed/v8.1.0129
tests: use Vim v8.1.0129 to work around Vim bug
Daniel Hahler [Tue, 24 Jul 2018 23:19:51 +0000 (01:19 +0200)]
Fix cython tests that successful due to Vim segfaulting and vimrunner not handling it
Daniel Hahler [Tue, 24 Jul 2018 22:59:20 +0000 (00:59 +0200)]
tests: use Vim v8.1.0129 to work around Vim bug
This works around a segfault with profiling.
Ref: https://github.com/vim/vim/commit/
ad6480961080f80a455b2394f27b02935a2ded52 #commitcomment-
29790223
Daniel Hahler [Sun, 22 Jul 2018 21:59:18 +0000 (23:59 +0200)]
README: update badges: CircleCI/Codecov
Daniel Hahler [Sun, 22 Jul 2018 21:54:26 +0000 (23:54 +0200)]
Address Flake8's E127 with "if (" (#102)
> continuation line over-indented for visual indent
It appears that the "if (" is just the 4 columns wide that triggers the
extra indent with sw=4.
Might also change/adjust b:control_statement to ignore `if (`, but this
appears to be more flexible/correct.
Daniel Hahler [Sat, 21 Jul 2018 20:22:15 +0000 (22:22 +0200)]
tests: fix vim.kill: use <CR> (#109)
Daniel Hahler [Sat, 21 Jul 2018 20:07:45 +0000 (22:07 +0200)]
Coverage reporting via covimerage (#107)
This splits out the tests for cython, since the runtime file gets
reloaded for them, and that resets profiling information.
Daniel Hahler [Sat, 21 Jul 2018 07:02:47 +0000 (09:02 +0200)]
Use Docker for easier test running (#86)
Switches to CircleCI instead of Travis, which handles running tests in
Docker much better, especially since Travis is really slow (~30min vs
2.5min on CircleCI).
The Docker image is based on
https://github.com/tweekmonster/vim-testbed, and targets are added to
the Makefile to build/push it.
Daniel Hahler [Tue, 17 Jul 2018 22:37:40 +0000 (00:37 +0200)]
tests: remove nil from hang-closing tests (#105)
There is not much value in running all tests with it to see that the
default is used.
Daniel Hahler [Mon, 16 Jul 2018 18:02:16 +0000 (20:02 +0200)]
Travis: do not pin rvm (#103)
Daniel Hahler [Mon, 16 Jul 2018 18:00:35 +0000 (20:00 +0200)]
Travis: remove vint for now
It is always failing, not worth fixing for now.
Ref: https://github.com/Kuniwak/vint/pull/288
Ref: https://github.com/Kuniwak/vint/issues/287
Daniel Hahler [Mon, 16 Jul 2018 17:55:51 +0000 (19:55 +0200)]
Gemfile: update vimrunner to 0.3.4 (#104)
Daniel Hahler [Sun, 15 Jul 2018 19:31:38 +0000 (21:31 +0200)]
README: add Troubleshooting section
Fixes https://github.com/Vimjas/vim-python-pep8-indent/issues/75.
Jake Harr [Sun, 15 Jul 2018 19:11:26 +0000 (15:11 -0400)]
Add option for hanging closing brackets (#94)
The main idea is discussed at length in PyCQA/pycodestyle#103.
* Add tests for `python_pep8_indent_hang_closing`
This might be overkill. It reruns the current "vim" set of tests once
for each value of the new setting. Of course, this makes the test suite
take longer to run. I couldn't think of a good way to factor out the
relevant test cases without creating a mess.
Daniel Hahler [Fri, 17 Nov 2017 13:58:22 +0000 (14:58 +0100)]
Revert "Improve s:find_start_of_multiline_statement: only look for round parens" (#95)
This reverts commit
922268fbd89a49991b5b5b73e969f8daa8a10263 .
Add a regression test.
Conflicts:
indent/python.vim
Daniel Hahler [Thu, 16 Nov 2017 17:47:52 +0000 (18:47 +0100)]
Merge pull request #91 from Vimjas/maxoff-by-type
Intermediate fix for indenting huge dicts
Daniel Hahler [Thu, 16 Nov 2017 16:28:46 +0000 (17:28 +0100)]
use 50 for round parens, add tests
Daniel Hahler [Mon, 9 Oct 2017 02:18:35 +0000 (04:18 +0200)]
Improve s:find_start_of_multiline_statement: only look for round parens
Daniel Hahler [Thu, 5 Oct 2017 21:20:50 +0000 (23:20 +0200)]
s:find_opening_paren: use known nearest for stopline
Daniel Hahler [Thu, 5 Oct 2017 21:12:24 +0000 (23:12 +0200)]
Intermediate fix for indenting huge dicts
This uses different offsets for the type of pairs: '()' and '[]' will
only look for just 20 lines above, while 1000 lines are used for '{}',
which might be a huge dict.
Ref: https://github.com/Vimjas/vim-python-pep8-indent/pull/64.
Daniel Hahler [Sat, 7 Oct 2017 19:45:40 +0000 (21:45 +0200)]
Improve tests (#93)
* Travis: use "make test"
* Travis: do not start Xvfb
* Makefile: make test fast, add test_slow
Daniel Hahler [Sat, 7 Oct 2017 19:29:10 +0000 (21:29 +0200)]
tests: explicitly enable old "should" syntax to fix deprecation warnings (#92)
> Deprecation Warnings:
>
> Using `should` from rspec-expectations' old `:should` syntax without
> explicitly enabling the syntax is deprecated. Use the new `:expect`
> syntax or explicitly enable `:should` with `config.expect_with(:rspec) {
> |c| c.syntax = :should }` instead. Called from
> …/vim-python-pep8-indent/spec/indent/indent_spec.rb:141:in
> `block (3 levels) in <top (required)>'.
Ivan Smirnov [Mon, 21 Aug 2017 15:59:17 +0000 (16:59 +0100)]
Indent next line if prev line is empty (+tests) (#88)
Daniel Hahler [Sun, 30 Jul 2017 14:34:15 +0000 (16:34 +0200)]
Travis: update config (#87)
* Travis: update config based on splitjoin's config
* rvm: 2.4.1
* Add VIMRUNNER_REUSE_SERVER, and a wrapper Makefile
* Travis: VIMRUNNER_REUSE_SERVER=1
* Start Xvfb manually
Daniel Hahler [Sun, 30 Jul 2017 14:17:23 +0000 (16:17 +0200)]
tests: insert blank lines before each test (#89)
This is required with reuse_server.
Daniel Hahler [Sat, 29 Jul 2017 13:43:28 +0000 (15:43 +0200)]
README: add g: prefix to config section
Daniel Hahler [Sat, 29 Jul 2017 13:28:39 +0000 (15:28 +0200)]
Upgrade vimrunner to 0.3.3 (#85)
Daniel Hahler [Sat, 29 Jul 2017 12:50:37 +0000 (14:50 +0200)]
Travis: run vint, build only master branch
Daniel Hahler [Sat, 29 Jul 2017 12:35:28 +0000 (14:35 +0200)]
Lint fixes (vint)
Daniel Hahler [Sat, 29 Jul 2017 13:10:07 +0000 (15:10 +0200)]
Do not set expandtab, (soft)tabstop, shiftwidth (#83)
It is not the job of an indent plugin to set those.
Closes https://github.com/Vimjas/vim-python-pep8-indent/pull/70.
Closes https://github.com/Vimjas/vim-python-pep8-indent/pull/80.
Ivan Smirnov [Sat, 29 Jul 2017 13:09:18 +0000 (14:09 +0100)]
Indent empty lines inside blocks (#81)
Daniel Hahler [Sat, 29 Jul 2017 12:24:37 +0000 (14:24 +0200)]
Add a symlink for cython (#74)
Fixes https://github.com/Vimjas/vim-python-pep8-indent/issues/73.
Daniel Hahler [Sat, 28 Jan 2017 23:13:41 +0000 (00:13 +0100)]
Take over maintainership, move it to Vimjas org
Daniel Hahler [Sat, 3 Sep 2016 01:27:55 +0000 (03:27 +0200)]
fix multiline strings when breaking a string after opening parenthesis (#58)
Daniel Hahler [Sat, 3 Sep 2016 01:27:43 +0000 (03:27 +0200)]
Fix indentation of "else" in nested "if" (#59)
Fixes https://github.com/hynek/vim-python-pep8-indent/issues/56.
Daniel Hahler [Sat, 3 Sep 2016 00:11:55 +0000 (02:11 +0200)]
spec_helper: pass in already obtained line (#60)
The tests are quite slow, and I have the feeling that most comes from
the helpers, and more importantly not reusing the Vim instance (because
of the lockup issue).
Daniel Hahler [Fri, 2 Sep 2016 23:57:46 +0000 (01:57 +0200)]
Update vimrunner: 0.3.1 => 0.3.2 (#57)
Daniel Hahler [Wed, 6 Jul 2016 09:17:48 +0000 (11:17 +0200)]
Improve handling of multiline strings (#50)
* Improve handling of multiline strings
Fixes https://github.com/hynek/vim-python-pep8-indent/issues/49.
* tests: use an uneven width (3) instead of 8
This makes sure that the tests work as expected.
* tests: move helper functions to spec_helper.rb
* Add python_pep8_indent_for_multiline_string setting
Ref: https://github.com/hynek/vim-python-pep8-indent/issues/49#issuecomment-
228581896
* Use indent directly if prevnonblank is known
This removes the now unused s:indent_prevnonblank function.
Daniel Hahler [Mon, 4 Jul 2016 04:32:30 +0000 (06:32 +0200)]
Fix keeping indent with 'else' for 'if' after 'try-except' (#52)
Fixes https://github.com/hynek/vim-python-pep8-indent/issues/47.
Hynek Schlawack [Sun, 3 Jul 2016 11:19:59 +0000 (13:19 +0200)]
Merge pull request #54 from blueyed/fix-typo
Doc fixes
Hynek Schlawack [Sun, 3 Jul 2016 11:17:31 +0000 (13:17 +0200)]
Merge pull request #53 from blueyed/factor-out-dedented-already
Factor out is_dedented_already
Daniel Hahler [Sun, 3 Jul 2016 11:15:37 +0000 (13:15 +0200)]
Remove AUTHORS, link to contributors on GitHub
Daniel Hahler [Sun, 3 Jul 2016 11:14:28 +0000 (13:14 +0200)]
Uppercase Vim
Daniel Hahler [Sun, 3 Jul 2016 11:13:43 +0000 (13:13 +0200)]
Fix typo: s/it with/with
Daniel Hahler [Sun, 3 Jul 2016 11:09:49 +0000 (13:09 +0200)]
Factor out is_dedented_already
Not really necessary, but I did it when using it somewhere else
initially, and it might be more readable after all.
Antony Lee [Tue, 21 Jun 2016 18:28:51 +0000 (11:28 -0700)]
Add Cython support (#48)
Just making indents after cdef and cpdef similar to def. The variable
must be made buffer-local in case one is editing both Python and Cython
sources at the same time.
Daniel Hahler [Sat, 23 May 2015 22:24:22 +0000 (00:24 +0200)]
Fix regression with colon-at-eol detection (#44)
Instead of using `search` it now goes back and breaks if a char is found
that should not get skipped.
Fixes https://github.com/hynek/vim-python-pep8-indent/issues/44
Closes https://github.com/hynek/vim-python-pep8-indent/issues/45
Daniel Hahler [Tue, 12 May 2015 16:24:52 +0000 (18:24 +0200)]
Merge pull request #41 from blueyed/fix-jedi-call-signatures
Handle jedi-vim call signatures when looking for colon in prev line
Daniel Hahler [Wed, 6 May 2015 13:12:26 +0000 (15:12 +0200)]
Improve handling of lookup in previous lines
- Handle jedi-vim call signatures when looking for colon and function
def in previous line.
This adds `jedi\S` to s:skip_special_chars and improves the algorithm to
find the colon in the previous line in `s:indent_like_previous_line`.
- Add `s:match_expr_on_line` and use it for `nothing_after_opening_paren`.
- Handle comments after opening paren (#32).
NOTE: This handles older Vim versions, where `synconcealed` behaves different
(returns an empty list for non-concealed) and `getcurpos` is not
available (Vim 7.3.429 (used on Travis)).
Fixes: https://github.com/hynek/vim-python-pep8-indent/issues/32
Daniel Hahler [Wed, 6 May 2015 14:30:12 +0000 (16:30 +0200)]
Vimrunner: doc for config.reuse_server=false
I've tried to set it to true by default, but it is still buggy.
Daniel Hahler [Wed, 6 May 2015 15:36:59 +0000 (17:36 +0200)]
Update vimrunner to 0.3.1
Daniel Hahler [Wed, 6 May 2015 13:57:16 +0000 (15:57 +0200)]
Travis: display vim --version
Daniel Hahler [Thu, 7 May 2015 15:21:45 +0000 (17:21 +0200)]
Merge pull request #42 from blueyed/more-indent-function-def
Add more indentation after function definition
Daniel Hahler [Wed, 6 May 2015 16:07:18 +0000 (18:07 +0200)]
Add more indentation after function/class definition
Fixes https://github.com/hynek/vim-python-pep8-indent/issues/30
Daniel Hahler [Fri, 27 Feb 2015 17:17:37 +0000 (18:17 +0100)]
Fix indenting of strings, especially after opening paren
Fixes https://github.com/hynek/vim-python-pep8-indent/issues/36
Closes https://github.com/hynek/vim-python-pep8-indent/pull/37
Hynek Schlawack [Wed, 6 May 2015 11:15:00 +0000 (13:15 +0200)]
Merge pull request #40 from blueyed/fix-comment
Fix comment for s:skip_search usage
Daniel Hahler [Wed, 6 May 2015 10:56:19 +0000 (12:56 +0200)]
Fix comment for s:skip_search usage
This was overseen in
47ab0458 .
Hynek Schlawack [Tue, 3 Mar 2015 11:12:28 +0000 (12:12 +0100)]
Merge pull request #39 from blueyed/fix-indent
minor style: fix indenting for multiline statement
Hynek Schlawack [Tue, 3 Mar 2015 10:47:28 +0000 (11:47 +0100)]
Merge pull request #38 from blueyed/doc-fix-sw-note
doc: fix comment about 'sw': 0 is used to follow 'ts'
Daniel Hahler [Fri, 27 Feb 2015 17:54:57 +0000 (18:54 +0100)]
doc: fix comment about 'sw': 0 is used to follow 'ts'
Daniel Hahler [Fri, 27 Feb 2015 17:58:12 +0000 (18:58 +0100)]
minor style: fix indenting for multiline statement
Hynek Schlawack [Fri, 21 Nov 2014 17:40:52 +0000 (18:40 +0100)]
Merge pull request #35 from tgs/master
Fix demo indentation
Thomas Smith [Fri, 21 Nov 2014 16:15:30 +0000 (11:15 -0500)]
Fix demo indentation
Hynek Schlawack [Mon, 8 Sep 2014 10:39:09 +0000 (12:39 +0200)]
Merge branch 'pr/34'
Fixes #25
Fixes #34
Hynek Schlawack [Mon, 8 Sep 2014 10:35:27 +0000 (12:35 +0200)]
Apply more polish
Hynek Schlawack [Mon, 8 Sep 2014 10:29:16 +0000 (12:29 +0200)]
Add more licensing stuff
Hynek Schlawack [Mon, 8 Sep 2014 10:23:05 +0000 (12:23 +0200)]
Polish the docs a bit
Bryan Bennett [Sat, 6 Sep 2014 19:01:42 +0000 (15:01 -0400)]
Revert back to using RST
Bryan Bennett [Fri, 5 Sep 2014 17:19:43 +0000 (13:19 -0400)]
Update AUTHORS.rst
Bryan Bennett [Fri, 5 Sep 2014 17:18:19 +0000 (13:18 -0400)]
RST -> MD and add references to other installers
Added info for installing via NeoBundle and Vundle.
Bryan Bennett [Fri, 5 Sep 2014 17:00:34 +0000 (13:00 -0400)]
Rename README.rst to README.md