Proposal for better indentation for SQL strings?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
The issue provides no file or test entry point, so start by reproducing the PHP-mode behavior with the SQL string examples shown. Trace how pressing RET indents multiline strings and determine whether keyword-based alignment is feasible; done means SELECT, FROM, and WHERE receive the requested indentation.
Written by the indexing model from the issue text.
Description
Would it be possible to indent on specific keywords of SQL strings in PHP-mode? For example, when I'm typing a SQL string, and press RET on line 2:
public function FooBar() {
$sSql = 'SELECT foo, bar
FROM footable
WHERE foo = 1'
}
I would like to see have the indentation in PHP-mode like this:
public function FooBar() {
$sSql = 'SELECT foo, bar
FROM footable
WHERE foo = 1'
}
Is that even possible?
- Dominant language
- Emacs Lisp
- Stars
- 602
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from emacs-php/php-mode
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in emacs-php/php-mode
Similar issues
-
Difficulty 2/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 4 days