Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Ability to turn on by default based on file extensions #4

Open
erichiller opened this issue Nov 14, 2015 · 5 comments
Open

Comments

@erichiller
Copy link

Awesome extension! I looked forever for something like this for far once again you delivered! It would be great to have the ability to turn on by default based on file extensions

@Maximus5
Copy link
Owner

What plugin?

@erichiller
Copy link
Author

Sorry about that, didn't realize it wasn't it's own repo -- EditWrap -- replaced autowrap.

@Maximus5
Copy link
Owner

You may create a macro. I believe it's a proper way.

@erichiller
Copy link
Author

Do you recommend any sample Macros to take a look at so I can get a handle at how far uses lua? I can't find many english docs.

@Maximus5
Copy link
Owner

Check for %FARHOME%\Encyclopedia\macroapi_manual.en.chm.

Macro
{
  description="Edit and auto-soft-wrap";
  area="Shell Search";
  key="F4";
  condition=function() return APanel.FilePanel end;
action=function()
  Keys(akey(1,1))
  if Area.Editor then
    if mf.fmatch(mf.fsplit(Editor.FileName,12), "*.md|*.html") == 1 then
      -- Toggle word wrap.
      -- Command ID (2) is the same as hotkey in the plugin menu
      Plugin.Call("580F7F4F-7E64-4367-84C1-5A6EB66DAB1F",2)
    end
  end
end;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants