aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept
diff options
context:
space:
mode:
Diffstat (limited to 'modules/textadept')
-rw-r--r--modules/textadept/editing.lua23
-rw-r--r--modules/textadept/keys.lua8
-rw-r--r--modules/textadept/menu.lua1
3 files changed, 3 insertions, 29 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index c67542ba..d5d78ac6 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -406,29 +406,6 @@ function M.select_paragraph()
end
---
--- Selects the surrounding block of text whose lines' indentation levels are
--- greater than or equal to the current line's level.
--- If a text block is selected and the lines immediately above and below it are
--- one indentation level lower, adds those lines to the selection.
--- @name select_indented_block
-function M.select_indented_block()
- local buffer = buffer
- local s = buffer:line_from_position(buffer.selection_start)
- local e = buffer:line_from_position(buffer.selection_end)
- local indent = buffer.line_indentation[s] - buffer.tab_width
- if indent < 0 then return end
- if buffer:get_sel_text() ~= '' and
- buffer.line_indentation[s - 1] == indent and
- buffer.line_indentation[e + 1] == indent then
- s, e, indent = s - 1, e + 1, indent + buffer.tab_width
- end
- while buffer.line_indentation[s - 1] > indent do s = s - 1 end
- while buffer.line_indentation[e + 1] > indent do e = e + 1 end
- s, e = buffer:position_from_line(s), buffer.line_end_position[e]
- buffer:set_sel(s, e)
-end
-
----
-- Converts indentation between tabs and spaces according to `buffer.use_tabs`.
-- If `buffer.use_tabs` is `true`, `buffer.tab_width` indenting spaces are
-- converted to tabs. Otherwise, all indenting tabs are converted to
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index c7689605..8e90e644 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -53,7 +53,6 @@ local M = {}
-- Ctrl+Shift+D |⌘⇧D |M-S-W |Select word
-- Ctrl+Shift+N |⌘⇧N |M-S-N |Select line
-- Ctrl+Shift+P |⌘⇧P |M-S-P |Select paragraph
--- Ctrl+Shift+I |⌘⇧I |M-S-I |Select indented block
-- Ctrl+Alt+U |^U |M-^U |Upper case selection
-- Ctrl+Alt+Shift+U |^⇧U |M-^L |Lower case selection
-- Alt+< |^< |M-> |Enclose as XML tags
@@ -310,7 +309,7 @@ for _, f in ipairs(menu_buffer_functions) do buffer[f] = buffer[f] end
-- Windows and Linux key bindings.
--
-- Unassigned keys (~ denotes keys reserved by the operating system):
--- c: A C H p Q T ~ V Y _ ) ] } +
+-- c: A C H I p Q T ~ V Y _ ) ] } +
-- a: aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ_ ) ] } *+-/=\n\s
-- ca: aAbBcCdD F jJkKlLmM N qQ t xXy zZ_"'()[]{}<>* / \s
--
@@ -325,7 +324,7 @@ for _, f in ipairs(menu_buffer_functions) do buffer[f] = buffer[f] end
-- Mac OSX key bindings.
--
-- Unassigned keys (~ denotes keys reserved by the operating system):
--- m: A C ~ JkK ~M p ~ tT U V yY _ ) ] } + ~~\n
+-- m: A C ~ I JkK ~M p ~ tT U V yY _ ) ] } + ~~\n
-- c: cC D gG H J K L oO qQ xXyYzZ_ ) ] } * /
-- cm: aAbBcC~D F ~HiIjJkKlL~MnN p q~rRsStTuUvVwWxXyYzZ_"'()[]{}<>*+-/=\t\n
--
@@ -353,7 +352,7 @@ for _, f in ipairs(menu_buffer_functions) do buffer[f] = buffer[f] end
-- Unassigned keys (~ denotes keys reserved by the operating system):
-- c: g~~ ~
-- cm: cd g~~ k ~ q t xyz
--- m: e J qQ sS u vVw yYzZ_ +
+-- m: e I J qQ sS u vVw yYzZ_ +
-- Note: m[befhstv] may be used by Linux/BSD GUI terminals for menu access.
--
-- CTRL = 'c' (Control ^)
@@ -421,7 +420,6 @@ keys[not OSX and not CURSES and 'c{'
keys[not OSX and (not CURSES and 'cD' or 'mW') or 'mD'] = editing.select_word
keys[not OSX and not CURSES and 'cN' or 'mN'] = editing.select_line
keys[not OSX and not CURSES and 'cP' or 'mP'] = editing.select_paragraph
-keys[not OSX and not CURSES and 'cI' or 'mI'] = editing.select_indented_block
-- Selection.
keys[not OSX and (not CURSES and 'cau' or 'cmu') or 'cu'] = buffer.upper_case
keys[not OSX and (not CURSES and 'caU' or 'cml') or 'cU'] = buffer.lower_case
diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua
index 4aac1eff..55cf7ee6 100644
--- a/modules/textadept/menu.lua
+++ b/modules/textadept/menu.lua
@@ -65,7 +65,6 @@ local menubar = {
{_L['Select _Word'], editing.select_word},
{_L['Select _Line'], editing.select_line},
{_L['Select Para_graph'], editing.select_paragraph},
- {_L['Select _Indented Block'], editing.select_indented_block},
},
{ title = _L['Selectio_n'],
{_L['_Upper Case Selection'], buffer.upper_case},