diff options
author | 2020-08-23 18:24:10 -0400 | |
---|---|---|
committer | 2020-08-23 18:24:10 -0400 | |
commit | 63648dbe99b908e7c6a5259f4027cb54b1e698ff (patch) | |
tree | 16d596596d67f94a9a6920d5b1ffdc5024e434c9 | |
parent | e326775782bc8b9b0e004d5134d602b26ffeb3a5 (diff) |
Added "Edit > Preferences" menu item and key binding for opening user init.lua.
Also changed the mnemonic for "Edit > Filter Through" in the process.
-rw-r--r-- | core/locale.conf | 4 | ||||
-rw-r--r-- | core/locales/locale.ar.conf | 2 | ||||
-rw-r--r-- | core/locales/locale.de.conf | 2 | ||||
-rw-r--r-- | core/locales/locale.es.conf | 2 | ||||
-rw-r--r-- | core/locales/locale.fr.conf | 2 | ||||
-rw-r--r-- | core/locales/locale.it.conf | 2 | ||||
-rw-r--r-- | core/locales/locale.pl.conf | 2 | ||||
-rw-r--r-- | core/locales/locale.ru.conf | 2 | ||||
-rw-r--r-- | core/locales/locale.sv.conf | 2 | ||||
-rw-r--r-- | core/locales/locale.zh.conf | 2 | ||||
-rw-r--r-- | doc/manual.md | 4 | ||||
-rw-r--r-- | modules/textadept/keys.lua | 7 | ||||
-rw-r--r-- | modules/textadept/menu.lua | 4 |
13 files changed, 32 insertions, 5 deletions
diff --git a/core/locale.conf b/core/locale.conf index 53f16fa8..6d067034 100644 --- a/core/locale.conf +++ b/core/locale.conf @@ -174,7 +174,7 @@ Transpose Characters = T_ranspose Characters Join Lines = _Join Lines # The menu item for filtering text through a shell command and replacing input # text with that command's output text. -Filter Through = _Filter Through +Filter Through = Filter Thr_ough # Menu items for selecting text and entities. Select = _Select Select between Matching Delimiters = Select between _Matching Delimiters @@ -196,6 +196,8 @@ Enclose in Brackets = Enclose in _Brackets Enclose in Braces = Enclose in B_races Move Selected Lines Up = _Move Selected Lines Up Move Selected Lines Down = Move Selected Lines Do_wn +# Menu item for opening user preferences. +Preferences = Pre_ferences # Menu items for searching and replacing text within buffers and files. Search = _Search Find = _Find diff --git a/core/locales/locale.ar.conf b/core/locales/locale.ar.conf index 5969fe3e..bca60843 100644 --- a/core/locales/locale.ar.conf +++ b/core/locales/locale.ar.conf @@ -196,6 +196,8 @@ Enclose in Brackets = احتويه في أقواس م_ربعة Enclose in Braces = احتويه في أقواس م_نحنية Move Selected Lines Up = _حرّكه لأعلى Move Selected Lines Down = ح_رّكه لأسفل +# Menu item for opening user preferences. +Preferences = Pre_ferences # Menu items for searching and replacing text within buffers and files. Search = _بحث Find = ا_بحث diff --git a/core/locales/locale.de.conf b/core/locales/locale.de.conf index 700065dd..a349285a 100644 --- a/core/locales/locale.de.conf +++ b/core/locales/locale.de.conf @@ -196,6 +196,8 @@ Enclose in Brackets = in eckige Klammern setzen Enclose in Braces = in geschweifte Klammern setzen Move Selected Lines Up = Ausgewählte Zeilen nach oben verschieben Move Selected Lines Down = Ausgewählte Zeilen nach unten verschieben +# Menu item for opening user preferences. +Preferences = Einstellungen # Menu items for searching and replacing text within buffers and files. Search = _Suche Find = _Suchen diff --git a/core/locales/locale.es.conf b/core/locales/locale.es.conf index 42d9fc9d..7b96c970 100644 --- a/core/locales/locale.es.conf +++ b/core/locales/locale.es.conf @@ -196,6 +196,8 @@ Enclose in Brackets = Delimi_tar por corchetes Enclose in Braces = Delimit_ar por llaves Move Selected Lines Up = Mover lí_neas seleccionadas arriba Move Selected Lines Down = Mo_ver líneas seleccionadas abajo +# Menu item for opening user preferences. +Preferences = Preferencias # Menu items for searching and replacing text within buffers and files. Search = _Buscar Find = _Buscar diff --git a/core/locales/locale.fr.conf b/core/locales/locale.fr.conf index 4820ee1e..8850f110 100644 --- a/core/locales/locale.fr.conf +++ b/core/locales/locale.fr.conf @@ -197,6 +197,8 @@ Enclose in Brackets = Entre c_rochets Enclose in Braces = Entre _accolades Move Selected Lines Up = Déplacer les lignes vers le _haut Move Selected Lines Down = Déplacer les lignes vers le _bas +# Menu item for opening user preferences. +Preferences = Pre_ferences # Menu items for searching and replacing text within buffers and files. Search = _Recherche Find = _Rechercher diff --git a/core/locales/locale.it.conf b/core/locales/locale.it.conf index 1dde5e31..0202de01 100644 --- a/core/locales/locale.it.conf +++ b/core/locales/locale.it.conf @@ -196,6 +196,8 @@ Enclose in Brackets = Includi tra parentesi _quadre Enclose in Braces = Includi tra parentesi _graffe Move Selected Lines Up = Muovi le linee in _alto Move Selected Lines Down = Muovi le linee in _basso +# Menu item for opening user preferences. +Preferences = Pre_ferences # Menu items for searching and replacing text within buffers and files. Search = _Ricerca Find = _Cerca diff --git a/core/locales/locale.pl.conf b/core/locales/locale.pl.conf index 50fe91f8..ecacc2e8 100644 --- a/core/locales/locale.pl.conf +++ b/core/locales/locale.pl.conf @@ -197,6 +197,8 @@ Enclose in Brackets = Zamknij w nawiasie k_wadratowym Enclose in Braces = Zamknij w nawiasie k_lamrowym Move Selected Lines Up = Przenieś wiersze w _górę Move Selected Lines Down = Przenieś wiersze w _dół +# Menu item for opening user preferences. +Preferences = Pre_ferences # Menu items for searching and replacing text within buffers and files. Search = Wy_szukiwanie Find = _Znajdź... diff --git a/core/locales/locale.ru.conf b/core/locales/locale.ru.conf index 5f24b6c3..24be9914 100644 --- a/core/locales/locale.ru.conf +++ b/core/locales/locale.ru.conf @@ -196,6 +196,8 @@ Enclose in Brackets = Заключить в к_вадратные скобки Enclose in Braces = Заключить в _фигурные скобки Move Selected Lines Up = Переместить выделенные строки _вверх Move Selected Lines Down = Переместить выделнные строки в_низ +# Menu item for opening user preferences. +Preferences = Настройки # Menu items for searching and replacing text within buffers and files. Search = _Поиск Find = _Найти diff --git a/core/locales/locale.sv.conf b/core/locales/locale.sv.conf index 015ab2f0..fdc8334b 100644 --- a/core/locales/locale.sv.conf +++ b/core/locales/locale.sv.conf @@ -196,6 +196,8 @@ Enclose in Brackets = Sätt inom _hakparenteser Enclose in Braces = Sätt inom _krullparenteser Move Selected Lines Up = _Flytta markerade rader upp Move Selected Lines Down = Flytta markerade rader _ner +# Menu item for opening user preferences. +Preferences = Inställningar # Menu items for searching and replacing text within buffers and files. Search = _Sök Find = _Sök... diff --git a/core/locales/locale.zh.conf b/core/locales/locale.zh.conf index 7d366651..489e9a23 100644 --- a/core/locales/locale.zh.conf +++ b/core/locales/locale.zh.conf @@ -196,6 +196,8 @@ Enclose in Brackets = 用方括号包裹(_B) Enclose in Braces = 用花括号包裹(_R) Move Selected Lines Up = 上移选中行(_M) Move Selected Lines Down = 下移选中行(_W) +# Menu item for opening user preferences. +Preferences = Pre_ferences # Menu items for searching and replacing text within buffers and files. Search = 搜索(_S) Find = 查找(_F) diff --git a/doc/manual.md b/doc/manual.md index be7aebf1..52da92b1 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -114,7 +114,9 @@ settings, change the settings of existing modules, load custom modules, configure key bindings, extend menus, enhance support for file types and programming languages, and run arbitrary Lua code. These topics will be covered throughout the manual. Textadept's comprehensive [Lua API][] lists, among other -things, all configurable settings for buffers, views, and modules. +things, all configurable settings for buffers, views, and modules. You can open +your *~/.textadept/init.lua* file via `Ctrl+P` on Windows, Linux, and BSD, `⌘,` +on macOS, and `M-~` in the terminal version. Here is a simple *~/.textadept/init.lua* for illustration: diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 61e0356a..f4479ded 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -59,6 +59,7 @@ local M = {} -- Alt+{ |^{ |M-} |Enclose in braces -- Ctrl+Shift+Up |^⇧⇡ |S-^Up |Move selected lines up -- Ctrl+Shift+Down |^⇧⇣ |S-^Down |Move selected lines down +-- Ctrl+P |⌘, |M-~ |Preferences -- **Search** | | | -- Ctrl+F |⌘F |M-F<br/>M-S-F|Find -- Ctrl+G<br/>F3 |⌘G |M-G |Find next @@ -213,10 +214,10 @@ local M = {} -- ‡: Ctrl+Enter in Windows terminal version. module('textadept.keys')]] --- Windows and Linux key bindings. +-- Windows, Linux, and BSD key bindings. -- -- Unassigned keys (~ denotes keys reserved by the operating system): --- c: C H I p Q T ~ V Y _ ) ] } + +-- c: C H I Q T ~ V Y _ ) ] } + -- a: aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ_ ) ] } *+-/=\n\s -- ca: aAbBcCdD F H jJkKlLmM N qQ t xXy zZ_"'()[]{}<>* / \n\s -- @@ -335,6 +336,8 @@ local bindings = { {'ctrl+shift+up', 'ctrl+shift+up', 'ctrl+shift+up'}, [buffer.move_selected_lines_down] = {'ctrl+shift+down', 'ctrl+shift+down', 'ctrl+shift+down'}, + -- Preferences + [m_edit[_L['Preferences']][2]] = {'ctrl+p', 'cmd+,', 'meta+~'}, -- Search. [m_search[_L['Find']][2]] = {'ctrl+f', 'cmd+f', {'meta+f', 'meta+F'}}, diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index 13f52197..198dda73 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -130,7 +130,9 @@ local default_menubar = { SEPARATOR, {_L['Move Selected Lines Up'], buffer.move_selected_lines_up}, {_L['Move Selected Lines Down'], buffer.move_selected_lines_down} - } + }, + SEPARATOR, + {_L['Preferences'], function() io.open_file(_USERHOME .. '/init.lua') end} }, { title = _L['Search'], |