Skip to content

Instantly share code, notes, and snippets.

@hynek
Created June 21, 2012 13:51
Show Gist options
  • Save hynek/2965846 to your computer and use it in GitHub Desktop.
Save hynek/2965846 to your computer and use it in GitHub Desktop.
Match indentation of second argument with first argument if the first one on the same line like the opening parenthesis - originally by Steve Losh
--- /Users/hynek/Downloads/python.vim 2012-06-21 15:44:18.000000000 +0200
+++ python.vim 2012-06-21 15:38:52.000000000 +0200
@@ -119,11 +119,7 @@
return indent(parlnum) + &shiftwidth
endif
else
- if closing_paren
- return parcol - 1
- else
- return parcol
- endif
+ return parcol
endif
endif
@hynek
Copy link
Author

hynek commented Jun 21, 2012

Essentially it gets you:

foobar(bar,
       foo)

Get the original file from http://www.vim.org/scripts/script.php?script_id=974 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment