diff options
-rw-r--r-- | core/locale.conf | 9 | ||||
-rw-r--r-- | modules/textadept/menu.lua | 18 |
2 files changed, 19 insertions, 8 deletions
diff --git a/core/locale.conf b/core/locale.conf index 0ac77d6c..2f12d53f 100644 --- a/core/locale.conf +++ b/core/locale.conf @@ -148,15 +148,16 @@ _Current Directory = _Current Directory _Buffer = _Buffer _Next Buffer = _Next Buffer _Previous Buffer = _Previous Buffer -Swit_ch Buffer = Swit_ch Buffer +Switch _Buffer = Switch _Buffer Toggle View _EOL = Toggle View _EOL Toggle _Wrap Mode = Toggle _Wrap Mode -Toggle Show _Indentation Guides = Toggle Show _Indentation Guides +Toggle Show Indentation _Guides = Toggle Show Indentation _Guides Toggle Use _Tabs = Toggle Use _Tabs Toggle View White_space = Toggle View White_space Toggle _Virtual Space = Toggle _Virtual Space -EOL Mode = EOL Mode -Encoding = Encoding +_Indentation = _Indentation +EOL _Mode = EOL _Mode +En_coding = En_coding UTF-8 = UTF-8 ASCII = ASCII ISO-8859-1 = ISO-8859-1 diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index 1bbe69f4..a183996c 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -44,6 +44,10 @@ local function toggle_setting(setting, i) end events.emit('update_ui') -- for updating statusbar end +local function set_indentation(i) + buffer.indent, buffer.tab_width = i, i + events.emit('update_ui') -- for updating statusbar +end local function set_eol_mode(mode) buffer.eol_mode = mode buffer:convert_eo_ls(mode) @@ -222,23 +226,29 @@ menubar = { { title = L('_Buffer'), { L('_Next Buffer'), { 'goto_buffer', v, 1, false } }, { L('_Previous Buffer'), { 'goto_buffer', v, -1, false } }, - { L('Swit_ch Buffer'), { gui.switch_buffer } }, + { L('Switch _Buffer'), { gui.switch_buffer } }, { SEPARATOR, SEPARATOR }, { L('Toggle View _EOL'), { toggle_setting, 'view_eol' } }, { L('Toggle _Wrap Mode'), { toggle_setting, 'wrap_mode' } }, - { L('Toggle Show _Indentation Guides'), + { L('Toggle Show Indentation _Guides'), { toggle_setting, 'indentation_guides' } }, { L('Toggle Use _Tabs'), { toggle_setting, 'use_tabs' } }, { L('Toggle View White_space'), { toggle_setting, 'view_ws' } }, { L('Toggle _Virtual Space'), { toggle_setting, 'virtual_space_options', 2} }, { SEPARATOR }, - { title = L('EOL Mode'), + { title = L('_Indentation'), + { '2', { set_indentation, 2 } }, + { '3', { set_indentation, 3 } }, + { '4', { set_indentation, 4 } }, + { '8', { set_indentation, 8 } }, + }, + { title = L('EOL _Mode'), { L('CRLF'), { set_eol_mode, 0 } }, { L('CR'), { set_eol_mode, 1 } }, { L('LF'), { set_eol_mode, 2 } }, }, - { title = L('Encoding'), + { title = L('En_coding'), { L('UTF-8'), { set_encoding, 'UTF-8' } }, { L('ASCII'), { set_encoding, 'ASCII' } }, { L('ISO-8859-1'), { set_encoding, 'ISO-8859-1' } }, |