22 |
--------------------------------------------------------------------------------
/walkthrough/workingWithRemotes.nls.pt-br.md:
--------------------------------------------------------------------------------
1 | ## Trabalhando com Remotos
2 |
3 | A extensão suporta completamente cenários de [Desenvolvimento Remoto](https://code.visualstudio.com/docs/remote/remote-overview).
4 |
5 | Isso significa que quando você conecta a um local _remoto_, como Container Docker, SSH ou WSL, a extensão estará disponível, pronta para ser usada.
6 |
7 | > Você não precisa instalar a extensão no ambiente remoto.
8 |
9 | Melhor ainda, se você usar a configuração `bookmarks.saveBookmarksInProject` definida como `true`, os bookmarks salvos localmente _estarão disponíveis_ remotamente, e você conseguirá navegar e atualizar os bookmarks. Assim como se fosse um recurso de uma pasta que você abriu remotamente.
10 |
11 |
--------------------------------------------------------------------------------
/walkthrough/customizingAppearance.nls.pt-br.md:
--------------------------------------------------------------------------------
1 | ## Personalizando a Aparência
2 |
3 | Você pode personalizar não apenas como o ícone é apresentado na Medianiz, mas também adicionar cor de fundo a linha com bookmark e a régua de visão geral.
4 |
5 | Algo como isso nas suas configuráções:
6 |
7 | ```json
8 | "bookmarks.gutterIconFillColor": "none",
9 | // "bookmarks.gutterIconBorderColor": "157EFB",
10 | "workbench.colorCustomizations": {
11 | ...
12 | "bookmarks.lineBackground": "#0077ff2a",
13 | "bookmarks.lineBorder": "#FF0000",
14 | "bookmarks.overviewRuler": "#157EFB88"
15 | }
16 | ```
17 |
18 | Pode deixar seus bookmarks assim:
19 |
20 | 
--------------------------------------------------------------------------------
/walkthrough/customizingAppearance.nls.pl.md:
--------------------------------------------------------------------------------
1 | ## Dostosowywanie wyglądu
2 |
3 | Możesz dostosować nie tylko to, jak ikona jest wyświetlana w marginesie (Gutter), ale także dodać kolor tła do zakładkowanej linii oraz do linijki przeglądu.
4 |
5 | Coś takiego w twoich ustawieniach:
6 |
7 | ```json
8 | "bookmarks.gutterIconFillColor": "none",
9 | // "bookmarks.gutterIconBorderColor": "157EFB",
10 | "workbench.colorCustomizations": {
11 | ...
12 | "bookmarks.lineBackground": "#0077ff2a",
13 | "bookmarks.lineBorder": "#FF0000",
14 | "bookmarks.overviewRuler": "#157EFB88"
15 | }
16 | ```
17 |
18 | Może to skutkować zakładką wyglądającą tak:
19 |
20 | 
21 |
--------------------------------------------------------------------------------
/src/core/container.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { ExtensionContext } from "vscode";
7 |
8 | export class Container {
9 | private static _extContext: ExtensionContext;
10 |
11 | public static get context(): ExtensionContext {
12 | return this._extContext;
13 | }
14 |
15 | public static set context(ec: ExtensionContext) {
16 | this._extContext = ec;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/walkthrough/customizingAppearance.nls.es.md:
--------------------------------------------------------------------------------
1 | ## Personalizando la apariencia
2 |
3 | No sólo puedes personalizar cómo se muestra el ícono en el canal, sino también añadir un fondo de color a una línea con un marcador o a la regla de visión general.
4 |
5 | Un código como este en tu configuración:
6 |
7 | ```json
8 | "bookmarks.gutterIconFillColor": "none",
9 | // "bookmarks.gutterIconBorderColor": "157EFB",
10 | "workbench.colorCustomizations": {
11 | ...
12 | "bookmarks.lineBackground": "#0077ff2a",
13 | "bookmarks.lineBorder": "#FF0000",
14 | "bookmarks.overviewRuler": "#157EFB88"
15 | }
16 | ```
17 |
18 | Puede hacer que un marcador se vea así:
19 |
20 | 
--------------------------------------------------------------------------------
/walkthrough/customizingAppearance.nls.hi.md:
--------------------------------------------------------------------------------
1 | ## रूप-रंग अनुकूलित करना
2 |
3 | आप न केवल Gutter में आइकन को कैसे दिखाया जाए इसे अनुकूलित कर सकते हैं, बल्कि बुकमार्क की गई पंक्ति और ओवरव्यू रूलर के लिए एक पृष्ठभूमि रंग भी जोड़ सकते हैं।
4 |
5 | आपकी सेटिंग्स में कुछ इस तरह हो सकता है:
6 |
7 | ```json
8 | "bookmarks.gutterIconFillColor": "none",
9 | // "bookmarks.gutterIconBorderColor": "157EFB",
10 | "workbench.colorCustomizations": {
11 | ...
12 | "bookmarks.lineBackground": "#0077ff2a",
13 | "bookmarks.lineBorder": "#FF0000",
14 | "bookmarks.overviewRuler": "#157EFB88"
15 | }
16 | ```
17 |
18 | इसका परिणाम इस तरह के एक बुकमार्क के रूप में हो सकता है:
19 |
20 | 
--------------------------------------------------------------------------------
/src/commands/openSettings.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { commands } from "vscode";
7 | import { Container } from "../core/container";
8 |
9 | export function registerOpenSettings() {
10 | Container.context.subscriptions.push(commands.registerCommand("bookmarks.openSettings", async () => {
11 | commands.executeCommand("workbench.action.openSettings", "@ext:alefragnani.bookmarks");
12 | }));
13 | }
--------------------------------------------------------------------------------
/src/commands/walkthrough.ts:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *---------------------------------------------------------------------------------------------*/
5 |
6 | import { commands } from "vscode";
7 | import { Container } from "../core/container";
8 |
9 | function openSideBar() {
10 | commands.executeCommand("bookmarksExplorer.focus");
11 | }
12 |
13 | export function registerWalkthrough() {
14 | Container.context.subscriptions.push(commands.registerCommand("_bookmarks.openSideBar", () => openSideBar()))
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/walkthrough/customizingAppearance.nls.tr.md:
--------------------------------------------------------------------------------
1 | ## Görünümü Özelleştirme
2 |
3 | Yalnızca simgenin Cilt Payı'nda nasıl gösterileceğini özelleştirmekle kalmaz, aynı zamanda yer imi çizgisine ve genel bakış cetveline bir arka plan rengi de ekleyebilirsiniz.
4 |
5 | Ayarlarınızda buna benzer bir şey:
6 |
7 | ```json
8 | "bookmarks.gutterIconFillColor": "none",
9 | // "bookmarks.gutterIconBorderColor": "157EFB",
10 | "workbench.colorCustomizations": {
11 | ...
12 | "bookmarks.lineBackground": "#0077ff2a",
13 | "bookmarks.lineBorder": "#FF0000",
14 | "bookmarks.overviewRuler": "#157EFB88"
15 | }
16 | ```
17 |
18 | Bunun gibi bir yer işaretiyle sonuçlanabilir:
19 |
20 | 
--------------------------------------------------------------------------------
/walkthrough/customizingAppearance.nls.fr.md:
--------------------------------------------------------------------------------
1 | ## Personnalisation de l’apparence
2 |
3 | Vous pouvez personnaliser l’affichage de l’icône dans la marge, mais aussi ajouter une couleur d’arrière-plan et une bordure à la ligne marquée d’un signet et modifier l’aspect lors du survol.
4 |
5 | Ajoutez quelque chose comme ceci dans vos paramètres :
6 |
7 | ```json
8 | "bookmarks.gutterIconFillColor": "none",
9 | // "bookmarks.gutterIconBorderColor": "157EFB",
10 | "workbench.colorCustomizations": {
11 | ...
12 | "bookmarks.lineBackground": "#0077ff2a",
13 | "bookmarks.lineBorder": "#FF0000",
14 | "bookmarks.overviewRuler": "#157EFB88"
15 | }
16 | ```
17 |
18 | Pour obtenir un signet qui ressemble à ceci :
19 |
20 | 
21 |
--------------------------------------------------------------------------------
/walkthrough/workingWithRemotes.nls.fr.md:
--------------------------------------------------------------------------------
1 | ## Travailler avec des environnements distants
2 |
3 | L’extension prend entièrement en charge les scénarios de [Développement à distance](https://code.visualstudio.com/docs/remote/remote-overview).
4 |
5 | Cela signifie que lorsque vous vous connectez à un emplacement _distant_, comme un conteneur Docker, SSH ou WSL, l’extension sera disponible et prête à être utilisée.
6 |
7 | > Vous n’avez pas besoin d’installer l’extension sur l’environnement distant.
8 |
9 | Encore mieux, si vous utilisez le paramètre `bookmarks.saveBookmarksInProject` défini sur `true`, les signets enregistrés localement _seront disponibles_ à distance, et vous pourrez naviguer et mettre à jour les signets. Comme s’il s’agissait d’une ressource du dossier que vous avez ouvert à distance.
10 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "presentation": {
4 | "echo": false,
5 | "reveal": "always",
6 | "focus": false,
7 | "panel": "dedicated",
8 | "showReuseMessage": false
9 | },
10 | "tasks": [
11 | {
12 | "type": "npm",
13 | "script": "build",
14 | "group": "build",
15 | "problemMatcher": ["$ts-webpack", "$tslint-webpack"]
16 | },
17 | {
18 | "type": "npm",
19 | "script": "watch",
20 | "group": {
21 | "kind": "build",
22 | "isDefault": true
23 | },
24 | "isBackground": true,
25 | "problemMatcher": ["$ts-webpack-watch", "$tslint-webpack-watch"]
26 | }
27 | ]
28 | }
--------------------------------------------------------------------------------
/src/gutter/editorLineNumberContext.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { Uri, commands } from "vscode";
7 | import { File } from "../core/file";
8 |
9 | export interface EditorLineNumberContextParams {
10 | lineNumber: number,
11 | uri: Uri
12 | }
13 |
14 | export function updateLinesWithBookmarkContext(activeFile: File) {
15 | const linesWithBookmarks = activeFile.bookmarks.map(b => b.line + 1);
16 |
17 | commands.executeCommand("setContext", "bookmarks.linesWithBookmarks",
18 | linesWithBookmarks);
19 | }
--------------------------------------------------------------------------------
/walkthrough/navigateToBookmarks.md:
--------------------------------------------------------------------------------
1 | ## Navigate to Bookmarks
2 |
3 | Bookmarks represent positions in your code, so you can easily and quickly go back to them whenever necessary.
4 |
5 | The extension provides commands to quickly navigate back and forth between bookmarks, like `Bookmarks: Jump to Next` and `Bookmarks: Jump to Previous`.
6 |
7 | But it is not limited to this. It also provides commands to see all Bookmarks within a file, or the entire workspace and easily go to it. Use the `Bookmarks: List` and `Bookmarks: List from All Files` command instead, and the extension will display a preview of the bookmarked line (or its label) and it position.
8 |
9 | 
10 |
11 | > Tip: If you simply navigate on the list, the editor will temporarily scroll to its position, giving you a better understanding if that bookmark is what you were looking for.
12 |
13 |
--------------------------------------------------------------------------------
/walkthrough/navigateToBookmarks.nls.hi.md:
--------------------------------------------------------------------------------
1 | ## बुकमार्क्स पर जाएँ
2 |
3 | बुकमार्क्स आपके कोड में स्थानों को दर्शाते हैं, ताकि आप जब भी आवश्यक हो, आसानी से और जल्दी वहां लौट सकें।
4 |
5 | यह एक्सटेंशन आपको बुकमार्क्स के बीच जल्दी से आगे-पीछे नेविगेट करने के लिए कमांड प्रदान करता है, जैसे `Bookmarks: Jump to Next` और `Bookmarks: Jump to Previous`।
6 |
7 | लेकिन यह यहीं तक सीमित नहीं है। यह फ़ाइल या पूरे वर्कस्पेस के भीतर सभी बुकमार्क्स देखने और आसानी से वहाँ जाने के लिए भी कमांड प्रदान करता है। इसके लिए `Bookmarks: List` और `Bookmarks: List from All Files` कमांड का उपयोग करें, और एक्सटेंशन बुकमार्क की गई पंक्ति (या उसका लेबल) और उसकी स्थिति का पूर्वावलोकन दिखाएगा।
8 |
9 | 
10 |
11 | > सुझाव: यदि आप केवल सूची में नेविगेट करते हैं, तो संपादक अस्थायी रूप से उस स्थिति पर स्क्रॉल करेगा, जिससे आपको यह समझने में मदद मिलेगी कि क्या यह वही बुकमार्क है जिसकी आप तलाश कर रहे थे।
12 |
--------------------------------------------------------------------------------
/walkthrough/navigateToBookmarks.nls.pl.md:
--------------------------------------------------------------------------------
1 | ## Nawigacja do Zakładek
2 |
3 | Zakładki reprezentują pozycje w twoim kodzie, dzięki czemu możesz łatwo i szybko do nich wracać, kiedy tylko jest to konieczne.
4 |
5 | Rozszerzenie oferuje polecenia umożliwiające szybką nawigację do przodu i do tyłu między zakładkami, takie jak `Zakładki: Skocz do następnego` i `Zakładki: Skocz do poprzedniego`.
6 |
7 | Ale to nie wszystko. Rozszerzenie umożliwia również wyświetlenie wszystkich zakładek w pliku lub w całym obszarze roboczym i łatwe przejście do nich. Użyj poleceń `Zakładki: Lista` i `Zakładki: Lista ze wszystkich plików`, a rozszerzenie wyświetli podgląd zakładkowanej linii (lub jej etykiety) i jej pozycji.
8 |
9 | 
10 |
11 | > Wskazówka: Jeśli po prostu nawigujesz po liście, edytor tymczasowo przewinie do jej pozycji, dając ci lepsze zrozumienie, czy ta zakładka jest tym, czego szukałeś.
12 |
--------------------------------------------------------------------------------
/walkthrough/navigateToBookmarks.nls.es.md:
--------------------------------------------------------------------------------
1 | ## Ir a los marcadores
2 |
3 | Los marcadores establecen posiciones concretas en tu código para que puedas volver a esas posiciones rápida y fácilmente siempre que quieras.
4 |
5 | Esta extensión ofrece comandos para que puedas navegar de atrás hacia adelante (y viceversa) entre los marcadores: `Bookmarks: Ir al siguiente` y `Bookmarks: Ir al anterior`.
6 |
7 | Aun así, no se limita a esto, pues también ofrece comandos para ver todos los marcadores en un archivo o en un espacio de trabajo entera. Usa el comando `Bookmarks: Mostrar` y `Bookmarks: Mostrar marcadores de todos los archivos` para que la extensión muestre una vista previa de la línea que tiene un marcador (o su etiqueta) y su posición.
8 |
9 | 
10 |
11 | > Consejo: si navegas a través de la lista, el editor irá temporalmente a la posición del marcador, así puedes saber si ese es el marcador que estás buscando.
--------------------------------------------------------------------------------
/walkthrough/navigateToBookmarks.nls.pt-br.md:
--------------------------------------------------------------------------------
1 | ## Navegar para Bookmarks
2 |
3 | Bookmarks representam posições no seu código, então você pode voltar a elas de forma rápida e fácil sempre que necessário.
4 |
5 | Essa extensão disponibiliza comandos para nevegar facilmente para os bookmarks a frente e atrás, tais como `Bookmarks: Pular para o Próximo` and `Bookmarks: Pular para o Anterior`.
6 |
7 | Mas não está limitado a isso. Também disponibiliza comandos para visualizar todos os bookmarks em um arquivo, ou em toda a área de trabalho. Use os comandos `Bookmarks: Listar` and `Bookmarks: Listar de Todos os Arquivos`, e a extensão apresentará uma prévia da linha com bookmark (ou seu rótulo) e sua posição.
8 |
9 | 
10 |
11 | > Dica: Se você simplesmente navegar pela lista, o editor irá rolar temporariamente para a posição do bookmark, dando-lhe um entendimento melhor se o bookmark é aquele que você está procurando.
12 |
13 |
--------------------------------------------------------------------------------
/walkthrough/navigateToBookmarks.nls.tr.md:
--------------------------------------------------------------------------------
1 | ## Yer İşaretlerine Git
2 |
3 | Yer işaretleri kodunuzdaki konumları temsil eder; böylece gerektiğinde bunlara kolayca ve hızlı bir şekilde geri dönebilirsiniz.
4 |
5 | Uzantı, `Yer İşaretleri: Sonrakine Geç` ve `Yer İşaretleri: Öncekine Geç` gibi yer işaretleri arasında hızlı bir şekilde ileri geri gezinmek için komutlar sağlar..
6 |
7 | Ancak bununla sınırlı değil. Ayrıca bir dosyadaki tüm Yer İşaretlerini veya çalışma alanının tamamını görmenizi ve ona kolayca gitmenizi sağlayan komutlar da sağlar. Bunun yerine `Yer İşaretleri: Liste` ve `Yer İşaretleri: Tüm Dosyalardan Listele` komutunu kullanın; uzantı, yer işareti eklenen satırın (veya etiketinin) ve konumunun bir önizlemesini görüntüler.
8 |
9 | 
10 |
11 | > İpucu: Sadece listede gezinirseniz, düzenleyici geçici olarak o konuma kaydırarak o yer işaretinin aradığınız şey olup olmadığını daha iyi anlamanızı sağlar.
12 |
13 |
--------------------------------------------------------------------------------
/walkthrough/navigateToBookmarks.nls.fr.md:
--------------------------------------------------------------------------------
1 | ## Navigation entre les signets
2 |
3 | Les signets représentent des positions dans votre code, vous permettant d’y revenir facilement et rapidement lorsque nécessaire.
4 |
5 | L’extension fournit des commandes pour naviguer rapidement d’un signet à l’autre, comme `Bookmarks: Jump to Next` et `Bookmarks: Jump to Previous`.
6 |
7 | Mais ce n’est pas tout. Elle propose également des commandes pour voir tous les signets d’un fichier ou de l’ensemble de l’espace de travail et y accéder facilement. Utilisez plutôt les commandes `Bookmarks: List` et `Bookmarks: List from All Files`, et l’extension affichera un aperçu de la ligne marquée (ou son étiquette) et sa position.
8 |
9 | 
10 |
11 | > Astuce : Si vous naviguez simplement dans la liste, l’éditeur défilera temporairement jusqu'à la position correspondante, vous permettant de mieux comprendre si ce signet est celui que vous recherchiez.
12 |
--------------------------------------------------------------------------------
/src/sidebar/parser.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | export interface Point {
7 | line: number,
8 | column: number
9 | }
10 |
11 | export function parsePosition(position: string): Point | undefined {
12 | const re = new RegExp(/\(Ln\s(\d+),\sCol\s(\d+)\)/);
13 | const matches = re.exec(position);
14 | if (matches) {
15 | return {
16 | line: parseInt(matches[ 1 ], 10),
17 | column: parseInt(matches[ 2 ], 10)
18 | };
19 | }
20 | return undefined;
21 | }
22 |
23 | export function encodePosition(line: number, column: number): string {
24 | return " (Ln " + line.toString() + ", Col " + column.toString() + ")";
25 | }
--------------------------------------------------------------------------------
/src/utils/revealLocation.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { TextEditorRevealType, workspace } from "vscode";
7 |
8 | export enum RevealLocation {
9 | Top = "top",
10 | Center = "center"
11 | }
12 |
13 | export function getRevealLocationConfig(ifOutsideViewport: boolean): TextEditorRevealType {
14 | const configuration = workspace.getConfiguration("bookmarks");
15 | const revealLocation = configuration.get("revealLocation", RevealLocation.Center);
16 |
17 | return revealLocation === RevealLocation.Top ?
18 | TextEditorRevealType.AtTop :
19 | ifOutsideViewport ?
20 | TextEditorRevealType.InCenterIfOutsideViewport :
21 | TextEditorRevealType.InCenter;
22 | }
--------------------------------------------------------------------------------
/src/core/constants.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 | import os = require("os");
6 |
7 | export enum Directions {
8 | Forward,
9 | Backward
10 | }
11 |
12 | export enum BadgeConfig {
13 | All = "all",
14 | Files = "files",
15 | Off = "off"
16 | }
17 |
18 | export const SEARCH_EDITOR_SCHEME = "search-editor-body";
19 | export const UNTITLED_SCHEME = "untitled";
20 |
21 | export const isWindows = os.platform() === "win32";
22 |
23 | export const NO_BOOKMARKS = -1;
24 | export const NO_MORE_BOOKMARKS = -2;
25 | export const NO_BOOKMARKS_BEFORE = -3;
26 | export const NO_BOOKMARKS_AFTER = -4;
27 |
28 | export const WORKSPACE_ROOTPATH = "$ROOTPATH$";
29 |
30 | export const DEFAULT_GUTTER_ICON_FILL_COLOR = "#157EFB";
31 | export const DEFAULT_GUTTER_ICON_BORDER_COLOR = "#157EFB";
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | {
3 | "version": "0.2.0",
4 | "configurations": [
5 | {
6 | "name": "Launch Extension",
7 | "type": "extensionHost",
8 | "request": "launch",
9 | "runtimeExecutable": "${execPath}",
10 | "args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
11 | "stopOnEntry": false,
12 | "outFiles": ["${workspaceFolder}/dist/**/*.js"],
13 | // "skipFiles": ["/**", "**/node_modules/**", "**/app/out/vs/**", "**/extensions/**"],
14 | "smartStep": true,
15 | "sourceMaps": true
16 | },
17 | {
18 | "name": "Run Web Extension in VS Code",
19 | "type": "pwa-extensionHost",
20 | "debugWebWorkerHost": true,
21 | "request": "launch",
22 | "args": [
23 | "--extensionDevelopmentPath=${workspaceFolder}",
24 | "--extensionDevelopmentKind=web"
25 | ],
26 | "outFiles": ["${workspaceFolder}/dist/**/*.js"],
27 | "preLaunchTask": "npm: watch"
28 | }
29 | ]
30 | }
--------------------------------------------------------------------------------
/src/core/file.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { Uri } from "vscode";
7 | import { Bookmark } from "./bookmark";
8 | // import { UNTITLED_SCHEME } from "./constants";
9 |
10 | export interface File {
11 | path: string;
12 | bookmarks: Bookmark[];
13 | uri?: Uri;
14 | }
15 |
16 | // eslint-disable-next-line @typescript-eslint/no-empty-interface
17 | export interface FileList extends Array { }
18 |
19 | export function createFile(filePath: string, uri?: Uri): File {
20 |
21 | // let newUri: Uri = uri;
22 | // if (uri?.scheme === UNTITLED_SCHEME) {
23 | // newUri = Uri.parse(`${UNTITLED_SCHEME}:${uri.path}`)
24 | // }
25 |
26 | const newFile: File = {
27 | path: filePath,
28 | bookmarks: [],
29 | uri//: newUri
30 | }
31 | return newFile;
32 | }
--------------------------------------------------------------------------------
/src/test/runTest.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import * as path from 'path';
7 |
8 | import { runTests } from '@vscode/test-electron';
9 |
10 | async function main() {
11 | try {
12 | // The folder containing the Extension Manifest package.json
13 | // Passed to `--extensionDevelopmentPath`
14 | const extensionDevelopmentPath = path.resolve(__dirname, '../../../');
15 |
16 | // The path to test runner
17 | // Passed to --extensionTestsPath
18 | const extensionTestsPath = path.resolve(__dirname, './suite/index');
19 |
20 | // Download VS Code, unzip it and run the integration test
21 | await runTests({ extensionDevelopmentPath, extensionTestsPath });
22 | } catch (err) {
23 | console.error(err);
24 | console.error('Failed to run tests');
25 | process.exit(1);
26 | }
27 | }
28 |
29 | main();
30 |
--------------------------------------------------------------------------------
/walkthrough/defineLabelsForYourBookmarks.md:
--------------------------------------------------------------------------------
1 | ## Define Labels for Your Bookmarks
2 |
3 | Bookmarks represent positions in your code, so you can easily and quickly go back to them whenever necessary. But sometimes its position or the content of that line is not so meaningful as you would like to be.
4 |
5 | To fill this gap, you can define **Labels** to be tied to the bookmark.
6 |
7 | You can eaily type your own **Label** when you toggle a bookmark, or you can ask the extension to suggest for you.
8 |
9 | You have a handlfull of alternatives to choose:
10 |
11 | * `useWhenSelected`: Use the selected text _(if available)_ directly, no confirmation required
12 | * `suggestWhenSelected`: Suggests the selected text _(if available)_. You still need to confirm.
13 | * `suggestWhenSelectedOrLineWhenNoSelected`: Suggests the selected text _(if available)_ or the entire line (when has no selection). You still need to confirm
14 |
15 |
--------------------------------------------------------------------------------
/walkthrough/defineLabelsForYourBookmarks.nls.tr.md:
--------------------------------------------------------------------------------
1 | ## Yer İşaretleriniz için Etiketleri Tanımlayın
2 |
3 | Yer işaretleri kodunuzdaki konumları temsil eder; böylece gerektiğinde bunlara kolayca ve hızlı bir şekilde geri dönebilirsiniz. Ancak bazen o satırın konumu veya içeriği sizin istediğiniz kadar anlamlı olmayabilir.
4 |
5 | Bu boşluğu doldurmak için yer işaretine bağlanacak **Etiketler**'i tanımlayabilirsiniz.
6 |
7 | Bir yer işaretini değiştirdiğinizde kendi **Etiketinizi** kolayca yazabilir veya uzantının sizin için önermesini isteyebilirsiniz.
8 |
9 | Seçebileceğiniz bir sürü alternatifiniz var:
10 |
11 | * `useWhenSelected`: Seçilen metni _(varsa)_ doğrudan kullanın, onay gerekmez
12 | * `suggestWhenSelected`: Seçilen metni _(varsa)_ önerir. Hala onaylamanız gerekiyor.
13 | * `suggestWhenSelectedOrLineWhenNoSelected`: Seçilen metni _(varsa)_ veya tüm satırı (seçim olmadığında) önerir. Hala onaylamanız gerekiyor
14 |
15 |
--------------------------------------------------------------------------------
/walkthrough/defineLabelsForYourBookmarks.nls.hi.md:
--------------------------------------------------------------------------------
1 | ## अपने बुकमार्क्स के लिए लेबल निर्धारित करें
2 |
3 | बुकमार्क्स आपके कोड में किसी स्थान को दर्शाते हैं, ताकि आप जब भी आवश्यक हो, आसानी से और जल्दी उस स्थान पर लौट सकें। लेकिन कभी-कभी उस स्थान या उस पंक्ति की सामग्री का उतना अर्थपूर्ण महत्व नहीं होता, जितना आप चाहते हैं।
4 |
5 | इस अंतर को भरने के लिए, आप **लेबल** निर्धारित कर सकते हैं जो बुकमार्क से जुड़े होंगे।
6 |
7 | जब आप कोई बुकमार्क टॉगल करते हैं, तो आप आसानी से अपना स्वयं का **लेबल** टाइप कर सकते हैं, या एक्सटेंशन से सुझाव देने के लिए कह सकते हैं।
8 |
9 | आपके पास चुनने के लिए कई विकल्प होते हैं:
10 |
11 | * `useWhenSelected`: चयनित पाठ _(यदि उपलब्ध हो)_ का सीधे उपयोग करें, पुष्टि की आवश्यकता नहीं
12 | * `suggestWhenSelected`: चयनित पाठ का सुझाव दें _(यदि उपलब्ध हो)_। आपको पुष्टि करनी होगी।
13 | * `suggestWhenSelectedOrLineWhenNoSelected`: चयनित पाठ _(यदि उपलब्ध हो)_ या पूरी पंक्ति (जब कोई चयन नहीं हो) का सुझाव दें। आपको पुष्टि करनी होगी।
14 |
15 |
--------------------------------------------------------------------------------
/src/sidebar/helpAndFeedbackView.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { ExtensionContext, l10n } from "vscode";
7 | import { HelpAndFeedbackView, Link, StandardLinksProvider, ProvideFeedbackLink, Command } from "vscode-ext-help-and-feedback-view";
8 |
9 | export function registerHelpAndFeedbackView(context: ExtensionContext) {
10 | const items = new Array();
11 | const predefinedProvider = new StandardLinksProvider('alefragnani.Bookmarks');
12 | items.push(predefinedProvider.getGetStartedLink());
13 | items.push(new ProvideFeedbackLink('bookmarks'));
14 | items.push(predefinedProvider.getReviewIssuesLink());
15 | items.push(predefinedProvider.getReportIssueLink());
16 | items.push({
17 | icon: 'heart',
18 | title: l10n.t('Support'),
19 | command: 'bookmarks.supportBookmarks'
20 | });
21 | new HelpAndFeedbackView(context, "bookmarksHelpAndFeedback", items);
22 | }
--------------------------------------------------------------------------------
/src/sidebar/workspaceNode.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { TreeItem, TreeItemCollapsibleState, WorkspaceFolder } from "vscode";
7 | import { ThemeIcons } from "vscode-ext-codicons";
8 | import { Controller } from "../core/controller";
9 | import { FileNode } from "./fileNode";
10 | import { BookmarkNodeKind } from "./nodes";
11 |
12 | export class WorkspaceNode extends TreeItem {
13 |
14 | constructor(
15 | public readonly label: string,
16 | public readonly workspaceFolder: WorkspaceFolder,
17 | public readonly collapsibleState: TreeItemCollapsibleState,
18 | public readonly kind: BookmarkNodeKind,
19 | public readonly files: FileNode[],
20 | public readonly controller: Controller
21 | ) {
22 | super(label, collapsibleState);
23 | this.iconPath = ThemeIcons.root_folder;
24 | this.contextValue = "WorkspaceNode";
25 | }
26 | }
--------------------------------------------------------------------------------
/walkthrough/defineLabelsForYourBookmarks.nls.pl.md:
--------------------------------------------------------------------------------
1 | ## Definiowanie Etykiet dla Twoich Zakładek
2 |
3 | Zakładki reprezentują pozycje w twoim kodzie, dzięki czemu możesz łatwo i szybko do nich wrócić, kiedy tylko jest to konieczne. Ale czasami pozycja ta lub zawartość danej linii nie jest tak znacząca, jak byś tego chciał.
4 |
5 | Aby wypełnić tę lukę, możesz zdefiniować **Etykiety**, które będą przypisane do zakładki.
6 |
7 | Możesz łatwo wpisać własną **Etykietę** podczas przełączania zakładki, lub możesz poprosić rozszerzenie, aby zaproponowało ci ją.
8 |
9 | Masz do wyboru kilka alternatyw:
10 |
11 | * `useWhenSelected`: Użyj zaznaczonego tekstu _(jeśli dostępny)_ bezpośrednio, bez potrzeby potwierdzenia
12 | * `suggestWhenSelected`: Zaproponuj zaznaczony tekst _(jeśli dostępny)_. Nadal musisz potwierdzić.
13 | * `suggestWhenSelectedOrLineWhenNoSelected`: Zaproponuj zaznaczony tekst _(jeśli dostępny)_ lub całą linię (kiedy nie ma zaznaczenia). Nadal musisz potwierdzić
14 |
15 |
22 |
--------------------------------------------------------------------------------
/src/whats-new/commands.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { commands } from "vscode";
7 | import { Container } from "../core/container";
8 | import { WhatsNewManager } from "../../vscode-whats-new/src/Manager";
9 | import { BookmarksSocialMediaProvider, BookmarksContentProvider } from "./contentProvider";
10 |
11 | export async function registerWhatsNew() {
12 | const provider = new BookmarksContentProvider();
13 | const viewer = new WhatsNewManager(Container.context)
14 | .registerContentProvider("alefragnani", "Bookmarks", provider)
15 | .registerSocialMediaProvider(new BookmarksSocialMediaProvider());
16 | await viewer.showPageInActivation();
17 | Container.context.subscriptions.push(commands.registerCommand("bookmarks.whatsNew", () => viewer.showPage()));
18 | Container.context.subscriptions.push(commands.registerCommand("_bookmarks.whatsNewContextMenu", () => viewer.showPage()));
19 | }
20 |
--------------------------------------------------------------------------------
/walkthrough/defineLabelsForYourBookmarks.nls.pt-br.md:
--------------------------------------------------------------------------------
1 | ## Defina Rótulos para Seus Bookmarks
2 |
3 | Bookmarks representam posições no seu código, o que permite que você volte de forma rápida e fácil para elas, sempre que necessário. Mas as vezes a posição ou o conteúdo da linha não é tão significativo quanto você gostaria que fosse..
4 |
5 | Para preencher essa necessidade, você pode definir **Rótulos** a serem associados aos Bookmarks.
6 |
7 | Você pode facilmente digitar o **Rótulo** quando você cria o bookmark, ou você pode pedir a extensão para sugerir para você.
8 |
9 | Você tem algumas alternativas para escolher:
10 |
11 | * `useWhenSelected`: Usa o texto selecionado _(se disponível)_ diretamente, sem solicitar confirmação.
12 | * `suggestWhenSelected`: Sugere o texto selecionado _(se disponível)_. Você ainda precisa confirmar.
13 | * `suggestWhenSelectedOrLineWhenNoSelected`: Sugere o texto selecionado _(se disponível)_ ou a toda a linha (quando não houver seleção). Você ainda precisa confirmar.
14 |
15 |
22 |
--------------------------------------------------------------------------------
/walkthrough/defineLabelsForYourBookmarks.nls.es.md:
--------------------------------------------------------------------------------
1 | ## Elegir etiquetas para tus marcadores
2 |
3 | Los marcadores establecen posiciones concretas en tu código para que puedas volver a esas posiciones rápida y fácilmente siempre que quieras. Sin embargo, puede que la posición o el contenido de la línea no sean tan útiles como te gustaría que fuesen.
4 |
5 | Para solucionar esto, puedes escribir **etiquetas**, que van unidas al marcador.
6 |
7 | Puedes escribir tu propia **etiqueta** cuando estableces un marcador; también puedes dejar que la extensión te sugiera una.
8 |
9 | Tienes un montón de alternativas entre las que elegir:
10 |
11 | * `useWhenSelected`: usa el texto seleccionado inmediatamente _(si está disponible)_. No se necesita confirmación.
12 | * `suggestWhenSelected`: sugiere el texto seleccionado _(si está disponible)_. Es necesario que lo confirmes.
13 | * `suggestWhenSelectedOrLineWhenNoSelected`: sugiere el texto seleccionado _(si está disponible)_ o la línea entera (si no hay ninguna selección). Es necesario que lo confirmes.
14 |
15 |
--------------------------------------------------------------------------------
/l10n/bundle.l10n.zh-cn.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor": "成为赞助者",
3 | "Donate via PayPal": "通过 PayPal 捐赠",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!": "即使 Bookmarks 是免费提供的,如果你觉得它相当好使, \n 请考虑捐助以支援我们的开发工作,非常感谢!",
5 | "Open a file first to list bookmarks": "先打开文件以列出书签",
6 | "Type a line number or a piece of code to navigate to": "输入行号或一段代码以跳转到",
7 | "Open a file first to clear bookmarks": "先打开文件以清空书签",
8 | "No Bookmarks found": "没有找到书签",
9 | "Open a file first to jump to bookmarks": "先打开文件以跳转至书签",
10 | "No more bookmarks": "没有更多书签",
11 | "Bookmark Label": "书签标签",
12 | "Type a label for your bookmark": "为你的书签输入标签",
13 | "You must define a label for the bookmark.": "你需要为该书签输入标签",
14 | "Open a file first to toggle bookmarks": "先打开文件以添加或删除书签",
15 | "You can't toggle bookmarks in Search Editor": "你不能在搜索编辑器中添加或删除书签。",
16 | "Support": "赞助",
17 | "Open a file first to shrink bookmark selection": "先打开文件以收缩光标选区",
18 | "Command not supported with more than one selection": "该指令不能在多选择的时候使用",
19 | "No selection found": "未选择任何内容",
20 | "No more bookmarks to shrink": "没有更多的书签可供收缩选区",
21 | "1 file with bookmarks": "一个具有书签的文件",
22 | "files with bookmarks": "个具有书签的文件",
23 | "Error loading Bookmarks: ": "在载入书签时发生问题: "
24 | }
--------------------------------------------------------------------------------
/src/test/suite/extension.test.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import * as assert from 'assert';
7 |
8 | // You can import and use all API from the 'vscode' module
9 | // as well as import your extension to test it
10 | import * as vscode from 'vscode';
11 |
12 | const timeout = async (ms = 200) => new Promise(resolve => setTimeout(resolve, ms));
13 |
14 | suite('Extension Test Suite', () => {
15 | let extension: vscode.Extension;
16 | vscode.window.showInformationMessage('Start all tests.');
17 |
18 | suiteSetup(() => {
19 | extension = vscode.extensions.getExtension('alefragnani.Bookmarks') as vscode.Extension;
20 | });
21 |
22 | test('Sample test', () => {
23 | assert.equal(-1, [1, 2, 3].indexOf(5));
24 | assert.equal(-1, [1, 2, 3].indexOf(0));
25 | });
26 |
27 | test('Activation test', async () => {
28 | await extension.activate();
29 | assert.equal(extension.isActive, true);
30 | });
31 |
32 | test('Extension loads in VSCode and is active', async () => {
33 | await timeout(1500);
34 | assert.equal(extension.isActive, true);
35 | });
36 | });
37 |
--------------------------------------------------------------------------------
/src/utils/overviewRulerLane.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { OverviewRulerLane, workspace } from "vscode";
7 |
8 | export enum OverviewRulerLaneConfig {
9 | None = "none",
10 | Left = "left",
11 | Center = "center",
12 | Right = "right",
13 | Full = "full"
14 | }
15 |
16 | export function getOverviewRulerLaneConfig(): OverviewRulerLane | undefined {
17 | const configuration = workspace.getConfiguration("bookmarks");
18 | const configValue = configuration.get("overviewRulerLane", OverviewRulerLaneConfig.Full);
19 |
20 | switch (configValue) {
21 | case OverviewRulerLaneConfig.Left:
22 | return OverviewRulerLane.Left;
23 | case OverviewRulerLaneConfig.Center:
24 | return OverviewRulerLane.Center;
25 | case OverviewRulerLaneConfig.Right:
26 | return OverviewRulerLane.Right;
27 | case OverviewRulerLaneConfig.Full:
28 | return OverviewRulerLane.Full;
29 | case OverviewRulerLaneConfig.None:
30 | return undefined;
31 | }
32 | }
--------------------------------------------------------------------------------
/src/gutter/commands.ts:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *---------------------------------------------------------------------------------------------*/
5 |
6 | import { commands } from "vscode";
7 | import { EditorLineNumberContextParams } from "./editorLineNumberContext";
8 | import { Container } from "../core/container";
9 |
10 | export function registerGutterCommands(toggleCommand: (params: EditorLineNumberContextParams) => void, toggleLabeledCommand: (params: EditorLineNumberContextParams) => void) {
11 | Container.context.subscriptions.push(
12 | commands.registerCommand("_bookmarks.addBookmarkAtLine#gutter",
13 | async (params: EditorLineNumberContextParams) => {
14 | await toggleCommand(params);
15 | }));
16 |
17 | Container.context.subscriptions.push(
18 | commands.registerCommand("_bookmarks.addLabeledBookmarkAtLine#gutter",
19 | async (params: EditorLineNumberContextParams) => {
20 | await toggleLabeledCommand(params);
21 | }));
22 |
23 | Container.context.subscriptions.push(
24 | commands.registerCommand("_bookmarks.removeBookmarkAtLine#gutter",
25 | async (params: EditorLineNumberContextParams) => {
26 | await toggleCommand(params);
27 | }));
28 | }
--------------------------------------------------------------------------------
/src/quickpick/controllerPicker.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import path = require("path");
7 | import { QuickPickItem, window } from "vscode";
8 | import { codicons } from "vscode-ext-codicons";
9 | import { Controller } from "../core/controller";
10 |
11 | interface ControllerQuickPickItem extends QuickPickItem {
12 | controller: Controller;
13 | }
14 |
15 | export async function pickController(controllers: Controller[], activeController: Controller): Promise {
16 |
17 | if (controllers.length === 1) {
18 | return activeController;
19 | }
20 |
21 | const items: ControllerQuickPickItem[] = controllers.map(controller => {
22 | return {
23 | label: codicons.root_folder + ' ' + controller.workspaceFolder.name,
24 | description: path.dirname(controller.workspaceFolder.uri.path),
25 | controller: controller
26 | }
27 | }
28 | );
29 |
30 | const selection = await window.showQuickPick(items, {
31 | placeHolder: 'Select a workspace'
32 | });
33 |
34 | if (typeof selection === "undefined") {
35 | return undefined
36 | }
37 |
38 | return selection.controller;
39 | }
--------------------------------------------------------------------------------
/src/commands/supportBookmarks.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { commands, env, l10n, MessageItem, Uri, window } from "vscode";
7 | import { Container } from "../core/container";
8 |
9 | export function registerSupportBookmarks() {
10 | Container.context.subscriptions.push(commands.registerCommand("bookmarks.supportBookmarks", async () => {
11 | const actions: MessageItem[] = [
12 | { title: l10n.t('Become a Sponsor') },
13 | { title: l10n.t('Donate via PayPal') }
14 | ];
15 | const option = await window.showInformationMessage(l10n.t(`While Bookmarks is offered for free, if you find it useful,
16 | please consider supporting it. Thank you!`), ...actions);
17 | let uri: Uri;
18 | if (option === actions[ 0 ]) {
19 | uri = Uri.parse('https://github.com/sponsors/alefragnani');
20 | }
21 | if (option === actions[ 1 ]) {
22 | uri = Uri.parse('https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EP57F3B6FXKTU&lc=US&item_name=Alessandro%20Fragnani&item_number=vscode%20extensions¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted');
23 | }
24 | if (uri) {
25 | await env.openExternal(uri);
26 | }
27 | }));
28 | }
29 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | # Controls when the action will run. Triggers the workflow on push or pull request
4 | # events but only for the master branch
5 | on:
6 | push:
7 | branches: [ master ]
8 | pull_request:
9 | branches: [ master ]
10 |
11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
12 | jobs:
13 | # This workflow contains a single job called "build"
14 | build:
15 | # The type of runner that the job will run on
16 | strategy:
17 | matrix:
18 | os: [macos-latest, ubuntu-latest, windows-latest]
19 | runs-on: ${{ matrix.os }}
20 |
21 | # Steps represent a sequence of tasks that will be executed as part of the job
22 | steps:
23 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24 | - name: Checkout
25 | uses: actions/checkout@v4
26 | with:
27 | submodules: true
28 |
29 | # Runs a set of commands using the runners shell
30 | - name: Install Node.js
31 | uses: actions/setup-node@v4
32 | with:
33 | node-version: 20.x
34 | cache: 'npm'
35 |
36 | # Runs the tests
37 | - name: Cache VS Code downloads
38 | uses: actions/cache@v4
39 | with:
40 | path: .vscode-test
41 | key: vscode-test-${{ matrix.os }}-${{ hashFiles('**/package.json') }}
42 | restore-keys: |
43 | vscode-test-${{ matrix.os }}-
44 | - run: npm ci
45 | - run: xvfb-run -a npm test
46 | if: runner.os == 'Linux'
47 | - run: npm test
48 | if: runner.os != 'Linux'
49 |
--------------------------------------------------------------------------------
/l10n/bundle.l10n.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor":"Become a Sponsor",
3 | "Donate via PayPal":"Donate via PayPal",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!":"While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!",
5 | "Open a file first to list bookmarks":"Open a file first to list bookmarks",
6 | "Type a line number or a piece of code to navigate to":"Type a line number or a piece of code to navigate to",
7 | "Open a file first to clear bookmarks":"Open a file first to clear bookmarks",
8 | "No Bookmarks found":"No Bookmarks found",
9 | "Open a file first to jump to bookmarks":"Open a file first to jump to bookmarks",
10 | "No more bookmarks":"No more bookmarks",
11 | "Bookmark Label":"Bookmark Label",
12 | "Type a label for your bookmark":"Type a label for your bookmark",
13 | "You must define a label for the bookmark.":"You must define a label for the bookmark.",
14 | "Open a file first to toggle bookmarks":"Open a file first to toggle bookmarks",
15 | "You can't toggle bookmarks in Search Editor":"You can't toggle bookmarks in Search Editor",
16 | "Support":"Support",
17 | "Open a file first to shrink bookmark selection":"Open a file first to shrink bookmark selection",
18 | "Command not supported with more than one selection":"Command not supported with more than one selection",
19 | "No selection found":"No selection found",
20 | "No more bookmarks to shrink":"No more bookmarks to shrink",
21 | "1 file with bookmarks":"1 file with bookmarks",
22 | "files with bookmarks":"files with bookmarks",
23 | "Error loading Bookmarks: ":"Error loading Bookmarks: "
24 | }
--------------------------------------------------------------------------------
/l10n/bundle.l10n.pl.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor": "Zostań sponsorem",
3 | "Donate via PayPal": "Wspomóż przez PayPal",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!": "Chociaż Zakładki są oferowane za darmo, jeśli uznasz je za przydatne, \n prosimy o wsparcie. Dziękujemy!",
5 | "Open a file first to list bookmarks": "Najpierw otwórz plik, aby wyświetlić zakładki",
6 | "Type a line number or a piece of code to navigate to": "Wpisz numer linii lub fragment kodu, aby do niego przejść",
7 | "Open a file first to clear bookmarks": "Najpierw otwórz plik, aby wyczyścić zakładki",
8 | "No Bookmarks found": "Nie znaleziono zakładek",
9 | "Open a file first to jump to bookmarks": "Najpierw otwórz plik, aby przejść do zakładek",
10 | "No more bookmarks": "Nie ma więcej zakładek",
11 | "Bookmark Label": "Etykieta zakładki",
12 | "Type a label for your bookmark": "Wpisz etykietę dla swojej zakładki",
13 | "You must define a label for the bookmark.": "Musisz określić etykietę dla zakładki.",
14 | "Open a file first to toggle bookmarks": "Najpierw otwórz plik, aby przełączać zakładki",
15 | "You can't toggle bookmarks in Search Editor": "Nie możesz przełączać zakładek w Edytorze Wyszukiwania",
16 | "Support": "Wsparcie techniczne",
17 | "Open a file first to shrink bookmark selection": "Najpierw otwórz plik, aby zmniejszyć wybór zakładek",
18 | "Command not supported with more than one selection": "Komenda nie działa przy więcej niż jednym wyborze",
19 | "No selection found": "Nie znaleziono zaznaczenia",
20 | "No more bookmarks to shrink": "Nie ma więcej zakładek do zmniejszenia",
21 | "1 file with bookmarks": "1 plik z zakładkami",
22 | "files with bookmarks": "pliki z zakładkami",
23 | "Error loading Bookmarks: ": "Błąd ładowania Zakładek: "
24 | }
25 |
--------------------------------------------------------------------------------
/l10n/bundle.l10n.pt-br.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor":"Torne-se um Patrocinador",
3 | "Donate via PayPal":"Doar via PayPal",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!":"Embora Bookmarks seja oferecido gratuitamente, se você o acha útil, \n considere apoiá-lo. Obrigado!",
5 | "Open a file first to list bookmarks":"Abra um arquivo antes de listar bookmarks",
6 | "Type a line number or a piece of code to navigate to":"Digite um número de linha ou pedaço de código para navegar",
7 | "Open a file first to clear bookmarks":"Abra um arquivo antes de limpar bookmarks",
8 | "No Bookmarks found":"Nenhum Bookmark encontrado",
9 | "Open a file first to jump to bookmarks":"Abra um arquivo antes de pular para bookmarks",
10 | "No more bookmarks":"Sem mais Bookmarks",
11 | "Bookmark Label":"Bookmark Rotulado",
12 | "Type a label for your bookmark":"Digite um rótulo para o seu bookmark",
13 | "You must define a label for the bookmark.":"Você deve definir um rótulo para o bookmark.",
14 | "Open a file first to toggle bookmarks":"Abra um arquivo antes de alternar bookmarks",
15 | "You can't toggle bookmarks in Search Editor":"Você não pode alternar bookmarks no Editor de Pesquisa",
16 | "Support":"Suporte",
17 | "Open a file first to shrink bookmark selection":"Abra um arquivo antes de contrair seleção entre bookmark",
18 | "Command not supported with more than one selection":"Comando não suportado com mais de uma seleção",
19 | "No selection found":"Nenhuma seleção encontrada",
20 | "No more bookmarks to shrink":"Sem mais bookmarks para contrair",
21 | "1 file with bookmarks":"1 arquivo com bookmarks",
22 | "files with bookmarks":"arquivos com bookmarks",
23 | "Error loading Bookmarks: ":"Erro lendo Bookmarks: "
24 | }
--------------------------------------------------------------------------------
/l10n/bundle.l10n.ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor":"Стать спонсором",
3 | "Donate via PayPal":"Пожертвовать через PayPal",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!":"Хотя «Закладки» предлагаются бесплатно, если вы находите их полезными, \n пожалуйста, поддержите их. Спасибо!",
5 | "Open a file first to list bookmarks":"Сначала откройте файл, чтобы составить список закладок",
6 | "Type a line number or a piece of code to navigate to":"Введите номер строки или фрагмент кода, чтобы перейти к нему",
7 | "Open a file first to clear bookmarks":"Сначала откройте файл, чтобы очистить закладки",
8 | "No Bookmarks found":"Закладки не найдены",
9 | "Open a file first to jump to bookmarks":"Сначала откройте файл, чтобы перейти к закладкам",
10 | "No more bookmarks":"Закладок больше нет",
11 | "Bookmark Label":"Закладка с меткой",
12 | "Type a label for your bookmark":"Введите метку для закладки",
13 | "You must define a label for the bookmark.":"Вы должны задать метку для закладки.",
14 | "Open a file first to toggle bookmarks":"Чтобы переключить закладки, сначала откройте файл",
15 | "You can't toggle bookmarks in Search Editor":"Вы не можете установить закладки в редакторе поиска",
16 | "Support":"Поддержка",
17 | "Open a file first to shrink bookmark selection":"Сначала откройте файл, чтобы сократить выделение закладки",
18 | "Command not supported with more than one selection":"Команда не поддерживается при наличии более одного выделения",
19 | "No selection found":"Выделение не найдено",
20 | "No more bookmarks to shrink":"Нет закладок, которые можно уменьшить",
21 | "1 file with bookmarks":"1 файл с закладками",
22 | "files with bookmarks":"файлов с закладками",
23 | "Error loading Bookmarks: ":"Ошибка загрузки закладок: "
24 | }
--------------------------------------------------------------------------------
/l10n/bundle.l10n.hi.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor": "प्रायोजक बनें",
3 | "Donate via PayPal": "PayPal के माध्यम से दान करें",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!": "बुकमार्क्स निःशुल्क उपलब्ध है, लेकिन यदि आपको यह उपयोगी लगे, \n तो कृपया इसका समर्थन करने पर विचार करें। धन्यवाद!",
5 | "Open a file first to list bookmarks": "बुकमार्क सूचीबद्ध करने के लिए पहले कोई फ़ाइल खोलें",
6 | "Type a line number or a piece of code to navigate to": "जाने के लिए कोई पंक्ति संख्या या कोड का अंश टाइप करें",
7 | "Open a file first to clear bookmarks": "बुकमार्क हटाने के लिए पहले कोई फ़ाइल खोलें",
8 | "No Bookmarks found": "कोई बुकमार्क नहीं मिला",
9 | "Open a file first to jump to bookmarks": "बुकमार्क पर जाने के लिए पहले कोई फ़ाइल खोलें",
10 | "No more bookmarks": "और कोई बुकमार्क नहीं है",
11 | "Bookmark Label": "बुकमार्क लेबल",
12 | "Type a label for your bookmark": "अपने बुकमार्क के लिए लेबल टाइप करें",
13 | "You must define a label for the bookmark.": "आपको बुकमार्क के लिए एक लेबल निर्धारित करना होगा।",
14 | "Open a file first to toggle bookmarks": "बुकमार्क टॉगल करने के लिए पहले कोई फ़ाइल खोलें",
15 | "You can't toggle bookmarks in Search Editor": "आप सर्च एडिटर में बुकमार्क टॉगल नहीं कर सकते",
16 | "Support": "समर्थन",
17 | "Open a file first to shrink bookmark selection": "बुकमार्क चयन को संकुचित करने के लिए पहले कोई फ़ाइल खोलें",
18 | "Command not supported with more than one selection": "यह कमांड एक से अधिक चयन के साथ समर्थित नहीं है",
19 | "No selection found": "कोई चयन नहीं मिला",
20 | "No more bookmarks to shrink": "संकुचित करने के लिए और कोई बुकमार्क नहीं है",
21 | "1 file with bookmarks": "एक फ़ाइल बुकमार्क हैं",
22 | "files with bookmarks": "फ़ाइलें बुकमार्क हैं",
23 | "Error loading Bookmarks: ": "बुकमार्क लोड करने में त्रुटि: "
24 | }
25 |
--------------------------------------------------------------------------------
/l10n/bundle.l10n.es.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor":"Convertirse en un patrocinador",
3 | "Donate via PayPal":"Donar por PayPal",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!":"Aunque Bookmarks sea gratis, considera apoyarla con una donación \n si te ha sido útil. ¡Gracias!",
5 | "Open a file first to list bookmarks":"Abre un archivo antes de mostrar los marcadores",
6 | "Type a line number or a piece of code to navigate to":"Escribe el número de línea o la porción de código a la que quieres ir",
7 | "Open a file first to clear bookmarks":"Abre un archivo antes de eliminar marcadores",
8 | "No Bookmarks found":"No se encontraron marcadores",
9 | "Open a file first to jump to bookmarks":"Abre un archivo antes de ir a los marcadores",
10 | "No more bookmarks":"No hay más marcadores",
11 | "Bookmark Label":"Etiqueta del marcador",
12 | "Type a label for your bookmark":"Escribe una etiqueta para tu marcador",
13 | "You must define a label for the bookmark.":"Debes escribir una etiqueta para tu marcador.",
14 | "Open a file first to toggle bookmarks":"Abre un archivo antes de alternar los marcadores",
15 | "You can't toggle bookmarks in Search Editor":"No puedes alternar los marcadores en el Editor de búsqueda",
16 | "Support":"Soporte",
17 | "Open a file first to shrink bookmark selection":"Abre un archivo antes de contraer la selección de marcadores",
18 | "Command not supported with more than one selection":"No se permite este comando con más de una selección",
19 | "No selection found":"No se encontró ninguna selección",
20 | "No more bookmarks to shrink":"No hay más marcadores que contraer",
21 | "1 file with bookmarks":"1 archivo con marcadores",
22 | "files with bookmarks":"archivos con marcadores",
23 | "Error loading Bookmarks: ":"Error al cargar Bookmarks: "
24 | }
--------------------------------------------------------------------------------
/l10n/bundle.l10n.tr.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor": "Sponsor Olun",
3 | "Donate via PayPal": "PayPal aracılığıyla bağış yapın",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!": "Yer İşaretleri ücretsiz olarak sunulsa da yararlı buluyorsanız \n lütfen desteklemeyi düşünün. Teşekkür ederim!",
5 | "Open a file first to list bookmarks": "Yer işaretlerini listelemek için önce bir dosya açın",
6 | "Type a line number or a piece of code to navigate to": "Gitmek için bir satır numarası veya bir kod parçası yazın",
7 | "Open a file first to clear bookmarks": "Yer işaretlerini temizlemek için önce bir dosya açın",
8 | "No Bookmarks found": "Yer İşareti bulunamadı",
9 | "Open a file first to jump to bookmarks": "Yer işaretlerine atlamak için önce bir dosya açın",
10 | "No more bookmarks": "Daha fazla yer işareti yok",
11 | "Bookmark Label": "Yer İşareti Etiketi",
12 | "Type a label for your bookmark": "Yer işaretiniz için bir etiket yazın",
13 | "You must define a label for the bookmark.": "Yer işareti için bir etiket tanımlamanız gerekir.",
14 | "Open a file first to toggle bookmarks": "Yer işaretlerini değiştirmek için önce bir dosya açın",
15 | "You can't toggle bookmarks in Search Editor": "Arama Düzenleyicisi'nde yer işaretlerini değiştiremezsiniz",
16 | "Support": "Destek",
17 | "Open a file first to shrink bookmark selection": "Yer işareti seçimini daraltmak için önce bir dosya açın",
18 | "Command not supported with more than one selection": "Komut birden fazla seçimle desteklenmiyor",
19 | "No selection found": "Seçim bulunamadı",
20 | "No more bookmarks to shrink": "Artık küçültülecek yer işareti yok",
21 | "1 file with bookmarks": "1 yer işareti olan dosya",
22 | "files with bookmarks": "yer işareti olan dosya",
23 | "Error loading Bookmarks: ": "Yer İşaretleri yüklenirken hata oluştu: "
24 | }
--------------------------------------------------------------------------------
/l10n/bundle.l10n.fr.json:
--------------------------------------------------------------------------------
1 | {
2 | "Become a Sponsor": "Devenir un sponsor",
3 | "Donate via PayPal": "Faire un don via PayPal",
4 | "While Bookmarks is offered for free, if you find it useful, \n please consider supporting it. Thank you!": "Bien que Bookmarks soit offert gratuitement, si vous le trouvez utile, \n veuillez envisager de le soutenir. Merci !",
5 | "Open a file first to list bookmarks": "Ouvrez d’abord un fichier pour lister les signets",
6 | "Type a line number or a piece of code to navigate to": "Tapez un numéro de ligne ou un morceau de code pour y naviguer",
7 | "Open a file first to clear bookmarks": "Ouvrez d’abord un fichier pour effacer les signets",
8 | "No Bookmarks found": "Aucun signet trouvé",
9 | "Open a file first to jump to bookmarks": "Ouvrez d’abord un fichier pour accéder aux signets",
10 | "No more bookmarks": "Plus de signets",
11 | "Bookmark Label": "Étiquette du signet",
12 | "Type a label for your bookmark": "Tapez une étiquette pour votre signet",
13 | "You must define a label for the bookmark.": "Vous devez définir une étiquette pour le signet.",
14 | "Open a file first to toggle bookmarks": "Ouvrez d’abord un fichier pour basculer les signets",
15 | "You can't toggle bookmarks in Search Editor": "Vous ne pouvez pas basculer les signets dans l’éditeur de recherche",
16 | "Support": "Support",
17 | "Open a file first to shrink bookmark selection": "Ouvrez d’abord un fichier pour réduire la sélection de signets",
18 | "Command not supported with more than one selection": "Commande non prise en charge avec plus d’une sélection",
19 | "No selection found": "Aucune sélection trouvée",
20 | "No more bookmarks to shrink": "Plus de signets à réduire",
21 | "1 file with bookmarks": "1 fichier avec des signets",
22 | "files with bookmarks": "fichiers avec des signets",
23 | "Error loading Bookmarks: ": "Erreur lors du chargement des signets : "
24 | }
25 |
--------------------------------------------------------------------------------
/src/suggestion.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { Selection, workspace, window } from "vscode";
7 |
8 | enum SuggestionMode {
9 | dontUse = "dontUse",
10 | suggestWhenSelected = "suggestWhenSelected",
11 | useWhenSelected = "useWhenSelected",
12 | suggestWhenSelectedOrLineWhenNoSelected = "suggestWhenSelectedOrLineWhenNoSelected"
13 | }
14 |
15 | export function useSelectionWhenAvailable(): boolean {
16 | return workspace.getConfiguration("bookmarks")
17 | .get("label.suggestion", SuggestionMode.dontUse) === SuggestionMode.useWhenSelected;
18 | }
19 |
20 | export function suggestLabel(selection: Selection): string {
21 | const configSuggestion = workspace.getConfiguration("bookmarks")
22 | .get("label.suggestion", SuggestionMode.dontUse);
23 | switch (configSuggestion) {
24 | case SuggestionMode.dontUse:
25 | return "";
26 |
27 | case SuggestionMode.suggestWhenSelected:
28 | case SuggestionMode.useWhenSelected:
29 | if (!selection.isEmpty) {
30 | return window.activeTextEditor.document.getText(selection);
31 | } else {
32 | return "";
33 | }
34 |
35 | case SuggestionMode.suggestWhenSelectedOrLineWhenNoSelected:
36 | if (!selection.isEmpty) {
37 | return window.activeTextEditor.document.getText(selection);
38 | } else {
39 | return window.activeTextEditor.document.lineAt(selection.start.line).text.trim();
40 | }
41 |
42 | default:
43 | break;
44 | }
45 | }
--------------------------------------------------------------------------------
/src/utils/reveal.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { Selection, Uri, window, workspace } from "vscode";
7 | import { Bookmark } from "../core/bookmark";
8 | import { getRevealLocationConfig } from "./revealLocation";
9 |
10 | export function revealLine(line: number, directJump?: boolean) {
11 | const newSe = new Selection(line, 0, line, 0);
12 | window.activeTextEditor.selection = newSe;
13 | window.activeTextEditor.revealRange(newSe, getRevealLocationConfig(directJump));
14 | }
15 |
16 | export function revealPosition(line: number, column: number): void {
17 | if (isNaN(column)) {
18 | revealLine(line);
19 | } else {
20 | const revealType = getRevealLocationConfig(line === window.activeTextEditor.selection.active.line);
21 | const newPosition = new Selection(line, column, line, column);
22 | window.activeTextEditor.selection = newPosition;
23 | window.activeTextEditor.revealRange(newPosition, revealType);
24 | }
25 | }
26 |
27 | export async function previewPositionInDocument(point: Bookmark, uri: Uri): Promise {
28 | const textDocument = await workspace.openTextDocument(uri);
29 | await window.showTextDocument(textDocument, { preserveFocus: true, preview: true } );
30 | revealPosition(point.line - 1, point.column - 1);
31 | }
32 |
33 | export async function revealPositionInDocument(point: Bookmark, uri: Uri): Promise {
34 | const textDocument = await workspace.openTextDocument(uri);
35 | await window.showTextDocument(textDocument, undefined, false);
36 | revealPosition(point.line, point.column);
37 | }
38 |
39 | export function isInDiffEditor(): boolean {
40 | return window.activeTextEditor?.viewColumn === undefined;
41 | }
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Copyright (c) Microsoft Corporation. All rights reserved.
4 | * Licensed under the GPLv3 License. See License.txt in the project root for license information.
5 | *--------------------------------------------------------------------------------------------*/
6 |
7 | //@ts-check
8 |
9 | 'use strict';
10 |
11 | const path = require('path');
12 | const TerserPlugin = require('terser-webpack-plugin');
13 | const webpack = require('webpack');
14 |
15 |
16 |
17 | /**@type {import('webpack').Configuration}*/
18 | const config = {
19 | entry: "./src/extension.ts",
20 | optimization: {
21 | minimizer: [new TerserPlugin({
22 | parallel: true,
23 | terserOptions: {
24 | ecma: 2019,
25 | keep_classnames: false,
26 | mangle: true,
27 | module: true
28 | }
29 | })],
30 | },
31 |
32 | devtool: 'source-map',
33 | externals: {
34 | vscode: "commonjs vscode" // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
35 | },
36 | resolve: { // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
37 | extensions: ['.ts', '.js']
38 | },
39 | module: {
40 | rules: [{
41 | test: /\.ts$/,
42 | exclude: /node_modules/,
43 | use: [{
44 | loader: 'ts-loader',
45 | }]
46 | }]
47 | },
48 | };
49 |
50 | const nodeConfig = {
51 | ...config,
52 | target: "node",
53 | output: { // the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
54 | path: path.resolve(__dirname, 'dist'),
55 | filename: 'extension-node.js',
56 | libraryTarget: "commonjs2",
57 | devtoolModuleFilenameTemplate: "../[resource-path]",
58 | },
59 | }
60 |
61 | module.exports = [nodeConfig];
62 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | First off all, thank you for taking the time to contribute!
4 |
5 | When contributing to this project, please first discuss the changes you wish to make via an issue before making changes.
6 |
7 | ## Your First Code Contribution
8 |
9 | Unsure where to begin contributing? You can start by looking through the [`help wanted`](https://github.com/alefragnani/vscode-bookmarks/labels/good%20first%20issue) issues.
10 |
11 | ### Getting the code
12 |
13 | ```
14 | git clone https://github.com/alefragnani/vscode-bookmarks.git
15 | ```
16 |
17 | Prerequisites
18 |
19 | - [Git](https://git-scm.com/), `>= 2.22.0`
20 | - [NodeJS](https://nodejs.org/), `>= 18.17.0`
21 |
22 | ### Dependencies
23 |
24 | From a terminal, where you have cloned the repository, execute the following command to install the required dependencies:
25 |
26 | ```
27 | git submodule init
28 | git submodule update
29 | npm install
30 | ```
31 |
32 | ### Build / Watch
33 |
34 | From inside VS Code, run `Tasks: Run Task Build`. It **Builds** the extension in **Watch Mode**.
35 |
36 | This will first do an initial full build and then watch for file changes, compiling those changes incrementally, enabling a fast, iterative coding experience.
37 |
38 | > **Tip!** You can press Cmd+Shift+B (Ctrl+Shift+B on Windows, Linux) to start the watch task.
39 |
40 | > **Tip!** You don't need to stop and restart the development version of Code after each change. You can just execute `Reload Window` from the command palette.
41 |
42 | ### Linting
43 |
44 | This project uses [ESLint](https://eslint.org/) for code linting. You can run ESLint across the code by calling `npm run lint` from a terminal. Warnings from ESLint show up in the `Errors and Warnings` quick box and you can navigate to them from inside VS Code.
45 |
46 | To lint the code as you make changes you can install the [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension.
47 |
48 | ### Debugging
49 |
50 | 1. Open the `vscode-bookmarks` folder
51 | 2. Ensure the required [dependencies](#dependencies) are installed
52 | 3. Choose the `Launch Extension` launch configuration from the launch dropdown in the Run and Debug viewlet and press `F5`.
53 |
54 | ## Submitting a Pull Request
55 |
56 | Be sure your branch is up to date (relative to `master`) and submit your PR. Also add reference to the issue the PR refers to.
--------------------------------------------------------------------------------
/src/sidebar/bookmarkNode.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { Command, TreeItem, TreeItemCollapsibleState, Uri, workspace } from "vscode";
7 | import { DEFAULT_GUTTER_ICON_BORDER_COLOR, DEFAULT_GUTTER_ICON_FILL_COLOR } from "../core/constants";
8 | import { File } from "../core/file";
9 | import { BookmarkNodeKind } from "./nodes";
10 |
11 | export interface BookmarkPreview {
12 | file: string;
13 | line: number;
14 | column: number;
15 | preview: string;
16 | uri: Uri;
17 | }
18 |
19 | export class BookmarkNode extends TreeItem {
20 |
21 | constructor(
22 | public readonly label: string,
23 | public readonly relativePath: string,
24 | public readonly collapsibleState: TreeItemCollapsibleState,
25 | public readonly kind: BookmarkNodeKind,
26 | public readonly bookmark: File,
27 | public readonly books?: BookmarkPreview[],
28 | public readonly command?: Command
29 | ) {
30 | super(label, collapsibleState);
31 |
32 | this.description = relativePath;
33 | const iconFillColor = workspace.getConfiguration("bookmarks").get("gutterIconFillColor", DEFAULT_GUTTER_ICON_FILL_COLOR);
34 | const iconBorderColor = workspace.getConfiguration("bookmarks").get("gutterIconBorderColor", DEFAULT_GUTTER_ICON_BORDER_COLOR);
35 | const iconPath = Uri.parse(
36 | `data:image/svg+xml,${encodeURIComponent(
37 | ``,
38 | )}`,
39 | );
40 | this.iconPath = iconPath;
41 | this.contextValue = "BookmarkNodeBookmark";
42 | }
43 | }
--------------------------------------------------------------------------------
/images/bookmark-activity-bar.svg:
--------------------------------------------------------------------------------
1 |
2 |
65 |
--------------------------------------------------------------------------------
/src/storage/workspaceState.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { workspace, window, WorkspaceFolder, l10n } from "vscode";
7 | import { Container } from "../core/container";
8 | import { appendPath, createDirectoryUri, deleteFileUri, readFileUri, uriExists, writeFileUri } from "../utils/fs";
9 | import { Controller } from "../core/controller";
10 |
11 | function canSaveBookmarksInProject(): boolean {
12 | let saveBookmarksInProject: boolean = workspace.getConfiguration("bookmarks").get("saveBookmarksInProject", false);
13 |
14 | // really use saveBookmarksInProject
15 | // 0. has at least a folder opened
16 | // 1. is a valid workspace/folder
17 | // 2. has only one workspaceFolder
18 | // let hasBookmarksFile: boolean = false;
19 | if (saveBookmarksInProject && !workspace.workspaceFolders) {
20 | saveBookmarksInProject = false;
21 | }
22 |
23 | return saveBookmarksInProject;
24 | }
25 |
26 | export async function loadBookmarks(workspaceFolder: WorkspaceFolder): Promise {
27 | const saveBookmarksInProject: boolean = canSaveBookmarksInProject();
28 |
29 | const newController = new Controller(workspaceFolder);
30 |
31 | if (saveBookmarksInProject) {
32 | const bookmarksFileInProject = appendPath(appendPath(workspaceFolder.uri, ".vscode"), "bookmarks.json");
33 | if (! await uriExists(bookmarksFileInProject)) {
34 | return newController;
35 | }
36 | try {
37 | const contents = await readFileUri(bookmarksFileInProject);
38 | newController.loadFrom(contents, true);
39 | return newController;
40 | } catch (error) {
41 | window.showErrorMessage(l10n.t("Error loading Bookmarks: ") + error.toString());
42 | return newController;
43 | }
44 | } else {
45 | const savedBookmarks = Container.context.workspaceState.get("bookmarks", "");
46 | if (savedBookmarks !== "") {
47 | newController.loadFrom(JSON.parse(savedBookmarks));
48 | }
49 | return newController;
50 | }
51 | }
52 |
53 | export function saveBookmarks(controller: Controller): void {
54 | const saveBookmarksInProject: boolean = canSaveBookmarksInProject();
55 |
56 | if (saveBookmarksInProject) {
57 | const bookmarksFileInProject = appendPath(appendPath(controller.workspaceFolder.uri, ".vscode"), "bookmarks.json");
58 |
59 | // avoid empty bookmarks.json file
60 | if (!controller.hasAnyBookmark()) {
61 | if (uriExists(bookmarksFileInProject)) {
62 | deleteFileUri(bookmarksFileInProject);
63 | }
64 | return;
65 | }
66 |
67 | if (!uriExists(appendPath(controller.workspaceFolder.uri, ".vscode"))) {
68 | createDirectoryUri(appendPath(controller.workspaceFolder.uri, ".vscode"));
69 | }
70 | writeFileUri(bookmarksFileInProject, JSON.stringify(controller.zip(), null, "\t"));
71 | } else {
72 | Container.context.workspaceState.update("bookmarks", JSON.stringify(controller.zip()));
73 | }
74 | }
--------------------------------------------------------------------------------
/src/decoration/decoration.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { createLineDecoration } from "vscode-ext-decoration";
7 | import { workspace, ThemeColor, OverviewRulerLane, TextEditor, Range, TextEditorDecorationType, Uri, DecorationRenderOptions, window } from "vscode";
8 | import { Controller } from "../core/controller";
9 | import { indexOfBookmark } from "../core/operations";
10 | import { DEFAULT_GUTTER_ICON_BORDER_COLOR, DEFAULT_GUTTER_ICON_FILL_COLOR } from "../core/constants";
11 | import { getOverviewRulerLaneConfig } from "../utils/overviewRulerLane";
12 |
13 | function createGutterRulerDecoration(
14 | overviewRulerLane?: OverviewRulerLane,
15 | overviewRulerColor?: string | ThemeColor,
16 | gutterIconPath?: string | Uri): TextEditorDecorationType {
17 |
18 | const decorationOptions: DecorationRenderOptions = {
19 | gutterIconPath,
20 | overviewRulerLane,
21 | overviewRulerColor: overviewRulerLane !== undefined ? overviewRulerColor : undefined
22 | };
23 |
24 | decorationOptions.isWholeLine = false;
25 |
26 | return window.createTextEditorDecorationType(decorationOptions);
27 | }
28 |
29 | export function createBookmarkDecorations(): TextEditorDecorationType[] {
30 | const iconFillColor = workspace.getConfiguration("bookmarks").get("gutterIconFillColor", DEFAULT_GUTTER_ICON_FILL_COLOR);
31 | const iconBorderColor = workspace.getConfiguration("bookmarks").get("gutterIconBorderColor", DEFAULT_GUTTER_ICON_BORDER_COLOR);
32 | const iconPath = Uri.parse(
33 | `data:image/svg+xml,${encodeURIComponent(
34 | ``,
35 | )}`,
36 | );
37 |
38 | const overviewRulerColor = new ThemeColor('bookmarks.overviewRuler');
39 | const lineBackground = new ThemeColor('bookmarks.lineBackground');
40 | const lineBorder = new ThemeColor('bookmarks.lineBorder');
41 |
42 | const overviewRulerLane = getOverviewRulerLaneConfig();
43 |
44 | const gutterDecoration = createGutterRulerDecoration(overviewRulerLane, overviewRulerColor, iconPath);
45 | const lineDecoration = createLineDecoration(lineBackground, lineBorder);
46 | return [gutterDecoration, lineDecoration];
47 | }
48 |
49 | export function updateDecorationsInActiveEditor(activeEditor: TextEditor, bookmarks: Controller,
50 | bookmarkDecorationType: TextEditorDecorationType[]) {
51 | if (!activeEditor) {
52 | return;
53 | }
54 |
55 | if (!bookmarks.activeFile) {
56 | return;
57 | }
58 |
59 | if (bookmarks.activeFile.bookmarks.length === 0) {
60 | const bks: Range[] = [];
61 |
62 | bookmarkDecorationType.forEach(d => activeEditor.setDecorations(d, bks));
63 | return;
64 | }
65 |
66 | const books: Range[] = [];
67 |
68 | // Remove all bookmarks if active file is empty
69 | if (activeEditor.document.lineCount === 1 && activeEditor.document.lineAt(0).text === "") {
70 | bookmarks.activeFile.bookmarks = [];
71 | } else {
72 | const invalids = [];
73 | for (const element of bookmarks.activeFile.bookmarks) {
74 |
75 | if (element.line <= activeEditor.document.lineCount) {
76 | const decoration = new Range(element.line, 0, element.line, 0);
77 | books.push(decoration);
78 | } else {
79 | invalids.push(element);
80 | }
81 | }
82 |
83 | if (invalids.length > 0) {
84 | let idxInvalid: number;
85 | for (const element of invalids) {
86 | idxInvalid = indexOfBookmark(bookmarks.activeFile, element);
87 | bookmarks.activeFile.bookmarks.splice(idxInvalid, 1);
88 | }
89 | }
90 | }
91 | bookmarkDecorationType.forEach(d => activeEditor.setDecorations(d, books));
92 | }
--------------------------------------------------------------------------------
/src/utils/fs.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import os = require("os");
7 | import path = require("path");
8 | import { Uri, workspace, WorkspaceFolder } from "vscode";
9 | import { Bookmark } from "../core/bookmark";
10 | import { UNTITLED_SCHEME } from "../core/constants";
11 | import { File } from "../core/file";
12 |
13 | export function getRelativePath(folder: string, filePath: string) {
14 | if (!folder) {
15 | return filePath;
16 | }
17 |
18 | let relativePath = path.relative(folder, filePath);
19 |
20 | // multiplatform
21 | if (os.platform() === "win32") {
22 | relativePath = relativePath.replace(/\\/g, "/");
23 | }
24 |
25 | return relativePath;
26 | }
27 |
28 | export function appendPath(uri: Uri, pathSuffix: string): Uri {
29 | const pathPrefix = uri.path.endsWith("/") ? uri.path : `${uri.path}/`;
30 | const filePath = `${pathPrefix}${pathSuffix}`;
31 |
32 | return uri.with({
33 | path: filePath
34 | });
35 | }
36 |
37 | export function uriJoin(uri: Uri, ...paths: string[]): string {
38 | return path.join(uri.fsPath, ...paths);
39 | }
40 |
41 | export function uriWith(uri: Uri, prefix: string, filePath: string): Uri {
42 | const newPrefix = prefix === "/"
43 | ? ""
44 | : prefix;
45 |
46 | return uri.with({
47 | path: `${newPrefix}/${filePath}`
48 | });
49 | }
50 |
51 | export async function uriExists(uri: Uri): Promise {
52 |
53 | if (uri.scheme === UNTITLED_SCHEME) {
54 | return true;
55 | }
56 |
57 | try {
58 | await workspace.fs.stat(uri);
59 | return true;
60 | } catch {
61 | return false;
62 | }
63 | }
64 |
65 | export async function fileExists(filePath: string): Promise {
66 | try {
67 | await workspace.fs.stat(Uri.parse(filePath));
68 | return true;
69 | } catch {
70 | return false;
71 | }
72 | }
73 |
74 | export async function createDirectoryUri(uri: Uri): Promise {
75 | return workspace.fs.createDirectory(uri);
76 | }
77 |
78 | export async function createDirectory(dir: string): Promise {
79 | return workspace.fs.createDirectory(Uri.parse(dir));
80 | }
81 |
82 | export async function readFile(filePath: string): Promise {
83 | const bytes = await workspace.fs.readFile(Uri.parse(filePath));
84 | return JSON.parse(new TextDecoder('utf-8').decode(bytes));
85 | }
86 |
87 | export async function readFileUri(uri: Uri): Promise {
88 | const bytes = await workspace.fs.readFile(uri);
89 | return JSON.parse(new TextDecoder('utf-8').decode(bytes));
90 | }
91 |
92 | export async function readRAWFileUri(uri: Uri): Promise {
93 | const bytes = await workspace.fs.readFile(uri);
94 | return new TextDecoder('utf-8').decode(bytes);
95 | }
96 |
97 | export async function writeFile(filePath: string, contents: string): Promise {
98 | const writeData = new TextEncoder().encode(contents);
99 | await workspace.fs.writeFile(Uri.parse(filePath), writeData);
100 | }
101 |
102 | export async function writeFileUri(uri: Uri, contents: string): Promise {
103 | const writeData = new TextEncoder().encode(contents);
104 | await workspace.fs.writeFile(uri, writeData);
105 | }
106 |
107 | export async function deleteFileUri(uri: Uri): Promise {
108 | await workspace.fs.delete(uri, { recursive: false, useTrash: false})
109 | }
110 |
111 | export function parsePosition(position: string): Bookmark | undefined {
112 | const re = new RegExp(/\(Ln\s(\d+),\sCol\s(\d+)\)/);
113 | const matches = re.exec(position);
114 | if (matches) {
115 | return {
116 | line: parseInt(matches[ 1 ], 10),
117 | column: parseInt(matches[ 2 ], 10)
118 | };
119 | }
120 | return undefined;
121 | }
122 |
123 | export function getFileUri(file: File, workspaceFolder: WorkspaceFolder): Uri {
124 | if (file.uri) {
125 | return file.uri;
126 | }
127 |
128 | if (!workspaceFolder) {
129 | return Uri.file(file.path);
130 | }
131 |
132 | const prefix = workspaceFolder.uri.path.endsWith("/")
133 | ? workspaceFolder.uri.path
134 | : `${workspaceFolder.uri.path}/`;
135 | return uriWith(workspaceFolder.uri, prefix, file.path);
136 | }
--------------------------------------------------------------------------------
/src/selections.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { window, Position, l10n } from "vscode";
7 | import { Directions } from "./core/constants";
8 | import { selectLines, expandSelectionToPosition, shrinkSelectionToPosition } from "vscode-ext-selection";
9 | import { Controller } from "./core/controller";
10 | import { nextBookmark } from "./core/operations";
11 |
12 | export function selectBookmarkedLines(bookmarks: Controller) {
13 | if (!window.activeTextEditor) {
14 | window.showInformationMessage(l10n.t("Open a file first to clear bookmarks"));
15 | return;
16 | }
17 |
18 | if (bookmarks.activeFile.bookmarks.length === 0) {
19 | window.showInformationMessage(l10n.t("No Bookmarks found"));
20 | return;
21 | }
22 |
23 | const lines: number[] = [];
24 | for (const bookmark of bookmarks.activeFile.bookmarks) {
25 | lines.push(bookmark.line);
26 | }
27 | selectLines(window.activeTextEditor, lines);
28 | }
29 |
30 | export function shrinkSelection(bookmarks: Controller) {
31 | if (!window.activeTextEditor) {
32 | window.showInformationMessage(l10n.t("Open a file first to shrink bookmark selection"));
33 | return;
34 | }
35 |
36 | if (window.activeTextEditor.selections.length > 1) {
37 | window.showInformationMessage(l10n.t("Command not supported with more than one selection"));
38 | return;
39 | }
40 |
41 | if (window.activeTextEditor.selection.isEmpty) {
42 | window.showInformationMessage(l10n.t("No selection found"));
43 | return;
44 | }
45 |
46 | if (bookmarks.activeFile.bookmarks.length === 0) {
47 | window.showInformationMessage(l10n.t("No Bookmarks found"));
48 | return;
49 | }
50 |
51 | // which direction?
52 | const direction: Directions = window.activeTextEditor.selection.isReversed ? Directions.Forward : Directions.Backward;
53 | const activeSelectionStartLine: number = window.activeTextEditor.selection.isReversed ? window.activeTextEditor.selection.end.line : window.activeTextEditor.selection.start.line;
54 |
55 | let currPosition: Position;
56 | if (direction === Directions.Forward) {
57 | currPosition = window.activeTextEditor.selection.start;
58 | } else {
59 | currPosition = window.activeTextEditor.selection.end;
60 | }
61 |
62 | nextBookmark(bookmarks.activeFile, currPosition, direction)
63 | .then((next) => {
64 | if (typeof next === "number") {
65 | window.setStatusBarMessage(l10n.t("No more bookmarks"), 2000);
66 | return;
67 | } else {
68 |
69 | if ((direction === Directions.Backward && next.line < activeSelectionStartLine) ||
70 | (direction === Directions.Forward && next.line > activeSelectionStartLine)) {
71 | window.setStatusBarMessage(l10n.t("No more bookmarks to shrink"), 2000);
72 | } else {
73 | shrinkSelectionToPosition(window.activeTextEditor, next, direction);
74 | }
75 | }
76 | })
77 | .catch((error) => {
78 | console.log("activeBookmark.nextBookmark REJECT" + error);
79 | });
80 | }
81 |
82 | export function expandSelectionToNextBookmark(bookmarks: Controller, direction: Directions) {
83 | if (!window.activeTextEditor) {
84 | window.showInformationMessage(l10n.t("Open a file first to clear bookmarks"));
85 | return;
86 | }
87 |
88 | if (bookmarks.activeFile.bookmarks.length === 0) {
89 | window.showInformationMessage(l10n.t("No Bookmarks found"));
90 | return;
91 | }
92 |
93 | let currPosition: Position;
94 | if (window.activeTextEditor.selection.isEmpty) {
95 | currPosition = window.activeTextEditor.selection.active;
96 | } else {
97 | if (direction === Directions.Forward) {
98 | currPosition = window.activeTextEditor.selection.end;
99 | } else {
100 | currPosition = window.activeTextEditor.selection.start;
101 | }
102 | }
103 |
104 | nextBookmark(bookmarks.activeFile, currPosition, direction)
105 | .then((next) => {
106 | if (typeof next === "number") {
107 | window.setStatusBarMessage(l10n.t("No more bookmarks"), 2000);
108 | return;
109 | } else {
110 | expandSelectionToPosition(window.activeTextEditor, next, direction);
111 | }
112 | })
113 | .catch((error) => {
114 | console.log("activeBookmark.nextBookmark REJECT" + error);
115 | });
116 | }
--------------------------------------------------------------------------------
/.github/copilot-instructions.md:
--------------------------------------------------------------------------------
1 | # Copilot Instructions for vscode-bookmarks
2 |
3 | ## Project Overview
4 |
5 | This is a Visual Studio Code extension called **Bookmarks** that helps users navigate their code by marking and jumping between important positions. The extension supports labeling bookmarks, selection commands, and provides a dedicated sidebar view.
6 |
7 | ## Technology Stack
8 |
9 | - **Language**: TypeScript
10 | - **Build Tool**: Webpack 5
11 | - **Target Environment**: VS Code Extension (Node.js runtime)
12 | - **TypeScript Config**: Target ES2020, CommonJS modules
13 | - **Linting**: ESLint with `eslint-config-vscode-ext`
14 | - **Testing**: Mocha (test infrastructure exists in devDependencies)
15 |
16 | ## Project Structure
17 |
18 | ```
19 | src/
20 | ├── extension.ts # Main extension entry point
21 | ├── commands/ # Command implementations
22 | ├── core/ # Core bookmark logic
23 | ├── decoration/ # Gutter and editor decorations
24 | ├── gutter/ # Gutter icon management
25 | ├── quickpick/ # Quick pick UI components
26 | ├── sidebar/ # Sidebar tree view provider
27 | ├── sticky/ # Sticky bookmark engine
28 | ├── storage/ # Workspace state persistence
29 | ├── utils/ # Utility functions
30 | └── whats-new/ # What's New feature
31 |
32 | dist/ # Webpack output (extension-node.js)
33 | l10n/ # Localization files
34 | walkthrough/ # Getting Started walkthrough content
35 | ```
36 |
37 | ## Build & Development Commands
38 |
39 | ```bash
40 | npm run build # Build for development
41 | npm run watch # Watch mode for development
42 | npm run webpack # Development webpack build
43 | npm run webpack-dev # Webpack watch mode
44 | npm run lint # Run ESLint
45 | npm run vscode:prepublish # Production build (runs before publishing)
46 | ```
47 |
48 | ## Coding Standards & Conventions
49 |
50 | ### File Headers
51 | All source files should include the GPL-3.0 license header:
52 | ```typescript
53 | /*---------------------------------------------------------------------------------------------
54 | * Copyright (c) Alessandro Fragnani. All rights reserved.
55 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
56 | *--------------------------------------------------------------------------------------------*/
57 | ```
58 |
59 | ### Import Organization
60 | - Import VS Code API first: `import * as vscode from "vscode"`
61 | - Group related imports together
62 | - Use named imports for specific VS Code types
63 | - Import from local modules using relative paths
64 |
65 | ### Code Style
66 | - Use double quotes for strings
67 | - Use semicolons
68 | - Use camelCase for variables and functions
69 | - Use PascalCase for classes and interfaces
70 | - Prefer `const` over `let` where possible
71 | - Enable strict mode with `"alwaysStrict": true` in TypeScript
72 |
73 | ### Extension Architecture Patterns
74 | - **Container Pattern**: The `Container` class stores global state like `Container.context`
75 | - **Controllers**: Multiple controllers manage bookmarks for different workspaces/files
76 | - **Decorations**: Bookmark decorations are managed centrally and updated when configuration changes
77 | - **Event-Driven**: Heavy use of VS Code events (`onDidChangeConfiguration`, `onDidChangeTextDocument`, etc.)
78 |
79 | ## Key Extension Features
80 |
81 | 1. **Bookmark Management**: Toggle, add labeled, delete bookmarks
82 | 2. **Navigation**: Jump to next/previous bookmarks, with wrap-around support
83 | 3. **Selection**: Select lines between bookmarks, expand/shrink selections
84 | 4. **Sidebar**: Tree view showing all bookmarks organized by file
85 | 5. **Persistence**: Save bookmarks in workspace state or project files
86 | 6. **Sticky Bookmarks**: Bookmarks follow code when lines are added/removed
87 | 7. **Multi-root Support**: Works with multi-root workspaces
88 | 8. **Internationalization**: Support for multiple languages (l10n)
89 |
90 | ## Configuration & Settings
91 |
92 | Important settings (see `package.json` contributes.configuration):
93 | - `bookmarks.saveBookmarksInProject`: Save bookmarks in project vs workspace state
94 | - `bookmarks.gutterIconFillColor`: Customize gutter icon color
95 | - `bookmarks.navigateThroughAllFiles`: Navigate across all files
96 | - `bookmarks.experimental.enableNewStickyEngine`: Use new sticky bookmark engine
97 | - `bookmarks.sideBar.expanded`: Default sidebar expansion state
98 |
99 | ## Dependencies
100 |
101 | Key dependencies:
102 | - `vscode-ext-*`: Shared VS Code extension utilities
103 | - `path-browserify`, `os-browserify`: Browser polyfills for path/os modules
104 |
105 | ## Development Guidelines
106 |
107 | 1. **Before Making Changes**:
108 | - Run `npm run lint` to check for existing issues
109 | - Build with `npm run build` to ensure compilation works
110 | - Test the extension by pressing F5 in VS Code to launch Extension Development Host
111 |
112 | 2. **When Adding Features**:
113 | - Register commands in `package.json` under `contributes.commands`
114 | - Add command handlers in `src/extension.ts` or dedicated files in `src/commands/`
115 | - Update decorations if visual changes are needed
116 | - Consider multi-root workspace scenarios
117 | - Add localization strings to `package.nls.json`
118 |
119 | 3. **When Modifying Configuration**:
120 | - Update `package.json` contributes.configuration
121 | - Handle configuration changes in the `onDidChangeConfiguration` listener
122 | - Add localization keys for new settings
123 |
124 | 4. **Testing Considerations**:
125 | - Manual testing in Extension Development Host is primary method
126 | - Test with single and multi-root workspaces
127 | - Test bookmark persistence across VS Code restarts
128 | - Verify sticky bookmarks work with code edits
129 |
130 | ## Common Tasks
131 |
132 | ### Adding a New Command
133 | 1. Add command to `package.json` contributes.commands
134 | 2. Register command handler in `src/extension.ts` using `vscode.commands.registerCommand`
135 | 3. Add localization string to `package.nls.json`
136 | 4. Update menus if command should appear in context menus or editor title
137 |
138 | ### Modifying Bookmark Behavior
139 | - Core bookmark logic is in `src/core/`
140 | - Operations like next/previous are in `src/core/operations.ts`
141 | - Sticky behavior is in `src/sticky/`
142 |
143 | ### Updating UI
144 | - Sidebar tree view: `src/sidebar/bookmarkProvider.ts`
145 | - Decorations: `src/decoration/decoration.ts`
146 | - Quick pick: `src/quickpick/`
147 |
148 | ## Important Notes
149 |
150 | - Extension activates on `onStartupFinished` event
151 | - Main entry point is `dist/extension-node.js` (built from `src/extension.ts`)
152 | - GPL-3.0 licensed - maintain license headers
153 | - Supports virtual workspaces and untrusted workspaces
154 | - Published to both VS Code Marketplace and Open VSX
155 |
--------------------------------------------------------------------------------
/package.nls.zh-cn.json:
--------------------------------------------------------------------------------
1 | {
2 | "bookmarks.activitybar.title": "书签",
3 | "bookmarks.views.Explorer.name": "书签列表",
4 | "bookmarks.views.HelpAndFeedback.name": "帮助和反馈",
5 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenEmpty": "为了使用书签功能,你需要先打开一个文件夹或工作区。\n[打开文件夹](command:_bookmarks.openFolderWelcome)\n[打开工作区](command:workbench.action.openWorkspace)\n可以通过[阅读文档](http://github.com/alefragnani/vscode-bookmarks/#bookmarks)了解关于 VS Code 中使用书签的更多信息。",
6 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenNoFileOpen": "未找到任何书签。\n若需要编辑书签,你需要先在编辑器中打开一个文件。\n[打开文件](command:workbench.action.quickOpen)\n可以通过[阅读文档](http://github.com/alefragnani/vscode-bookmarks/#bookmarks)了解关于 VS Code 中使用书签的更多信息。",
7 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenHasFileOpen": "未找到任何书签。\n若需要添加书签,你需要先将光标放在文件的任意位置,然后运行命令:\n[书签: 添加/删除书签](command:bookmarks.toggle)\n可以通过[阅读文档](http://github.com/alefragnani/vscode-bookmarks/#bookmarks)了解关于 VS Code 中使用书签的更多信息。",
8 | "bookmarks.editor.context.label": "书签",
9 | "bookmarks.editor.title.label": "书签",
10 | "bookmarks.commands.category.bookmarks": "书签",
11 | "bookmarks.commands.category.bookmarks.selection": "书签(选区操作)",
12 | "bookmarks.commands.toggle.title": "添加/删除书签",
13 | "bookmarks.commands.jumpToNext.title": "跳转至下一个书签",
14 | "bookmarks.commands.jumpToPrevious.title": "跳转至上一个书签",
15 | "bookmarks.commands.jumpTo.title": "跳转至文档/行",
16 | "bookmarks.commands.selectLines.title": "选取所有书签行",
17 | "bookmarks.commands.expandSelectionToNext.title": "扩展光标选区至下一个书签处",
18 | "bookmarks.commands.expandSelectionToPrevious.title": "扩展光标选区至上一个书签处",
19 | "bookmarks.commands.shrinkSelection.title": "收缩光标选区尾至选区中最后一个书签",
20 | "bookmarks.commands.list.title": "列出文件中所有书签",
21 | "bookmarks.commands.toggleLabeled.title": "添加含标签的书签/删除书签",
22 | "bookmarks.commands.refresh.title": "刷新",
23 | "bookmarks.commands.viewAsTree#sideBar.title": "以树形式查看",
24 | "bookmarks.commands.viewAsList#sideBar.title": "以列表形式查看",
25 | "bookmarks.commands.openSettings.title": "打开设置",
26 | "bookmarks.commands.hidePosition.title": "隐藏位置",
27 | "bookmarks.commands.showPosition.title": "显示位置",
28 | "bookmarks.commands.clear.title": "清空所有书签",
29 | "bookmarks.commands.clearFromFile.title": "清空文件中所有书签",
30 | "bookmarks.commands.deleteBookmark.title": "删除书签",
31 | "bookmarks.commands.editLabel.title": "编辑标签",
32 | "bookmarks.commands.addBookmarkAtLine#gutter.title": "添加书签",
33 | "bookmarks.commands.addLabeledBookmarkAtLine#gutter.title": "添加含标签的书签",
34 | "bookmarks.commands.removeBookmarkAtLine#gutter.title": "删除书签",
35 | "bookmarks.commands.listFromAllFiles.title": "列出所有书签",
36 | "bookmarks.commands.clearFromAllFiles.title": "全部清空",
37 | "bookmarks.commands.whatsNew.title": "更新内容",
38 | "bookmarks.commands.whatsNewContextMenu.title": "更新内容",
39 | "bookmarks.commands.openFolderWelcome.title": "打开文件夹",
40 | "bookmarks.commands.supportBookmarks.title": "支持 Bookmarks 的开发工作",
41 | "bookmarks.configuration.title": "书签",
42 | "bookmarks.configuration.saveBookmarksInProject.description": "允许书签存储在打开的文件夹或工作区中,而不是在 VS Code 内部保存。",
43 | "bookmarks.configuration.gutterIconPath.description": "自定义书签图标的图片路径。",
44 | "bookmarks.configuration.gutterIconPath.deprecation": "改用 `bookmarks.gutterIconFillColor` 与 `bookmarks.gutterIconBorderColor`",
45 | "bookmarks.configuration.gutterIconFillColor.description": "指定装订线(Gutter Ruler)中书签图标的填充颜色",
46 | "bookmarks.configuration.gutterIconBorderColor.description": "指定装订线(Gutter Ruler)中书签图标的边框颜色",
47 | "bookmarks.configuration.backgroundLineColor.description": "装饰器的背景色。使用 rgba() 并指定透明背景颜色,以与其他装饰一起使用。例如:rgba(21, 126, 251, 0.1)",
48 | "bookmarks.configuration.backgroundLineColor.deprecation": "已被 `workbench.colorCustomizations` 中的 `bookmarks.lineBackground` 设置项代替。",
49 | "bookmarks.configuration.navigateThroughAllFiles.description": "允许搜索所有工作区中的文件中的书签,而不仅仅局限于当前文件。",
50 | "bookmarks.configuration.wrapNavigation.description": "允许在第一个和最后一个书签之间(当前文件或所有文件)循环跳转。",
51 | "bookmarks.configuration.useWorkaroundForFormatters.description": "启用对 Prettier 等格式化工具的适配方案。若不启用该设置,使用此类格式化工具时,本扩展将无法收到文件变更事件,彼时书签的位置会被打乱。",
52 | "bookmarks.configuration.experimental.enableNewStickyEngine.description": "实验性配置项。启用新的粘性引擎,提供对格式化程序的支持、更好的撤销操作实现与源文件更改检测。",
53 | "bookmarks.configuration.keepBookmarksOnLineDelete.description": "是否将被删去行上的书签移至其下一行,而不是将其上的书签一起删除。",
54 | "bookmarks.configuration.showNoMoreBookmarksWarning.description": "在书签间导航时,当书签不存在,是否显示警告提示。",
55 | "bookmarks.configuration.showCommandsInContextMenu.description": "是否在上下文菜单中显示书签命令(添加/删除书签、跳转至上一个/下一个书签)。",
56 | "bookmarks.configuration.sidebar.expanded.description": "是否在书签侧边栏中以展开形式列出书签。",
57 | "bookmarks.configuration.sideBar.countBadge.description": "控制活动栏书签图标上圆点提示的计数行为",
58 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.all": "显示所有文件的书签总数",
59 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.files": "显示至少包含一个书签的文件的总数",
60 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.off": "禁用计数与圆点提示",
61 | "bookmarks.configuration.sidebar.hideWelcome.description": "控制侧边栏中欢迎视图的可见性",
62 | "bookmarks.configuration.multicursor.toggleMode.description": "指定当使用多光标的同时新建书签,此时对已有书签行的处理方式。",
63 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.allLinesAtOnce": "为所有没有被书签标记的行创建书签。",
64 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.eachLineIndependently": "如果选中行存在书签,则删除该书签;如果选中行不存在书签,则为该行添加书签。",
65 | "bookmarks.configuration.label.suggestion.description": "指定新建具有标签的书签时,对标签的生成方式。",
66 | "bookmarks.configuration.label.suggestion.enumDescriptions.dontUse": "禁用标签生成",
67 | "bookmarks.configuration.label.suggestion.enumDescriptions.useWhenSelected": "使用已选中的文本(不需要额外确认)。",
68 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelected": "使用已选中的文本(需要额外确认)。",
69 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelectedOrLineWhenNoSelected": "使用已选中的文本,或是当未选中任何文本时使用整行内容(需要额外确认)。",
70 | "bookmarks.configuration.revealLocation.description": "指定当跳转到书签时,书签所在行在编辑器中出现的位置",
71 | "bookmarks.configuration.revealLocation.enumDescriptions.top": "编辑器顶部",
72 | "bookmarks.configuration.revealLocation.enumDescriptions.center": "编辑器中心",
73 | "bookmarks.colors.lineBackground.description": "书签所在行的背景色",
74 | "bookmarks.colors.lineBorder.description": "书签所在行的外边框颜色",
75 | "bookmarks.colors.overviewRuler.description": "编辑器的概览标尺(Overview Ruler)中,书签标记的颜色",
76 | "bookmarks.walkthroughs.title": "开始使用 Bookmarks",
77 | "bookmarks.walkthroughs.description": "了解有关 Bookmarks 扩展的更多信息以优化您的工作流程",
78 | "bookmarks.walkthroughs.toggle.title": "添加 / 删除书签",
79 | "bookmarks.walkthroughs.toggle.description": "为任何位置添加或删除书签。\n装订线(Gutter Ruler)和概览标尺(Overview Ruler)中均添加了显眼的标示,以便轻松识别带有书签标记的行。",
80 | "bookmarks.walkthroughs.navigateToBookmarks.title": "跳转至书签",
81 | "bookmarks.walkthroughs.navigateToBookmarks.description": "在书签标记间轻松跳转,如臂使指。\n可通过书签行的具体内容,或是使用标签来搜索书签",
82 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.title": "为你的书签添加标签",
83 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.description": "你可以给任何书签添加标签,让它们不仅能够标注位置,还能承载更多信息。",
84 | "bookmarks.walkthroughs.exclusiveSideBar.title": "专属侧边栏",
85 | "bookmarks.walkthroughs.exclusiveSideBar.description": "活用侧边栏能够十足有效的提高你的工作效率。\n[打开书签侧边栏](command:_bookmarks.openSideBar)",
86 | "bookmarks.walkthroughs.workingWithRemotes.title": "兼容 VS Code 远程开发",
87 | "bookmarks.walkthroughs.workingWithRemotes.description": "本扩展完全兼容 [远程开发](https://code.visualstudio.com/docs/remote/remote-overview)。只需要在本地编辑器中安装,便能够在 WSL、Containers、SSH 或是 Codespaces 中正常使用书签功能。",
88 | "bookmarks.walkthroughs.customizingAppearance.title": "自定义外观",
89 | "bookmarks.walkthroughs.customizingAppearance.description": "你可以自定义书签在编辑器中的呈现方式,例如书签标记使用的图标,或是概览标尺(Overview Ruler)中书签标记的颜色。\n[Open Settings - Gutter Icon](command:workbench.action.openSettings?%5B%22bookmarks.gutterIcon%22%5D)\n[Open Settings - Line](command:workbench.action.openSettingsJson?%5B%22workbench.colorCustomizations%22%5D)"
90 | }
--------------------------------------------------------------------------------
/src/core/operations.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { Position, Uri, workspace, WorkspaceFolder } from "vscode";
7 | import { codicons } from "vscode-ext-codicons";
8 | import { Bookmark, BookmarkQuickPickItem } from "./bookmark";
9 | import { Directions, NO_BOOKMARKS, NO_BOOKMARKS_AFTER, NO_BOOKMARKS_BEFORE, NO_MORE_BOOKMARKS } from "./constants";
10 | import { File } from "./file";
11 | import { uriExists, uriWith } from "../utils/fs";
12 |
13 | export function nextBookmark(file: File, currentPosition: Position, direction: Directions): Promise {
14 | return new Promise((resolve, reject) => {
15 |
16 | if (typeof file.bookmarks === "undefined") {
17 | reject('typeof file.bookmarks == "undefined"');
18 | return;
19 | }
20 |
21 | const navigateThroughAllFiles: boolean = workspace.getConfiguration("bookmarks").get("navigateThroughAllFiles", true);
22 |
23 | if (file.bookmarks.length === 0) {
24 | if (navigateThroughAllFiles) {
25 | resolve(NO_BOOKMARKS);
26 | return;
27 | } else {
28 | resolve(currentPosition);
29 | return;
30 | }
31 | }
32 |
33 | const wrapNavigation: boolean = workspace.getConfiguration("bookmarks").get("wrapNavigation", true);
34 |
35 | let nextBookmark: Position;
36 |
37 | if (direction === Directions.Forward) {
38 | for (const element of file.bookmarks) {
39 | if (element.line > currentPosition.line) {
40 | nextBookmark = new Position(element.line, element.column); // .line
41 | break;
42 | }
43 | }
44 |
45 | if (typeof nextBookmark === "undefined") {
46 | if (navigateThroughAllFiles) {
47 | resolve(NO_MORE_BOOKMARKS);
48 | return;
49 | } else if (!wrapNavigation) {
50 | resolve(NO_BOOKMARKS_AFTER);
51 | return;
52 | } else {
53 | resolve(new Position(file.bookmarks[ 0 ].line, file.bookmarks[ 0 ].column));
54 | return;
55 | }
56 | } else {
57 | resolve(nextBookmark);
58 | return;
59 | }
60 | } else { // JUMP_BACKWARD
61 | for (let index = file.bookmarks.length - 1; index >= 0; index--) {
62 | const element = file.bookmarks[ index ];
63 | if (element.line < currentPosition.line) {
64 | nextBookmark = new Position(element.line, element.column); // .line
65 | break;
66 | }
67 | }
68 | if (typeof nextBookmark === "undefined") {
69 | if (navigateThroughAllFiles) {
70 | resolve(NO_MORE_BOOKMARKS);
71 | return;
72 | } else if (!wrapNavigation) {
73 | resolve(NO_BOOKMARKS_BEFORE);
74 | return;
75 | } else {
76 | resolve(new Position(file.bookmarks[ file.bookmarks.length - 1 ].line, file.bookmarks[ file.bookmarks.length - 1 ].column));
77 | return;
78 | }
79 | } else {
80 | resolve(nextBookmark);
81 | return;
82 | }
83 | }
84 | });
85 | }
86 |
87 | export function listBookmarks(file: File, workspaceFolder: WorkspaceFolder) {
88 |
89 | // eslint-disable-next-line no-async-promise-executor
90 | return new Promise(async (resolve, reject) => {
91 |
92 | // no bookmark, returns empty
93 | if (file.bookmarks.length === 0) {
94 | resolve(undefined);
95 | return;
96 | }
97 |
98 | let uriDocBookmark: Uri;
99 | if (file.uri) {
100 | uriDocBookmark = file.uri;
101 | } else {
102 | if (!workspaceFolder) {
103 | uriDocBookmark = Uri.file(file.path);
104 | } else {
105 | const prefix = workspaceFolder.uri.path.endsWith("/")
106 | ? workspaceFolder.uri.path
107 | : `${workspaceFolder.uri.path}/`;
108 | uriDocBookmark = uriWith(workspaceFolder.uri, prefix, file.path);
109 | }
110 | }
111 |
112 | // file does not exist, returns empty
113 | if (! await uriExists(uriDocBookmark)) {
114 | resolve(undefined);
115 | return;
116 | }
117 |
118 | // const uriDocBookmark: Uri = Uri.file(file.path);
119 | workspace.openTextDocument(uriDocBookmark).then(doc => {
120 |
121 | const items: BookmarkQuickPickItem[] = [];
122 | const invalids = [];
123 | // tslint:disable-next-line:prefer-for-of
124 | for (let index = 0; index < file.bookmarks.length; index++) {
125 |
126 | const bookmarkLine = file.bookmarks[ index ].line + 1;
127 | const bookmarkColumn = file.bookmarks[ index ].column + 1;
128 |
129 | // check for 'invalidated' bookmarks, when its outside the document length
130 | if (bookmarkLine <= doc.lineCount) {
131 | const lineText = doc.lineAt(bookmarkLine - 1).text.trim();
132 | // const normalizedPath = doc.uri.fsPath;
133 |
134 | if (file.bookmarks[index].label === "") {
135 | items.push({ description: "(Ln " + bookmarkLine.toString() + ", Col " +
136 | bookmarkColumn.toString() + ")",
137 | label: lineText,
138 | detail: file.path,
139 | uri: uriDocBookmark });
140 | } else {
141 | items.push({ description: "(Ln " + bookmarkLine.toString() + ", Col " +
142 | bookmarkColumn.toString() + ")",
143 | label: codicons.tag + " " + file.bookmarks[index].label,
144 | detail: file.path,
145 | uri: uriDocBookmark });
146 | }
147 | } else {
148 | invalids.push(bookmarkLine);
149 | }
150 | }
151 | if (invalids.length > 0) {
152 | let idxInvalid: number;
153 | // tslint:disable-next-line:prefer-for-of
154 | for (let indexI = 0; indexI < invalids.length; indexI++) {
155 | idxInvalid = file.bookmarks.indexOf( {line: invalids[ indexI ] - 1});
156 | file.bookmarks.splice(idxInvalid, 1);
157 | }
158 | }
159 |
160 | resolve(items);
161 | return;
162 | });
163 | });
164 | }
165 |
166 | export function clear(file: File): void {
167 | file.bookmarks.length = 0;
168 | }
169 |
170 | export function indexOfBookmark(file: File, line: number): number {
171 | for (let index = 0; index < file.bookmarks.length; index++) {
172 | const element = file.bookmarks[index];
173 | if (element.line === line) {
174 | return index;
175 | }
176 | }
177 |
178 | return -1;
179 | }
180 |
181 | export async function getLinePreview(uri: Uri, line: number): Promise {
182 | // const uriDocBookmark: Uri = Uri.file(file.path);
183 | const doc = await workspace.openTextDocument(uri);
184 | return doc.lineAt(line).text.trim();
185 | }
186 |
187 | export function sortBookmarks(file: File): void {
188 | file.bookmarks.sort((n1, n2) => {
189 | if (n1.line > n2.line) {
190 | return 1;
191 | }
192 | if (n1.line < n2.line) {
193 | return -1;
194 | }
195 | return 0;
196 | });
197 | }
--------------------------------------------------------------------------------
/package.nls.ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "bookmarks.activitybar.title": "Закладки",
3 | "bookmarks.views.Explorer.name": "Проводник",
4 | "bookmarks.views.HelpAndFeedback.name": "Справка и обратная связь",
5 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenEmpty": "Чтобы использовать закладки, сначала нужно открыть папку или рабочее пространство.\n[Открыть папку]](command:_bookmarks.openFolderWelcome)\n[Открыть рабочее пространство](command:workbench.action.openWorkspace)\nЧтобы узнать больше о том, как использовать закладки в VS Code [читайте документацию](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
6 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenNoFileOpen": "Закладок пока нет.\nЧтобы использовать закладки, нужно открыть файл в редакторе.\n[Открыть файл](command:workbench.action.quickOpen)\nЧтобы узнать больше о том, как использовать закладки в VS Code [читайте документацию](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
7 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenHasFileOpen": "Закладок пока нет.\nЧтобы использовать закладки, установите курсор в любое место файла и выполните команду:\n[Bookmarks: Toggle](command:bookmarks.toggle)\nЧтобы узнать больше о том, как использовать закладки в VS Code [читайте документацию](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
8 | "bookmarks.editor.context.label": "Закладки",
9 | "bookmarks.editor.title.label": "Закладки",
10 | "bookmarks.commands.category.bookmarks": "Закладки",
11 | "bookmarks.commands.category.bookmarks.selection": "Закладки (Выделение)",
12 | "bookmarks.commands.toggle.title": "добавить/убрать",
13 | "bookmarks.commands.jumpToNext.title": "Перейти к следующей",
14 | "bookmarks.commands.jumpToPrevious.title": "Перейти к предыдущей",
15 | "bookmarks.commands.jumpTo.title": "Перейти к документу/строке",
16 | "bookmarks.commands.selectLines.title": "Выделить линию",
17 | "bookmarks.commands.expandSelectionToNext.title": "Сделать выделение до следующего",
18 | "bookmarks.commands.expandSelectionToPrevious.title": "Сделать выделение до предыдущего",
19 | "bookmarks.commands.shrinkSelection.title": "Уменьшить выделение",
20 | "bookmarks.commands.list.title": "Список",
21 | "bookmarks.commands.toggleLabeled.title": "Переключить маркер",
22 | "bookmarks.commands.refresh.title": "Обновить",
23 | "bookmarks.commands.viewAsTree#sideBar.title": "Просмотреть как дерево",
24 | "bookmarks.commands.viewAsList#sideBar.title": "Просмотреть как список",
25 | "bookmarks.commands.openSettings.title": "Открыть настройки",
26 | "bookmarks.commands.hidePosition.title": "Скрыть позицию",
27 | "bookmarks.commands.showPosition.title": "Показать позицию",
28 | "bookmarks.commands.clear.title": "Очистить",
29 | "bookmarks.commands.clearFromFile.title": "Очистить",
30 | "bookmarks.commands.deleteBookmark.title": "Удалить",
31 | "bookmarks.commands.editLabel.title": "Изменить маркер",
32 | "bookmarks.commands.addBookmarkAtLine#gutter.title": "Добавить закладку",
33 | "bookmarks.commands.addLabeledBookmarkAtLine#gutter.title": "Добавить закладку с меткой",
34 | "bookmarks.commands.removeBookmarkAtLine#gutter.title": "Удалить закладку",
35 | "bookmarks.commands.listFromAllFiles.title": "Список из всех файлов",
36 | "bookmarks.commands.clearFromAllFiles.title": "Очистить из всех файлов",
37 | "bookmarks.commands.whatsNew.title": "Что нового",
38 | "bookmarks.commands.whatsNewContextMenu.title": "Что нового",
39 | "bookmarks.commands.openFolderWelcome.title": "Открыть папку",
40 | "bookmarks.commands.supportBookmarks.title": "Поддержать проект Bookmarks",
41 | "bookmarks.configuration.title": "Закладки",
42 | "bookmarks.configuration.saveBookmarksInProject.description": "Разрешить локальное сохранение (и восстановление) закладок в открытом Проекте/Папке вместо VSCoda",
43 | "bookmarks.configuration.gutterIconPath.description": "Путь к другому изображению, которое будет представлено в виде маркера закладки",
44 | "bookmarks.configuration.gutterIconPath.deprecation": "Вместо этого используйте `bookmarks.gutterIconFillColor` и `bookmarks.gutterIconBorderColor`",
45 | "bookmarks.configuration.gutterIconFillColor.description": "Определяет цвет заливки значка закладки",
46 | "bookmarks.configuration.gutterIconBorderColor.description": "Определяет цвет границы значка закладки",
47 | "bookmarks.configuration.backgroundLineColor.description": "Цвет фона (background) строки на которую установлена закладка. Используйте rgba(), чтобы задать прозрачные цвета фона для хорошего сочетания с другим оформлением. Пример: rgba(21, 126, 251, 0,1)",
48 | "bookmarks.configuration.backgroundLineColor.deprecation": "Вместо этого используйте `bookmarks.lineBackground` в `workbench.colorCustomizations`",
49 | "bookmarks.configuration.navigateThroughAllFiles.description": "Разрешить навигатору искать закладки во всех файлах проекта, а не только в текущем",
50 | "bookmarks.configuration.wrapNavigation.description": "Разрешить навигацию по первой и последней закладкам в области (текущий файл или все файлы)",
51 | "bookmarks.configuration.useWorkaroundForFormatters.description": "Использовать обходной путь для форматировщиков таких как Prettier, который не уведомляет об изменениях документа и путает поведение прикреплённой закладки",
52 | "bookmarks.configuration.experimental.enableNewStickyEngine.description": "Экспериментальный. Включает новый механизм Sticky с поддержкой форматеров, улучшенным обнаружением изменений источника и операциями отмены",
53 | "bookmarks.configuration.keepBookmarksOnLineDelete.description": "Указывает, должны ли закладки на удаленной строке сохраняться в файле, перемещая его вниз на следующую строку, вместо того, чтобы удалять его вместе со строкой, в которой он был переключен.",
54 | "bookmarks.configuration.showNoMoreBookmarksWarning.description": "Указывает, будет ли отображаться уведомление при попытке перехода между закладками, когда их больше нет.",
55 | "bookmarks.configuration.showCommandsInContextMenu.description": "Определяет, отображаются ли команды закладок в контекстном меню",
56 | "bookmarks.configuration.sidebar.expanded.description": "Определяет, будет ли отображаться развернутая боковая панель.",
57 | "bookmarks.configuration.sideBar.countBadge.description": "Управляет значком счетчика на значке закладки на панели действий.",
58 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.all": "Показать сумму закладок из всех файлов",
59 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.files": "Показать количество файлов, содержащих хотя бы одну закладку",
60 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.off": "Отключить значок счетчика закладок",
61 | "bookmarks.configuration.sidebar.hideWelcome.description": "Управляет видимостью приветственных окон на боковой панели.",
62 | "bookmarks.configuration.multicursor.toggleMode.description": "Определяет, как несколько курсоров обрабатывают уже отмеченные закладки строки",
63 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.allLinesAtOnce": "Создает закладки сразу во всех выбранных строках, если хотя бы в одной из строк нет закладки",
64 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.eachLineIndependently": "Буквально переключает закладку в каждой строке вместо того, чтобы сделать все строки равными",
65 | "bookmarks.configuration.label.suggestion.description": "Указывает, как будут предлагаться ярлыки при создании закладок.",
66 | "bookmarks.configuration.label.suggestion.enumDescriptions.dontUse": "Не использовать выделение (исходное поведение)",
67 | "bookmarks.configuration.label.suggestion.enumDescriptions.useWhenSelected": "Использовать выделенный текст (если есть) напрямую, подтверждение не требуется",
68 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelected": "Предлагает выделенный текст (если есть). Вам все еще нужно подтвердить.",
69 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelectedOrLineWhenNoSelected": "Предлагает выделенный текст (если есть) или всю строку (если нет выделения). Вам все еще нужно подтвердить.",
70 | "bookmarks.configuration.revealLocation.description": "Указывает место, где будет отображаться строка с закладкой.",
71 | "bookmarks.configuration.revealLocation.enumDescriptions.top": "Показывает строку с закладкой в верхней части редактора.",
72 | "bookmarks.configuration.revealLocation.enumDescriptions.center": "Показывает строку с закладкой в центре редактора.",
73 | "bookmarks.colors.lineBackground.description": "Цвет фона для отмеченной строки",
74 | "bookmarks.colors.lineBorder.description": "Цвет фона для границы вокруг линии с закладкой",
75 | "bookmarks.colors.overviewRuler.description": "Обзор цвета маркера линейки для закладок"
76 | }
--------------------------------------------------------------------------------
/package.nls.hi.json:
--------------------------------------------------------------------------------
1 | {
2 | "bookmarks.activitybar.title": "बुकमार्क्स",
3 | "bookmarks.views.Explorer.name": "एक्सप्लोरर",
4 | "bookmarks.views.HelpAndFeedback.name": "मदद और सुझाव",
5 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenEmpty": "बुकमार्क्स का उपयोग करने के लिए, पहले एक फ़ोल्डर या वर्कस्पेस खोलें।\n[फ़ोल्डर खोलें](command:_bookmarks.openFolderWelcome)\n[वर्कस्पेस खोलें](command:workbench.action.openWorkspace)\nVS कोड में बुकमार्क्स के उपयोग के बारे में अधिक जानने के लिए [दस्तावेज़ पढ़ें](http://github.com/alefragnani/vscode-bookmarks/#bookmarks)।",
6 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenNoFileOpen": "अभी तक कोई बुकमार्क नहीं है।\nबुकमार्क्स का उपयोग करने के लिए, संपादक में एक फ़ाइल खोलें।\n[फ़ाइल खोलें](command:workbench.action.quickOpen)\nVS कोड में बुकमार्क्स के उपयोग के बारे में अधिक जानने के लिए [दस्तावेज़ पढ़ें](http://github.com/alefragnani/vscode-bookmarks/#bookmarks)।",
7 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenHasFileOpen": "अभी तक कोई बुकमार्क नहीं है।\nबुकमार्क्स का उपयोग करने के लिए, फ़ाइल में किसी स्थान पर कर्सर रखें और कमांड चलाएँ:\n[बुकमार्क्स: टॉगल करें](command:bookmarks.toggle)\nVS कोड में बुकमार्क्स के उपयोग के बारे में अधिक जानने के लिए [दस्तावेज़ पढ़ें](http://github.com/alefragnani/vscode-bookmarks/#bookmarks)।",
8 | "bookmarks.editor.context.label": "बुकमार्क्स",
9 | "bookmarks.editor.title.label": "बुकमार्क्स",
10 | "bookmarks.commands.category.bookmarks": "बुकमार्क्स",
11 | "bookmarks.commands.category.bookmarks.selection": "बुकमार्क्स (चयन)",
12 | "bookmarks.commands.toggle.title": "टॉगल करें",
13 | "bookmarks.commands.jumpToNext.title": "अगले पर जाएँ",
14 | "bookmarks.commands.jumpToPrevious.title": "पिछले पर जाएँ",
15 | "bookmarks.commands.jumpTo.title": "दस्तावेज़/पंक्ति पर जाएँ",
16 | "bookmarks.commands.selectLines.title": "पंक्तियाँ चुनें",
17 | "bookmarks.commands.expandSelectionToNext.title": "चयन को अगली तक विस्तृत करें",
18 | "bookmarks.commands.expandSelectionToPrevious.title": "चयन को पिछली तक विस्तृत करें",
19 | "bookmarks.commands.shrinkSelection.title": "चयन संक्षिप्त करें",
20 | "bookmarks.commands.list.title": "सूची",
21 | "bookmarks.commands.toggleLabeled.title": "लेबल टॉगल करें",
22 | "bookmarks.commands.refresh.title": "रीफ़्रेश करें",
23 | "bookmarks.commands.viewAsTree#sideBar.title": "ट्री रूप में देखें",
24 | "bookmarks.commands.viewAsList#sideBar.title": "सूची रूप में देखें",
25 | "bookmarks.commands.openSettings.title": "सेटिंग्स खोलें",
26 | "bookmarks.commands.hidePosition.title": "स्थिति छुपाएँ",
27 | "bookmarks.commands.showPosition.title": "स्थिति दिखाएँ",
28 | "bookmarks.commands.clear.title": "साफ़ करें",
29 | "bookmarks.commands.clearFromFile.title": "फ़ाइल से साफ़ करें",
30 | "bookmarks.commands.deleteBookmark.title": "बुकमार्क हटाएँ",
31 | "bookmarks.commands.editLabel.title": "लेबल संपादित करें",
32 | "bookmarks.commands.addBookmarkAtLine#gutter.title": "बुकमार्क जोड़ें",
33 | "bookmarks.commands.addLabeledBookmarkAtLine#gutter.title": "लेबल वाला बुकमार्क जोड़ें",
34 | "bookmarks.commands.removeBookmarkAtLine#gutter.title": "बुकमार्क हटाएँ",
35 | "bookmarks.commands.listFromAllFiles.title": "सभी फ़ाइलों से सूची",
36 | "bookmarks.commands.clearFromAllFiles.title": "सभी फ़ाइलों से साफ़ करें",
37 | "bookmarks.commands.whatsNew.title": "नया क्या है",
38 | "bookmarks.commands.whatsNewContextMenu.title": "नया क्या है",
39 | "bookmarks.commands.openFolderWelcome.title": "फ़ोल्डर खोलें",
40 | "bookmarks.commands.supportBookmarks.title": "बुकमार्क्स का समर्थन करें",
41 | "bookmarks.commands.openSideBar.title": "साइड बार खोलें",
42 | "bookmarks.configuration.title": "बुकमार्क्स",
43 | "bookmarks.configuration.saveBookmarksInProject.description": "बुकमार्क्स को प्रोजेक्ट/फ़ोल्डर में स्थानीय रूप से सहेजने (और पुनर्स्थापित) की अनुमति दें",
44 | "bookmarks.configuration.gutterIconPath.description": "बुकमार्क के रूप में प्रदर्शित होने वाली छवि का पथ",
45 | "bookmarks.configuration.gutterIconPath.deprecation": "`bookmarks.gutterIconFillColor` और `bookmarks.gutterIconBorderColor` का उपयोग करें",
46 | "bookmarks.configuration.gutterIconFillColor.description": "बुकमार्क आइकन का भराव रंग निर्दिष्ट करें",
47 | "bookmarks.configuration.gutterIconBorderColor.description": "बुकमार्क आइकन की सीमा का रंग निर्दिष्ट करें",
48 | "bookmarks.configuration.backgroundLineColor.description": "डेकोरेशन की पृष्ठभूमि का रंग",
49 | "bookmarks.configuration.backgroundLineColor.deprecation": "`workbench.colorCustomizations` में `bookmarks.lineBackground` का उपयोग करें",
50 | "bookmarks.configuration.navigateThroughAllFiles.description": "बुकमार्क्स को केवल वर्तमान फ़ाइल के बजाय सभी फ़ाइलों में नेविगेट करने की अनुमति दें",
51 | "bookmarks.configuration.wrapNavigation.description": "नेविगेशन को पहले और अंतिम बुकमार्क्स पर रैप करने की अनुमति दें",
52 | "bookmarks.configuration.useWorkaroundForFormatters.description": "ऐसे फॉर्मेटर्स के लिए वर्कअराउंड का उपयोग करें जो दस्तावेज़ परिवर्तन पर सूचित नहीं करते",
53 | "bookmarks.configuration.experimental.enableNewStickyEngine.description": "प्रयोगात्मक। नया स्टिकी इंजन सक्षम करें",
54 | "bookmarks.configuration.keepBookmarksOnLineDelete.description": "हटाई गई पंक्ति पर बुकमार्क को अगली पंक्ति में ले जाने की अनुमति दें",
55 | "bookmarks.configuration.showNoMoreBookmarksWarning.description": "बुकमार्क्स समाप्त होने पर चेतावनी दिखाएँ या नहीं",
56 | "bookmarks.configuration.showCommandsInContextMenu.description": "संदर्भ मेनू में बुकमार्क्स कमांड्स दिखाएँ",
57 | "bookmarks.configuration.sidebar.expanded.description": "साइड बार को विस्तारित रूप में दिखाएँ",
58 | "bookmarks.configuration.sideBar.countBadge.description": "सक्रियिटी बार आइकन पर काउंट बैज को नियंत्रित करता है",
59 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.all": "सभी फ़ाइलों से बुकमार्क्स की कुल संख्या दिखाएँ",
60 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.files": "बुकमार्क्स वाली फ़ाइलों की संख्या दिखाएँ",
61 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.off": "काउंट बैज को अक्षम करें",
62 | "bookmarks.configuration.sidebar.hideWelcome.description": "साइड बार में स्वागत दृश्यों की दृश्यता को नियंत्रित करता है",
63 | "bookmarks.configuration.multicursor.toggleMode.description": "मल्टी कर्सर बुकमार्क टॉगल को कैसे संभाले, यह निर्दिष्ट करें",
64 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.allLinesAtOnce": "यदि किसी भी चयनित पंक्ति में बुकमार्क नहीं है, तो सभी में जोड़ें",
65 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.eachLineIndependently": "प्रत्येक पंक्ति पर अलग-अलग टॉगल करें",
66 | "bookmarks.configuration.label.suggestion.description": "बुकमार्क बनाते समय लेबल सुझाव कैसे काम करे",
67 | "bookmarks.configuration.label.suggestion.enumDescriptions.dontUse": "चयन का उपयोग न करें (मूल व्यवहार)",
68 | "bookmarks.configuration.label.suggestion.enumDescriptions.useWhenSelected": "चयनित पाठ का सीधे उपयोग करें",
69 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelected": "चयनित पाठ का सुझाव दें, पुष्टि आवश्यक है",
70 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelectedOrLineWhenNoSelected": "चयनित पाठ या संपूर्ण पंक्ति का सुझाव दें",
71 | "bookmarks.configuration.revealLocation.description": "बुकमार्क्ड पंक्ति कहाँ दिखाई जाएगी",
72 | "bookmarks.configuration.revealLocation.enumDescriptions.top": "संपादक के शीर्ष पर प्रकट करें",
73 | "bookmarks.configuration.revealLocation.enumDescriptions.center": "संपादक के केंद्र में प्रकट करें",
74 | "bookmarks.configuration.overviewRulerLane.description": "बुकमार्क्ड पंक्ति के लिए ओवरव्यू रूलर में लेन निर्दिष्ट करें",
75 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.none": "ओवरव्यू रूलर में न दिखाएँ",
76 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.left": "बाईं लेन में दिखाएँ",
77 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.center": "केंद्र लेन में दिखाएँ",
78 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.right": "दाईं लेन में दिखाएँ",
79 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.full": "पूरी ऊंचाई पर दिखाएँ",
80 | "bookmarks.colors.lineBackground.description": "बुकमार्क की गई पंक्ति की पृष्ठभूमि का रंग",
81 | "bookmarks.colors.lineBorder.description": "बुकमार्क लाइन के चारों ओर बॉर्डर रंग",
82 | "bookmarks.colors.overviewRuler.description": "बुकमार्क्स के लिए ओवरव्यू रूलर मार्कर का रंग",
83 | "bookmarks.walkthroughs.title": "बुकमार्क्स के साथ शुरुआत करें",
84 | "bookmarks.walkthroughs.description": "अपने कार्यप्रवाह को बेहतर बनाने के लिए बुकमार्क्स के बारे में जानें",
85 | "bookmarks.walkthroughs.toggle.title": "बुकमार्क्स टॉगल करें",
86 | "bookmarks.walkthroughs.toggle.description": "किसी भी स्थान पर आसानी से बुकमार्क जोड़ें/हटाएँ।\nगटर और ओवरव्यू रूलर में एक आइकन जोड़ा जाता है।",
87 | "bookmarks.walkthroughs.navigateToBookmarks.title": "बुकमार्क्स पर जाएँ",
88 | "bookmarks.walkthroughs.navigateToBookmarks.description": "बुकमार्क की गई पंक्तियों के बीच जल्दी से जाएँ।\nलाइन की सामग्री और लेबल का उपयोग करके खोजें।",
89 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.title": "अपने बुकमार्क्स के लिए लेबल निर्धारित करें",
90 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.description": "आप किसी भी बुकमार्क के लिए विशेष अर्थ देने के लिए लेबल निर्धारित कर सकते हैं।",
91 | "bookmarks.walkthroughs.exclusiveSideBar.title": "विशेष साइड बार",
92 | "bookmarks.walkthroughs.exclusiveSideBar.description": "एक विशेष साइड बार जो आपकी उत्पादकता बढ़ाता है।\n[साइड बार खोलें](command:_bookmarks.openSideBar)",
93 | "bookmarks.walkthroughs.workingWithRemotes.title": "रिमोट्स के साथ कार्य करना",
94 | "bookmarks.walkthroughs.workingWithRemotes.description": "यह एक्सटेंशन रिमोट डेवलपमेंट के साथ काम करता है जैसे WSL, कंटेनर, SSH और कोडस्पेस।",
95 | "bookmarks.walkthroughs.customizingAppearance.title": "रूप-रंग अनुकूलित करें",
96 | "bookmarks.walkthroughs.customizingAppearance.description": "बुकमार्क्स के आइकन, लाइन और ओवरव्यू रूलर को अनुकूलित करें।\n[सेटिंग्स खोलें - गटर आइकन](command:workbench.action.openSettings?%5B%22bookmarks.gutterIcon%22%5D)\n[सेटिंग्स खोलें - लाइन](command:workbench.action.openSettingsJson?%5B%22workbench.colorCustomizations%22%5D)"
97 | }
--------------------------------------------------------------------------------
/package.nls.pl.json:
--------------------------------------------------------------------------------
1 | {
2 | "bookmarks.activitybar.title": "Zakładki",
3 | "bookmarks.views.Explorer.name": "Eksplorator",
4 | "bookmarks.views.HelpAndFeedback.name": "Pomoc i opinie",
5 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenEmpty": "Aby używać Zakładek, musisz najpierw otworzyć folder lub przestrzeń roboczą.\n[Otwórz folder](command:_bookmarks.openFolderWelcome)\n[Otwórz przestrzeń roboczą](command:workbench.action.openWorkspace)\nAby dowiedzieć się więcej o używaniu Zakładek w VS Code [przeczytaj dokumentację](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
6 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenNoFileOpen": "Jeszcze nie ma zakładek.\nAby używać Zakładek, musisz otworzyć plik w edytorze.\n[Otwórz plik](command:workbench.action.quickOpen)\nAby dowiedzieć się więcej o używaniu Zakładek w VS Code [przeczytaj dokumentację](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
7 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenHasFileOpen": "Jeszcze nie ma zakładek.\nAby używać Zakładek, umieść kursor w dowolnym miejscu w pliku i uruchom polecenie:\n[Zakładki: Przełącz](command:bookmarks.toggle)\nAby dowiedzieć się więcej o używaniu Zakładek w VS Code [przeczytaj dokumentację](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
8 | "bookmarks.editor.context.label": "Zakładki",
9 | "bookmarks.editor.title.label": "Zakładki",
10 | "bookmarks.commands.category.bookmarks": "Zakładki",
11 | "bookmarks.commands.category.bookmarks.selection": "Zakładki (Wybór)",
12 | "bookmarks.commands.toggle.title": "Przełącz",
13 | "bookmarks.commands.jumpToNext.title": "Skocz do następnego",
14 | "bookmarks.commands.jumpToPrevious.title": "Skocz do poprzedniego",
15 | "bookmarks.commands.jumpTo.title": "Skocz do dokumentu/linii",
16 | "bookmarks.commands.selectLines.title": "Wybierz linie",
17 | "bookmarks.commands.expandSelectionToNext.title": "Rozszerz zaznaczenie do następnego",
18 | "bookmarks.commands.expandSelectionToPrevious.title": "Rozszerz zaznaczenie do poprzedniego",
19 | "bookmarks.commands.shrinkSelection.title": "Zmniejsz zaznaczenie",
20 | "bookmarks.commands.list.title": "Lista",
21 | "bookmarks.commands.toggleLabeled.title": "Przełącz z etykietą",
22 | "bookmarks.commands.refresh.title": "Odśwież",
23 | "bookmarks.commands.viewAsTree#sideBar.title": "Pokaż jako drzewo",
24 | "bookmarks.commands.viewAsList#sideBar.title": "Pokaż jako listę",
25 | "bookmarks.commands.openSettings.title": "Otwórz ustawienia",
26 | "bookmarks.commands.hidePosition.title": "Ukryj pozycję",
27 | "bookmarks.commands.showPosition.title": "Pokaż pozycję",
28 | "bookmarks.commands.clear.title": "Wyczyść",
29 | "bookmarks.commands.clearFromFile.title": "Wyczyść",
30 | "bookmarks.commands.deleteBookmark.title": "Usuń",
31 | "bookmarks.commands.editLabel.title": "Edytuj etykietę",
32 | "bookmarks.commands.addBookmarkAtLine#gutter.title": "Dodaj zakładkę",
33 | "bookmarks.commands.addLabeledBookmarkAtLine#gutter.title": "Dodaj zakładkę z etykietą",
34 | "bookmarks.commands.removeBookmarkAtLine#gutter.title": "Usuń zakładkę",
35 | "bookmarks.commands.listFromAllFiles.title": "Lista ze wszystkich plików",
36 | "bookmarks.commands.clearFromAllFiles.title": "Wyczyść ze wszystkich plików",
37 | "bookmarks.commands.whatsNew.title": "Co nowego",
38 | "bookmarks.commands.whatsNewContextMenu.title": "Co nowego",
39 | "bookmarks.commands.openFolderWelcome.title": "Otwórz folder",
40 | "bookmarks.commands.supportBookmarks.title": "Wsparcie dla Zakładek",
41 | "bookmarks.commands.openSideBar.title": "Otwórz pasek boczny",
42 | "bookmarks.configuration.title": "Zakładki",
43 | "bookmarks.configuration.saveBookmarksInProject.description": "Pozwala na zapisywanie (i przywracanie) zakładek lokalnie w otwartym Projekcie/Folderze zamiast w VS Code",
44 | "bookmarks.configuration.gutterIconPath.description": "Ścieżka do innego obrazu, który będzie prezentowany jako ikona Zakładki",
45 | "bookmarks.configuration.gutterIconPath.deprecation": "Zamiast tego użyj `bookmarks.gutterIconFillColor` i `bookmarks.gutterIconBorderColor`",
46 | "bookmarks.configuration.gutterIconFillColor.description": "Określa kolor wypełnienia ikony zakładki",
47 | "bookmarks.configuration.gutterIconBorderColor.description": "Określa kolor obramowania ikony zakładki",
48 | "bookmarks.configuration.backgroundLineColor.description": "Kolor tła dekoracji. Użyj rgba() i zdefiniuj przezroczyste kolory tła, aby dobrze współgrały z innymi dekoracjami. Np.: rgba(21, 126, 251, 0.1)",
49 | "bookmarks.configuration.backgroundLineColor.deprecation": "Zamiast tego użyj `bookmarks.lineBackground` w `workbench.colorCustomizations`",
50 | "bookmarks.configuration.navigateThroughAllFiles.description": "Pozwala na wyszukiwanie zakładek we wszystkich plikach w projekcie, zamiast tylko w bieżącym",
51 | "bookmarks.configuration.wrapNavigation.description": "Pozwala na nawigację do pierwszej i ostatniej zakładki w zakresie (bieżący plik lub wszystkie pliki)",
52 | "bookmarks.configuration.useWorkaroundForFormatters.description": "Używa obejścia dla formatujących, takich jak Prettier, które nie powiadamiają o zmianach w dokumencie i wprowadzają zamieszanie w zachowaniu zakładek Sticky",
53 | "bookmarks.configuration.experimental.enableNewStickyEngine.description": "Eksperymentalne. Włącza nowy silnik Sticky z wsparciem dla formatujących, ulepszoną detekcją zmian w źródłach i operacjami cofania",
54 | "bookmarks.configuration.keepBookmarksOnLineDelete.description": "Określa, czy zakładki na usuniętej linii powinny być zachowane w pliku, przenosząc je w dół do następnej linii, zamiast usuwać je wraz z linią, na której zostały przełączone.",
55 | "bookmarks.configuration.showNoMoreBookmarksWarning.description": "Określa, czy powiadomienie zostanie pokazane podczas próby nawigacji między zakładkami, gdy nie ma więcej zakładek.",
56 | "bookmarks.configuration.showCommandsInContextMenu.description": "Określa, czy polecenia Zakładek są wyświetlane w menu kontekstowym",
57 | "bookmarks.configuration.sidebar.expanded.description": "Określa, czy pasek boczny ma być wyświetlany rozwinięty",
58 | "bookmarks.configuration.sideBar.countBadge.description": "Kontroluje odznakę z liczbą na ikonie Zakładki na pasku aktywności",
59 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.all": "Pokaż sumę zakładek ze wszystkich plików",
60 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.files": "Pokaż sumę plików zawierających co najmniej jedną zakładkę",
61 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.off": "Wyłącz odznakę liczby Zakładek",
62 | "bookmarks.configuration.sidebar.hideWelcome.description": "Steruje widocznością widoków powitalnych na pasku bocznym",
63 | "bookmarks.configuration.multicursor.toggleMode.description": "Określa, jak wielokursor obsługuje już oznaczone linie zakładkami",
64 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.allLinesAtOnce": "Tworzy zakładki we wszystkich zaznaczonych liniach naraz, jeśli przynajmniej jedna z linii nie ma zakładki",
65 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.eachLineIndependently": "Dosłownie przełącza zakładkę w każdej linii, zamiast czynić wszystkie linie równymi",
66 | "bookmarks.configuration.label.suggestion.description": "Określa, jak sugerowane są etykiety podczas tworzenia zakładek",
67 | "bookmarks.configuration.label.suggestion.enumDescriptions.dontUse": "Nie używaj zaznaczenia (oryginalne zachowanie)",
68 | "bookmarks.configuration.label.suggestion.enumDescriptions.useWhenSelected": "Użyj bezpośrednio zaznaczonego tekstu (jeśli dostępny), bez wymaganej potwierdzenia",
69 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelected": "Sugeruje zaznaczony tekst (jeśli dostępny). Nadal wymagane jest potwierdzenie.",
70 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelectedOrLineWhenNoSelected": "Sugeruje zaznaczony tekst (jeśli dostępny) lub całą linię (gdy nie ma zaznaczenia). Nadal wymagane jest potwierdzenie.",
71 | "bookmarks.configuration.revealLocation.description": "Określa miejsce, w którym zostanie ujawniona zakładkowana linia",
72 | "bookmarks.configuration.revealLocation.enumDescriptions.top": "Ujawnia zakładkowaną linię na górze edytora",
73 | "bookmarks.configuration.revealLocation.enumDescriptions.center": "Ujawnia zakładkowaną linię w centrum edytora",
74 | "bookmarks.colors.lineBackground.description": "Kolor tła dla zakładkowanej linii",
75 | "bookmarks.colors.lineBorder.description": "Kolor tła dla obramowania wokół zakładkowanej linii",
76 | "bookmarks.colors.overviewRuler.description": "Kolor znacznika na linijce przeglądu dla zakładek",
77 | "bookmarks.walkthroughs.title": "Rozpocznij pracę z Zakładkami",
78 | "bookmarks.walkthroughs.description": "Dowiedz się więcej o Zakładkach, aby zoptymalizować swój przepływ pracy",
79 | "bookmarks.walkthroughs.toggle.title": "Przełączanie Zakładek",
80 | "bookmarks.walkthroughs.toggle.description": "Łatwo oznacz/odznacz Zakładki w dowolnej pozycji.\nIkona zostaje dodana zarówno do marginesu jak i linijki przeglądu, aby łatwo identyfikować linie z Zakładkami.",
81 | "bookmarks.walkthroughs.navigateToBookmarks.title": "Nawigacja do Zakładek",
82 | "bookmarks.walkthroughs.navigateToBookmarks.description": "Szybko przeskakuj między zakładkowanymi liniami.\nWyszukuj zakładki używając treści linii i/lub etykiet.",
83 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.title": "Definiuj etykiety dla swoich Zakładek",
84 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.description": "Możesz zdefiniować etykiety dla dowolnej zakładki, nadając im specjalne znaczenie inne niż ich pozycja.",
85 | "bookmarks.walkthroughs.exclusiveSideBar.title": "Ekskluzywny Pasek Boczny",
86 | "bookmarks.walkthroughs.exclusiveSideBar.description": "Ekskluzywny Pasek Boczny z wszystkim, czego potrzebujesz, aby zwiększyć swoją produktywność.\n[Otwórz Pasek Boczny](command:_bookmarks.openSideBar)",
87 | "bookmarks.walkthroughs.workingWithRemotes.title": "Praca z Zdalnymi",
88 | "bookmarks.walkthroughs.workingWithRemotes.description": "Rozszerzenie obsługuje scenariusze [Zdalnego Rozwoju](https://code.visualstudio.com/docs/remote/remote-overview). Nawet zainstalowane lokalnie, możesz używać Zakładek w WSL, Kontenerach, SSH i Codespaces.",
89 | "bookmarks.walkthroughs.customizingAppearance.title": "Dostosowywanie Wyglądu",
90 | "bookmarks.walkthroughs.customizingAppearance.description": "Dostosuj sposób prezentacji Zakładek, ich ikonę, linię i linijkę przeglądu\n[Otwórz Ustawienia - Ikona Marginesu](command:workbench.action.openSettings?%5B%22bookmarks.gutterIcon%22%5D)\n[Otwórz Ustawienia - Linia](command:workbench.action.openSettingsJson?%5B%22workbench.colorCustomizations%22%5D)"
91 | }
92 |
--------------------------------------------------------------------------------
/package.nls.tr.json:
--------------------------------------------------------------------------------
1 | {
2 | "bookmarks.activitybar.title": "Yer İşaretleri",
3 | "bookmarks.views.Explorer.name": "Tarayıcı",
4 | "bookmarks.views.HelpAndFeedback.name": "Yardım ve Geri Bildirim",
5 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenEmpty": "Yer İşaretlerini kullanmak için önce bir klasör veya çalışma alanı açmanız gerekir.\n[Klasör Aç](command:_bookmarks.openFolderWelcome)\n[Çalışma Alanı Aç](command:workbench.action.openWorkspace)\nDaha fazla bilgi edinmek için VS Code'da Yer İşaretlerinin nasıl kullanılacağı hakkında [belgeleri okuyun](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
6 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenNoFileOpen": "Henüz yer işareti yok.\nYer İşaretlerini kullanmak için düzenleyicide bir dosya açmanız gerekir.\n[Dosya Aç](command:workbench.action.quickOpen)\nYer İşaretlerini VS Code'da nasıl kullanacağınız hakkında daha fazla bilgi edinmek için [dokümanları okuyun](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
7 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenHasFileOpen": "Henüz yer işareti yok.\nYer İşaretlerini kullanmak için imleci dosyada herhangi bir konuma getirin ve şu komutu çalıştırın:\n[Yer İşaretleri: Geçiş](command:bookmarks.toggle)\nVS Code'da Yer İşaretlerinin nasıl kullanılacağı hakkında daha fazla bilgi edinmek için [belgeleri okuyun ](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
8 | "bookmarks.editor.context.label": "Yer İşaretleri",
9 | "bookmarks.editor.title.label": "Yer İşaretleri",
10 | "bookmarks.commands.category.bookmarks": "Yer İşaretleri",
11 | "bookmarks.commands.category.bookmarks.selection": "Yer İşaretleri (Seçim)",
12 | "bookmarks.commands.toggle.title": "Geçiş Yap",
13 | "bookmarks.commands.jumpToNext.title": "Sonrakine Geç",
14 | "bookmarks.commands.jumpToPrevious.title": "Öncekine Geç",
15 | "bookmarks.commands.jumpTo.title": "Dokümana/Satıra Geç",
16 | "bookmarks.commands.selectLines.title": "Satırları Seç",
17 | "bookmarks.commands.expandSelectionToNext.title": "Seçimi Sonrakine Genişlet",
18 | "bookmarks.commands.expandSelectionToPrevious.title": "Seçimi Öncekine Genişlet",
19 | "bookmarks.commands.shrinkSelection.title": "Seçimi Küçült",
20 | "bookmarks.commands.list.title": "Liste",
21 | "bookmarks.commands.toggleLabeled.title": "Etiketliyi aç/kapat",
22 | "bookmarks.commands.refresh.title": "Yenile",
23 | "bookmarks.commands.viewAsTree#sideBar.title": "Ağaç Olarak Görüntüle",
24 | "bookmarks.commands.viewAsList#sideBar.title": "Liste Olarak Görüntüle",
25 | "bookmarks.commands.openSettings.title": "Ayarları aç",
26 | "bookmarks.commands.hidePosition.title": "Konumu Gizle",
27 | "bookmarks.commands.showPosition.title": "Pozisyonu Göster",
28 | "bookmarks.commands.clear.title": "Temizle",
29 | "bookmarks.commands.clearFromFile.title": "Temizle",
30 | "bookmarks.commands.deleteBookmark.title": "Sil",
31 | "bookmarks.commands.editLabel.title": "Etiketi Düzenle",
32 | "bookmarks.commands.addBookmarkAtLine#gutter.title": "Yer İşareti Ekle",
33 | "bookmarks.commands.addLabeledBookmarkAtLine#gutter.title": "Etiketli Yer İşareti Ekle",
34 | "bookmarks.commands.removeBookmarkAtLine#gutter.title": "Yer İşaretini Kaldır",
35 | "bookmarks.commands.listFromAllFiles.title": "Tüm Dosyalardan Listele",
36 | "bookmarks.commands.clearFromAllFiles.title": "Tüm Dosyalardan Temizle",
37 | "bookmarks.commands.whatsNew.title": "Neler Yeni",
38 | "bookmarks.commands.whatsNewContextMenu.title": "Neler Yeni",
39 | "bookmarks.commands.openFolderWelcome.title": "Klasör Aç",
40 | "bookmarks.commands.supportBookmarks.title": "Yer İşaretlerini Destekle",
41 | "bookmarks.commands.openSideBar.title": "Yan Çubuğu Aç",
42 | "bookmarks.configuration.title": "Yer İşaretleri",
43 | "bookmarks.configuration.saveBookmarksInProject.description": "Yer işaretlerinin VS Code yerine Proje/Klasör içerisinde saklanmasına izin ver.",
44 | "bookmarks.configuration.gutterIconPath.description": "Yer İşareti olarak sunulacak başka bir görüntünün yolu",
45 | "bookmarks.configuration.gutterIconPath.deprecation": "Bunun yerine `bookmarks.gutterIconFillColor` ve `bookmarks.gutterIconBorderColor` kullanın",
46 | "bookmarks.configuration.gutterIconFillColor.description": "Yer işareti simgesinin dolgu rengini belirtir",
47 | "bookmarks.configuration.gutterIconBorderColor.description": "Yer işareti simgesinin kenarlık rengini belirtir",
48 | "bookmarks.configuration.backgroundLineColor.description": "Dekorasyonun arka plan rengi. Diğer dekorasyonlarla iyi uyum sağlamak için rgba() kullanın ve şeffaf arka plan renklerini tanımlayın. Ör.: rgba(21, 126, 251, 0.1)",
49 | "bookmarks.configuration.backgroundLineColor.deprecation": "Bunun yerine `workbench.colorCustomizations`da `bookmarks.lineBackground`ı kullanın",
50 | "bookmarks.configuration.navigateThroughAllFiles.description": "Yalnızca geçerli dosyalar yerine projedeki tüm dosyalarda yer işaretlerinin aranmasına izin ver",
51 | "bookmarks.configuration.wrapNavigation.description": "Gezinmenin kapsamdaki ilk ve son yer işaretlerinde (geçerli dosya veya tüm dosyalar) sarılmasına izin ver",
52 | "bookmarks.configuration.useWorkaroundForFormatters.description": "Prettier gibi formatlayıcılar için belge değişikliklerini bildirmeyen ve Bookmark'ın Yapışkan davranışını bozan bir geçici çözüm kullanın",
53 | "bookmarks.configuration.experimental.enableNewStickyEngine.description": "Deneysel. Biçimlendirici desteği, gelişmiş kaynak değişikliği algılamaları ve geri alma işlemleriyle yeni Yapışkan motorunu etkinleştirir",
54 | "bookmarks.configuration.keepBookmarksOnLineDelete.description": "Silinen satırdaki yer işaretlerinin, değiştirildiği satırla birlikte silinmek yerine bir sonraki satıra taşınarak dosyada tutulup tutulmayacağını belirtir.",
55 | "bookmarks.configuration.showNoMoreBookmarksWarning.description": "Başka yer işareti bulunmadığında yer işaretleri arasında gezinmeye çalışıldığında bir bildirimin gösterilip gösterilmeyeceğini belirtir.",
56 | "bookmarks.configuration.showCommandsInContextMenu.description": "Yer İşaretleri komutlarının içerik menüsünde görüntülenip görüntülenmeyeceğini belirtir",
57 | "bookmarks.configuration.sidebar.expanded.description": "Kenar Çubuğu gösterisinin genişletilmiş olarak görüntülenip görüntülenmeyeceğini belirtir",
58 | "bookmarks.configuration.sideBar.countBadge.description": "Etkinlik Çubuğundaki Yer İşareti simgesindeki sayım rozetini kontrol eder",
59 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.all": "Tüm dosyalardaki yer işaretlerinin toplamını göster",
60 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.files": "En az bir yer işareti içeren dosyaların toplamını göster",
61 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.off": "Yer İşaretleri sayısı rozetini devre dışı bırakın",
62 | "bookmarks.configuration.sidebar.hideWelcome.description": "Yan Çubuktaki Hoş Geldiniz Görünümlerinin görünürlüğünü kontrol eder",
63 | "bookmarks.configuration.multicursor.toggleMode.description": "Çoklu imlecin önceden işaretlenmiş satırları nasıl işleyeceğini belirtir",
64 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.allLinesAtOnce": "Satırlardan en az birinde yer işareti yoksa, seçilen tüm satırlarda aynı anda yer işaretleri oluşturur",
65 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.eachLineIndependently": "Tüm satırları eşitlemek yerine, kelimenin tam anlamıyla her satırdaki bir yer işaretini değiştirir",
66 | "bookmarks.configuration.label.suggestion.description": "Yer işaretleri oluşturulurken etiketlerin nasıl önerileceğini belirtir",
67 | "bookmarks.configuration.label.suggestion.enumDescriptions.dontUse": "Seçimi kullanmayın (orijinal davranış)",
68 | "bookmarks.configuration.label.suggestion.enumDescriptions.useWhenSelected": "Seçilen metni (varsa) doğrudan kullanın, onay gerekmez",
69 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelected": "Seçilen metni önerir (varsa). Hala onaylamanız gerekiyor.",
70 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelectedOrLineWhenNoSelected": "Seçilen metni (varsa) veya satırın tamamını (seçim olmadığında) önerir. Hala onaylamanız gerekiyor.",
71 | "bookmarks.configuration.revealLocation.description": "Yer işaretlerine eklenen satırın gösterileceği konumu belirtir",
72 | "bookmarks.configuration.revealLocation.enumDescriptions.top": "Düzenleyicinin üst kısmında yer işaretlerine eklenmiş satırı gösterir",
73 | "bookmarks.configuration.revealLocation.enumDescriptions.center": "Düzenleyicinin ortasındaki yer işaretlerine eklenmiş satırı ortaya çıkarır",
74 | "bookmarks.colors.lineBackground.description": "Yer işaretlerine eklenen satırın arka plan rengi",
75 | "bookmarks.colors.lineBorder.description": "Yer işaretlerine eklenen çizginin etrafındaki kenarlığın arka plan rengi",
76 | "bookmarks.colors.overviewRuler.description": "Yer işaretleri için cetvel işaretleyici rengine genel bakış",
77 | "bookmarks.walkthroughs.title": "Yer İşaretlerini Kullanmaya Başlayın",
78 | "bookmarks.walkthroughs.description": "İş akışınızı optimize etmek için Yer İşaretleri hakkında daha fazla bilgi edinin",
79 | "bookmarks.walkthroughs.toggle.title": "Yer Imlerinde Geçiş Yap",
80 | "bookmarks.walkthroughs.toggle.description": "Yer İşaretlerini herhangi bir konumdaki Kolayca İşaretleyin/İşaretini Kaldır.\nYer İşaretli satırları kolayca tanımlamak için hem cilt payına hem de genel bakış cetveline bir simge eklenir.",
81 | "bookmarks.walkthroughs.navigateToBookmarks.title": "Yer İşaretlerine Yönlendir",
82 | "bookmarks.walkthroughs.navigateToBookmarks.description": "Yer işaretli satırlar arasında hızla geçiş yapın.\nSatırın içeriğini ve/veya etiketlerini kullanarak yer işaretlerini arayın.",
83 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.title": "Yer işaretleriniz için etiketleri tanımlayın",
84 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.description": "Herhangi bir yer işareti için etiketleri tanımlayarak onlara konumu dışında özel bir anlam verebilirsiniz.",
85 | "bookmarks.walkthroughs.exclusiveSideBar.title": "Özel Yan Bar",
86 | "bookmarks.walkthroughs.exclusiveSideBar.description": "Üretkenliğinizi artırmak için ihtiyacınız olan her şeyi içeren özel bir Kenar Çubuğu.\n[Kenar Çubuğunu Aç](command:_bookmarks.openSideBar)",
87 | "bookmarks.walkthroughs.workingWithRemotes.title": "Uzaktan Çalışma",
88 | "bookmarks.walkthroughs.workingWithRemotes.description": "Bu eklenti [Uzaktan Geliştirme](https://code.visualstudio.com/docs/remote/remote-overview) senaryolarını destekler. Yerel olarak yüklense bile Yer İşaretlerini WSL, Konteynerler, SSH ve Kod Alanlarında (Codespaces) kullanabilirsiniz.",
89 | "bookmarks.walkthroughs.customizingAppearance.title": "Görünümü Özelleştirme",
90 | "bookmarks.walkthroughs.customizingAppearance.description": "Yer İşaretlerinin nasıl sunulacağını, simgesini, çizgisini ve genel bakış cetvelini özelleştirin\n[Ayarları Açın - Gutter İkonu](command:workbench.action.openSettings?%5B%22bookmarks.gutterIcon%22%5D)\n[Ayarları Açın - Satır](command:workbench.action.openSettingsJson?%5B%22workbench.colorCustomizations%22%5D)"
91 | }
92 |
--------------------------------------------------------------------------------
/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "bookmarks.activitybar.title": "Bookmarks",
3 | "bookmarks.views.Explorer.name": "Explorer",
4 | "bookmarks.views.HelpAndFeedback.name": "Help and Feedback",
5 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenEmpty": "In order to use Bookmarks, you have to open a folder or workspace first.\n[Open a Folder](command:_bookmarks.openFolderWelcome)\n[Open a Workspace](command:workbench.action.openWorkspace)\nTo learn more about how to use Bookmarks in VS Code [read the docs](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
6 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenNoFileOpen": "No bookmarks yet.\nIn order to use Bookmarks, you have to open a file in the editor.\n[Open a File](command:workbench.action.quickOpen)\nTo learn more about how to use Bookmarks in VS Code [read the docs](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
7 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenHasFileOpen": "No bookmarks yet.\nIn order to use Bookmarks, place the cursor in any location in the file and run the command:\n[Bookmarks: Toggle](command:bookmarks.toggle)\nTo learn more about how to use Bookmarks in VS Code [read the docs](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
8 | "bookmarks.editor.context.label": "Bookmarks",
9 | "bookmarks.editor.title.label": "Bookmarks",
10 | "bookmarks.commands.category.bookmarks": "Bookmarks",
11 | "bookmarks.commands.category.bookmarks.selection": "Bookmarks (Selection)",
12 | "bookmarks.commands.toggle.title": "Toggle",
13 | "bookmarks.commands.jumpToNext.title": "Jump to Next",
14 | "bookmarks.commands.jumpToPrevious.title": "Jump to Previous",
15 | "bookmarks.commands.jumpTo.title": "Jump to Document/Line",
16 | "bookmarks.commands.selectLines.title": "Select Lines",
17 | "bookmarks.commands.expandSelectionToNext.title": "Expand Selection to Next",
18 | "bookmarks.commands.expandSelectionToPrevious.title": "Expand Selection to Previous",
19 | "bookmarks.commands.shrinkSelection.title": "Shrink Selection",
20 | "bookmarks.commands.list.title": "List",
21 | "bookmarks.commands.toggleLabeled.title": "Toggle Labeled",
22 | "bookmarks.commands.refresh.title": "Refresh",
23 | "bookmarks.commands.viewAsTree#sideBar.title": "View as Tree",
24 | "bookmarks.commands.viewAsList#sideBar.title": "View as List",
25 | "bookmarks.commands.openSettings.title": "Open Settings",
26 | "bookmarks.commands.hidePosition.title": "Hide Position",
27 | "bookmarks.commands.showPosition.title": "Show Position",
28 | "bookmarks.commands.clear.title": "Clear",
29 | "bookmarks.commands.clearFromFile.title": "Clear",
30 | "bookmarks.commands.deleteBookmark.title": "Delete",
31 | "bookmarks.commands.editLabel.title": "Edit Label",
32 | "bookmarks.commands.addBookmarkAtLine#gutter.title": "Add Bookmark",
33 | "bookmarks.commands.addLabeledBookmarkAtLine#gutter.title": "Add Labeled Bookmark",
34 | "bookmarks.commands.removeBookmarkAtLine#gutter.title": "Remove Bookmark",
35 | "bookmarks.commands.listFromAllFiles.title": "List from All Files",
36 | "bookmarks.commands.clearFromAllFiles.title": "Clear from All Files",
37 | "bookmarks.commands.whatsNew.title": "What's New",
38 | "bookmarks.commands.whatsNewContextMenu.title": "What's New",
39 | "bookmarks.commands.openFolderWelcome.title": "Open Folder",
40 | "bookmarks.commands.supportBookmarks.title": "Support Bookmarks",
41 | "bookmarks.commands.openSideBar.title": "Open Side Bar",
42 | "bookmarks.configuration.title": "Bookmarks",
43 | "bookmarks.configuration.saveBookmarksInProject.description": "Allow bookmarks to be saved (and restored) locally in the opened Project/Folder instead of VS Code",
44 | "bookmarks.configuration.gutterIconPath.description": "Path to another image to be presented as Bookmark",
45 | "bookmarks.configuration.gutterIconPath.deprecation": "Use `bookmarks.gutterIconFillColor` and `bookmarks.gutterIconBorderColor` instead",
46 | "bookmarks.configuration.gutterIconFillColor.description": "Specifies the fill color of the bookmark icon",
47 | "bookmarks.configuration.gutterIconBorderColor.description": "Specifies the border color of the bookmark icon",
48 | "bookmarks.configuration.backgroundLineColor.description": "Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations. Ex.: rgba(21, 126, 251, 0.1)",
49 | "bookmarks.configuration.backgroundLineColor.deprecation": "Use `bookmarks.lineBackground` in `workbench.colorCustomizations` instead",
50 | "bookmarks.configuration.navigateThroughAllFiles.description": "Allow navigation look for bookmarks in all files in the project, instead of only the current",
51 | "bookmarks.configuration.wrapNavigation.description": "Allow navigation to wrap around at the first and last bookmarks in scope (current file or all files)",
52 | "bookmarks.configuration.useWorkaroundForFormatters.description": "Use a workaround for formatters like Prettier, which does not notify on document changes and messes Bookmark's Sticky behavior",
53 | "bookmarks.configuration.experimental.enableNewStickyEngine.description": "Experimental. Enables the new Sticky engine with support for Formatters, improved source change detections and undo operations",
54 | "bookmarks.configuration.keepBookmarksOnLineDelete.description": "Specifies whether bookmarks on deleted line should be kept on file, moving it down to the next line, instead of deleting it with the line where it was toggled.",
55 | "bookmarks.configuration.showNoMoreBookmarksWarning.description": "Specifies whether a notification will be shown when attempting to navigate between bookmarks when no more exist.",
56 | "bookmarks.configuration.showCommandsInContextMenu.description": "Specifies whether Bookmarks commands are displayed on the context menu",
57 | "bookmarks.configuration.sidebar.expanded.description": "Specifies whether the Side Bar show be displayed expanded",
58 | "bookmarks.configuration.sideBar.countBadge.description": "Controls the count badge on the Bookmark icon on the Activity Bar",
59 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.all": "Show the sum of bookmarks from all files",
60 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.files": "Show the sum of files that contains at least one bookmark",
61 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.off": "Disable the Bookmarks count badge",
62 | "bookmarks.configuration.sidebar.hideWelcome.description": "Controls the visibility of the Welcome Views in the Side Bar",
63 | "bookmarks.configuration.multicursor.toggleMode.description": "Specifies how multi cursor handles already bookmarked lines",
64 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.allLinesAtOnce": "Creates bookmarks in all selected lines at once, if at least one of the lines don't have a bookmark",
65 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.eachLineIndependently": "Literally toggles a bookmark in each line, instead of making all lines equal",
66 | "bookmarks.configuration.label.suggestion.description": "Specifies how labels are suggested when creating bookmarks",
67 | "bookmarks.configuration.label.suggestion.enumDescriptions.dontUse": "Don't use the selection (original behavior)",
68 | "bookmarks.configuration.label.suggestion.enumDescriptions.useWhenSelected": "Use the selected text (if available) directly, no confirmation required",
69 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelected": "Suggests the selected text (if available). You still need to confirm.",
70 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelectedOrLineWhenNoSelected": "Suggests the selected text (if available) or the entire line (when has no selection). You still need to confirm.",
71 | "bookmarks.configuration.revealLocation.description": "Specifies the location where the bookmarked line will be revealed",
72 | "bookmarks.configuration.revealLocation.enumDescriptions.top": "Reveals the bookmarked line at the top of the editor",
73 | "bookmarks.configuration.revealLocation.enumDescriptions.center": "Reveals the bookmarked line in the center of the editor",
74 | "bookmarks.configuration.overviewRulerLane.description": "Specifies the lane in the overview ruler where the bookmarked line will be shown",
75 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.none": "Don't show the bookmarked line in the overview ruler",
76 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.left": "Show the bookmarked line in the left lane of the overview ruler",
77 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.center": "Show the bookmarked line in the center lane of the overview ruler",
78 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.right": "Show the bookmarked line in the right lane of the overview ruler",
79 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.full": "Show the bookmarked line in the full height of the overview ruler",
80 | "bookmarks.colors.lineBackground.description": "Background color for the bookmarked line",
81 | "bookmarks.colors.lineBorder.description": "Background color for the border around the bookmarked line",
82 | "bookmarks.colors.overviewRuler.description": "Overview ruler marker color for bookmarks",
83 | "bookmarks.walkthroughs.title": "Get Started with Bookmarks",
84 | "bookmarks.walkthroughs.description": "Learn more about Bookmarks to optimize your workflow",
85 | "bookmarks.walkthroughs.toggle.title": "Toggle Bookmarks",
86 | "bookmarks.walkthroughs.toggle.description": "Easily Mark/Unmark Bookmarks at any position.\nAn icon is added to both the gutter and overview ruler to easily identify the lines with Bookmarks.",
87 | "bookmarks.walkthroughs.navigateToBookmarks.title": "Navigate to Bookmarks",
88 | "bookmarks.walkthroughs.navigateToBookmarks.description": "Quickly jump between bookmarked lines.\nSearch bookmarks using the line's content and/or labels.",
89 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.title": "Define labels for your bookmarks",
90 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.description": "You can define labels for any bookmark, giving them an special meaning other than its position.",
91 | "bookmarks.walkthroughs.exclusiveSideBar.title": "Exclusive Side Bar",
92 | "bookmarks.walkthroughs.exclusiveSideBar.description": "An exclusive Side Bar with everything you need to increase your productivity.\n[Open Side Bar](command:_bookmarks.openSideBar)",
93 | "bookmarks.walkthroughs.workingWithRemotes.title": "Working with Remotes",
94 | "bookmarks.walkthroughs.workingWithRemotes.description": "The extension support [Remote Development](https://code.visualstudio.com/docs/remote/remote-overview) scenarios. Even installed locally, you can use Bookmarks in WSL, Containers, SSH and Codespaces.",
95 | "bookmarks.walkthroughs.customizingAppearance.title": "Customizing Appearance",
96 | "bookmarks.walkthroughs.customizingAppearance.description": "Customize how Bookmarks are presented, its icon, line and overview ruler\n[Open Settings - Gutter Icon](command:workbench.action.openSettings?%5B%22bookmarks.gutterIcon%22%5D)\n[Open Settings - Line](command:workbench.action.openSettingsJson?%5B%22workbench.colorCustomizations%22%5D)"
97 | }
--------------------------------------------------------------------------------
/package.nls.fa.json:
--------------------------------------------------------------------------------
1 | {
2 | "bookmarks.activitybar.title": "بوکمارک",
3 | "bookmarks.views.Explorer.name": "مرورگر",
4 | "bookmarks.views.HelpAndFeedback.name": "راهنما و بازخورد",
5 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenEmpty": "برای استفاده از بوکمارک، ابتدا باید یک پوشه یا فضای کاری باز کنید.\n[باز کردن پوشه](command:_bookmarks.openFolderWelcome)\n[باز کردن فضای کاری](command:workbench.action.openWorkspace)\nبرای یادگیری بیشتر درباره استفاده از بوکمارک در VS Code [مستندات را بخوانید](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
6 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenNoFileOpen": "هنوز هیچ بوکمارکی وجود ندارد.\nبرای استفاده از بوکمارک، باید یک فایل در ادیتور باز کنید.\n[باز کردن فایل](command:workbench.action.quickOpen)\nبرای یادگیری بیشتر درباره استفاده از بوکمارک در VS Code [مستندات را بخوانید](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
7 | "bookmarks.viewsWelcome.bookmarksExplorer.contents.whenHasFileOpen": "هنوز هیچ بوکمارکی وجود ندارد.\nبرای استفاده از بوکمارک، مکاننما را در هر جای فایل قرار داده و دستور زیر را اجرا کنید:\n[Bookmarks: تغییر وضعیت](command:bookmarks.toggle)\nبرای یادگیری بیشتر درباره استفاده از بوکمارک در VS Code [مستندات را بخوانید](http://github.com/alefragnani/vscode-bookmarks/#bookmarks).",
8 | "bookmarks.editor.context.label": "بوکمارک",
9 | "bookmarks.editor.title.label": "بوکمارک",
10 | "bookmarks.commands.category.bookmarks": "بوکمارک",
11 | "bookmarks.commands.category.bookmarks.selection": "بوکمارک (انتخاب)",
12 | "bookmarks.commands.toggle.title": "تغییر وضعیت",
13 | "bookmarks.commands.jumpToNext.title": "پرش به بعدی",
14 | "bookmarks.commands.jumpToPrevious.title": "پرش به قبلی",
15 | "bookmarks.commands.jumpTo.title": "پرش به سند/خط",
16 | "bookmarks.commands.selectLines.title": "انتخاب خطوط",
17 | "bookmarks.commands.expandSelectionToNext.title": "گسترش انتخاب به بعدی",
18 | "bookmarks.commands.expandSelectionToPrevious.title": "گسترش انتخاب به قبلی",
19 | "bookmarks.commands.shrinkSelection.title": "کوچککردن انتخاب",
20 | "bookmarks.commands.list.title": "فهرست",
21 | "bookmarks.commands.toggleLabeled.title": "تغییر وضعیت برچسبدار",
22 | "bookmarks.commands.refresh.title": "بازآوری",
23 | "bookmarks.commands.viewAsTree#sideBar.title": "نمایش به صورت درخت",
24 | "bookmarks.commands.viewAsList#sideBar.title": "نمایش به صورت فهرست",
25 | "bookmarks.commands.openSettings.title": "باز کردن تنظیمات",
26 | "bookmarks.commands.hidePosition.title": "مخفی کردن موقعیت",
27 | "bookmarks.commands.showPosition.title": "نمایش موقعیت",
28 | "bookmarks.commands.clear.title": "پاککردن",
29 | "bookmarks.commands.clearFromFile.title": "پاککردن",
30 | "bookmarks.commands.deleteBookmark.title": "حذف",
31 | "bookmarks.commands.editLabel.title": "ویرایش برچسب",
32 | "bookmarks.commands.addBookmarkAtLine#gutter.title": "افزودن بوکمارک",
33 | "bookmarks.commands.addLabeledBookmarkAtLine#gutter.title": "افزودن بوکمارک برچسبدار",
34 | "bookmarks.commands.removeBookmarkAtLine#gutter.title": "حذف بوکمارک",
35 | "bookmarks.commands.listFromAllFiles.title": "فهرست از همه فایلها",
36 | "bookmarks.commands.clearFromAllFiles.title": "پاککردن از همه فایلها",
37 | "bookmarks.commands.whatsNew.title": "قالبیت های جدید",
38 | "bookmarks.commands.whatsNewContextMenu.title": "قالبیت های جدید چیست؟",
39 | "bookmarks.commands.openFolderWelcome.title": "باز کردن پوشه",
40 | "bookmarks.commands.supportBookmarks.title": "پشتیبانی از Bookmarks",
41 | "bookmarks.commands.openSideBar.title": "باز کردن ستون فرعی",
42 | "bookmarks.configuration.title": "بوکمارک",
43 | "bookmarks.configuration.saveBookmarksInProject.description": "اجازه دهید بوکمارک به صورت محلی در پروژه/پوشه باز شده ذخیره (و بازیابی) شوند به جای VS Code",
44 | "bookmarks.configuration.gutterIconPath.description": "مسیر یک تصویر دیگر برای نمایش به عنوان بوکمارک",
45 | "bookmarks.configuration.gutterIconPath.deprecation": "به جای آن از `bookmarks.gutterIconFillColor` و `bookmarks.gutterIconBorderColor` استفاده کنید",
46 | "bookmarks.configuration.gutterIconFillColor.description": "رنگ داخلی آیکون بوکمارک را مشخص میکند",
47 | "bookmarks.configuration.gutterIconBorderColor.description": "رنگ حاشیه آیکون بوکمارک را مشخص میکند",
48 | "bookmarks.configuration.backgroundLineColor.description": "رنگ پسزمینه برای تزیین. از rgba() استفاده کنید و رنگهای شفاف را انتخاب کنید تا با سایر تزیینها هماهنگ باشد. مثل: rgba(21, 126, 251, 0.1)",
49 | "bookmarks.configuration.backgroundLineColor.deprecation": "به جای آن از `bookmarks.lineBackground` در `workbench.colorCustomizations` استفاده کنید",
50 | "bookmarks.configuration.navigateThroughAllFiles.description": "اجازه دهید ناوبری، بوکمارک را در همه فایلهای پروژه جستجو کند به جای فقط فایل فعلی",
51 | "bookmarks.configuration.wrapNavigation.description": "اجازه دهید ناوبری در اولین و آخرین بوکمارک در محدوده (فایل فعلی یا همه فایلها) بچرخد",
52 | "bookmarks.configuration.useWorkaroundForFormatters.description": "از یک راهحل جایگزین برای فرمتکنندههایی مثل Prettier استفاده کنید، که تغییرات سند را اطلاع نمیدهند و رفتار چسبنده بوکمارک را خراب میکنند",
53 | "bookmarks.configuration.experimental.enableNewStickyEngine.description": "آزمایشی. موتور چسبنده جدید با پشتیبانی از فرمتکنندهها، بهبود در تشخیص تغییرات منبع و عملیات بازگردانی را فعال میکند",
54 | "bookmarks.configuration.keepBookmarksOnLineDelete.description": "مشخص میکند که آیا بوکمارک در خطوط حذفشده باید در فایل نگه داشته شوند (و به خط بعدی منتقل شوند) یا همراه خط حذف شوند",
55 | "bookmarks.configuration.showNoMoreBookmarksWarning.description": "مشخص میکند که آیا هنگام تلاش برای ناوبری بین بوکمارک وقتی هیچ بوکمارک دیگری وجود ندارد، هشدار نمایش داده شود یا نه",
56 | "bookmarks.configuration.showCommandsInContextMenu.description": "مشخص میکند که آیا دستورات بوکمارک در منوی زمینه نمایش داده شوند یا نه",
57 | "bookmarks.configuration.sidebar.expanded.description": "مشخص میکند که آیا ستون فرعی به صورت باز نمایش داده شود",
58 | "bookmarks.configuration.sideBar.countBadge.description": "کنترل نشان تعداد روی آیکون بوکمارک در نوار فعالیت",
59 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.all": "مجموع بوکمارک از همه فایلها را نمایش بده",
60 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.files": "مجموع فایلهایی که بوکمارک دارند را نمایش بده",
61 | "bookmarks.configuration.sideBar.countBadge.enumDescriptions.off": "نمایش تعداد بوکمارک را غیرفعال کن",
62 | "bookmarks.configuration.sidebar.hideWelcome.description": "نمایش یا پنهان کردن صفحه خوشامد در ستون فرعی را کنترل میکند",
63 | "bookmarks.configuration.multicursor.toggleMode.description": "مشخص میکند که بوکمارکگذاری چند مکاننما چگونه خطوط بوکمارکدار را مدیریت کند",
64 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.allLinesAtOnce": "در همه خطوط انتخابشده بهطور همزمان بوکمارک ایجاد میکند اگر دستکم یکی از خطوط بوکمارک نداشته باشد",
65 | "bookmarks.configuration.multicursor.toggleMode.enumDescriptions.eachLineIndependently": "بهطور مستقل در هر خط یک بوکمارک تغییر وضعیت میدهد بهجای یکسانسازی همه خطوط",
66 | "bookmarks.configuration.label.suggestion.description": "مشخص میکند هنگام ایجاد بوکمارک، برچسبها چگونه پیشنهاد شوند",
67 | "bookmarks.configuration.label.suggestion.enumDescriptions.dontUse": "از انتخاب استفاده نکن (رفتار اصلی)",
68 | "bookmarks.configuration.label.suggestion.enumDescriptions.useWhenSelected": "از متن انتخابشده (اگر موجود بود) مستقیم استفاده کن، بدون نیاز به تأیید",
69 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelected": "متن انتخابشده (اگر موجود بود) را پیشنهاد میدهد. هنوز باید تأیید کنید.",
70 | "bookmarks.configuration.label.suggestion.enumDescriptions.suggestWhenSelectedOrLineWhenNoSelected": "متن انتخابشده (اگر موجود بود) یا کل خط (وقتی انتخابی وجود ندارد) را پیشنهاد میدهد. هنوز باید تأیید کنید.",
71 | "bookmarks.configuration.revealLocation.description": "مشخص میکند که بوکمارک بوکمارکگذاریشده کجا در ادیتور نمایش داده شود",
72 | "bookmarks.configuration.revealLocation.enumDescriptions.top": "بوکمارک بوکمارکگذاریشده در بالای ادیتور نمایش داده شود",
73 | "bookmarks.configuration.revealLocation.enumDescriptions.center": "بوکمارک بوکمارکگذاریشده در مرکز ادیتور نمایش داده شود",
74 | "bookmarks.configuration.overviewRulerLane.description": "مشخص میکند بوکمارک در کدام بخش خطکش نمای کلی نمایش داده شوند",
75 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.none": "بوکمارک بوکمارکگذاریشده را در خطکش نمای کلی نشان نده",
76 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.left": "بوکمارک بوکمارکگذاریشده را در بخش چپ خطکش نمای کلی نشان بده",
77 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.center": "بوکمارک بوکمارکگذاریشده را در بخش مرکزی خطکش نمای کلی نشان بده",
78 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.right": "بوکمارک بوکمارکگذاریشده را در بخش راست خطکش نمای کلی نشان بده",
79 | "bookmarks.configuration.overviewRulerLane.enumDescriptions.full": "بوکمارک بوکمارکگذاریشده را در کل ارتفاع خطکش نمای کلی نشان بده",
80 | "bookmarks.colors.lineBackground.description": "رنگ پسزمینه برای بوکمارک بوکمارکگذاریشده",
81 | "bookmarks.colors.lineBorder.description": "رنگ حاشیه برای بوکمارک بوکمارکگذاریشده",
82 | "bookmarks.colors.overviewRuler.description": "رنگ نشانگر خطکش نمای کلی برای بوکمارک",
83 | "bookmarks.walkthroughs.title": "شروع به کار با بوکمارک",
84 | "bookmarks.walkthroughs.description": "درباره بوکمارک بیشتر یاد بگیرید تا جریان کاری خود را بهینه کنید",
85 | "bookmarks.walkthroughs.toggle.title": "تغییر وضعیت بوکمارک",
86 | "bookmarks.walkthroughs.toggle.description": "بهآسانی بوکمارک را در هر مکانی علامتگذاری/لغو کنید.\nیک آیکون به هر دو بخش کناری و خطکش نمای کلی افزوده میشود تا بوکمارک بوکمارکگذاریشده بهآسانی شناسایی شوند.",
87 | "bookmarks.walkthroughs.navigateToBookmarks.title": "رفتن به بوکمارک",
88 | "bookmarks.walkthroughs.navigateToBookmarks.description": "بهسرعت بین بوکمارک بوکمارکگذاریشده جابهجا شوید.\nبوکمارک را بر اساس محتوای خط و/یا برچسبها جستجو کنید.",
89 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.title": "تعریف برچسبها برای بوکمارکی شما",
90 | "bookmarks.walkthroughs.defineLabelsForYourBookmarks.description": "میتوانید برای هر بوکمارک برچسبی تعریف کنید تا معنای خاصی فراتر از موقعیت آن داشته باشد.",
91 | "bookmarks.walkthroughs.exclusiveSideBar.title": "ستون فرعی اختصاصی",
92 | "bookmarks.walkthroughs.exclusiveSideBar.description": "یک ستون فرعی اختصاصی با همه ابزارهایی که برای افزایش بهرهوری نیاز دارید.\n[باز کردن ستون فرعی](command:_bookmarks.openSideBar)",
93 | "bookmarks.walkthroughs.workingWithRemotes.title": "کار با محیط ریموت",
94 | "bookmarks.walkthroughs.workingWithRemotes.description": "این افزونه از سناریوهای [توسعه راهدور](https://code.visualstudio.com/docs/remote/remote-overview) پشتیبانی میکند. حتی اگر محلی نصب شده باشد، میتوانید بوکمارک را در WSL، کانتینرها، SSH و فضا برنامه نویسی استفاده کنید.",
95 | "bookmarks.walkthroughs.customizingAppearance.title": "شخصی سازی ظاهر",
96 | "bookmarks.walkthroughs.customizingAppearance.description": "شخصی سازی کنید که بوکمارک چگونه نمایش داده شوند: آیکون، خط و خطکش نمای کلی\n[باز کردن تنظیمات - آیکون کناری](command:workbench.action.openSettings?%5B%22bookmarks.gutterIcon%22%5D)\n[باز کردن تنظیمات - خط](command:workbench.action.openSettingsJson?%5B%22workbench.colorCustomizations%22%5D)"
97 | }
98 |
--------------------------------------------------------------------------------
/src/sticky/stickyLegacy.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Castellant Guillaume & Alessandro Fragnani. All rights reserved.
3 | * Licensed under the GPLv3 License. See License.md in the project root for license information.
4 | *
5 | * Original Author: Castellant Guillaume (@Terminux),
6 | * (https://github.com/alefragnani/vscode-bookmarks/pull/20)
7 | *--------------------------------------------------------------------------------------------*/
8 |
9 | import * as vscode from "vscode";
10 | import { Controller } from "../core/controller";
11 | import { File } from "../core/file";
12 | import { indexOfBookmark } from "../core/operations";
13 |
14 | export class Sticky {
15 |
16 | public static stickyBookmarks(event: vscode.TextDocumentChangeEvent,
17 | activeEditorCountLine: number, activeBookmark: File,
18 | activeEditor: vscode.TextEditor, controller: Controller): boolean {
19 |
20 | let diffLine: number;
21 | let updatedBookmark = false;
22 |
23 | // fix autoTrimWhitespace
24 | if (this.HadOnlyOneValidContentChange(event)) {
25 | // add or delete line case
26 | if (event.document.lineCount !== activeEditorCountLine) {
27 | if (event.document.lineCount > activeEditorCountLine) {
28 | diffLine = event.document.lineCount - activeEditorCountLine;
29 | } else if (event.document.lineCount < activeEditorCountLine) {
30 | diffLine = activeEditorCountLine - event.document.lineCount;
31 | diffLine = 0 - diffLine;
32 |
33 | // one line up
34 | if (event.contentChanges[ 0 ].range.end.line - event.contentChanges[ 0 ].range.start.line === 1) {
35 |
36 | if ((event.contentChanges[ 0 ].range.end.character === 0) &&
37 | (event.contentChanges[ 0 ].range.start.character === 0)) {
38 | // the bookmarked one
39 | const idxbk = indexOfBookmark(activeBookmark, event.contentChanges[ 0 ].range.start.line); // bookmarks.indexOf({line: event.contentChanges[ 0 ].range.start.line});
40 | if (idxbk > -1) {
41 | controller.removeBookmark(idxbk, event.contentChanges[ 0 ].range.start.line);
42 | }
43 | }
44 | }
45 |
46 | if (event.contentChanges[ 0 ].range.end.line - event.contentChanges[ 0 ].range.start.line > 1) {
47 | for (let i = event.contentChanges[ 0 ].range.start.line/* + 1*/; i <= event.contentChanges[ 0 ].range.end.line; i++) {
48 | const index = indexOfBookmark(activeBookmark, i); // bookmarks.indexOf({line: i});
49 |
50 | if (index > -1) {
51 | controller.removeBookmark(index, i);
52 | updatedBookmark = true;
53 | }
54 | }
55 | }
56 | }
57 |
58 | for (let index = 0; index < activeBookmark.bookmarks.length; index++) {
59 | const eventLine: number = event.contentChanges[ 0 ].range.start.line;
60 | let eventcharacter: number = event.contentChanges[ 0 ].range.start.character;
61 |
62 | // indent ?
63 | if (eventcharacter > 0) {
64 | let textInEventLine = activeEditor.document.lineAt(eventLine).text;
65 | textInEventLine = textInEventLine.replace(/\t/g, "").replace(/\s/g, "");
66 | if (textInEventLine === "") {
67 | eventcharacter = 0;
68 | }
69 | }
70 |
71 | // also =
72 | if (
73 | ((activeBookmark.bookmarks[ index ].line > eventLine) && (eventcharacter > 0)) ||
74 | ((activeBookmark.bookmarks[ index ].line >= eventLine) && (eventcharacter === 0))
75 | ) {
76 | let newLine = activeBookmark.bookmarks[ index ].line + diffLine;
77 | if (newLine < 0) {
78 | newLine = 0;
79 | }
80 |
81 | controller.updateBookmark(index, activeBookmark.bookmarks[index].line, newLine);
82 | updatedBookmark = true;
83 | }
84 | }
85 | }
86 |
87 | // paste case
88 | if (!updatedBookmark && (event.contentChanges[ 0 ].text.length > 1)) {
89 | const selection = vscode.window.activeTextEditor.selection;
90 | const lineRange = [ selection.start.line, selection.end.line ];
91 | let lineMin = Math.min.apply(this, lineRange);
92 | let lineMax = Math.max.apply(this, lineRange);
93 |
94 | if (selection.start.character > 0) {
95 | lineMin++;
96 | }
97 |
98 | if (selection.end.character < vscode.window.activeTextEditor.document.lineAt(selection.end).range.end.character) {
99 | lineMax--;
100 | }
101 |
102 | if (lineMin <= lineMax) {
103 | for (let i = lineMin; i <= lineMax; i++) {
104 | const index = indexOfBookmark(activeBookmark, i); // bookmarks.indexOf({line: i});
105 | if (index > -1) {
106 | controller.removeBookmark(index, i);
107 | updatedBookmark = true;
108 | }
109 | }
110 | }
111 | }
112 | } else {
113 | // Remove ident changes. Empty text decrease and only spaces increase
114 | const moveChanges = event.contentChanges.filter(c => !(c.range.start.line === c.range.end.line && /^[\t ]*$/.test(c.text)));
115 |
116 | if (moveChanges.length === 2) {
117 | // move line up and move line down case
118 | if (activeEditor.selections.length === 1) {
119 | if (moveChanges[ 0 ].text === "") {
120 | updatedBookmark = this.moveStickyBookmarks("down", activeBookmark, activeEditor, controller);
121 | } else if (moveChanges[ 1 ].text === "") {
122 | updatedBookmark = this.moveStickyBookmarks("up", activeBookmark, activeEditor, controller);
123 | }
124 | }
125 | }
126 | }
127 |
128 | return updatedBookmark;
129 | }
130 |
131 | public static moveStickyBookmarks(direction: string, activeBookmark: File, activeEditor: vscode.TextEditor, controller: Controller): boolean {
132 | let diffChange = -1;
133 | let updatedBookmark = false;
134 | let diffLine;
135 | const selection = activeEditor.selection;
136 | let lineRange = [selection.start.line, selection.end.line];
137 | const lineMin = Math.min.apply(this, lineRange);
138 | let lineMax = Math.max.apply(this, lineRange);
139 |
140 | if (selection.end.character === 0 && !selection.isSingleLine) {
141 | // const lineAt = activeEditor.document.lineAt(selection.end.line);
142 | // const posMin = new vscode.Position(selection.start.line + 1, selection.start.character);
143 | // const posMax = new vscode.Position(selection.end.line, lineAt.range.end.character);
144 | // vscode.window.activeTextEditor.selection = new vscode.Selection(posMin, posMax);
145 | lineMax--;
146 | }
147 |
148 | if (direction === "up") {
149 | diffLine = 1;
150 |
151 | const index = indexOfBookmark(activeBookmark, lineMin - 1);
152 | if (index > -1) {
153 | diffChange = lineMax;
154 | controller.removeBookmark(index, lineMin - 1);
155 | updatedBookmark = true;
156 | }
157 | } else if (direction === "down") {
158 | diffLine = -1;
159 |
160 | const index: number = indexOfBookmark(activeBookmark, lineMax + 1);
161 | if (index > -1) {
162 | diffChange = lineMin;
163 | controller.removeBookmark(index, lineMax + 1);
164 | updatedBookmark = true;
165 | }
166 | }
167 |
168 | lineRange = [];
169 | for (let i = lineMin; i <= lineMax; i++) {
170 | lineRange.push(i);
171 | }
172 | lineRange = lineRange.sort();
173 | if (diffLine < 0) {
174 | lineRange = lineRange.reverse();
175 | }
176 |
177 | // tslint:disable-next-line: forin
178 | for (const i in lineRange) {
179 | const index = indexOfBookmark(activeBookmark, lineRange[i]);
180 | if (index > -1) {
181 | controller.updateBookmark(index, lineRange[i],
182 | activeBookmark.bookmarks[index].line - diffLine);
183 | updatedBookmark = true;
184 | }
185 | }
186 |
187 | if (diffChange > -1) {
188 | controller.addBookmark(new vscode.Position(diffChange, 1)); // ?? recover correct column (removed bookmark)
189 | updatedBookmark = true;
190 | }
191 |
192 | return updatedBookmark;
193 | }
194 |
195 | private static HadOnlyOneValidContentChange(event): boolean {
196 |
197 | // not valid
198 | if ((event.contentChanges.length > 2) || (event.contentChanges.length === 0)) {
199 | return false;
200 | }
201 |
202 | // normal behavior - only 1
203 | if (event.contentChanges.length === 1) {
204 | return true;
205 | } else { // has 2, but is it a trimAutoWhitespace issue?
206 | if (event.contentChanges.length === 2) {
207 | const trimAutoWhitespace: boolean = vscode.workspace.getConfiguration("editor", null).get("trimAutoWhitespace", true);
208 | if (!trimAutoWhitespace) {
209 | return false;
210 | }
211 |
212 | // check if the first range is 'equal' and if the second is 'empty'
213 | const fistRangeEquals: boolean =
214 | (event.contentChanges[ 0 ].range.start.character === event.contentChanges[ 0 ].range.end.character) &&
215 | (event.contentChanges[ 0 ].range.start.line === event.contentChanges[ 0 ].range.end.line);
216 |
217 | const secondRangeEmpty: boolean = (event.contentChanges[ 1 ].text === "") &&
218 | (event.contentChanges[ 1 ].range.start.line === event.contentChanges[ 1 ].range.end.line) &&
219 | (event.contentChanges[ 1 ].range.start.character === 0) &&
220 | (event.contentChanges[ 1 ].range.end.character > 0);
221 |
222 | return fistRangeEquals && secondRangeEmpty;
223 | }
224 | }
225 | }
226 | }
--------------------------------------------------------------------------------