]>
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:
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
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
Jelte Fennema [Tue, 8 Jul 2014 14:16:11 +0000 (16:16 +0200)]
Fix indenting of strings between brackets
Add unit test
Add myself to authors
Hynek Schlawack [Fri, 27 Jun 2014 09:55:45 +0000 (11:55 +0200)]
Merge pull request #26 from dantesun/master
set shiftwidth,tabstop and softtabstop to 4
Fixes #9 too.
Dante Sun [Thu, 15 May 2014 10:58:01 +0000 (18:58 +0800)]
set shiftwidth,tabstop and softtabstop to 4
Hynek Schlawack [Sun, 6 Apr 2014 12:28:27 +0000 (14:28 +0200)]
Merge pull request #24 from has2k1/fix-indent-eagerness
Refix issue #5 (Correct indent after end of block)
Hassan Kibirige [Mon, 24 Mar 2014 09:34:40 +0000 (04:34 -0500)]
Fix test case introduced in last commit.
Hassan Kibirige [Sat, 22 Mar 2014 21:55:20 +0000 (16:55 -0500)]
Make fix work even with of preceeding empty lines.
Previous commit was not robust enough to catch the
same issue if there were empty lines between the
current line the previous block.
Hassan Kibirige [Thu, 13 Mar 2014 09:50:20 +0000 (04:50 -0500)]
Refix issue #5 (Correct indent after end of block)
The implementation clean up reintroduced a more severe
version of the bug. Plus, the test was slightly deficient
to catch the regression.
Problem
-------
Given two adjacent blocks where the 2nd block has
an equal or smaller indentation level compared to the 1st
block. If the 1st block does not end in a stop statement
it always sucks up the 2nd block.
This changes the meaning of code that already adheres to the
pep8 standard.
Solution
--------
Do not inherit indentation of the previous line if the current line
has less indentation but is valid.
Hynek Schlawack [Sun, 12 Jan 2014 12:53:44 +0000 (04:53 -0800)]
Merge pull request #20 from kljohann/clean_up
Clean up implementation
Johann Klähn [Tue, 7 Jan 2014 16:28:46 +0000 (17:28 +0100)]
prevent ':' from indenting inside unfinished string
Johann Klähn [Tue, 7 Jan 2014 16:53:17 +0000 (17:53 +0100)]
prevent tests being shadowed by first line rule
Johann Klähn [Fri, 3 Jan 2014 21:52:36 +0000 (22:52 +0100)]
unindent 'else' after 'for' and 'try/except'
Johann Klähn [Sun, 10 Nov 2013 08:03:50 +0000 (09:03 +0100)]
fix regression for multiple parens of different types
Johann Klähn [Fri, 8 Nov 2013 19:53:33 +0000 (20:53 +0100)]
correctly indent after parens in control structures
fixes #7
Johann Klähn [Mon, 18 Mar 2013 21:38:15 +0000 (22:38 +0100)]
clean up implementation
Hynek Schlawack [Fri, 3 Jan 2014 20:00:18 +0000 (21:00 +0100)]
Unindent 'finally' after 'else' too
Hynek Schlawack [Fri, 3 Jan 2014 19:36:41 +0000 (20:36 +0100)]
Un-indent for "else" after "for" and "try/except"
Fixes #21
Hynek Schlawack [Sat, 9 Nov 2013 15:08:57 +0000 (07:08 -0800)]
Merge pull request #19 from kljohann/tests
Run test cases for different sets of settings
While we care only about 4 spaces, running it with both may uncover subtle bugs.
Johann Klähn [Fri, 8 Nov 2013 19:52:17 +0000 (20:52 +0100)]
run test cases for different settings
LeoMao [Sun, 21 Jul 2013 13:33:11 +0000 (21:33 +0800)]
Indent correctly after lines with '#'s in strings
Fixes #5.
has2k1 [Thu, 31 Oct 2013 10:17:16 +0000 (05:17 -0500)]
Fix issue #5 (Correct indent after end of block)
Problem
-------
Given two adjacent blocks where the 2nd block has
an equal or smaller indentation level compared to the 1st
block. If the blocks are not separated by an empty line,
the 2nd block will be placed (indented) inside the 1st
block.
This changes the meaning of code that already adheres to the
pep8 standard.
Solution
--------
Do not inherit indentation of the previous line if the current line
has less indentation but is valid.
Hynek Schlawack [Tue, 29 Oct 2013 09:39:10 +0000 (10:39 +0100)]
Expand Hassan's name
Hynek Schlawack [Sun, 27 Oct 2013 18:03:58 +0000 (11:03 -0700)]
Merge pull request #16 from has2k1/commented-out-tests
Fix failing commented out tests
has2k1 [Tue, 13 Aug 2013 03:47:02 +0000 (22:47 -0500)]
Fix failing commented out tests
Related commits
---------------
- #
6e60ef0
Reason
------
The indent functions, in this case
GetPythonPEPIndent()
can modify the cursor position. There is nothing wrong with that
consequence, vim takes it into account and restores the cursor
position (see References below). For the tests vim is not doing
the calling, so the cursor is not restored.
Solution
--------
Restore the cursor position after calling the indent function.
Hynek Schlawack [Tue, 24 Sep 2013 08:16:33 +0000 (10:16 +0200)]
Add some polish and has2k1 to AUTHORS
has2k1 [Tue, 13 Aug 2013 01:10:18 +0000 (20:10 -0500)]
Add some info. about the ruby based test framework
Hynek Schlawack [Tue, 24 Sep 2013 08:10:43 +0000 (10:10 +0200)]
Merge branch 'clayg-fix-10'
Fixes #10
Hynek Schlawack [Tue, 24 Sep 2013 08:02:24 +0000 (10:02 +0200)]
Add Clay to AUTHORS and tweak some comments
Clay Gerrard [Wed, 18 Sep 2013 08:53:25 +0000 (01:53 -0700)]
add some tests
Clay Gerrard [Tue, 17 Sep 2013 02:20:25 +0000 (19:20 -0700)]
conform with pep8's preferences on explicit line continuation
Hynek Schlawack [Mon, 17 Jun 2013 07:53:20 +0000 (09:53 +0200)]
Fix double "of" in README.rst
Hynek Schlawack [Mon, 17 Jun 2013 07:40:01 +0000 (09:40 +0200)]
Add CONTRIBUTING.md and AUTHORS.rst
Hynek Schlawack [Mon, 17 Jun 2013 07:22:13 +0000 (09:22 +0200)]
Add Travis
Hynek Schlawack [Mon, 17 Jun 2013 06:15:27 +0000 (08:15 +0200)]
Comment out failing test case
Johann Klähn [Sun, 16 Jun 2013 21:47:13 +0000 (23:47 +0200)]
add basic test suite using vimrunner
Hynek Schlawack [Sun, 20 Jan 2013 11:33:05 +0000 (12:33 +0100)]
Add warning about python-mode shadowing
Hynek Schlawack [Sun, 20 Jan 2013 11:26:29 +0000 (03:26 -0800)]
Merge pull request #4 from ElectronicRU/master
Better colon handling
Fix regression that made vim not indent if there was a comment at the end of
a line.
Alexander Sedov [Sat, 19 Jan 2013 12:35:21 +0000 (16:35 +0400)]
Better end-of-line colon handling.
Joseph Irwin [Sat, 18 Aug 2012 04:18:25 +0000 (13:18 +0900)]
Do not indent after comment line with colon
When checking for a line ending with a colon, this commit adds a
condition to avoid matching comments. A comment line ending with a colon
should not indent a new block.
This changes the current behavior from this::
\#<some comment>:
<cursor>
To this::
\#<some comment>:
<cursor>
Hynek Schlawack [Sat, 30 Jun 2012 07:04:54 +0000 (09:04 +0200)]
Update README to reflect pathogen
Hynek Schlawack [Fri, 29 Jun 2012 19:33:18 +0000 (12:33 -0700)]
Merge pull request #1 from soli/master
move python.vim to indent subdirectory for easier pathogen (and such) management
Sylvain Soliman [Fri, 29 Jun 2012 19:27:09 +0000 (21:27 +0200)]
move python.vim to indent subdirectory for easier pathogen (and such) management
--HG--
rename : python.vim => indent/python.vim
Hynek Schlawack [Tue, 26 Jun 2012 12:07:20 +0000 (14:07 +0200)]
Initial import