سؤال

هل هناك طريقة لتعيين Sublime Text كمحرر النصوص الافتراضي لتنسيقات الملفات على نظام التشغيل Windows 7؟

أيضًا، إذا كان أي شخص يعرف برنامجًا تعليميًا لنص Sublime أو Wiki، فسيكون ذلك مفيدًا حقًا.

هل كانت مفيدة؟

المحلول

في الواقع ليس هذا جوابي، لقد فقط بحثت في جوجل عنه:

  1. فتح رجديت (يفوز+ر, ، اكتب "رجديت"، حدد موافق).
  2. انتقل إلى HKEY_CLASSES_ROOT\Applications\sublime_text.exe\shell\open\command
  3. التأكد من دقة المسار، وتصحيحه إذا لم يكن كذلك.الخروج من رجديت.
  4. افتح مدير المهام عبر كنترول+بديل+ديل (أو كنترول+يحول+خروج للإصدارات الأحدث من Windows)، قم بإيقاف Explorer.exe، وانتقل إلى التشغيل (يفوز+ر) واكتب "explorer.exe" (أو قم بتخطي هذه الخطوة وأعد التشغيل ببساطة).
  5. الآن حاول نفس الشيء، انقر بزر الماوس الأيمن فوق ملف نصي، وافتح باستخدام، وانتقل إلى Sublime، ويجب أن يظهر الآن في قائمة التطبيقات المتاحة.

بالنسبة لي، أشارت هذه القيمة إلى سطح المكتب حيث تم وضع النسخة المحمولة مسبقًا.وبالتالي لم ينجح الأمر.

ملاحظة.وبالنسبة لي لم تكن إعادة التشغيل أو تسجيل الخروج ضرورية (WinXP).

نصائح أخرى

تحرير في 21 نوفمبر 2014

href="https://stackoverflow.com/users/67865/tim-lewis"> تيم لويس أشار في التعليق أن هناك نسخة عامة أكثر في http://www.binaryfortress.com/notepadreplacer/ ، والذي يعمل بشكل أفضل.

الإجابة الأصلية

جرب هذا: https://github.com/grumpydev/sublime-notepad-replacement

هنا هي بعض الطرق لربط النص الأسمي المحمولة.يحتاج النص التالي إلى حفظ كملف مع ملحق .reg ثم في هذا الملف مرفق النقر بزر الماوس الأيمن> دمج.

سيضيف ذلك إدخال قائمة انقر بزر الماوس الأيمن فوق جميع الملفات: giveacodicetagpre.

سيكون لهذا نص سامي استبدل جميع المكالمات إلى notepad.exe: giveacodicetagpre.

سيؤدي ذلك إلى إنشاء فئة سامية يمكنك ربطها بعد ذلك بأي امتداد. giveacodicetagpre.

سيقوم بعد ذلك بربط تمديد .EXT مع SublemImeFile: giveacodicetagpre.

1: يمكنك أيضا تعيين الجمعيات الخاصة بك في لوحة التحكم :

لوحة التحكم> الافتراضيالبرامج > ربط ملف أو بروتوكول مع برنامج معين:

أدخل وصف الصورة هنا

2: أو، اتصل به من التعليمات البرمجية عبر IAPPlicationAcesociationRegistrationui :: LaunchAdvancedAcessociabivionui ؛) giveacodicetagpre.

You can just run CCleaner's registry cleaner tool and then choose and add the default program as usual. It worked for me when upgrading from ST2 to ST3.

Open context menu on file with desired extension in Explorer, than select Open with->You editor ( may be you need to browse for its binary before it appears in the list of available programs ) and set checkbox "Always use the selected program to open this kind of file".

I tried all options to make sublime text 3 as the default program for my .php, .css and/or .js files I don't exactly know why it all failed, I think it is related to windows 10 current version bug

But the good news is there is some working way for me, also for those who love CMD

  1. open CMD as administrator
  2. run this line: FTYPE sublime="C:\Program Files\Sublime Text 3\sublime_text.exe" "%1"
  3. for .php files use this command: ASSOC .php=sublime for js use this: ASSOC .js=sublime and so on...

Try this,

@echo off

SET st2Path=C:\Program Files\Sublime Text 2\sublime_text.exe

rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2"         /t REG_SZ /v "" /d "Open with Sublime Text 2"   /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2"         /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f

rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2"         /t REG_SZ /v "" /d "Open with Sublime Text 2"   /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2"         /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f

pause

I tested this for SublimeText 3(Portable) also and working fine. Create a .bat file with the above code and run it as administrator.

Reference : https://gist.github.com/mrchief/5628677

I was facing the same problem. the only solution was correct it manually --> open regedit and navigate to Computer\HKEY_CLASSES_ROOT\Applications\, find the sublime_text.exe entry, and delete it. You should now be able to set Sublime Text 3 as the default editor for anything you want.

i found this solution in this post:https://forum.sublimetext.com/t/cant-make-default-editor-in-windows/10747/14

If you are using the portable version, you can't set Sublime as the default program for any files because Windows won't acknowledge it as a program that can open things.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top