improved tab/shift+tab behaviour /w selected text