On Sat, 10 Jul 2010 21:48:35 +0400 Eugene Arshinov earshinov@gmail.com wrote:
Hi all.
I attach three patches:
- Keybindings to insert new line after/before current
...
- Automatically insert additional indentation in XML/HTML files if
previous line ends with an opening tag
I finally got round to replying to the other patches, sorry for the delay.
The drawback of the first patch is that I doubt it's so useful. I know Vi[m] provides shortcuts for these actions ('o' and 'O' in normal mode), but their necessity is questionable for me. I implemented this to ease XML editing with tag autocompletion turned on. Suppose you need to write to consequent <li>'s. Without this patch you need to press End+Enter after writing the first <li> to place the cursor where you need to start the second. With my patch, you only need to press one shortcut you can assign in Preferences > Keybindings :)
Maybe we could add these. BTW you could use utils_get_eol_char(). Also we already have sci_get_line_indent_position().
The drawback of the third patch is that it's not completed. If user likes to leave HTML tags like <br> "unclosed", she would be disturbed by automatic indentation caused by my patch, so a check box in Preferences is desirable. I'll code it as soon as we decide this patch can go to trunk.
For HTML perhaps we could have a filetype pref for this.
Regards, Nick