diff --git a/src/source.cpp b/src/source.cpp index e85a44b..638c074 100644 --- a/src/source.cpp +++ b/src/source.cpp @@ -3609,6 +3609,11 @@ bool Source::View::on_key_press_event_smart_inserts(GdkEventKey *event) { left = "/*"; right = "*/"; } + // Insert $$ around selection + else if(event->keyval == GDK_KEY_dollar && language_id == "latex") { + left = '$'; + right = '$'; + } else if(language_id == "markdown" || !is_code_iter(get_buffer()->get_insert()->get_iter()) || !is_code_iter(get_buffer()->get_selection_bound()->get_iter())) { // Insert `` around selection