From 26f2a6b8de5816d05b9448c2ebf55e987c7f3764 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sun, 2 Oct 2016 11:46:39 +0200 Subject: [PATCH] Add `g[`, `g]` and a jump list Fixes #814. --- documentation/commands.md | 18 +++++++++- extension/lib/commands-frame.coffee | 46 ++++++++++++++++++++---- extension/lib/commands.coffee | 20 +++++++++-- extension/lib/defaults.coffee | 2 ++ extension/lib/scrollable-elements.coffee | 7 ++++ extension/lib/vim-frame.coffee | 10 ++++++ extension/locale/de/vimfx.properties | 4 +++ extension/locale/en-US/vimfx.properties | 4 +++ extension/locale/es/vimfx.properties | 4 +++ extension/locale/fr/vimfx.properties | 4 +++ extension/locale/id/vimfx.properties | 4 +++ extension/locale/it/vimfx.properties | 4 +++ extension/locale/ja/vimfx.properties | 4 +++ extension/locale/nl/vimfx.properties | 4 +++ extension/locale/pt-BR/vimfx.properties | 4 +++ extension/locale/ru/vimfx.properties | 4 +++ extension/locale/sv-SE/vimfx.properties | 4 +++ extension/locale/zh-CN/vimfx.properties | 4 +++ extension/locale/zh-TW/vimfx.properties | 4 +++ 19 files changed, 144 insertions(+), 11 deletions(-) diff --git a/documentation/commands.md b/documentation/commands.md index ee4edf80..7930d4ea 100644 --- a/documentation/commands.md +++ b/documentation/commands.md @@ -141,6 +141,22 @@ eating your best hint char on most pages; see [The hint commands]). [The hint commands]: #the-hint-commands--hints-mode +### `g[` and `g]` + +Each time you use `gg`, `G`, `0`, `$`, `/`, `a/`, `g/`, `n`, `N` or `'`, the +current scroll position is recorded in a list just before the scrolling command +in question is performed. You can then travel back to the scroll positions in +that list by using the `g[` command. Went too far back? Use the `g]` to go +forward again. + +If the current scroll position already exists in the list, it is moved to the +end. This way, repeating `g[` you will scroll back to old positions only once. + +Both `g[` and `g]` go _count_ steps in the list. + +This feature is inspired by Vim’s _jump list._ Some people prefer changing the +shortcuts to `` and `` to match Vim’s. + ### Marks: `m` and `'` Other than traditional scrolling, VimFx has _marks._ Press `m` followed by a @@ -156,7 +172,7 @@ provides the `g/` shortcut instead. Just like Vim, VimFx has a few special marks. These are set automatically. - `'`: Pressing `''` takes you to the scroll position before the last `gg`, `G`, - `0`, `$`, `/`, `a/`, `g/`, `n`, `N` or `'`. + `0`, `$`, `/`, `a/`, `g/`, `n`, `N`, `'`, `g[` or `g]`. - `/`: Pressing `'/` takes you to the scroll position before the last `/`, `a/` or `g/`. diff --git a/extension/lib/commands-frame.coffee b/extension/lib/commands-frame.coffee index 4b5b0e46..b99f6989 100644 --- a/extension/lib/commands-frame.coffee +++ b/extension/lib/commands-frame.coffee @@ -95,13 +95,14 @@ commands.scroll = (args) -> vim.state.scrollableElements.filterSuitableDefault() viewportUtils.scroll(element, args) -commands.mark_scroll_position = ({vim, keyStr, notify = true}) -> - element = vim.state.scrollableElements.filterSuitableDefault() - vim.state.marks[keyStr] = - if element.ownerDocument.documentElement.localName == 'svg' - [element.ownerGlobal.scrollY, element.ownerGlobal.scrollX] - else - [element.scrollTop, element.scrollLeft] +commands.mark_scroll_position = (args) -> + {vim, keyStr, notify = true, addToJumpList = false} = args + + vim.state.marks[keyStr] = vim.state.scrollableElements.getPageScrollPosition() + + if addToJumpList + vim.addToJumpList() + if notify vim.notify(translate('notification.mark_scroll_position.success', keyStr)) @@ -115,8 +116,39 @@ commands.scroll_to_mark = (args) -> args.amounts = vim.state.marks[keyStr] element = vim.state.scrollableElements.filterSuitableDefault() + commands.mark_scroll_position({ + vim + keyStr: lastPositionMark + notify: false + addToJumpList: true + }) + viewportUtils.scroll(element, args) + +commands.scroll_to_position = (args) -> + {vim, extra: {count, direction, lastPositionMark}} = args + + if direction == 'previous' and vim.state.jumpListIndex >= 0 and + vim.state.jumpListIndex == vim.state.jumpList.length - 1 + vim.addToJumpList() + + {jumpList, jumpListIndex} = vim.state + maxIndex = jumpList.length - 1 + + if (direction == 'previous' and jumpListIndex <= 0) or + (direction == 'next' and jumpListIndex >= maxIndex) + vim.notify(translate("notification.scroll_to_#{direction}_position.limit")) + return + + index = jumpListIndex + count * (if direction == 'previous' then -1 else +1) + index = Math.max(index, 0) + index = Math.min(index, maxIndex) + + args.amounts = jumpList[index] + element = vim.state.scrollableElements.filterSuitableDefault() + commands.mark_scroll_position({vim, keyStr: lastPositionMark, notify: false}) viewportUtils.scroll(element, args) + vim.state.jumpListIndex = index helper_follow = (options, matcher, {vim, pass}) -> {id, combine = true, selectors = FOLLOW_DEFAULT_SELECTORS} = options diff --git a/extension/lib/commands.coffee b/extension/lib/commands.coffee index 364625ca..943c19b4 100644 --- a/extension/lib/commands.coffee +++ b/extension/lib/commands.coffee @@ -243,7 +243,7 @@ commands.scroll_to_right = helper_scrollToX.bind(null, Infinity) helper_mark_last_scroll_position = (vim) -> keyStr = vim.options['scroll.last_position_mark'] - vim._run('mark_scroll_position', {keyStr, notify: false}) + vim._run('mark_scroll_position', {keyStr, notify: false, addToJumpList: true}) commands.mark_scroll_position = ({vim}) -> vim._enterMode('marks', (keyStr) -> @@ -254,14 +254,28 @@ commands.mark_scroll_position = ({vim}) -> commands.scroll_to_mark = ({vim}) -> vim._enterMode('marks', (keyStr) -> helper_scroll( - vim, null, 'scrollTo', 'other', ['top', 'left'], [0, 0] - ['scrollTopMax', 'scrollLeftMax'], 0, 'scroll_to_mark' + vim, null, 'scrollTo', 'other', ['left', 'top'], [0, 0] + ['scrollLeftMax', 'scrollTopMax'], 0, 'scroll_to_mark' {keyStr, lastPositionMark: vim.options['scroll.last_position_mark']} ) vim.hideNotification() ) vim.notify(translate('notification.scroll_to_mark.enter')) +helper_scroll_to_position = (direction, {vim, count = 1}) -> + lastPositionMark = vim.options['scroll.last_position_mark'] + helper_scroll( + vim, null, 'scrollTo', 'other', ['left', 'top'], [0, 0] + ['scrollLeftMax', 'scrollTopMax'], 0, 'scroll_to_position' + {count, direction, lastPositionMark} + ) + +commands.scroll_to_previous_position = + helper_scroll_to_position.bind(null, 'previous') + +commands.scroll_to_next_position = + helper_scroll_to_position.bind(null, 'next') + commands.tab_new = ({vim}) -> diff --git a/extension/lib/defaults.coffee b/extension/lib/defaults.coffee index 3f2394f5..aa5cd9fb 100644 --- a/extension/lib/defaults.coffee +++ b/extension/lib/defaults.coffee @@ -58,6 +58,8 @@ shortcuts = '$': 'scroll_to_right' 'm': 'mark_scroll_position' "'": 'scroll_to_mark' + 'g[': 'scroll_to_previous_position' + 'g]': 'scroll_to_next_position' 'tabs': 't': 'tab_new' diff --git a/extension/lib/scrollable-elements.coffee b/extension/lib/scrollable-elements.coffee index 5e02c961..e275b933 100644 --- a/extension/lib/scrollable-elements.coffee +++ b/extension/lib/scrollable-elements.coffee @@ -130,4 +130,11 @@ class ScrollableElements @reject((element) => not @isScrollable(element)) return @largest ? @quirks(@window.document.documentElement) + getPageScrollPosition: -> + element = @filterSuitableDefault() + if element.ownerDocument.documentElement.localName == 'svg' + return [element.ownerGlobal.scrollX, element.ownerGlobal.scrollY] + else + return [element.scrollLeft, element.scrollTop] + module.exports = ScrollableElements diff --git a/extension/lib/vim-frame.coffee b/extension/lib/vim-frame.coffee index 3791dec3..93a921f1 100644 --- a/extension/lib/vim-frame.coffee +++ b/extension/lib/vim-frame.coffee @@ -54,6 +54,8 @@ class VimFrame hasInteraction: false shouldRefocus: false marks: {} + jumpList: [] + jumpListIndex: -1 explicitBodyFocus: false hasFocusedTextInput: false lastFocusedTextInput: null @@ -107,4 +109,12 @@ class VimFrame utils.simulateMouseEvents(element, 'hover-end', browserOffset) @state.lastHover.element = null + addToJumpList: -> + [newX, newY] = position = @state.scrollableElements.getPageScrollPosition() + jumpList = @state.jumpList[..@state.jumpListIndex] + .filter(([x, y]) -> not (x == newX and y == newY)) + .concat([position]) + @state.jumpList = jumpList + @state.jumpListIndex = jumpList.length - 1 + module.exports = VimFrame diff --git a/extension/locale/de/vimfx.properties b/extension/locale/de/vimfx.properties index ed7e40c5..d38e56c1 100644 --- a/extension/locale/de/vimfx.properties +++ b/extension/locale/de/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Zum linken Rand scrollen mode.normal.scroll_to_right=Zum rechten Rand scrollen mode.normal.mark_scroll_position=Scroll-Position markieren mode.normal.scroll_to_mark=Zur Markierung scrollen +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Tabs mode.normal.tab_new=Neuen Tab öffnen @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Scroll-Position markieren (Taste drücke notification.mark_scroll_position.success=Markierung gesetzt: %S notification.scroll_to_mark.enter=Zur Markierung scrollen (Taste drücken...) notification.scroll_to_mark.none=Keine Markierung für: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=Kein letzter Tab notification.tab_select_oldest_unvisited.none=Keine unbesuchten Tabs notification.tab_restore.none=Keine zuletzt geschlossene Tabs diff --git a/extension/locale/en-US/vimfx.properties b/extension/locale/en-US/vimfx.properties index a9d0c51f..59164138 100644 --- a/extension/locale/en-US/vimfx.properties +++ b/extension/locale/en-US/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Scroll to the far left mode.normal.scroll_to_right=Scroll to the far right mode.normal.mark_scroll_position=Mark scroll position mode.normal.scroll_to_mark=Scroll to mark +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Tabs mode.normal.tab_new=New tab @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Mark scroll position (press a key…) notification.mark_scroll_position.success=Mark set: %S notification.scroll_to_mark.enter=Scroll to mark (press a key…) notification.scroll_to_mark.none=No mark for: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=No most recent tab notification.tab_select_oldest_unvisited.none=No unvisited tabs notification.tab_restore.none=No recently closed tabs diff --git a/extension/locale/es/vimfx.properties b/extension/locale/es/vimfx.properties index 2bec2527..3674c1f5 100644 --- a/extension/locale/es/vimfx.properties +++ b/extension/locale/es/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Desplazar al extremo izquierdo mode.normal.scroll_to_right=Desplazar al extremo derecho mode.normal.mark_scroll_position=Marcar posición de desplazamiento mode.normal.scroll_to_mark=Desplazar hasta la marca +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Pestañas mode.normal.tab_new=Nueva pestaña @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Marque la posición de desplazamiento (p notification.mark_scroll_position.success=Se ha establecido la marca: %S notification.scroll_to_mark.enter=Desplácese hasta la marca (pulse una tecla…) notification.scroll_to_mark.none=No hay marca para: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=No hay pestaña más reciente notification.tab_select_oldest_unvisited.none=No hay pestañas no visitadas notification.tab_restore.none=No hay pestañas cerradas recientemente diff --git a/extension/locale/fr/vimfx.properties b/extension/locale/fr/vimfx.properties index 1cc87c07..72477ea0 100644 --- a/extension/locale/fr/vimfx.properties +++ b/extension/locale/fr/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Faire défiler jusqu'au bord gauche mode.normal.scroll_to_right=Faire défiler jusqu'au bord droit mode.normal.mark_scroll_position=Marquer la position actuelle mode.normal.scroll_to_mark=Faire défiler jusqu'au marqueur +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Onglets mode.normal.tab_new=Ouvrir un nouvel onglet @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Marquer la position actuelle (pressez un notification.mark_scroll_position.success=Marqueur ajouté: %S notification.scroll_to_mark.enter=Faire défiler jusqu'au marqueur (pressez une touche…) notification.scroll_to_mark.none=Pas de marqueur pour: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=Pas de dernier onglet ouvert notification.tab_select_oldest_unvisited.none=Aucun onglet non visité notification.tab_restore.none=Aucun onglet récemment fermé diff --git a/extension/locale/id/vimfx.properties b/extension/locale/id/vimfx.properties index bc678fce..4b939a54 100644 --- a/extension/locale/id/vimfx.properties +++ b/extension/locale/id/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Gulung ke paling kiri mode.normal.scroll_to_right=Gulung ke paling kanan mode.normal.mark_scroll_position=Tandai posisi gulung mode.normal.scroll_to_mark=Gulung ke Penanda +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Tab mode.normal.tab_new=Tab baru @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Tandai posisi gulung (tekan sebuah tombo notification.mark_scroll_position.success=Penanda dibuat: %S notification.scroll_to_mark.enter=Gulung ke tanda (tekan sebuah tombol…) notification.scroll_to_mark.none=Tidak ada penanda untuk: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=Tidak ada tab terakhir notification.tab_select_oldest_unvisited.none=Tidak ada tab yang belum dikunjungi notification.tab_restore.none=Tidak ada tab terakhir ditutup diff --git a/extension/locale/it/vimfx.properties b/extension/locale/it/vimfx.properties index cd1e3448..5a97722d 100644 --- a/extension/locale/it/vimfx.properties +++ b/extension/locale/it/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Scorri all'estrema sinistra mode.normal.scroll_to_right=Scorri all'estrema destra mode.normal.mark_scroll_position=Salva la posizione nella pagina mode.normal.scroll_to_mark=Vai alla posizione salvata +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Schede (tab) mode.normal.tab_new=Apri una nuova scheda @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Marca la posizione nella pagina (premi u notification.mark_scroll_position.success=Marcatura aggiunta: %S notification.scroll_to_mark.enter=Vai alla marcatura (premi un tasto…) notification.scroll_to_mark.none=Nessuna marcatura per: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=Nessuna scheda più recente notification.tab_select_oldest_unvisited.none=Nessuna scheda non visitata notification.tab_restore.none=Nessuna scheda chiusa di recente diff --git a/extension/locale/ja/vimfx.properties b/extension/locale/ja/vimfx.properties index 4f360ab0..4d27a33d 100644 --- a/extension/locale/ja/vimfx.properties +++ b/extension/locale/ja/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=左へスクロール mode.normal.scroll_to_right=右へスクロール mode.normal.mark_scroll_position=スクロール位置をマーク mode.normal.scroll_to_mark=マークまでスクロール +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=タブの操作 mode.normal.tab_new=新規タブを開く @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=スクロール位置をマーク (キ notification.mark_scroll_position.success=マークをセット: %S notification.scroll_to_mark.enter=マークにスクロール (キーを押してください…) notification.scroll_to_mark.none=マークがありません: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=直近のタブがありません notification.tab_select_oldest_unvisited.none=未訪問のタブがありません notification.tab_restore.none=最近閉じたタブがありません diff --git a/extension/locale/nl/vimfx.properties b/extension/locale/nl/vimfx.properties index 51230ebf..d9a1a398 100644 --- a/extension/locale/nl/vimfx.properties +++ b/extension/locale/nl/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Scroll helemaal naar links mode.normal.scroll_to_right=Scroll helemaal naar rechts mode.normal.mark_scroll_position=Scrollpositie opslaan mode.normal.scroll_to_mark=Scroll naar opgeslagen scrollpositie +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Tabbladen mode.normal.tab_new=Open een nieuw tabblad @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Onthoud scrollpositie (druk op een toets notification.mark_scroll_position.success=Positie onthouden: %S notification.scroll_to_mark.enter=Scroll naar positie (druk op een toets...) notification.scroll_to_mark.none=Geen positie onthouden voor: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=Geen meest recente tabs notification.tab_select_oldest_unvisited.none=Geen onbezochte tabs notification.tab_restore.none=Geen recent gesloten tabs diff --git a/extension/locale/pt-BR/vimfx.properties b/extension/locale/pt-BR/vimfx.properties index 68a9d838..68d5820b 100644 --- a/extension/locale/pt-BR/vimfx.properties +++ b/extension/locale/pt-BR/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Rolar para a esquerda até o fim mode.normal.scroll_to_right=Rolar para a direita até o fim mode.normal.mark_scroll_position=Marcar posição de rolagem mode.normal.scroll_to_mark=Rolar até a marca +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Abas mode.normal.tab_new=Nova aba @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Marcar posição de rolagem (pressione u notification.mark_scroll_position.success=Marca definida: %S notification.scroll_to_mark.enter=Rolar até a marca (pressione uma tecla…) notification.scroll_to_mark.none=Nenhuma marca para: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=Nenhuma aba mais recente notification.tab_select_oldest_unvisited.none=Nenhuma aba não visitada notification.tab_restore.none=Nenhuma aba recentemente fechada diff --git a/extension/locale/ru/vimfx.properties b/extension/locale/ru/vimfx.properties index e3455ac3..5eabf23d 100644 --- a/extension/locale/ru/vimfx.properties +++ b/extension/locale/ru/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Прокрутить влево до конца mode.normal.scroll_to_right=Прокрутить вправо до конца mode.normal.mark_scroll_position=Отметить позицию прокрутки mode.normal.scroll_to_mark=Перейти к отметке +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=Вкладки mode.normal.tab_new=Открыть новую вкладку @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Отметить позицию прок notification.mark_scroll_position.success=Отметка установлена: %S notification.scroll_to_mark.enter=Перейти к отметке (нажмите клавишу…) notification.scroll_to_mark.none=Нет отметки: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=Нет послдених вкладок notification.tab_select_oldest_unvisited.none=Нет непосещённых вкладок notification.tab_restore.none=Нет недавно закрытых вкладок diff --git a/extension/locale/sv-SE/vimfx.properties b/extension/locale/sv-SE/vimfx.properties index cfa1b639..00830e4b 100644 --- a/extension/locale/sv-SE/vimfx.properties +++ b/extension/locale/sv-SE/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=Scrolla längst till vänster mode.normal.scroll_to_right=Scrolla längst till höger mode.normal.mark_scroll_position=Markera scrollposition mode.normal.scroll_to_mark=Scrolla till markör +mode.normal.scroll_to_previous_position=Scrolla till föregående position +mode.normal.scroll_to_next_position=Scrolla till nästa position category.tabs=Flikar mode.normal.tab_new=Ny flik @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=Markera scrollposition (tryck på en tan notification.mark_scroll_position.success=Markör satt: %S notification.scroll_to_mark.enter=Scrolla till markör (tryck på en tangent…) notification.scroll_to_mark.none=Ingen markör för: %S +notification.scroll_to_previous_position.limit=Ingen föregående scrollposition +notification.scroll_to_next_position.limit=Ingen nästa scrollposition notification.tab_select_most_recent.none=Ingen senaste flik notification.tab_select_oldest_unvisited.none=Inga obesökta flikar notification.tab_restore.none=Inga nyligen stängda flikar diff --git a/extension/locale/zh-CN/vimfx.properties b/extension/locale/zh-CN/vimfx.properties index e80d51d3..7edaa2e5 100644 --- a/extension/locale/zh-CN/vimfx.properties +++ b/extension/locale/zh-CN/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=滚动到最左边 mode.normal.scroll_to_right=滚动到最右边 mode.normal.mark_scroll_position=标记滚动位置 mode.normal.scroll_to_mark=滚动到标记位置 +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=标签页 mode.normal.tab_new=新建标签页 @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=标记滚动位置(按下一个按键… notification.mark_scroll_position.success=设置标记: %S notification.scroll_to_mark.enter=滚动到标记处(按下一个按键…) notification.scroll_to_mark.none=没有发现标记: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=没有最近访问的标签页 notification.tab_select_oldest_unvisited.none=没有未访问的标签页 notification.tab_restore.none=无最近关闭的标签页 diff --git a/extension/locale/zh-TW/vimfx.properties b/extension/locale/zh-TW/vimfx.properties index 4ee9c101..e9ad5dd4 100644 --- a/extension/locale/zh-TW/vimfx.properties +++ b/extension/locale/zh-TW/vimfx.properties @@ -41,6 +41,8 @@ mode.normal.scroll_to_left=捲動到網頁最左端 mode.normal.scroll_to_right=捲動到網頁最右端 mode.normal.mark_scroll_position=標記目前捲軸位置 mode.normal.scroll_to_mark=滾動回標記位置 +mode.normal.scroll_to_previous_position=Scroll to previous position +mode.normal.scroll_to_next_position=Scroll to next position category.tabs=分頁 mode.normal.tab_new=開新分頁 @@ -146,6 +148,8 @@ notification.mark_scroll_position.enter=標記捲軸位置 (按下一個按鍵 notification.mark_scroll_position.success=設定標記: %S notification.scroll_to_mark.enter=捲動到標記點 (按下一個按鍵…) notification.scroll_to_mark.none=找不到標記: %S +notification.scroll_to_previous_position.limit=No previous scroll position +notification.scroll_to_next_position.limit=No next scroll position notification.tab_select_most_recent.none=沒有最近分頁 notification.tab_select_oldest_unvisited.none=沒有未造訪分頁 notification.tab_restore.none=沒有最近關閉分頁