From 7e7fa1f64093e4abd0b76ec511f6f187362cf1f8 Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Thu, 9 Nov 2017 16:42:57 -0200 Subject: [PATCH] Prefixed the semantic linefeed settings with WrapPlus.semantic_ (cherry picked from commit 7b1c0cc385991bc2fdd40bd93224568c4eec68d6) --- Base File.sublime-settings | 8 ++++---- wrap_plus.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Base File.sublime-settings b/Base File.sublime-settings index 2f00655..9fddf90 100644 --- a/Base File.sublime-settings +++ b/Base File.sublime-settings @@ -23,7 +23,7 @@ // will wrap near its end, // // This is valid only when the `WrapPlus.semantic_line_wrap` above is enabled. - "WrapPlus.balance_characters_between_line_wraps": true, + "WrapPlus.semantic_balance_characters_between_line_wraps": true, // The minimum of the percentage of the current maximum line width a line can // have. For example, if you `wrap_width` is set to 100, and you set this to `0.2`, @@ -34,13 +34,13 @@ // to disable the minimum width and always wrap the lines despite their size. // // This is valid only when the `WrapPlus.semantic_line_wrap` above is enabled. - "WrapPlus.minimum_line_size_percent": 0.0, + "WrapPlus.semantic_minimum_line_size_percent": 0.0, // When wrapping lines, it will consider they to be a list of words if between // two sequential commas is find at the maximum these number of words. // // This is valid only when the `WrapPlus.semantic_line_wrap` above is enabled. - "WrapPlus.maximum_words_in_comma_separated_list": 3, + "WrapPlus.semantic_maximum_words_in_comma_separated_list": 3, // The `semantic_line_wrap` detects the maximum line width and uses it to // limite/delimite the maximum line width. If you like your lines only to be @@ -49,7 +49,7 @@ // * This is valid only when the `WrapPlus.semantic_line_wrap` above is enabled. // * If the setting `WrapPlus.balance_characters_between_line_wraps` is enabled, // this setting will be ignored. - "WrapPlus.disable_line_wrapping_by_maximum_width": false, + "WrapPlus.semantic_disable_line_wrapping_by_maximum_width": false, // Determines whether or not line endings are included in the line size: // - true: Always included. diff --git a/wrap_plus.py b/wrap_plus.py index 1106058..b909e18 100644 --- a/wrap_plus.py +++ b/wrap_plus.py @@ -661,10 +661,10 @@ def run(self, edit, width=0): break_long_words = view_settings.get('WrapPlus.break_long_words', True) break_on_hyphens = view_settings.get('WrapPlus.break_on_hyphens', True) - minimum_line_size_percent = view_settings.get('WrapPlus.minimum_line_size_percent', 0.2) - balance_characters_between_line_wraps = view_settings.get('WrapPlus.balance_characters_between_line_wraps', False) - disable_line_wrapping_by_maximum_width = view_settings.get('WrapPlus.disable_line_wrapping_by_maximum_width', False) - maximum_words_in_comma_separated_list = view_settings.get('WrapPlus.maximum_words_in_comma_separated_list', 3) + 1 + minimum_line_size_percent = view_settings.get('WrapPlus.semantic_minimum_line_size_percent', 0.2) + balance_characters_between_line_wraps = view_settings.get('WrapPlus.semantic_balance_characters_between_line_wraps', False) + disable_line_wrapping_by_maximum_width = view_settings.get('WrapPlus.semantic_disable_line_wrapping_by_maximum_width', False) + maximum_words_in_comma_separated_list = view_settings.get('WrapPlus.semantic_maximum_words_in_comma_separated_list', 3) + 1 wrapper = textwrap.TextWrapper(break_long_words=break_long_words, break_on_hyphens=break_on_hyphens)